diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index cd724f0c5a..88556965b8 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -92,6 +92,8 @@ namespace OpenRA public bool SanityCheckUnsyncedCode = false; public int Samples = 25; public bool IgnoreVersionMismatch = false; + public bool SendSystemInformation = true; + public string UUID = System.Guid.NewGuid().ToString(); } public class GraphicSettings @@ -179,7 +181,7 @@ namespace OpenRA public Modifiers ZoomModifier = Modifiers.Ctrl; public bool FetchNews = true; - public string NewsUrl = "http://www.openra.net/gamenews"; + public string NewsUrl = "http://master.openra.net/gamenews"; } public class KeySettings diff --git a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs index 64a323734f..a490400b5b 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs @@ -220,7 +220,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (newsButton != null) { if (!fetchedNews) - new Download(Game.Settings.Game.NewsUrl, cacheFile, e => { }, + new Download(Game.Settings.Game.NewsUrl + SysInfoQuery(), cacheFile, e => { }, (e, c) => NewsDownloadComplete(e, cacheFile, currentNews, () => newsButton.AttachPanel(newsPanel))); @@ -252,6 +252,22 @@ namespace OpenRA.Mods.Common.Widgets.Logic () => { Game.CloseServer(); SwitchMenu(MenuType.MapEditor); }); } + string SysInfoQuery() + { + if (!Game.Settings.Debug.SendSystemInformation) + return null; + + return "?id={0}&platform={1}&os={2}&runtime={3}&lang={4}&version={5}&mod={6}&modversion={7}".F( + Uri.EscapeUriString(Game.Settings.Debug.UUID), + Uri.EscapeUriString(Platform.CurrentPlatform.ToString()), + Uri.EscapeUriString(Environment.OSVersion.ToString()), + Uri.EscapeUriString(Platform.RuntimeVersion), + Uri.EscapeUriString(System.Globalization.CultureInfo.InstalledUICulture.TwoLetterISOLanguageName), + Uri.EscapeUriString(ModMetadata.AllMods["modchooser"].Version), + Uri.EscapeUriString(Game.ModData.Manifest.Mod.Id), + Uri.EscapeUriString(Game.ModData.Manifest.Mod.Version)); + } + void SetNewsStatus(string message) { message = WidgetUtils.WrapText(message, newsStatus.Bounds.Width, Game.Renderer.Fonts[newsStatus.Font]); diff --git a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs index c799be5b2c..4e2ea3d110 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs @@ -604,6 +604,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic BindCheckboxPref(panel, "BOTDEBUG_CHECKBOX", ds, "BotDebug"); BindCheckboxPref(panel, "FETCH_NEWS_CHECKBOX", gs, "FetchNews"); BindCheckboxPref(panel, "LUADEBUG_CHECKBOX", ds, "LuaDebug"); + BindCheckboxPref(panel, "SENDSYSINFO_CHECKBOX", ds, "SendSystemInformation"); return () => { }; } diff --git a/mods/cnc/chrome/settings.yaml b/mods/cnc/chrome/settings.yaml index 7fc8106265..1f00d6671f 100644 --- a/mods/cnc/chrome/settings.yaml +++ b/mods/cnc/chrome/settings.yaml @@ -523,6 +523,13 @@ Container@SETTINGS_PANEL: Height: 20 Font: Regular Text: Show Performance Text + Checkbox@PERFGRAPH_CHECKBOX: + X: 15 + Y: 100 + Width: 300 + Height: 20 + Font: Regular + Text: Show Performance Graph Checkbox@FETCH_NEWS_CHECKBOX: X: 310 Y: 40 @@ -530,43 +537,51 @@ Container@SETTINGS_PANEL: Height: 20 Font: Regular Text: Fetch Community News - Checkbox@PERFGRAPH_CHECKBOX: + Checkbox@SENDSYSINFO_CHECKBOX: X: 310 Y: 70 Width: 300 Height: 20 Font: Regular - Text: Show Performance Graph + Text: Send System Information + Label@SENDSYSINFO_DESC: + X: 310 + Y: 85 + Width: 250 + Height: 30 + Font: Tiny + WordWrap: True + Text: Your Operating System, OpenGL and .NET runtime versions, and language settings will be sent along with an anonymous ID to help priorise future development. Label@DEBUG_TITLE: - Y: 140 + Y: 170 Width: PARENT_RIGHT Font: Bold Text: Debug Align: Center Checkbox@BOTDEBUG_CHECKBOX: X: 15 - Y: 160 + Y: 190 Width: 300 Height: 20 Font: Regular Text: Show Bot Debug Messages Checkbox@VERBOSE_NAT_CHECKBOX: X: 310 - Y: 160 + Y: 190 Width: 300 Height: 20 Font: Regular Text: Detailed NAT logging Checkbox@CHECKUNSYNCED_CHECKBOX: X: 15 - Y: 190 + Y: 220 Width: 300 Height: 20 Font: Regular Text: Check Sync around Unsynced Code Checkbox@LUADEBUG_CHECKBOX: X: 310 - Y: 190 + Y: 220 Width: 300 Height: 20 Font: Regular diff --git a/mods/ra/chrome/settings.yaml b/mods/ra/chrome/settings.yaml index 9447c2e8a2..1bad794584 100644 --- a/mods/ra/chrome/settings.yaml +++ b/mods/ra/chrome/settings.yaml @@ -524,6 +524,13 @@ Background@SETTINGS_PANEL: Height: 20 Font: Regular Text: Show Performance Text + Checkbox@PERFGRAPH_CHECKBOX: + X: 15 + Y: 100 + Width: 300 + Height: 20 + Font: Regular + Text: Show Performance Graph Checkbox@FETCH_NEWS_CHECKBOX: X: 310 Y: 40 @@ -531,43 +538,51 @@ Background@SETTINGS_PANEL: Height: 20 Font: Regular Text: Fetch Community News - Checkbox@PERFGRAPH_CHECKBOX: + Checkbox@SENDSYSINFO_CHECKBOX: X: 310 Y: 70 Width: 300 Height: 20 Font: Regular - Text: Show Performance Graph + Text: Send System Information + Label@SENDSYSINFO_DESC: + X: 310 + Y: 85 + Width: 250 + Height: 30 + Font: Tiny + WordWrap: True + Text: Your Operating System, OpenGL and .NET runtime versions, and language settings will be sent along with an anonymous ID to help priorise future development. Label@DEBUG_TITLE: - Y: 140 + Y: 170 Width: PARENT_RIGHT Font: Bold Text: Debug Align: Center Checkbox@BOTDEBUG_CHECKBOX: X: 15 - Y: 160 + Y: 190 Width: 300 Height: 20 Font: Regular Text: Show Bot Debug Messages Checkbox@VERBOSE_NAT_CHECKBOX: X: 310 - Y: 160 + Y: 190 Width: 300 Height: 20 Font: Regular Text: Detailed NAT logging Checkbox@CHECKUNSYNCED_CHECKBOX: X: 15 - Y: 190 + Y: 220 Width: 300 Height: 20 Font: Regular Text: Check Sync around Unsynced Code Checkbox@LUADEBUG_CHECKBOX: X: 310 - Y: 190 + Y: 220 Width: 300 Height: 20 Font: Regular