From 7b0705df2804aa7ccfb09e0c76503ee3ffb4f879 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 6 Jun 2021 17:24:36 +0200 Subject: [PATCH] Disable build update button for 32bit version, so I only have to provide 64bit builds (while still supporting releases in 32 bit) --- out/locale/en/LC_MESSAGES/default.po | 5 ++++- source/updatecheck.pas | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/out/locale/en/LC_MESSAGES/default.po b/out/locale/en/LC_MESSAGES/default.po index 8833d3ff..51887aa0 100644 --- a/out/locale/en/LC_MESSAGES/default.po +++ b/out/locale/en/LC_MESSAGES/default.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: HeidiSQL\n" "POT-Creation-Date: 2012-11-05 21:40\n" -"PO-Revision-Date: 2021-06-05 08:39+0200\n" +"PO-Revision-Date: 2021-06-06 17:21+0200\n" "Last-Translator: Ansgar Becker \n" "Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n" "MIME-Version: 1.0\n" @@ -3688,6 +3688,9 @@ msgstr "Nightly build" msgid "Download nightly build" msgstr "Download nightly build" +msgid "No build updates for 32 bit version" +msgstr "No build updates for 32 bit version" + #. frmUpdateCheck..groupRelease..Caption #: updatecheck.dfm:90 msgid "Official release" diff --git a/source/updatecheck.pas b/source/updatecheck.pas index 6f09173e..f4c244dc 100644 --- a/source/updatecheck.pas +++ b/source/updatecheck.pas @@ -195,11 +195,17 @@ begin Note := Ini.ReadString(INISECT_BUILD, 'Note', ''); if Note <> '' then memoBuild.Lines.Add(_('Notes') + ': * ' + StringReplace(Note, '%||%', CRLF+'* ', [rfReplaceAll] ) ); - btnBuild.Caption := f_('Download and install build %d', [BuildRevision]); - // A new release should have priority over a new nightly build. - // So the user should not be able to download a newer build here - // before having installed the new release. - btnBuild.Enabled := (Mainform.AppVerRevision = 0) or ((BuildRevision > Mainform.AppVerRevision) and (not LinkLabelRelease.Enabled)); + if GetExecutableBits = 64 then begin + btnBuild.Caption := f_('Download and install build %d', [BuildRevision]); + // A new release should have priority over a new nightly build. + // So the user should not be able to download a newer build here + // before having installed the new release. + btnBuild.Enabled := (Mainform.AppVerRevision = 0) or ((BuildRevision > Mainform.AppVerRevision) and (not LinkLabelRelease.Enabled)); + end + else begin + btnBuild.Caption := _('No build updates for 32 bit version'); + end; + end; if FileExists(CheckFilename) then