Add ability to collect system information from users' systems
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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 () => { };
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user