diff --git a/installer/AMXXRelease/AMXXRelease.exe b/installer/AMXXRelease/AMXXRelease.exe index c8d98224..cf41e6a9 100755 Binary files a/installer/AMXXRelease/AMXXRelease.exe and b/installer/AMXXRelease/AMXXRelease.exe differ diff --git a/installer/AMXXRelease/LinuxBuilder.cs b/installer/AMXXRelease/LinuxBuilder.cs index 64879408..bf14220d 100755 --- a/installer/AMXXRelease/LinuxBuilder.cs +++ b/installer/AMXXRelease/LinuxBuilder.cs @@ -40,9 +40,9 @@ namespace AMXXRelease if (m_Cfg.MakeOpts().IndexOf("amd64") != -1) - info.Arguments = "zcvf " + target + "_amd64.tar.gz " + file_list; + info.Arguments = "zcvf \"" + target + "_amd64.tar.gz\" " + file_list; else - info.Arguments = "zcvf " + target + ".tar.gz " + file_list; + info.Arguments = "zcvf \"" + target + ".tar.gz\" " + file_list; info.UseShellExecute = false; Process p = Process.Start(info); diff --git a/installer/AMXXRelease/Main.cs b/installer/AMXXRelease/Main.cs index 4846aaf6..efdb6cef 100755 --- a/installer/AMXXRelease/Main.cs +++ b/installer/AMXXRelease/Main.cs @@ -39,6 +39,9 @@ namespace AMXXRelease return; } + if (!ValidateConfigPaths()) + return; + ABuilder builder = null; if ((int)System.Environment.OSVersion.Platform == 128) { @@ -53,6 +56,41 @@ namespace AMXXRelease builder.Build(m_Cfg, build); } + + private bool ValidateConfigPaths() + { + if ( !File.Exists( ABuilder.PropSlashes(m_Cfg.CompressPath()) ) ) + { + Console.WriteLine("Failed to find compression program! Check 'compress' option in config."); + return false; + } + + string source = ABuilder.PropSlashes(m_Cfg.GetSourceTree()); + + if (!Directory.Exists(source)) + { + Console.WriteLine("Failed to find source tree! Check 'source' option in config."); + return false; + } else { + // Check subdirectories of source tree to make sure they contain necessary directories + if (!Directory.Exists(ABuilder.PropSlashes(source + "\\amxmodx")) || + !Directory.Exists(ABuilder.PropSlashes(source + "\\configs")) || + !Directory.Exists(ABuilder.PropSlashes(source + "\\dlls")) || + !Directory.Exists(ABuilder.PropSlashes(source + "\\plugins"))) + { + Console.WriteLine("Source tree appears invalid! Check 'source' option in config."); + return false; + } + } + + if ( !File.Exists( ABuilder.PropSlashes(m_Cfg.DevenvPath()) ) ) + { + Console.WriteLine("Failed to find compilation program! Check 'devenv' option in config."); + return false; + } + + return true; + } } } diff --git a/installer/AMXXRelease/Win32Builder.cs b/installer/AMXXRelease/Win32Builder.cs index dcf7ecda..5f2c12b2 100755 --- a/installer/AMXXRelease/Win32Builder.cs +++ b/installer/AMXXRelease/Win32Builder.cs @@ -20,7 +20,7 @@ namespace AMXXRelease info.FileName = m_Cfg.CompressPath(); info.WorkingDirectory = dir; - info.Arguments = "-r " + target + ".zip " + "*.*"; + info.Arguments = "-r \"" + target + ".zip\" " + "*.*"; info.UseShellExecute = false; Process p = Process.Start(info);