diff --git a/OpenRA.Game/Utilities.cs b/OpenRA.Game/Utilities.cs index 5d7dcc64dc..700c833b30 100644 --- a/OpenRA.Game/Utilities.cs +++ b/OpenRA.Game/Utilities.cs @@ -28,9 +28,9 @@ namespace OpenRA ExecuteUtilityAsync("--extract-zip \"{0}\" \"{1}\"".F(zipFile, path), parseOutput, onComplete); } - public void InstallRAFilesAsync(string cdPath, Action parseOutput, Action onComplete) + public void InstallRAFilesAsync(string cdPath, string path, Action parseOutput, Action onComplete) { - ExecuteUtilityAsync("--install-ra-packages \"{0}\"".F(cdPath), parseOutput, onComplete); + ExecuteUtilityAsync("--install-ra-packages \"{0}\" \"{1}\"".F(cdPath, path), parseOutput, onComplete); } public void PromptFilepathAsync(string title, Action withPath) diff --git a/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs index b9906d7d73..097daed367 100755 --- a/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs @@ -165,7 +165,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates }; if (Info.InstallMode == "ra") - Game.Utilities.InstallRAFilesAsync(path, parseOutput, onComplete); + Game.Utilities.InstallRAFilesAsync(path, FileSystem.SpecialPackageRoot+Info.PackagePath, parseOutput, onComplete); else ShowDownloadError("Installing from CD not supported"); } @@ -211,7 +211,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates Game.RunAfterTick(() => ContinueLoading(Info)); }; - Game.RunAfterTick(() => Game.Utilities.ExtractZipAsync(file, Info.PackagePath, parseOutput, onComplete)); + Game.RunAfterTick(() => Game.Utilities.ExtractZipAsync(file, FileSystem.SpecialPackageRoot+Info.PackagePath, parseOutput, onComplete)); } }; diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index 1395ec7108..d416511a17 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -57,14 +57,14 @@ namespace OpenRA.Utility public static void InstallRAPackages(string[] args) { - if (args.Length < 2) + if (args.Length < 3) { Console.WriteLine("Error: Invalid syntax"); return; } var basePath = "{0}{1}".F(args[1], Path.DirectorySeparatorChar); - var toPath = "mods{0}ra{0}packages{0}".F(Path.DirectorySeparatorChar); + var toPath = args[2]; var directCopy = new string[] {"INSTALL/REDALERT.MIX"}; var extract = new string[] {"conquer.mix", "russian.mix", "allies.mix", "sounds.mix", "scores.mix", "snow.mix", "interior.mix", "temperat.mix"}; @@ -87,14 +87,14 @@ namespace OpenRA.Utility public static void InstallCncPackages(string[] args) { - if (args.Length < 2) + if (args.Length < 3) { Console.WriteLine("Error: Invalid syntax"); return; } var basePath = "{0}{1}".F(args[1], Path.DirectorySeparatorChar); - var toPath = "mods{0}cnc{0}packages{0}".F(Path.DirectorySeparatorChar); + var toPath = args[2]; var directCopy = new string[] {"CONQUER.MIX", "DESERT.MIX", "GENERAL.MIX", "SCORES.MIX", "SOUNDS.MIX", "TEMPERAT.MIX", "WINTER.MIX"}; var extract = new string[] {"cclocal.mix", "speech.mix", "tempicnh.mix", "updatec.mix"};