From 04433f4c3a9270b5b21f1780b98641572a5fb596 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 19 May 2017 12:51:15 +0100 Subject: [PATCH] Remove search for suffix on git commit hash in C# UI * Instead we just add a comment next to a 'false' return, and it can be replaced in a build script. --- renderdocui/Windows/MainWindow.cs | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/renderdocui/Windows/MainWindow.cs b/renderdocui/Windows/MainWindow.cs index b130d3d0e..37f5c9781 100644 --- a/renderdocui/Windows/MainWindow.cs +++ b/renderdocui/Windows/MainWindow.cs @@ -97,25 +97,11 @@ namespace renderdocui.Windows { get { - return InformationalVersion.Replace("-official", "").Replace("-beta", ""); + return InformationalVersion; } } - private bool BetaVersion - { - get - { - return InformationalVersion.Contains("-beta"); - } - } - - private bool OfficialVersion - { - get - { - return InformationalVersion.Contains("-official"); - } - } + private bool OfficialVersion { get { return /*RENDERDOC_OFFICIAL_BUILD*/false; } } private string BareVersionString { @@ -203,7 +189,7 @@ namespace renderdocui.Windows })); remoteStatusThread.Start(); - sendErrorReportToolStripMenuItem.Enabled = OfficialVersion || BetaVersion; + sendErrorReportToolStripMenuItem.Enabled = OfficialVersion; // create default layout if layout failed to load if (!loaded) @@ -693,8 +679,6 @@ namespace renderdocui.Windows Text = prefix + "RenderDoc "; if(OfficialVersion) Text += VersionString; - else if(BetaVersion) - Text += String.Format("{0}-beta - {1}", VersionString, GitCommitHash); else Text += String.Format("Unofficial release ({0} - {1})", VersionString, GitCommitHash); @@ -1392,7 +1376,7 @@ namespace renderdocui.Windows { if (IsVersionMismatched()) { - if (!OfficialVersion && !BetaVersion) + if (!OfficialVersion) { MessageBox.Show("You are running an unofficial build with mismatched core and UI versions.\n" + "Double check where you got your build from and do a sanity check!", @@ -1431,7 +1415,7 @@ namespace renderdocui.Windows return; } - if (!OfficialVersion && !BetaVersion) + if (!OfficialVersion) { if (callback != null) callback(UpdateResult.Unofficial); return; @@ -1463,9 +1447,6 @@ namespace renderdocui.Windows string versionCheck = BareVersionString; - if (BetaVersion) - versionCheck += String.Format("-{0}-beta", GitCommitHash.Substring(0, 8)); - statusText.Text = "Checking for updates..."; statusProgress.Visible = true; statusProgress.Style = ProgressBarStyle.Marquee;