Merge pull request #3682 from keymanapp/fix/windows/3680-show-version-with-tag-in-setup

fix(windows): show version with tag in setup
This commit is contained in:
Marc Durdin 2020-10-08 18:48:26 +11:00 committed by GitHub
commit 3e052bd9ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 2 deletions

View file

@ -85,6 +85,8 @@ type
ssOptionsPackageLanguageAssociation,
ssOptionsDefaultLanguage,
ssInstallerVersion,
{ Download dialog }
ssDownloadingTitle,

View file

@ -74,6 +74,13 @@ object frmInstallOptions: TfrmInstallOptions
Font.Style = [fsBold]
ParentFont = False
end
object lblInstallerVersion: TLabel
Left = 8
Top = 358
Width = 102
Height = 16
Caption = 'lblInstallerVersion'
end
object chkStartWithWindows: TCheckBox
Left = 8
Top = 100

View file

@ -48,6 +48,7 @@ type
lblDefaultKeymanSettings: TLabel;
lblSelectModulesToInstall: TLabel;
lblAssociatedKeyboardLanguage: TLabel;
lblInstallerVersion: TLabel;
procedure FormCreate(Sender: TObject);
procedure cmdOKClick(Sender: TObject);
private
@ -97,6 +98,7 @@ implementation
uses
bootstrapmain,
KeymanVersion,
SetupStrings;
{ TfrmInstallOptions }
@ -125,6 +127,8 @@ begin
chkCheckForUpdates.Visible := FAllowOptions;
chkStartWithWindows.Visible := FAllowOptions;
lblInstallerVersion.Caption := FInstallInfo.Text(ssInstallerVersion, [KeymanVersion.CKeymanVersionInfo.VersionWithTag]);
SetupDynamicOptions;
end;

View file

@ -55,6 +55,9 @@ Restart now?</string>
<string name="ssOptionsUpgradeKeyboards">Upgrade keyboards installed with older versions to version $VERSION</string>
<string name="ssOptionsAutomaticallyReportUsage">Share anonymous usage statistics with keyman.com</string>
<!-- Parameters: %0:s: version of installer (may differ from Keyman version) -->
<string name="ssInstallerVersion">Setup version: %0:s</string>
<!-- Parameters: %0:s: version -->
<string name="ssOptionsInstallKeyman">Install $APPNAME %0:s</string>

View file

@ -89,8 +89,17 @@ begin
FNewVersion := node.Values['version'].Value;
FFileName := node.Values['file'].Value;
FInstallURL := node.Values['url'].Value;
FInstallSize := (node.Values['size'] as TJSONNumber).AsInt64;
FStatus := ucrsUpdateReady;
if node.Values['size'] is TJSONNumber then
begin
FInstallSize := (node.Values['size'] as TJSONNumber).AsInt64;
FStatus := ucrsUpdateReady;
end
else
begin
FInstallSize := 0;
FStatus := ucrsNoUpdate;
FErrorMessage := 'No valid updates found.';
end;
end
else
begin