Take SpecialPackageRoot into account when installing packages
This commit is contained in:
@@ -28,9 +28,9 @@ namespace OpenRA
|
||||
ExecuteUtilityAsync("--extract-zip \"{0}\" \"{1}\"".F(zipFile, path), parseOutput, onComplete);
|
||||
}
|
||||
|
||||
public void InstallRAFilesAsync(string cdPath, Action<string> parseOutput, Action onComplete)
|
||||
public void InstallRAFilesAsync(string cdPath, string path, Action<string> 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<string> withPath)
|
||||
|
||||
@@ -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
|
||||
if (!error)
|
||||
Game.RunAfterTick(() => ContinueLoading(Info));
|
||||
};
|
||||
|
||||
|
||||
Game.RunAfterTick(() => Game.Utilities.ExtractZipAsync(file, FileSystem.SpecialPackageRoot+Info.PackagePath, parseOutput, onComplete));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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"};
|
||||
|
||||
Reference in New Issue
Block a user