diff --git a/common/windows/delphi/general/Keyman.System.ExecuteHistory.pas b/common/windows/delphi/general/Keyman.System.ExecutionHistory.pas
similarity index 77%
rename from common/windows/delphi/general/Keyman.System.ExecuteHistory.pas
rename to common/windows/delphi/general/Keyman.System.ExecutionHistory.pas
index e146f8fa69..08fd015c88 100644
--- a/common/windows/delphi/general/Keyman.System.ExecuteHistory.pas
+++ b/common/windows/delphi/general/Keyman.System.ExecutionHistory.pas
@@ -1,4 +1,12 @@
-unit Keyman.System.ExecuteHistory;
+unit Keyman.System.ExecutionHistory;
+
+{
+ Copyright: © SIL International.
+
+ This module provides functionality to track the execution state of the Keyman
+ engine. It uses a global atom to record whether Keyman has started during the
+ current session and checks if it has previously run.
+}
interface
@@ -25,7 +33,6 @@ begin
if GetLastError <> ERROR_FILE_NOT_FOUND then
RaiseLastOSError;
atom := GlobalAddAtom(AtomName);
- KL.Log('RecordKeymanStarted: True');
Result := True;
if atom = 0 then
RaiseLastOSError;
@@ -47,13 +54,10 @@ begin
begin
if GetLastError <> ERROR_SUCCESS then
RaiseLastOSError;
-
- KL.Log('HasKeymanRun: Keyman Has Run');
Result := True;
end
else
begin
- KL.Log('HasKeymanRun: Keyman Has Run');
Result := False;
end;
diff --git a/common/windows/delphi/general/RegistryKeys.pas b/common/windows/delphi/general/RegistryKeys.pas
index efd60b4148..0d1ba5484e 100644
--- a/common/windows/delphi/general/RegistryKeys.pas
+++ b/common/windows/delphi/general/RegistryKeys.pas
@@ -162,7 +162,6 @@ const
SRegKey_KeymanDesktop_CU = SRegKey_KeymanDesktopRoot_CU;
SRegKey_KeymanDesktop_LM = SRegKey_KeymanDesktopRoot_LM;
-
{ Other Keyman Settings }
SRegValue_DeadkeyConversionMode = 'deadkey conversion mode'; // CU // I4552
@@ -300,7 +299,6 @@ const
SRegKey_KeymanDeveloperRoot_LM = SRegKey_KeymanRoot_LM + '\Keyman Developer'; // LM CU
SRegKey_KeymanDeveloper_LM = SRegKey_KeymanDeveloperRoot_LM; // LM CU
-
SRegKey_IDE_CU = SRegKey_KeymanDeveloper_CU + '\IDE'; // CU
SRegKey_IDEDock_CU = SRegKey_IDE_CU + '\Dock'; // CU
SRegKey_IDEFiles_CU = SRegKey_IDE_CU + '\Files'; // CU
diff --git a/windows/src/desktop/kmshell/kmshell.dpr b/windows/src/desktop/kmshell/kmshell.dpr
index 805a79aa58..13cf5a79de 100644
--- a/windows/src/desktop/kmshell/kmshell.dpr
+++ b/windows/src/desktop/kmshell/kmshell.dpr
@@ -183,7 +183,7 @@ uses
Keyman.System.RemoteUpdateCheck in 'main\Keyman.System.RemoteUpdateCheck.pas',
Keyman.System.UpdateStateMachine in 'main\Keyman.System.UpdateStateMachine.pas',
Keyman.System.DownloadUpdate in 'main\Keyman.System.DownloadUpdate.pas',
- Keyman.System.ExecuteHistory in '..\..\..\..\common\windows\delphi\general\Keyman.System.ExecuteHistory.pas',
+ Keyman.System.ExecutionHistory in '..\..\..\..\common\windows\delphi\general\Keyman.System.ExecutionHistory.pas',
UfrmStartInstall in 'main\UfrmStartInstall.pas' {Form1};
{$R VERSION.RES}
diff --git a/windows/src/desktop/kmshell/kmshell.dproj b/windows/src/desktop/kmshell/kmshell.dproj
index 79061ffe4a..3715f94659 100644
--- a/windows/src/desktop/kmshell/kmshell.dproj
+++ b/windows/src/desktop/kmshell/kmshell.dproj
@@ -359,7 +359,7 @@
-
+
dfm
@@ -425,12 +425,6 @@
False
-
-
- kmshell.exe
- true
-
-
kmshell.exe
@@ -443,6 +437,12 @@
true
+
+
+ kmshell.exe
+ true
+
+
1
diff --git a/windows/src/desktop/kmshell/main/BackgroundUpdateStateDiagram.md b/windows/src/desktop/kmshell/main/BackgroundUpdateStateDiagram.md
index 59c735eeb2..160d54b2c1 100644
--- a/windows/src/desktop/kmshell/main/BackgroundUpdateStateDiagram.md
+++ b/windows/src/desktop/kmshell/main/BackgroundUpdateStateDiagram.md
@@ -6,6 +6,6 @@ stateDiagram
Downloading --> Installing
Downloading --> WaitingRestart
WaitingRestart --> Installing
- Installing --> WaitingPostInstall
- WaitingPostInstall --> Idle
+ Installing --> PostInstall
+ PostInstall --> Idle
```
diff --git a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas
index edcc649da4..d47927dab5 100644
--- a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas
+++ b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas
@@ -32,8 +32,8 @@ uses
httpuploader,
Keyman.System.UpdateCheckResponse,
- Keyman.System.ExecuteHistory,
UfrmStartInstall,
+ Keyman.System.ExecutionHistory,
UfrmDownloadProgress;
const
diff --git a/windows/src/desktop/kmshell/main/UfrmMain.pas b/windows/src/desktop/kmshell/main/UfrmMain.pas
index 5df7c2aa6a..5f16aeb047 100644
--- a/windows/src/desktop/kmshell/main/UfrmMain.pas
+++ b/windows/src/desktop/kmshell/main/UfrmMain.pas
@@ -847,8 +847,6 @@ begin
KL.Log('TrmfMain: Executing Update_ApplyNow Failed');
end;
-
-
procedure TfrmMain.TntFormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
inherited;
diff --git a/windows/src/desktop/kmshell/main/initprog.pas b/windows/src/desktop/kmshell/main/initprog.pas
index 88d08ef4d1..79f1f60a60 100644
--- a/windows/src/desktop/kmshell/main/initprog.pas
+++ b/windows/src/desktop/kmshell/main/initprog.pas
@@ -253,6 +253,8 @@ begin
else if s = '-?' then FMode := fmHelpKMShell
else if s = '-h' then FMode := fmHelp
else if s = '-t' then FMode := fmTextEditor
+ //TODO: will remove -ouc not used
+ // -buc uses the Statemachine can be used for external scripts to force a check
else if s = '-ouc' then FMode := fmOnlineUpdateCheck
else if s = '-buc' then FMode := fmBackgroundUpdateCheck
else if s = '-bd' then FMode := fmBackgroundDownload
diff --git a/windows/src/desktop/kmshell/xml/menuframe_update.jpg b/windows/src/desktop/kmshell/xml/menuframe_update.jpg
new file mode 100644
index 0000000000..6eeb76bfd6
Binary files /dev/null and b/windows/src/desktop/kmshell/xml/menuframe_update.jpg differ
diff --git a/windows/src/desktop/kmshell/xml/strings.xml b/windows/src/desktop/kmshell/xml/strings.xml
index 824ce9dfc7..62125399ff 100644
--- a/windows/src/desktop/kmshell/xml/strings.xml
+++ b/windows/src/desktop/kmshell/xml/strings.xml
@@ -695,6 +695,10 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
+
+
+
+ Update
diff --git a/windows/src/engine/insthelper/Keyman.System.Install.EnginePostInstall.pas b/windows/src/engine/insthelper/Keyman.System.Install.EnginePostInstall.pas
index 4eea8adb59..6b0fe419b2 100644
--- a/windows/src/engine/insthelper/Keyman.System.Install.EnginePostInstall.pas
+++ b/windows/src/engine/insthelper/Keyman.System.Install.EnginePostInstall.pas
@@ -36,7 +36,6 @@ begin
Result := False;
UpdateStr := 'usPostInstall';
- //KL.Log('SetBackgroundState State Entry');
if RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar(SRegKey_KeymanEngine_CU), 0, KEY_ALL_ACCESS, hk) = ERROR_SUCCESS then
begin
try
@@ -54,7 +53,7 @@ begin
end
else
begin
- // couldn't open registry key
+ // TODO: couldn't open registry key
end;
end;
diff --git a/windows/src/engine/keyman/main.pas b/windows/src/engine/keyman/main.pas
index 9f1dbc9b3f..8fcce5c014 100644
--- a/windows/src/engine/keyman/main.pas
+++ b/windows/src/engine/keyman/main.pas
@@ -78,11 +78,8 @@ var
hMutex: Cardinal;
begin
- KL.Log('Keyman RunProgram');
if not ValidateParameters(FCommand) then Exit;
- // TODO set atom application running
- KL.Log('Calling RecordKeymanStarted');
RecordKeymanStarted;
hProgramMutex := CreateMutex(nil, False, 'KeymanEXE70');