Disable GitHub update check in Steam build

This commit is contained in:
Jaex 2015-09-09 23:58:31 +03:00
parent fbad699203
commit 67e7549eef
8 changed files with 111 additions and 95 deletions

View file

@ -40,7 +40,7 @@
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;RELEASE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@ -53,7 +53,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Steam|AnyCPU'">
<OutputPath>bin\Steam\</OutputPath>
<DefineConstants>TRACE;Steam</DefineConstants>
<DefineConstants>TRACE;STEAM</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>

View file

@ -42,7 +42,11 @@ public AboutForm()
rtbShareXInfo.AddContextMenu();
rtbCredits.AddContextMenu();
#if STEAM
uclUpdate.Visible = false;
#else
uclUpdate.CheckUpdate(TaskHelpers.CheckUpdate);
#endif
lblTeam.Text = "ShareX Team:";
lblBerk.Text = "Jaex (Berk)";

View file

@ -35,19 +35,23 @@ private void InitializeComponent()
this.tpGeneral = new System.Windows.Forms.TabPage();
this.cbShowTray = new System.Windows.Forms.CheckBox();
this.cbTrayIconProgressEnabled = new System.Windows.Forms.CheckBox();
this.btnChromeSupport = new System.Windows.Forms.Button();
this.btnLanguages = new ShareX.HelpersLib.MenuButton();
this.cmsLanguages = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cbRememberMainFormPosition = new System.Windows.Forms.CheckBox();
this.llTranslators = new System.Windows.Forms.LinkLabel();
this.cbSilentRun = new System.Windows.Forms.CheckBox();
this.cbTaskbarProgressEnabled = new System.Windows.Forms.CheckBox();
this.cbRememberMainFormSize = new System.Windows.Forms.CheckBox();
this.cbSilentRun = new System.Windows.Forms.CheckBox();
this.cbRememberMainFormPosition = new System.Windows.Forms.CheckBox();
this.lblLanguage = new System.Windows.Forms.Label();
this.tpIntegration = new System.Windows.Forms.TabPage();
this.gbSteam = new System.Windows.Forms.GroupBox();
this.cbSteamShowInApp = new System.Windows.Forms.CheckBox();
this.gbChrome = new System.Windows.Forms.GroupBox();
this.btnChromeSupport = new System.Windows.Forms.Button();
this.gbWindows = new System.Windows.Forms.GroupBox();
this.cbStartWithWindows = new System.Windows.Forms.CheckBox();
this.cbSendToMenu = new System.Windows.Forms.CheckBox();
this.cbShellContextMenu = new System.Windows.Forms.CheckBox();
this.btnLanguages = new ShareX.HelpersLib.MenuButton();
this.cmsLanguages = new System.Windows.Forms.ContextMenuStrip(this.components);
this.llTranslators = new System.Windows.Forms.LinkLabel();
this.lblLanguage = new System.Windows.Forms.Label();
this.tpPaths = new System.Windows.Forms.TabPage();
this.lblNotePersonalFolderPath = new System.Windows.Forms.Label();
this.btnOpenScreenshotsFolder = new System.Windows.Forms.Button();
@ -110,12 +114,11 @@ private void InitializeComponent()
this.tpAdvanced = new System.Windows.Forms.TabPage();
this.pgSettings = new System.Windows.Forms.PropertyGrid();
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
this.gbChrome = new System.Windows.Forms.GroupBox();
this.cbSteamShowInApp = new System.Windows.Forms.CheckBox();
this.tpIntegration = new System.Windows.Forms.TabPage();
this.gbSteam = new System.Windows.Forms.GroupBox();
this.tcSettings.SuspendLayout();
this.tpGeneral.SuspendLayout();
this.tpIntegration.SuspendLayout();
this.gbSteam.SuspendLayout();
this.gbChrome.SuspendLayout();
this.gbWindows.SuspendLayout();
this.tpPaths.SuspendLayout();
this.tpProxy.SuspendLayout();
@ -134,9 +137,6 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.nudRetryUpload)).BeginInit();
this.tpPrint.SuspendLayout();
this.tpAdvanced.SuspendLayout();
this.gbChrome.SuspendLayout();
this.tpIntegration.SuspendLayout();
this.gbSteam.SuspendLayout();
this.SuspendLayout();
//
// tcSettings
@ -181,12 +181,39 @@ private void InitializeComponent()
this.cbTrayIconProgressEnabled.UseVisualStyleBackColor = true;
this.cbTrayIconProgressEnabled.CheckedChanged += new System.EventHandler(this.cbTrayIconProgressEnabled_CheckedChanged);
//
// btnChromeSupport
// btnLanguages
//
resources.ApplyResources(this.btnChromeSupport, "btnChromeSupport");
this.btnChromeSupport.Name = "btnChromeSupport";
this.btnChromeSupport.UseVisualStyleBackColor = true;
this.btnChromeSupport.Click += new System.EventHandler(this.btnChromeSupport_Click);
resources.ApplyResources(this.btnLanguages, "btnLanguages");
this.btnLanguages.Menu = this.cmsLanguages;
this.btnLanguages.MenuX0 = true;
this.btnLanguages.Name = "btnLanguages";
this.btnLanguages.UseVisualStyleBackColor = true;
//
// cmsLanguages
//
this.cmsLanguages.Name = "cmsLanguages";
resources.ApplyResources(this.cmsLanguages, "cmsLanguages");
//
// cbRememberMainFormPosition
//
resources.ApplyResources(this.cbRememberMainFormPosition, "cbRememberMainFormPosition");
this.cbRememberMainFormPosition.Name = "cbRememberMainFormPosition";
this.cbRememberMainFormPosition.UseVisualStyleBackColor = true;
this.cbRememberMainFormPosition.CheckedChanged += new System.EventHandler(this.cbRememberMainFormPosition_CheckedChanged);
//
// llTranslators
//
resources.ApplyResources(this.llTranslators, "llTranslators");
this.llTranslators.Name = "llTranslators";
this.llTranslators.TabStop = true;
this.llTranslators.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llTranslators_LinkClicked);
//
// cbSilentRun
//
resources.ApplyResources(this.cbSilentRun, "cbSilentRun");
this.cbSilentRun.Name = "cbSilentRun";
this.cbSilentRun.UseVisualStyleBackColor = true;
this.cbSilentRun.CheckedChanged += new System.EventHandler(this.cbSilentRun_CheckedChanged);
//
// cbTaskbarProgressEnabled
//
@ -202,19 +229,46 @@ private void InitializeComponent()
this.cbRememberMainFormSize.UseVisualStyleBackColor = true;
this.cbRememberMainFormSize.CheckedChanged += new System.EventHandler(this.cbRememberMainFormSize_CheckedChanged);
//
// cbSilentRun
// lblLanguage
//
resources.ApplyResources(this.cbSilentRun, "cbSilentRun");
this.cbSilentRun.Name = "cbSilentRun";
this.cbSilentRun.UseVisualStyleBackColor = true;
this.cbSilentRun.CheckedChanged += new System.EventHandler(this.cbSilentRun_CheckedChanged);
resources.ApplyResources(this.lblLanguage, "lblLanguage");
this.lblLanguage.Name = "lblLanguage";
//
// cbRememberMainFormPosition
// tpIntegration
//
resources.ApplyResources(this.cbRememberMainFormPosition, "cbRememberMainFormPosition");
this.cbRememberMainFormPosition.Name = "cbRememberMainFormPosition";
this.cbRememberMainFormPosition.UseVisualStyleBackColor = true;
this.cbRememberMainFormPosition.CheckedChanged += new System.EventHandler(this.cbRememberMainFormPosition_CheckedChanged);
this.tpIntegration.Controls.Add(this.gbSteam);
this.tpIntegration.Controls.Add(this.gbChrome);
this.tpIntegration.Controls.Add(this.gbWindows);
resources.ApplyResources(this.tpIntegration, "tpIntegration");
this.tpIntegration.Name = "tpIntegration";
this.tpIntegration.UseVisualStyleBackColor = true;
//
// gbSteam
//
this.gbSteam.Controls.Add(this.cbSteamShowInApp);
resources.ApplyResources(this.gbSteam, "gbSteam");
this.gbSteam.Name = "gbSteam";
this.gbSteam.TabStop = false;
//
// cbSteamShowInApp
//
resources.ApplyResources(this.cbSteamShowInApp, "cbSteamShowInApp");
this.cbSteamShowInApp.Name = "cbSteamShowInApp";
this.cbSteamShowInApp.UseVisualStyleBackColor = true;
//
// gbChrome
//
this.gbChrome.Controls.Add(this.btnChromeSupport);
resources.ApplyResources(this.gbChrome, "gbChrome");
this.gbChrome.Name = "gbChrome";
this.gbChrome.TabStop = false;
//
// btnChromeSupport
//
resources.ApplyResources(this.btnChromeSupport, "btnChromeSupport");
this.btnChromeSupport.Name = "btnChromeSupport";
this.btnChromeSupport.UseVisualStyleBackColor = true;
this.btnChromeSupport.Click += new System.EventHandler(this.btnChromeSupport_Click);
//
// gbWindows
//
@ -246,31 +300,6 @@ private void InitializeComponent()
this.cbShellContextMenu.UseVisualStyleBackColor = true;
this.cbShellContextMenu.CheckedChanged += new System.EventHandler(this.cbShellContextMenu_CheckedChanged);
//
// btnLanguages
//
resources.ApplyResources(this.btnLanguages, "btnLanguages");
this.btnLanguages.Menu = this.cmsLanguages;
this.btnLanguages.MenuX0 = true;
this.btnLanguages.Name = "btnLanguages";
this.btnLanguages.UseVisualStyleBackColor = true;
//
// cmsLanguages
//
this.cmsLanguages.Name = "cmsLanguages";
resources.ApplyResources(this.cmsLanguages, "cmsLanguages");
//
// llTranslators
//
resources.ApplyResources(this.llTranslators, "llTranslators");
this.llTranslators.Name = "llTranslators";
this.llTranslators.TabStop = true;
this.llTranslators.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llTranslators_LinkClicked);
//
// lblLanguage
//
resources.ApplyResources(this.lblLanguage, "lblLanguage");
this.lblLanguage.Name = "lblLanguage";
//
// tpPaths
//
this.tpPaths.Controls.Add(this.lblNotePersonalFolderPath);
@ -740,35 +769,6 @@ private void InitializeComponent()
this.tttvMain.TreeViewFont = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162)));
this.tttvMain.TreeViewSize = 175;
//
// gbChrome
//
this.gbChrome.Controls.Add(this.btnChromeSupport);
resources.ApplyResources(this.gbChrome, "gbChrome");
this.gbChrome.Name = "gbChrome";
this.gbChrome.TabStop = false;
//
// cbSteamShowInApp
//
resources.ApplyResources(this.cbSteamShowInApp, "cbSteamShowInApp");
this.cbSteamShowInApp.Name = "cbSteamShowInApp";
this.cbSteamShowInApp.UseVisualStyleBackColor = true;
//
// tpIntegration
//
this.tpIntegration.Controls.Add(this.gbSteam);
this.tpIntegration.Controls.Add(this.gbChrome);
this.tpIntegration.Controls.Add(this.gbWindows);
resources.ApplyResources(this.tpIntegration, "tpIntegration");
this.tpIntegration.Name = "tpIntegration";
this.tpIntegration.UseVisualStyleBackColor = true;
//
// gbSteam
//
this.gbSteam.Controls.Add(this.cbSteamShowInApp);
resources.ApplyResources(this.gbSteam, "gbSteam");
this.gbSteam.Name = "gbSteam";
this.gbSteam.TabStop = false;
//
// ApplicationSettingsForm
//
resources.ApplyResources(this, "$this");
@ -784,6 +784,10 @@ private void InitializeComponent()
this.tcSettings.ResumeLayout(false);
this.tpGeneral.ResumeLayout(false);
this.tpGeneral.PerformLayout();
this.tpIntegration.ResumeLayout(false);
this.gbSteam.ResumeLayout(false);
this.gbSteam.PerformLayout();
this.gbChrome.ResumeLayout(false);
this.gbWindows.ResumeLayout(false);
this.gbWindows.PerformLayout();
this.tpPaths.ResumeLayout(false);
@ -808,10 +812,6 @@ private void InitializeComponent()
this.tpPrint.ResumeLayout(false);
this.tpPrint.PerformLayout();
this.tpAdvanced.ResumeLayout(false);
this.gbChrome.ResumeLayout(false);
this.tpIntegration.ResumeLayout(false);
this.gbSteam.ResumeLayout(false);
this.gbSteam.PerformLayout();
this.ResumeLayout(false);
}

View file

@ -281,7 +281,7 @@ private void cbStartWithWindows_CheckedChanged(object sender, EventArgs e)
string filePath;
#if Steam
#if STEAM
filePath = Helpers.GetAbsolutePath("../ShareX_Launcher.exe");
#else
filePath = Application.ExecutablePath;

View file

@ -442,13 +442,13 @@
<value>16, 24</value>
</data>
<data name="cbSteamShowInApp.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 17</value>
<value>246, 17</value>
</data>
<data name="cbSteamShowInApp.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="cbSteamShowInApp.Text" xml:space="preserve">
<value>While ShareX open show "In-app" in Steam</value>
<value>While ShareX is open, show "In-app" in Steam</value>
</data>
<data name="&gt;&gt;cbSteamShowInApp.Name" xml:space="preserve">
<value>cbSteamShowInApp</value>

View file

@ -672,7 +672,7 @@ private void UpdateUploaderMenuNames()
private void ConfigureAutoUpdate()
{
#if !DEBUG
#if RELEASE
lock (updateTimerLock)
{
if (Program.Settings.AutoCheckUpdate)

View file

@ -41,6 +41,18 @@ internal static class Program
{
public static bool IsBeta = true;
public static bool IsSteamBuild
{
get
{
#if STEAM
return true;
#else
return false;
#endif
}
}
public static string Title
{
get

View file

@ -54,7 +54,7 @@
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;RELEASE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@ -68,7 +68,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Steam|AnyCPU'">
<OutputPath>bin\Steam\</OutputPath>
<DefineConstants>TRACE;Steam</DefineConstants>
<DefineConstants>TRACE;STEAM</DefineConstants>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>