mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 08:37:42 +00:00
chore(windows): Merge branch 'feat/windows/add-apply-now-update' into feat/windows/install-now-pop-up
This commit is contained in:
commit
cb341d985a
12 changed files with 27 additions and 25 deletions
|
|
@ -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;
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@
|
|||
<DCCReference Include="main\Keyman.System.RemoteUpdateCheck.pas"/>
|
||||
<DCCReference Include="main\Keyman.System.UpdateStateMachine.pas"/>
|
||||
<DCCReference Include="main\Keyman.System.DownloadUpdate.pas"/>
|
||||
<DCCReference Include="..\..\..\..\common\windows\delphi\general\Keyman.System.ExecuteHistory.pas"/>
|
||||
<DCCReference Include="..\..\..\..\common\windows\delphi\general\Keyman.System.ExecutionHistory.pas"/>
|
||||
<DCCReference Include="main\UfrmStartInstall.pas">
|
||||
<Form>Form1</Form>
|
||||
<FormType>dfm</FormType>
|
||||
|
|
@ -425,12 +425,6 @@
|
|||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="bin\Win32\Debug\kmshell.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>kmshell.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="kmshell.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>kmshell.exe</RemoteName>
|
||||
|
|
@ -443,6 +437,12 @@
|
|||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="bin\Win32\Debug\kmshell.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>kmshell.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ stateDiagram
|
|||
Downloading --> Installing
|
||||
Downloading --> WaitingRestart
|
||||
WaitingRestart --> Installing
|
||||
Installing --> WaitingPostInstall
|
||||
WaitingPostInstall --> Idle
|
||||
Installing --> PostInstall
|
||||
PostInstall --> Idle
|
||||
```
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ uses
|
|||
|
||||
httpuploader,
|
||||
Keyman.System.UpdateCheckResponse,
|
||||
Keyman.System.ExecuteHistory,
|
||||
UfrmStartInstall,
|
||||
Keyman.System.ExecutionHistory,
|
||||
UfrmDownloadProgress;
|
||||
|
||||
const
|
||||
|
|
|
|||
|
|
@ -847,8 +847,6 @@ begin
|
|||
KL.Log('TrmfMain: Executing Update_ApplyNow Failed');
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TfrmMain.TntFormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
inherited;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
BIN
windows/src/desktop/kmshell/xml/menuframe_update.jpg
Normal file
BIN
windows/src/desktop/kmshell/xml/menuframe_update.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -695,6 +695,10 @@ keyboard that you use in Windows. Keyman keyboards will adapt automatically to
|
|||
|
||||
|
||||
|
||||
<!-- Context: Online Update Dialog -->
|
||||
<!-- String Type: PlainText -->
|
||||
<!-- Introduced: 18.0.230.0 -->
|
||||
<string name="S_Update" comment="Update tab name">Update</string>
|
||||
|
||||
<!-- Context: Online Update Dialog -->
|
||||
<!-- String Type: PlainText -->
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue