Move ContentInstaller to OpenRA.Game from Mods.Common
This commit is contained in:
40
OpenRA.Game/ContentInstaller.cs
Normal file
40
OpenRA.Game/ContentInstaller.cs
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace OpenRA
|
||||||
|
{
|
||||||
|
// Referenced from ModMetadata, so needs to be in OpenRA.Game :(
|
||||||
|
public class ContentInstaller : IGlobalModData
|
||||||
|
{
|
||||||
|
public readonly string MenuWidget = null;
|
||||||
|
public readonly string MusicMenuWidget = null;
|
||||||
|
public readonly string BackgroundWidget = null;
|
||||||
|
public readonly string[] TestFiles = { };
|
||||||
|
public readonly string[] DiskTestFiles = { };
|
||||||
|
public readonly string PackageToExtractFromCD = null;
|
||||||
|
public readonly bool OverwriteFiles = true;
|
||||||
|
|
||||||
|
public readonly Dictionary<string, string[]> CopyFilesFromCD = new Dictionary<string, string[]>();
|
||||||
|
public readonly Dictionary<string, string[]> ExtractFilesFromCD = new Dictionary<string, string[]>();
|
||||||
|
|
||||||
|
public readonly string PackageMirrorList = null;
|
||||||
|
|
||||||
|
public readonly string MusicPackageMirrorList = null;
|
||||||
|
public readonly int ShippedSoundtracks = 0;
|
||||||
|
|
||||||
|
/// <summary> InstallShield .CAB file IDs, used to extract Mod-specific files. </summary>
|
||||||
|
public readonly HashSet<int> InstallShieldCABFileIds = new HashSet<int>();
|
||||||
|
|
||||||
|
/// <summary> InstallShield .CAB file IDs, used to extract Mod-specific archives and extract contents of ExtractFilesFromCD. </summary>
|
||||||
|
public readonly HashSet<string> InstallShieldCABFilePackageIds = new HashSet<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,6 +95,7 @@
|
|||||||
<Compile Include="FileFormats\IdxReader.cs" />
|
<Compile Include="FileFormats\IdxReader.cs" />
|
||||||
<Compile Include="FileSystem\BagFile.cs" />
|
<Compile Include="FileSystem\BagFile.cs" />
|
||||||
<Compile Include="Map\MapPlayers.cs" />
|
<Compile Include="Map\MapPlayers.cs" />
|
||||||
|
<Compile Include="ContentInstaller.cs" />
|
||||||
<Compile Include="MPos.cs" />
|
<Compile Include="MPos.cs" />
|
||||||
<Compile Include="Graphics\QuadRenderer.cs" />
|
<Compile Include="Graphics\QuadRenderer.cs" />
|
||||||
<Compile Include="Download.cs" />
|
<Compile Include="Download.cs" />
|
||||||
|
|||||||
@@ -18,31 +18,6 @@ using OpenRA.FileSystem;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common
|
namespace OpenRA.Mods.Common
|
||||||
{
|
{
|
||||||
public class ContentInstaller : IGlobalModData
|
|
||||||
{
|
|
||||||
public readonly string MenuWidget = null;
|
|
||||||
public readonly string MusicMenuWidget = null;
|
|
||||||
public readonly string BackgroundWidget = null;
|
|
||||||
public readonly HashSet<string> TestFiles = new HashSet<string>();
|
|
||||||
public readonly HashSet<string> DiskTestFiles = new HashSet<string>();
|
|
||||||
public readonly string PackageToExtractFromCD = null;
|
|
||||||
public readonly bool OverwriteFiles = true;
|
|
||||||
|
|
||||||
public readonly Dictionary<string, string[]> CopyFilesFromCD = new Dictionary<string, string[]>();
|
|
||||||
public readonly Dictionary<string, string[]> ExtractFilesFromCD = new Dictionary<string, string[]>();
|
|
||||||
|
|
||||||
public readonly string PackageMirrorList = null;
|
|
||||||
|
|
||||||
public readonly string MusicPackageMirrorList = null;
|
|
||||||
public readonly int ShippedSoundtracks = 0;
|
|
||||||
|
|
||||||
/// <summary> InstallShield .cab File Ids, used to extract Mod specific files. </summary>
|
|
||||||
public readonly HashSet<int> InstallShieldCABFileIds = new HashSet<int>();
|
|
||||||
|
|
||||||
/// <summary> InstallShield .cab File Ids, used to extract Mod specific archives and extract contents of ExtractFilesFromCD. </summary>
|
|
||||||
public readonly HashSet<string> InstallShieldCABFilePackageIds = new HashSet<string>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class InstallUtils
|
public static class InstallUtils
|
||||||
{
|
{
|
||||||
static IEnumerable<ZipEntry> GetEntries(this ZipInputStream z)
|
static IEnumerable<ZipEntry> GetEntries(this ZipInputStream z)
|
||||||
|
|||||||
Reference in New Issue
Block a user