From 8df507d97d13a4b31ec82c57ac20fbae8d49e6be Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:08:51 +1000 Subject: [PATCH 1/4] feat(windows): add menuframe_update image 4 config --- .../src/desktop/kmshell/xml/menuframe_update.jpg | Bin 0 -> 1404 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 windows/src/desktop/kmshell/xml/menuframe_update.jpg 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 0000000000000000000000000000000000000000..6eeb76bfd6f64f987667906903678cbd227dc21b GIT binary patch literal 1404 zcmbVKX;4#F6g~;rNJ1nK5GY98NOfS^h%7}xFbV{rVAuqlfsjQhB!MIdIA9Gb&=$LZ zwjctfRG~~Og#v|EWDx-!s-8V=2B;X z26jM!9k4?z(If|j`i8-(u{Z!o383Ez*IJeK{{@OvrjejhADT)@vRVs3*om-fnl>57 zXaXlOOe8=!4`HrUp_C$AjqoO^LW*PjTah9u71zN7-wjiy3=c(Fgr+U{fe?Zq1h^0n zsgM9kpamzCm1t!TxPlAHexL?1WPk=FC?|mot)(H377in%K}vqG8=)|S&~8@ovsv*A zK`!w~BLQjQ4k}O}P23Og^F|K#y6) zi-y?$^|lJfb%pbWJ!1D!r$$5~K2VU*Ak)ZX5{XQwQYkbhoyla-84MGanW+hj&0;W2 zElt_x919Bz=9;xumK-ZHjs*v62L=tDf<1x22CNJ0(GMb{ONrmhe}h0o!W1gan9e|i zMpGaXjEsmRBistHvrrvKY_i#Uz7NHGznHoqg|kifMFnl+?z#>O(QU&f=XiCtG2L>l zm9@=g2j1ITwr+QEb#s5uL$GJBub;m#AT%sIA`+dvL@JXXI-Kxy9-#(4LPLAObQ0N$bEAgx-rlPXJ?x5avgGJN4=X=ayx;aySMQ| z=kfckK&^7o>2I+{(s|>;rn&Ix&e`XYiLXj7y4;qX@;O*=d{XydorfwUqZ$LLiXEhy zRP6H~4f@_XnvrzoW5T%KX$Knn)U z881h}$Y^;@LR!jjA1UqgZaLRWU;TBhppY9n^VWHybGcq+l3o?vT!z8HHaE9~wM7^t z7LV@rt{JqZ>Mk=`xn5@Zizk9)fe9|~f(q!*6Ic6siIXny@${hh{`42#Ma!KJp!nfC*J z-1dxDR^`y}(%8W0_9&~a)w?$;w)UD|7Hn5J>OMVisIT)Ok5_&nD|Vuk)pOOu=~D5< Yp{(p1BS(7H*d8rVtA$gA18vyQKR^b-kN^Mx literal 0 HcmV?d00001 From 7860ddce5b1302fbb9297f543842e4ae6201cadd Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:11:23 +1000 Subject: [PATCH 2/4] feat(windows): add update to strings.xml --- windows/src/desktop/kmshell/xml/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) 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 From 1667cfed097a8ea618138f5896d6eeb05299d811 Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 3 Sep 2024 14:38:09 +1000 Subject: [PATCH 3/4] feat(windows): clean up ready for review --- common/windows/delphi/general/RegistryKeys.pas | 2 -- .../src/desktop/kmshell/main/BackgroundUpdateStateDiagram.md | 4 ++-- windows/src/desktop/kmshell/main/UfrmMain.pas | 2 -- windows/src/desktop/kmshell/main/initprog.pas | 2 ++ .../insthelper/Keyman.System.Install.EnginePostInstall.pas | 3 +-- windows/src/engine/keyman/main.pas | 3 --- 6 files changed, 5 insertions(+), 11 deletions(-) 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/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/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/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'); From 85a998bb732a8e072b3635a30c86adda91f943eb Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:31:49 +1000 Subject: [PATCH 4/4] feat(windows): rename executehistory module for clarity --- ...tory.pas => Keyman.System.ExecutionHistory.pas} | 14 +++++++++----- windows/src/desktop/kmshell/kmshell.dpr | 2 +- windows/src/desktop/kmshell/kmshell.dproj | 14 +++++++------- .../main/Keyman.System.UpdateStateMachine.pas | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) rename common/windows/delphi/general/{Keyman.System.ExecuteHistory.pas => Keyman.System.ExecutionHistory.pas} (77%) 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/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 @@ - +
Form1
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/Keyman.System.UpdateStateMachine.pas b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas index f7cfd9ef28..c91fdc858d 100644 --- a/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas +++ b/windows/src/desktop/kmshell/main/Keyman.System.UpdateStateMachine.pas @@ -32,7 +32,7 @@ uses httpuploader, Keyman.System.UpdateCheckResponse, - Keyman.System.ExecuteHistory, + Keyman.System.ExecutionHistory, UfrmDownloadProgress; const