Bring back --binary option.

Add ARM64 build 
configs.
This commit is contained in:
Fabian
2021-10-30 01:34:18 +02:00
parent 01c38b00ad
commit 47338d7543
4 changed files with 25 additions and 1 deletions

View File

@@ -7,12 +7,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Arctium.WoW.Launcher", "src
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Debug|ARM64.ActiveCfg = Debug|ARM64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Debug|ARM64.Build.0 = Debug|ARM64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Debug|x64.ActiveCfg = Debug|x64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Debug|x64.Build.0 = Debug|x64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Release|ARM64.ActiveCfg = Release|ARM64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Release|ARM64.Build.0 = Release|ARM64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Release|x64.ActiveCfg = Release|x64
{661B173A-D445-4706-9FF2-C0408ED62FA2}.Release|x64.Build.0 = Release|x64
EndGlobalSection

View File

@@ -14,7 +14,7 @@
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<FileVersion>9.0.0.0</FileVersion>
<Copyright>Arctium</Copyright>
<Platforms>x64</Platforms>
<Platforms>x64;ARM64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
@@ -29,8 +29,20 @@
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<!-- Native AOT settings -->
<RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
<IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
<PackageReference Include="runtime.win-x64.Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
<PackageReference Include="System.CommandLine" Version="2.0.0-*" />
</ItemGroup>

View File

@@ -11,6 +11,7 @@ static class LaunchOptions
{
public static Option<GameVersion> Version = new("--version", () => GameVersion.Retail);
public static Option<string> GamePath = new("--path");
public static Option<string> GameBinary = new("--binary");
public static Option<bool> KeepCache = new("--keepcache", () => true);
public static Parser Instance => new CommandLineBuilder(ConfigureCommandLine(RootCommand))
@@ -25,6 +26,7 @@ static class LaunchOptions
{
Version,
GamePath,
GameBinary,
KeepCache
};

View File

@@ -28,6 +28,10 @@ class Launcher
var currentFolder = AppDomain.CurrentDomain.BaseDirectory;
var gameFolder = $"{currentFolder}/{SubFolder}";
if (commandLineResult.HasOption(LaunchOptions.GameBinary))
BinaryName = commandLineResult.ValueForOption(LaunchOptions.GameBinary);
var gameBinaryPath = $"{gameFolder}/{BinaryName}";
if (commandLineResult.HasOption(LaunchOptions.GamePath))