diff --git a/GPatch/GPatch.nsi b/GPatch/GPatch.nsi index 66e85c8..d5d9199 100644 --- a/GPatch/GPatch.nsi +++ b/GPatch/GPatch.nsi @@ -2,7 +2,7 @@ Unicode True SetCompressor /SOLID zlib ; LZMA compresses about 20% better but is more likely to trigger AV false positives !define PRODUCT_NAME "Giants: Citizen Kabuto" -!define PRODUCT_VERSION "1.498" +!define PRODUCT_VERSION "1.499" ; MUI 1.67 compatible ------ !include "MUI2.nsh" @@ -42,7 +42,7 @@ SetCompressor /SOLID zlib ; LZMA compresses about 20% better but is more likely ; MUI end ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "Output\GPatch1_498_224_1.exe" +OutFile "Output\GPatch1_499_0_0.exe" InstallDir "$PROGRAMFILES\Giants\" InstallDirRegKey HKCU "SOFTWARE\PlanetMoon\Giants" "DestDir" ShowInstDetails hide diff --git a/Giants.Launcher/ApplicationNames.cs b/Giants.Launcher/ApplicationNames.cs index 0bd027c..33c6fcf 100644 --- a/Giants.Launcher/ApplicationNames.cs +++ b/Giants.Launcher/ApplicationNames.cs @@ -7,5 +7,7 @@ public const string GiantsBeta = nameof(GiantsBeta); public const string GiantsLauncher = nameof(GiantsLauncher); + + public const string GiantsLauncherBeta = nameof(GiantsLauncherBeta); } } diff --git a/Giants.Launcher/Forms/LauncherForm.cs b/Giants.Launcher/Forms/LauncherForm.cs index 58005a7..adf843b 100644 --- a/Giants.Launcher/Forms/LauncherForm.cs +++ b/Giants.Launcher/Forms/LauncherForm.cs @@ -173,8 +173,10 @@ namespace Giants.Launcher updateCompletedCallback: this.LauncherForm_DownloadCompletedCallback, updateProgressCallback: this.LauncherForm_DownloadProgressCallback); - Task gameVersionInfo = this.GetVersionInfo(ApplicationNames.Giants); - Task launcherVersionInfo = this.GetVersionInfo(ApplicationNames.GiantsLauncher); + Task gameVersionInfo = this.GetVersionInfo( + GetApplicationName(ApplicationType.Game)); + Task launcherVersionInfo = this.GetVersionInfo( + GetApplicationName(ApplicationType.Launcher)); await Task.WhenAll(gameVersionInfo, launcherVersionInfo); @@ -191,6 +193,27 @@ namespace Giants.Launcher } } + private static string GetApplicationName(ApplicationType applicationType) + { + switch (applicationType) + { + case ApplicationType.Game: +#if BETA + return ApplicationNames.GiantsBeta; +#else + return ApplicationNames.Giants; +#endif + case ApplicationType.Launcher: +#if BETA + return ApplicationNames.GiantsLauncherBeta; +#else + return ApplicationNames.GiantsLauncher; +#endif + } + + throw new ArgumentOutOfRangeException(); + } + private async Task GetVersionInfo(string appName) { VersionInfo versionInfo; diff --git a/Giants.Launcher/Forms/OptionsForm.cs b/Giants.Launcher/Forms/OptionsForm.cs index d39dd46..3ae6b7e 100644 --- a/Giants.Launcher/Forms/OptionsForm.cs +++ b/Giants.Launcher/Forms/OptionsForm.cs @@ -38,19 +38,6 @@ namespace Giants.Launcher .Disambiguate() .ToList() .ToArray()); - - RendererInfo renderer = GameSettings.CompatibleRenderers.Find( - r => StringComparer.OrdinalIgnoreCase.Compare(Path.GetFileName(r.FilePath), GameSettings.Get(RegistryKeys.Renderer)) == 0); - - if (renderer != null) - { - this.cmbRenderer.SelectedItem = renderer; - } - else - { - renderer = GameSettings.CompatibleRenderers.Find(r => r.Name == "DirectX 7"); - this.cmbRenderer.SelectedItem = renderer; - } } private void SetOptions() @@ -66,6 +53,19 @@ namespace Giants.Launcher this.cmbAntialiasing.SelectedIndex = 0; this.chkUpdates.Checked = GameSettings.Get(RegistryKeys.NoAutoUpdate) != 1; + + RendererInfo renderer = GameSettings.CompatibleRenderers.Find( + r => StringComparer.OrdinalIgnoreCase.Compare(Path.GetFileName(r.FilePath), GameSettings.Get(RegistryKeys.Renderer)) == 0); + + if (renderer != null) + { + this.cmbRenderer.SelectedItem = renderer; + } + else + { + renderer = GameSettings.CompatibleRenderers.Find(r => r.FileName == "gg_dx7r.dll"); + this.cmbRenderer.SelectedItem = renderer; + } } private void PopulateAntialiasing() diff --git a/Giants.Launcher/GameSettings.cs b/Giants.Launcher/GameSettings.cs index b3a8609..452e881 100644 --- a/Giants.Launcher/GameSettings.cs +++ b/Giants.Launcher/GameSettings.cs @@ -11,7 +11,7 @@ namespace Giants.Launcher { // Constants private const string RegistryKey = @"HKEY_CURRENT_USER\Software\PlanetMoon\Giants"; - private const int OptionsVersion = 3; + private const int OptionsVersion = 4; private static readonly Dictionary Settings = new Dictionary(); diff --git a/Giants.Launcher/Giants.Launcher.csproj b/Giants.Launcher/Giants.Launcher.csproj index 1388f0d..26bf22a 100644 --- a/Giants.Launcher/Giants.Launcher.csproj +++ b/Giants.Launcher/Giants.Launcher.csproj @@ -57,6 +57,26 @@ x86 false + + bin\ReleaseBeta\ + TRACE;BETA + true + pdbonly + x86 + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\DebugBeta\ + TRACE;DEBUG;BETA + full + x86 + 7.3 + prompt + MinimumRecommendedRules.ruleset + @@ -213,7 +233,8 @@ - xcopy /DY "$(TargetPath)" "$(GIANTS_PATH)\$(TargetFileName)*" + xcopy /DY "$(TargetPath)" "$(GIANTS_PATH)\$(TargetFileName)*" + xcopy /DY "$(TargetPath)" "$(GIANTS_PATH)\$(TargetFileName)*"