Remove unused package annotations.
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OpenRA.FileSystem
|
||||
return new Folder(filename, order, content);
|
||||
}
|
||||
|
||||
public IReadOnlyPackage OpenPackage(string filename, string annotation, int order)
|
||||
public IReadOnlyPackage OpenPackage(string filename, int order)
|
||||
{
|
||||
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
|
||||
return new MixFile(this, filename, order);
|
||||
@@ -76,7 +76,7 @@ namespace OpenRA.FileSystem
|
||||
MountedPackages.Add(mount);
|
||||
}
|
||||
|
||||
public void Mount(string name, string annotation = null)
|
||||
public void Mount(string name)
|
||||
{
|
||||
var optional = name.StartsWith("~");
|
||||
if (optional)
|
||||
@@ -84,7 +84,7 @@ namespace OpenRA.FileSystem
|
||||
|
||||
name = Platform.ResolvePath(name);
|
||||
|
||||
Action a = () => MountInner(OpenPackage(name, annotation, order++));
|
||||
Action a = () => MountInner(OpenPackage(name, order++));
|
||||
|
||||
if (optional)
|
||||
try { a(); }
|
||||
@@ -132,7 +132,7 @@ namespace OpenRA.FileSystem
|
||||
Mount(dir);
|
||||
|
||||
foreach (var pkg in manifest.Packages)
|
||||
Mount(pkg.Key, pkg.Value);
|
||||
Mount(pkg);
|
||||
}
|
||||
|
||||
Stream GetFromCache(string filename)
|
||||
|
||||
@@ -36,12 +36,11 @@ namespace OpenRA
|
||||
|
||||
public readonly ModMetadata Mod;
|
||||
public readonly string[]
|
||||
Folders, Rules, ServerTraits,
|
||||
Packages, Folders, Rules, ServerTraits,
|
||||
Sequences, VoxelSequences, Cursors, Chrome, Assemblies, ChromeLayout,
|
||||
Weapons, Voices, Notifications, Music, Translations, TileSets,
|
||||
ChromeMetrics, MapCompatibility, Missions;
|
||||
|
||||
public readonly IReadOnlyDictionary<string, string> Packages;
|
||||
public readonly IReadOnlyDictionary<string, string> MapFolders;
|
||||
public readonly MiniYaml LoadScreen;
|
||||
public readonly MiniYaml LobbyDefaults;
|
||||
@@ -75,7 +74,7 @@ namespace OpenRA
|
||||
// TODO: Use fieldloader
|
||||
Folders = YamlList(yaml, "Folders", true);
|
||||
MapFolders = YamlDictionary(yaml, "MapFolders", true);
|
||||
Packages = YamlDictionary(yaml, "Packages", true);
|
||||
Packages = YamlList(yaml, "Packages", true);
|
||||
Rules = YamlList(yaml, "Rules", true);
|
||||
Sequences = YamlList(yaml, "Sequences", true);
|
||||
VoxelSequences = YamlList(yaml, "VoxelSequences", true);
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace OpenRA
|
||||
ModFiles.LoadFromManifest(Manifest);
|
||||
|
||||
// Mount map package so custom assets can be used. TODO: check priority.
|
||||
ModFiles.Mount(ModFiles.OpenPackage(map.Path, null, int.MaxValue));
|
||||
ModFiles.Mount(ModFiles.OpenPackage(map.Path, int.MaxValue));
|
||||
|
||||
using (new Support.PerfTimer("Map.PreloadRules"))
|
||||
map.PreloadRules();
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common
|
||||
}
|
||||
|
||||
// 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 annotation, Dictionary<string, string[]> filesByDirectory,
|
||||
public static bool ExtractFromPackage(string srcPath, string package, Dictionary<string, string[]> filesByDirectory,
|
||||
string destPath, bool overwrite, ContentInstaller.FilenameCase caseModifier, Action<string> onProgress, Action<string> onError)
|
||||
{
|
||||
Directory.CreateDirectory(destPath);
|
||||
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common
|
||||
Log.Write("debug", "Mounting {0}".F(srcPath));
|
||||
Game.ModData.ModFiles.Mount(srcPath);
|
||||
Log.Write("debug", "Mounting {0}".F(package));
|
||||
Game.ModData.ModFiles.Mount(package, annotation);
|
||||
Game.ModData.ModFiles.Mount(package);
|
||||
|
||||
foreach (var directory in filesByDirectory)
|
||||
{
|
||||
|
||||
@@ -131,8 +131,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
statusLabel.GetText = () => "Extracting {0}".F(filename);
|
||||
var destFile = Platform.ResolvePath("^", "Content", modId, filename.ToLowerInvariant());
|
||||
cabExtractor.ExtractFile(uint.Parse(archive[0]), destFile);
|
||||
var annotation = archive.Length > 1 ? archive[1] : null;
|
||||
InstallUtils.ExtractFromPackage(source, destFile, annotation, extractFiles, destDir, overwrite, installData.OutputFilenameCase, onProgress, onError);
|
||||
InstallUtils.ExtractFromPackage(source, destFile, extractFiles, destDir, overwrite, installData.OutputFilenameCase, onProgress, onError);
|
||||
progressBar.Percentage += installPercent;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +156,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
var packageToExtract = installData.PackageToExtractFromCD.Split(':');
|
||||
var extractPackage = packageToExtract.First();
|
||||
var annotation = packageToExtract.Length > 1 ? packageToExtract.Last() : null;
|
||||
|
||||
var extractFiles = installData.ExtractFilesFromCD;
|
||||
|
||||
@@ -191,7 +189,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
if (!string.IsNullOrEmpty(extractPackage))
|
||||
{
|
||||
if (!InstallUtils.ExtractFromPackage(source, extractPackage, annotation, extractFiles, dest,
|
||||
if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest,
|
||||
overwrite, installData.OutputFilenameCase, onProgress, onError))
|
||||
{
|
||||
onError("Extracting files from CD failed.");
|
||||
|
||||
@@ -20,44 +20,44 @@ MapFolders:
|
||||
|
||||
Packages:
|
||||
# Tiberian Sun
|
||||
~scores.mix@CRC32
|
||||
~sidenc01.mix@CRC32
|
||||
~sidenc02.mix@CRC32
|
||||
~gmenu.mix@CRC32
|
||||
~e01scd01.mix@CRC32
|
||||
~e01scd02.mix@CRC32
|
||||
~maps01.mix@CRC32
|
||||
~maps02.mix@CRC32
|
||||
~movies01.mix@CRC32
|
||||
~movies02.mix@CRC32
|
||||
~multi.mix@CRC32
|
||||
~patch.mix@CRC32
|
||||
~sidecd01.mix@CRC32
|
||||
~sidecd02.mix@CRC32
|
||||
~tibsun.mix@CRC32
|
||||
cache.mix@CRC32
|
||||
conquer.mix@CRC32
|
||||
isosnow.mix@CRC32
|
||||
isotemp.mix@CRC32
|
||||
local.mix@CRC32
|
||||
sidec01.mix@CRC32
|
||||
sidec02.mix@CRC32
|
||||
sno.mix@CRC32
|
||||
snow.mix@CRC32
|
||||
sounds.mix@CRC32
|
||||
speech01.mix@CRC32 # EVA
|
||||
speech02.mix@CRC32 # Cabal
|
||||
tem.mix@CRC32
|
||||
temperat.mix@CRC32
|
||||
~scores.mix
|
||||
~sidenc01.mix
|
||||
~sidenc02.mix
|
||||
~gmenu.mix
|
||||
~e01scd01.mix
|
||||
~e01scd02.mix
|
||||
~maps01.mix
|
||||
~maps02.mix
|
||||
~movies01.mix
|
||||
~movies02.mix
|
||||
~multi.mix
|
||||
~patch.mix
|
||||
~sidecd01.mix
|
||||
~sidecd02.mix
|
||||
~tibsun.mix
|
||||
cache.mix
|
||||
conquer.mix
|
||||
isosnow.mix
|
||||
isotemp.mix
|
||||
local.mix
|
||||
sidec01.mix
|
||||
sidec02.mix
|
||||
sno.mix
|
||||
snow.mix
|
||||
sounds.mix
|
||||
speech01.mix # EVA
|
||||
speech02.mix # Cabal
|
||||
tem.mix
|
||||
temperat.mix
|
||||
# Firestorm
|
||||
~scores01.mix@CRC32
|
||||
~expand01.mix@CRC32
|
||||
~sounds01.mix@CRC32
|
||||
~e01sc01.mix@CRC32
|
||||
~e01sc02.mix@CRC32
|
||||
~e01vox01.mix@CRC32
|
||||
~e01vox02.mix@CRC32
|
||||
~ecache01.mix@CRC32
|
||||
~scores01.mix
|
||||
~expand01.mix
|
||||
~sounds01.mix
|
||||
~e01sc01.mix
|
||||
~e01sc02.mix
|
||||
~e01vox01.mix
|
||||
~e01vox02.mix
|
||||
~ecache01.mix
|
||||
|
||||
Rules:
|
||||
./mods/ts/rules/ai.yaml
|
||||
@@ -198,12 +198,12 @@ ContentInstaller:
|
||||
DiskTestFiles: MULTI.MIX, INSTALL/TIBSUN.MIX
|
||||
CopyFilesFromCD:
|
||||
.: INSTALL/TIBSUN.MIX, SCORES.MIX, MULTI.MIX
|
||||
PackageToExtractFromCD: INSTALL/TIBSUN.MIX:CRC32
|
||||
PackageToExtractFromCD: INSTALL/TIBSUN.MIX
|
||||
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
|
||||
MusicPackageMirrorList: http://www.openra.net/packages/ts-music-mirrors.txt
|
||||
InstallShieldCABFilePackageIds: 332:CRC32
|
||||
InstallShieldCABFilePackageIds: 332
|
||||
InstallShieldCABFileIds: 323, 364
|
||||
|
||||
ServerTraits:
|
||||
|
||||
Reference in New Issue
Block a user