-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(windows): kmshell switch handling for the installing state #12956
Conversation
Also handle the case where the SM seems to be stuck in the installing state. MSI may have failed.
User Test ResultsTest specification and instructions Test Artifacts |
UserCanceled := False; | ||
if BUpdateSM.ReadyToInstall and | ||
(not FSilent and (FMode in [fmStart, fmSplash, fmMain, fmAbout, fmHelp, | ||
fmShowHelp, fmSettings])) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcdurdin I have added fmShowHelp, and fmSettings as gui's where we could notify the user we can pop keyman update is ready to install. select update
, or close
.
However, I am still not happy that we are missing the all-important case when Keyman starts with Windows which is simply kmshell.exe -s
I propose we update this to have a switch -on-boot
so kmshell.exe -s -on-boot
then we could determine this is a case where the UI can be run. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kmshell -s
means 'silent' so that means no UI is intended to be shown there... We could change that to kmshell.exe -boot
, but we'd have to fixup existing installations -- we'd need to make sure that that change was applied during the upgrade (this is quite doable, just more work and testing).
I think that'd be good because it'd be clearer than the current -s
which could be used any time and is ambiguous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@_marc
This isn't me!
yikes
…h-handling # Keyman Conventional Commit suggestions: # # - Link to a Sentry issue with git trailer: # Fixes: _MODULE_-_ID_ # - Give credit to co-authors: # Co-authored-by: _Name_ <_email_> # - Use imperative, present tense ('attach' not 'attaches', 'attached' etc) # - Don't include a period at the end of the title # - Always include a blank line before trailers # - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
// Result = exit straight away as we are installing (MSI installer) | ||
// need to just do a no-op keyman will it maybe using kmshell to install | ||
// packages. | ||
// Should not be called while in installing state MSI installer may have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a period missing after "state"? I have a hard time parsing the sentence as it is.
Co-authored-by: Eberhard Beilharz <[email protected]>
Test ResultsI tested this issue with the attached "Keyman-18.0.175-alpha-test-12956" build(30/01/2025) on Windows 10. I'm sharing my observation here.
|
Changes in this pull request will be available for download in Keyman version 18.0.182-alpha |
This improves the switch handling around the installing state. Previously, the SM did a no-op and let the commands go through.
Now when in the installing state and the following modes are set "fmInstallTip, fmInstallTipsForPackages, fmRegisterTip, fmUpgradeKeyboards, fmUpgradeMnemonicLayout" skip being sent to the SM but all other messages are sent through. This then allows us to detect whne kmshell is trying to run as if successuly installed but state machine is still in the installing state.
This is also adds
ProcessBackroundUpdate
for neatness and readablity of code it is not inteded to change the functionality.A seperate issue #12994 will add a -boot switch.
User Testing
We will just test there is no regression.
TEST_INSTALL_UPDATE
WinR type regedit Go the current user key
update state
Press F5 to keep it refreshing it.
The state will go to
usDownloading
tousInstalling
at the same time keep checking theUpdateCache
folder.TEST_INSTALL_IDLE_CLEARED
In this test we will manipulate the registry update state to test the handling of receiving an kmshell request not expected in the installing state.
WinR type regedit Go the current user key
update state
Press F5 to keep it refreshing it.
The state will go to
usDownloading
tousInstalling
at the same time keep checking theUpdateCache
folder.update state
to "usInstalling"cd "c:\Program Files (x86)\Keyman\Keyman Desktop"
kmshell.exe -a
usIdle
press F5 to refreshUpdatedCache
folder should be empty