fix Tiberian Sun installation from CD
This commit is contained in:
@@ -55,7 +55,7 @@ namespace OpenRA
|
||||
}
|
||||
|
||||
// TODO: The package should be mounted into its own context to avoid name collisions with installed files
|
||||
public static bool ExtractFromPackage(string srcPath, string package, string[] files, string destPath, Action<string> onProgress, Action<string> onError)
|
||||
public static bool ExtractFromPackage(string srcPath, string package, string annotation, string[] files, string destPath, Action<string> onProgress, Action<string> onError)
|
||||
{
|
||||
if (!Directory.Exists(destPath))
|
||||
Directory.CreateDirectory(destPath);
|
||||
@@ -63,7 +63,7 @@ namespace OpenRA
|
||||
Log.Write("debug", "Mounting {0}".F(srcPath));
|
||||
GlobalFileSystem.Mount(srcPath);
|
||||
Log.Write("debug", "Mounting {0}".F(package));
|
||||
GlobalFileSystem.Mount(package);
|
||||
GlobalFileSystem.Mount(package, annotation);
|
||||
|
||||
foreach (var file in files)
|
||||
{
|
||||
|
||||
@@ -72,7 +72,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
var dest = new string[] { Platform.SupportDir, "Content", Game.modData.Manifest.Mod.Id }.Aggregate(Path.Combine);
|
||||
var copyFiles = Game.modData.Manifest.ContentInstaller.CopyFilesFromCD;
|
||||
|
||||
var extractPackage = Game.modData.Manifest.ContentInstaller.PackageToExtractFromCD;
|
||||
var packageToExtract = Game.modData.Manifest.ContentInstaller.PackageToExtractFromCD.Split(':');
|
||||
var extractPackage = packageToExtract.First();
|
||||
var annotation = packageToExtract.Length > 1 ? packageToExtract.Last() : null;
|
||||
|
||||
var extractFiles = Game.modData.Manifest.ContentInstaller.ExtractFilesFromCD;
|
||||
|
||||
var installCounter = 0;
|
||||
@@ -104,7 +107,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
|
||||
if (!string.IsNullOrEmpty(extractPackage))
|
||||
{
|
||||
if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest, onProgress, onError))
|
||||
if (!InstallUtils.ExtractFromPackage(source, extractPackage, annotation, extractFiles, dest, onProgress, onError))
|
||||
{
|
||||
onError("Extracting files from CD failed.");
|
||||
return;
|
||||
|
||||
@@ -160,8 +160,10 @@ ContentInstaller:
|
||||
InstallerMenuWidget: INSTALL_PANEL
|
||||
TestFiles: cache.mix, conquer.mix, isosnow.mix, isotemp.mix, local.mix, sidec01.mix, sidec02.mix, sno.mix, snow.mix, sounds.mix, speech01.mix, tem.mix, temperat.mix
|
||||
PackageMirrorList: http://www.openra.net/packages/ts-mirrors.txt
|
||||
DiskTestFiles: multi.mix, install/tibsun.mix
|
||||
CopyFilesFromCD: install/tibsun.mix, scores.mix, multi.mix
|
||||
DiskTestFiles: MULTI.MIX, INSTALL/TIBSUN.MIX
|
||||
CopyFilesFromCD: INSTALL/TIBSUN.MIX, SCORES.MIX, MULTI.MIX
|
||||
PackageToExtractFromCD: INSTALL/TIBSUN.MIX:CRC32
|
||||
ExtractFilesFromCD: cache.mix, conquer.mix, isosnow.mix, isotemp.mix, local.mix, sidec01.mix, sidec02.mix, sno.mix, snow.mix, sounds.mix, speech01.mix, tem.mix, temperat.mix
|
||||
ShippedSoundtracks: 2
|
||||
|
||||
ServerTraits:
|
||||
|
||||
Reference in New Issue
Block a user