diff --git a/Giants.Launcher/Config.cs b/Giants.Launcher/Config.cs new file mode 100644 index 0000000..c9fd725 --- /dev/null +++ b/Giants.Launcher/Config.cs @@ -0,0 +1,71 @@ +namespace Giants.Launcher +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Windows.Forms; + using Newtonsoft.Json; + + public class Config + { + private const string defaultConfigFileName = "GiantsDefault.config"; + private const string playerConfigFileName = "Giants.config"; + + private IDictionary defaultConfig = new Dictionary(); + private IDictionary userConfig = new Dictionary(); + + public void Read() + { + string defaultConfigFilePath = this.GetDefaultConfigPath(); + if (!File.Exists(defaultConfigFilePath)) + { + string message = string.Format(Resources.ErrorNoConfigFile, defaultConfigFilePath); + MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + Environment.Exit(-1); + return; + } + + this.defaultConfig = ReadConfig(defaultConfigFilePath); + + string userConfigFilePath = this.GetUserConfigPath(); + if (File.Exists(userConfigFilePath)) + { + this.userConfig = ReadConfig(userConfigFilePath); + } + } + + public string GetString(string section, string key) + { + if (this.userConfig.ContainsKey(section)) + { + dynamic sectionObject = this.userConfig[section]; + if (sectionObject != null) + { + return sectionObject.ContainsKey(key) ? (string)sectionObject[key] : ""; + } + } + + return this.defaultConfig[section][key]; + } + + // TODO: other accessors unimplemented as we only need master server host name for now + + private static IDictionary ReadConfig(string filePath) + { + string fileContents = File.ReadAllText(filePath); + return JsonConvert.DeserializeObject>(fileContents); + } + + private string GetDefaultConfigPath() + { + return defaultConfigFileName; + } + + private string GetUserConfigPath() + { + string applicationDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + + return Path.Combine(applicationDataPath, "Giants", playerConfigFileName); + } + } +} diff --git a/Giants.Launcher/ConfigKeys.cs b/Giants.Launcher/ConfigKeys.cs new file mode 100644 index 0000000..576403f --- /dev/null +++ b/Giants.Launcher/ConfigKeys.cs @@ -0,0 +1,8 @@ +namespace Giants.Launcher +{ + public static class ConfigKeys + { + public const string MasterServerHostName = "masterServerHostName"; + public const string BannedPlayers = "bannedPlayers"; + } +} diff --git a/Giants.Launcher/ConfigSections.cs b/Giants.Launcher/ConfigSections.cs new file mode 100644 index 0000000..9092c41 --- /dev/null +++ b/Giants.Launcher/ConfigSections.cs @@ -0,0 +1,7 @@ +namespace Giants.Launcher +{ + public static class ConfigSections + { + public const string Network = "network"; + } +} diff --git a/Giants.Launcher/ImageButton.cs b/Giants.Launcher/Forms/ImageButton.cs similarity index 100% rename from Giants.Launcher/ImageButton.cs rename to Giants.Launcher/Forms/ImageButton.cs diff --git a/Giants.Launcher/LauncherForm.Designer.cs b/Giants.Launcher/Forms/LauncherForm.Designer.cs similarity index 100% rename from Giants.Launcher/LauncherForm.Designer.cs rename to Giants.Launcher/Forms/LauncherForm.Designer.cs diff --git a/Giants.Launcher/LauncherForm.cs b/Giants.Launcher/Forms/LauncherForm.cs similarity index 96% rename from Giants.Launcher/LauncherForm.cs rename to Giants.Launcher/Forms/LauncherForm.cs index a1cab51..5fe745b 100644 --- a/Giants.Launcher/LauncherForm.cs +++ b/Giants.Launcher/Forms/LauncherForm.cs @@ -26,9 +26,10 @@ namespace Giants.Launcher private readonly VersionClient versionHttpClient; private readonly CommunityClient communityHttpClient; - private string commandLine = String.Empty; + private string commandLine; private string gamePath = null; private Updater updater; + private Config config; private string communityAppUri; public LauncherForm() @@ -40,6 +41,12 @@ namespace Giants.Launcher // Set window title this.Text = GameName; + // Read newer file-based game settings + this.config = new Config(); + this.config.Read(); + + string baseUrl = this.config.GetString(ConfigSections.Network, ConfigKeys.MasterServerHostName); + this.httpClient = new HttpClient( new HttpClientHandler() { @@ -47,12 +54,12 @@ namespace Giants.Launcher }); this.versionHttpClient = new VersionClient(this.httpClient) { - BaseUrl = BaseUrl - }; + BaseUrl = baseUrl + }; this.communityHttpClient = new CommunityClient(this.httpClient) { - BaseUrl = BaseUrl - }; + BaseUrl = baseUrl + }; } private void btnExit_Click(object sender, EventArgs e) diff --git a/Giants.Launcher/LauncherForm.resx b/Giants.Launcher/Forms/LauncherForm.resx similarity index 100% rename from Giants.Launcher/LauncherForm.resx rename to Giants.Launcher/Forms/LauncherForm.resx diff --git a/Giants.Launcher/OptionsForm.Designer.cs b/Giants.Launcher/Forms/OptionsForm.Designer.cs similarity index 100% rename from Giants.Launcher/OptionsForm.Designer.cs rename to Giants.Launcher/Forms/OptionsForm.Designer.cs diff --git a/Giants.Launcher/OptionsForm.cs b/Giants.Launcher/Forms/OptionsForm.cs similarity index 82% rename from Giants.Launcher/OptionsForm.cs rename to Giants.Launcher/Forms/OptionsForm.cs index 9825a22..8883d51 100644 --- a/Giants.Launcher/OptionsForm.cs +++ b/Giants.Launcher/Forms/OptionsForm.cs @@ -40,7 +40,7 @@ namespace Giants.Launcher .ToArray()); RendererInfo renderer = GameSettings.CompatibleRenderers.Find( - r => StringComparer.OrdinalIgnoreCase.Compare(Path.GetFileName(r.FilePath), GameSettings.Get(SettingKeys.Renderer)) == 0); + r => StringComparer.OrdinalIgnoreCase.Compare(Path.GetFileName(r.FilePath), GameSettings.Get(RegistryKeys.Renderer)) == 0); if (renderer != null) { @@ -56,21 +56,21 @@ namespace Giants.Launcher private void SetOptions() { var resolutions = (List)this.cmbResolution.DataSource; - this.cmbResolution.SelectedItem = resolutions.Find(r => r.Width == GameSettings.Get(SettingKeys.VideoWidth) && r.Height == GameSettings.Get(SettingKeys.VideoHeight)); + this.cmbResolution.SelectedItem = resolutions.Find(r => r.Width == GameSettings.Get(RegistryKeys.VideoWidth) && r.Height == GameSettings.Get(RegistryKeys.VideoHeight)); if (this.cmbResolution.SelectedItem == null) this.cmbResolution.SelectedIndex = 0; var antialiasingOptions = (List>)this.cmbAntialiasing.DataSource; - this.cmbAntialiasing.SelectedItem = antialiasingOptions.Find(o => o.Value == GameSettings.Get(SettingKeys.Antialiasing)); + this.cmbAntialiasing.SelectedItem = antialiasingOptions.Find(o => o.Value == GameSettings.Get(RegistryKeys.Antialiasing)); if (this.cmbAntialiasing.SelectedItem == null) this.cmbAntialiasing.SelectedIndex = 0; var anisotropyOptions = (List>)this.cmbAnisotropy.DataSource; - this.cmbAnisotropy.SelectedItem = anisotropyOptions.Find(o => o.Value == GameSettings.Get(SettingKeys.AnisotropicFiltering)); + this.cmbAnisotropy.SelectedItem = anisotropyOptions.Find(o => o.Value == GameSettings.Get(RegistryKeys.AnisotropicFiltering)); if (this.cmbAnisotropy.SelectedItem == null) this.cmbAnisotropy.SelectedIndex = 0; - this.chkUpdates.Checked = GameSettings.Get(SettingKeys.NoAutoUpdate) != 1; + this.chkUpdates.Checked = GameSettings.Get(RegistryKeys.NoAutoUpdate) != 1; } private void PopulateAntialiasing() @@ -178,10 +178,10 @@ namespace Giants.Launcher private void cmbRenderer_SelectedIndexChanged(object sender, EventArgs e) { - bool windowed = GameSettings.Get(SettingKeys.Windowed) == 1; + bool windowed = GameSettings.Get(RegistryKeys.Windowed) == 1; if (windowed) { - bool borderless = GameSettings.Get(SettingKeys.BorderlessWindow) == 1; + bool borderless = GameSettings.Get(RegistryKeys.BorderlessWindow) == 1; if (borderless) this.cmbMode.SelectedIndex = 2; else @@ -199,7 +199,7 @@ namespace Giants.Launcher } else { - this.chkVSync.Checked = GameSettings.Get(SettingKeys.VerticalSync) == 1; + this.chkVSync.Checked = GameSettings.Get(RegistryKeys.VerticalSync) == 1; this.chkVSync.Enabled = true; } @@ -210,7 +210,7 @@ namespace Giants.Launcher } else { - this.chkTripleBuffering.Checked = GameSettings.Get(SettingKeys.TripleBuffering) == 1; + this.chkTripleBuffering.Checked = GameSettings.Get(RegistryKeys.TripleBuffering) == 1; this.chkTripleBuffering.Enabled = true; } } @@ -220,25 +220,25 @@ namespace Giants.Launcher var renderer = this.cmbRenderer.SelectedItem as RendererInfo; if (renderer != null) { - GameSettings.Modify(SettingKeys.Renderer, renderer.FileName); + GameSettings.Modify(RegistryKeys.Renderer, renderer.FileName); } var resolution = (ScreenResolution)this.cmbResolution.SelectedItem; if (resolution != null) { - GameSettings.Modify(SettingKeys.VideoWidth, resolution.Width); - GameSettings.Modify(SettingKeys.VideoHeight, resolution.Height); + GameSettings.Modify(RegistryKeys.VideoWidth, resolution.Width); + GameSettings.Modify(RegistryKeys.VideoHeight, resolution.Height); } - GameSettings.Modify(SettingKeys.Antialiasing, this.cmbAntialiasing.SelectedValue); - GameSettings.Modify(SettingKeys.AnisotropicFiltering, this.cmbAnisotropy.SelectedValue); + GameSettings.Modify(RegistryKeys.Antialiasing, this.cmbAntialiasing.SelectedValue); + GameSettings.Modify(RegistryKeys.AnisotropicFiltering, this.cmbAnisotropy.SelectedValue); bool windowed = (WindowType)this.cmbMode.SelectedIndex == WindowType.Windowed || (WindowType)this.cmbMode.SelectedIndex == WindowType.Borderless; - GameSettings.Modify(SettingKeys.Windowed, windowed == true ? 1 : 0); + GameSettings.Modify(RegistryKeys.Windowed, windowed == true ? 1 : 0); bool borderless = (WindowType)this.cmbMode.SelectedIndex == WindowType.Borderless; - GameSettings.Modify(SettingKeys.BorderlessWindow, borderless == true ? 1 : 0); - GameSettings.Modify(SettingKeys.VerticalSync, this.chkVSync.Checked == true ? 1 : 0); - GameSettings.Modify(SettingKeys.TripleBuffering, this.chkTripleBuffering.Checked == true ? 1 : 0); - GameSettings.Modify(SettingKeys.NoAutoUpdate, this.chkUpdates.Checked == false ? 1 : 0); + GameSettings.Modify(RegistryKeys.BorderlessWindow, borderless == true ? 1 : 0); + GameSettings.Modify(RegistryKeys.VerticalSync, this.chkVSync.Checked == true ? 1 : 0); + GameSettings.Modify(RegistryKeys.TripleBuffering, this.chkTripleBuffering.Checked == true ? 1 : 0); + GameSettings.Modify(RegistryKeys.NoAutoUpdate, this.chkUpdates.Checked == false ? 1 : 0); GameSettings.Save(); diff --git a/Giants.Launcher/OptionsForm.resx b/Giants.Launcher/Forms/OptionsForm.resx similarity index 100% rename from Giants.Launcher/OptionsForm.resx rename to Giants.Launcher/Forms/OptionsForm.resx diff --git a/Giants.Launcher/GameSettings.cs b/Giants.Launcher/GameSettings.cs index 7caf465..b3a8609 100644 --- a/Giants.Launcher/GameSettings.cs +++ b/Giants.Launcher/GameSettings.cs @@ -43,15 +43,15 @@ namespace Giants.Launcher public static void SetDefaults(string gamePath) { // Set default settings: - Settings[SettingKeys.Renderer] = "gg_dx7r.dll"; - Settings[SettingKeys.Antialiasing] = 0; - Settings[SettingKeys.AnisotropicFiltering] = 0; - Settings[SettingKeys.VideoDepth] = 32; - Settings[SettingKeys.Windowed] = 0; - Settings[SettingKeys.BorderlessWindow] = 0; - Settings[SettingKeys.VerticalSync] = 1; - Settings[SettingKeys.TripleBuffering] = 1; - Settings[SettingKeys.NoAutoUpdate] = 0; + Settings[RegistryKeys.Renderer] = "gg_dx7r.dll"; + Settings[RegistryKeys.Antialiasing] = 0; + Settings[RegistryKeys.AnisotropicFiltering] = 0; + Settings[RegistryKeys.VideoDepth] = 32; + Settings[RegistryKeys.Windowed] = 0; + Settings[RegistryKeys.BorderlessWindow] = 0; + Settings[RegistryKeys.VerticalSync] = 1; + Settings[RegistryKeys.TripleBuffering] = 1; + Settings[RegistryKeys.NoAutoUpdate] = 0; // Get a list of renderers compatible with the user's system if (!CompatibleRenderers.Any()) @@ -70,33 +70,33 @@ namespace Giants.Launcher // Select the highest priority renderer if (CompatibleRenderers.Any()) { - Settings[SettingKeys.Renderer] = Path.GetFileName(CompatibleRenderers.Max().FilePath); + Settings[RegistryKeys.Renderer] = Path.GetFileName(CompatibleRenderers.Max().FilePath); } // Set the current desktop resolution, leaving bit depth at the default 32: - Settings[SettingKeys.VideoWidth] = Screen.PrimaryScreen.Bounds.Width; - Settings[SettingKeys.VideoHeight] = Screen.PrimaryScreen.Bounds.Height; + Settings[RegistryKeys.VideoWidth] = Screen.PrimaryScreen.Bounds.Width; + Settings[RegistryKeys.VideoHeight] = Screen.PrimaryScreen.Bounds.Height; } public static void Load(string gamePath) { SetDefaults(gamePath); - if ((int)Registry.GetValue(RegistryKey, SettingKeys.GameOptionsVersion, 0) == OptionsVersion) + if ((int)Registry.GetValue(RegistryKey, RegistryKeys.GameOptionsVersion, 0) == OptionsVersion) { try { - Settings[SettingKeys.Renderer] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.Renderer, SettingKeys.Renderer, typeof(string)); - Settings[SettingKeys.Antialiasing] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.Antialiasing, Settings[SettingKeys.Antialiasing], typeof(int)); - Settings[SettingKeys.AnisotropicFiltering] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.AnisotropicFiltering, Settings[SettingKeys.AnisotropicFiltering], typeof(int)); - Settings[SettingKeys.VideoWidth] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.VideoWidth, Settings[SettingKeys.VideoWidth], typeof(int)); - Settings[SettingKeys.VideoHeight] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.VideoHeight, Settings[SettingKeys.VideoHeight], typeof(int)); - Settings[SettingKeys.VideoDepth] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.VideoDepth, Settings[SettingKeys.VideoDepth], typeof(int)); - Settings[SettingKeys.Windowed] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.Windowed, Settings[SettingKeys.Windowed], typeof(int)); - Settings[SettingKeys.BorderlessWindow] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.BorderlessWindow, Settings[SettingKeys.BorderlessWindow], typeof(int)); - Settings[SettingKeys.VerticalSync] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.VerticalSync, Settings[SettingKeys.VerticalSync], typeof(int)); - Settings[SettingKeys.TripleBuffering] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.TripleBuffering, Settings[SettingKeys.TripleBuffering], typeof(int)); - Settings[SettingKeys.NoAutoUpdate] = RegistryExtensions.GetValue(RegistryKey, SettingKeys.NoAutoUpdate, Settings[SettingKeys.NoAutoUpdate], typeof(int)); + Settings[RegistryKeys.Renderer] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.Renderer, RegistryKeys.Renderer, typeof(string)); + Settings[RegistryKeys.Antialiasing] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.Antialiasing, Settings[RegistryKeys.Antialiasing], typeof(int)); + Settings[RegistryKeys.AnisotropicFiltering] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.AnisotropicFiltering, Settings[RegistryKeys.AnisotropicFiltering], typeof(int)); + Settings[RegistryKeys.VideoWidth] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VideoWidth, Settings[RegistryKeys.VideoWidth], typeof(int)); + Settings[RegistryKeys.VideoHeight] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VideoHeight, Settings[RegistryKeys.VideoHeight], typeof(int)); + Settings[RegistryKeys.VideoDepth] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VideoDepth, Settings[RegistryKeys.VideoDepth], typeof(int)); + Settings[RegistryKeys.Windowed] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.Windowed, Settings[RegistryKeys.Windowed], typeof(int)); + Settings[RegistryKeys.BorderlessWindow] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.BorderlessWindow, Settings[RegistryKeys.BorderlessWindow], typeof(int)); + Settings[RegistryKeys.VerticalSync] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.VerticalSync, Settings[RegistryKeys.VerticalSync], typeof(int)); + Settings[RegistryKeys.TripleBuffering] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.TripleBuffering, Settings[RegistryKeys.TripleBuffering], typeof(int)); + Settings[RegistryKeys.NoAutoUpdate] = RegistryExtensions.GetValue(RegistryKey, RegistryKeys.NoAutoUpdate, Settings[RegistryKeys.NoAutoUpdate], typeof(int)); } catch (Exception ex) { @@ -113,18 +113,18 @@ namespace Giants.Launcher { try { - Registry.SetValue(RegistryKey, SettingKeys.GameOptionsVersion, OptionsVersion, RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.Renderer, Settings[SettingKeys.Renderer], RegistryValueKind.String); - Registry.SetValue(RegistryKey, SettingKeys.Antialiasing, Settings[SettingKeys.Antialiasing], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.AnisotropicFiltering, Settings[SettingKeys.AnisotropicFiltering], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.VideoWidth, Settings[SettingKeys.VideoWidth], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.VideoHeight, Settings[SettingKeys.VideoHeight], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.VideoDepth, Settings[SettingKeys.VideoDepth], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.Windowed, Settings[SettingKeys.Windowed], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.BorderlessWindow, Settings[SettingKeys.BorderlessWindow], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.VerticalSync, Settings[SettingKeys.VerticalSync], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.TripleBuffering, Settings[SettingKeys.TripleBuffering], RegistryValueKind.DWord); - Registry.SetValue(RegistryKey, SettingKeys.NoAutoUpdate, Settings[SettingKeys.NoAutoUpdate], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.GameOptionsVersion, OptionsVersion, RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.Renderer, Settings[RegistryKeys.Renderer], RegistryValueKind.String); + Registry.SetValue(RegistryKey, RegistryKeys.Antialiasing, Settings[RegistryKeys.Antialiasing], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.AnisotropicFiltering, Settings[RegistryKeys.AnisotropicFiltering], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.VideoWidth, Settings[RegistryKeys.VideoWidth], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.VideoHeight, Settings[RegistryKeys.VideoHeight], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.VideoDepth, Settings[RegistryKeys.VideoDepth], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.Windowed, Settings[RegistryKeys.Windowed], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.BorderlessWindow, Settings[RegistryKeys.BorderlessWindow], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.VerticalSync, Settings[RegistryKeys.VerticalSync], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.TripleBuffering, Settings[RegistryKeys.TripleBuffering], RegistryValueKind.DWord); + Registry.SetValue(RegistryKey, RegistryKeys.NoAutoUpdate, Settings[RegistryKeys.NoAutoUpdate], RegistryValueKind.DWord); } catch (Exception ex) { diff --git a/Giants.Launcher/Giants.Launcher.csproj b/Giants.Launcher/Giants.Launcher.csproj index 4a5c40e..7d7faf6 100644 --- a/Giants.Launcher/Giants.Launcher.csproj +++ b/Giants.Launcher/Giants.Launcher.csproj @@ -12,7 +12,7 @@ Giants v4.7.2 512 - giants.ico + Resources\giants.ico false @@ -58,6 +58,10 @@ false + + + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll + 3.5 @@ -77,41 +81,44 @@ + + + - + - + Component - + Form Giants.Launcher - + LauncherForm.cs - + Form Giants.Launcher - + OptionsForm.cs - + LauncherForm.cs Giants.Launcher - + OptionsForm.cs @@ -129,6 +136,7 @@ + @@ -163,7 +171,7 @@ - + diff --git a/Giants.Launcher/Program.cs b/Giants.Launcher/Program.cs index 31efb5a..aaf33f3 100644 --- a/Giants.Launcher/Program.cs +++ b/Giants.Launcher/Program.cs @@ -30,7 +30,6 @@ namespace Giants.Launcher } Application.Exit(); - return; } @@ -55,7 +54,6 @@ namespace Giants.Launcher } Application.Run(form); - } } } diff --git a/Giants.Launcher/Properties/Resources.Designer.cs b/Giants.Launcher/Properties/Resources.Designer.cs index 6da43b4..fe22c7f 100644 --- a/Giants.Launcher/Properties/Resources.Designer.cs +++ b/Giants.Launcher/Properties/Resources.Designer.cs @@ -106,6 +106,15 @@ namespace Giants.Launcher { } } + /// + /// Looks up a localized string similar to Settings file {0} was not found.. + /// + internal static string ErrorNoConfigFile { + get { + return ResourceManager.GetString("ErrorNoConfigFile", resourceCulture); + } + } + /// /// Looks up a localized string similar to Could not locate any renderers compatible with your system. The most compatible renderer has been selected, but you may experience difficulty running the game.. /// diff --git a/Giants.Launcher/Properties/Resources.resx b/Giants.Launcher/Properties/Resources.resx index 88f5efa..0447d91 100644 --- a/Giants.Launcher/Properties/Resources.resx +++ b/Giants.Launcher/Properties/Resources.resx @@ -202,4 +202,7 @@ Join the community on {0}! + + Settings file {0} was not found. + \ No newline at end of file diff --git a/Giants.Launcher/SettingKeys.cs b/Giants.Launcher/RegistryKeys.cs similarity index 95% rename from Giants.Launcher/SettingKeys.cs rename to Giants.Launcher/RegistryKeys.cs index bcab14e..fb563ea 100644 --- a/Giants.Launcher/SettingKeys.cs +++ b/Giants.Launcher/RegistryKeys.cs @@ -1,6 +1,6 @@ namespace Giants.Launcher { - public class SettingKeys + public static class RegistryKeys { public const string Antialiasing = "Antialiasing"; public const string AnisotropicFiltering = "AnisotropicFiltering"; diff --git a/Giants.Launcher/giants.ico b/Giants.Launcher/giants.ico deleted file mode 100644 index 6796ad2..0000000 Binary files a/Giants.Launcher/giants.ico and /dev/null differ diff --git a/Giants.Launcher/packages.config b/Giants.Launcher/packages.config new file mode 100644 index 0000000..a9de8b5 --- /dev/null +++ b/Giants.Launcher/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file