Commit graph

95 commits

Author SHA1 Message Date
rc-swag
9c7b1a6ae6 fix(windows): remove dead code 2026-01-08 17:19:34 +10:00
rc-swag
62af1f0c1c fix(windows): ensure download is new process 2025-12-01 09:47:05 +10:00
rc-swag
d769ef31b5
Merge pull request #14683 from keymanapp/fix/windows/14577/clean-cache-idle-state
fix(windows): remove cached files in idle state
2025-10-03 09:19:56 +10:00
rc-swag
96507a433b
update(windows): review comment
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-09-09 21:00:49 +10:00
rc-swag
4d38b254e5 fix(windows): fix confusing code comments 2025-09-09 12:04:16 +10:00
rc-swag
9229d1c76a fix(windows): remove cached files in idle state
First run event is actually called from the setup installation package
this means the setup file will be locked and will not be removed
by the first run event. Therefore we need to remove the cache files
in idle state when we get kmshell events. This seems excesive but we
need to do it for the reason explained.

Fixes: #14577
2025-09-04 15:09:31 +10:00
rc-swag
3ea8756192 fix(windows): refactor ReadyToInstall
It became apparent that we need to abort the "waitingtorestart" state
before promting the user if they want to install. Otherwise it is
confusing as to why nothing happens and Keyman just starts.
In doing that it was easier to refactor ReadyToInstall to validate the
cache, and check that automatic updates was still set.
It can now also trigger an abort clearing the cache and returning to
idle. This has slight flow on effect in that the HandleKMShell event
can still be called following in the exectution flow.
2025-09-04 14:30:12 +10:00
rc-swag
017a26435e fix(windows): continue when waitingrestart return to idle
When waiting restart on a handlekmshell event and returning to idle
kmshell execution should continue
2025-08-29 15:45:50 +10:00
rc-swag
aadfe4c7cc
fix(windows): commit review suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-08-19 14:01:18 +10:00
rc-swag
2acfa5493a fix(windows): check if autmatic updates off before prompt
Before prompting check if automatic updates has been turned
off in the time sitting in waiting for restart.
Also check it as we transition to waiting for restart in case
it was turned off while downloading.

Fixes:#14262
2025-07-03 17:35:33 +10:00
rc-swag
145f19b009
fix(windows): review comments
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-06-16 10:12:15 +10:00
rc-swag
d1adc63f80
Merge pull request #14166 from keymanapp/fix/windows/keyboard-only-install-return-idle
fix(windows): keyboard only install return idle
2025-06-13 10:57:58 +10:00
rc-swag
26c39fd3bb
feat(windows): review comments
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-06-13 10:57:06 +10:00
rc-swag
0d23efeae3 fix(windows): if only keyboards return to idle
There will be no `firstrun` for kmshell.exe if it is a keyboard only
install. We can therefore return to the idle state in the current
process
2025-06-12 15:31:22 +10:00
rc-swag
0408262eed chore(windows): Merge branch 'fix/windows/13767/error-updates-not-downloaded-after-3' into fix/windows/add-wuc-enum-result 2025-06-12 14:58:20 +10:00
rc-swag
cbd9146e31 chore(windows): Merge branch 'master' into fix/windows/13767/error-updates-not-downloaded-after-3
# 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
2025-06-11 22:11:11 +10:00
rc-swag
4b2b9c1a84 fix(windows): early return when download meta data invalid
is invalid or the version is not newer then currently installed
2025-06-11 22:09:48 +10:00
rc-swag
4462be9166 fix(windows): update TODO with issue number 2025-06-05 14:38:20 +10:00
rc-swag
c0dcec60f1 fix(windows): update all update check code 2025-06-05 11:10:14 +10:00
rc-swag
b33fec44a5 fix(windows): TRemoteUpdateCheckResult two new values
TRemoteUpdateCheckResult now has wucUpdateAvailable and
wucNotChecked to avoid confusion
2025-06-05 10:58:15 +10:00
rc-swag
ba3bcd95ac fix(windows): use ucrsUpdateReady in check for updates
When determining whether to move to the update available the
ucrsUpdateReady is now taken into account, not just the wucSuccess
flag. All the cases that check if there is Keyman installer file in
the metadata now check for this, and this was the original intent.
A two new function HasKeymanInstallFileUpdate and
CheckMetaDataForUpdate have been added to aid this check.
2025-06-05 09:08:58 +10:00
rc-swag
004c40606a
fix(windows): review comment fix log msg
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-06-02 20:54:07 +10:00
rc-swag
b1b065b912 fix(windows): fix download failing when cache.json missing
or stale. This commit adds a precondition check when entering the
Download state. It checks to see if the cache.json file still exists
then it checks if there are packages or installer files to download.
This will also check the version with ucrsUpdateReady, so if the
installed version is already newer it will not attempt the download.
If the check fails it will removed any cached files and return to
the idle state and check for updates.

Fixes: #13767
2025-06-02 20:39:46 +10:00
rc-swag
e33322fe8a fix(windows): change from error to breadcrumb and log
As this will also be seen when a user declines elevation
it is not really an error just breadcrumb incase there is
some actual error as a result.
fixes: #14066
2025-05-29 13:32:33 +10:00
rc-swag
309637474e fix(windows): fix sentry error message reporting 2025-05-22 13:24:12 +10:00
rc-swag
3857157fda
Merge pull request #13984 from keymanapp/fix/windows/13771/first-run-updateavailble-state
fix(windows): only breadcrumb unexpected state on first run
2025-05-22 11:44:55 +10:00
rc-swag
0dfe141114
Merge pull request #13920 from keymanapp/fix/windows/13831/rename-exit-method
fix(windows): rename Enter and Exit methods TState
2025-05-21 13:24:27 +10:00
rc-swag
73fa622092 fix(windows): only breadcrumb unexpected state on first run
If configuration is set to not automatically downloadupdates
and then from the configuration tab the check for update button is
clicked. If an update is found the upgrade statemachine is now in
state UpdateAvailable. If a updated keyman installer file is then
download direclty from keyman.com. Then installed by running the self
installer then on firstrun the statemachine will still be in the
UpdateState. This is should be fine, but it will be good to breadcrumb
incase we start to see some crashes on firstrun with this interaction.

The setup executable could modify the registry state directly but it is
cleaner to have the one master of the registry state value.

Fixes: #13771
2025-05-20 14:41:33 +10:00
rc-swag
f54601dc3e
fix(windows): address review comment ignore case
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-05-19 10:50:35 +10:00
rc-swag
2b53497046 fix(windows): add breadcrumbs and remove klogs
Add some extra breadcrumbs for when loading cache file fails.
2025-05-16 18:37:28 +10:00
rc-swag
44d7d66921 fix(windows): rename Enter and Exit methods TState
The state machine method for Exiting a a state was overiding
the Delphi system Exit. This meant that any intended early returns
inside TState method where actually just calling the State.Exit
method then continuing execution within the method.

Fixes: 13831
2025-05-15 16:09:31 +10:00
rc-swag
c02d43b799 fix(windows): use json file name against cache folder
Be more precise by matching the file name in the cache.json file
with the downloaded file in the cache folder. This will mean any
older installation versions that were not correctly cleaned up will
not be installed.

fixes #13831
2025-05-08 22:36:04 +10:00
rc-swag
ccc186c9a5 fix(windows): add breadcrumb to download failures
Also add checks to see if it the system is online before attempting
downloads. Adding this to the breadcrumb also.
2025-05-02 17:11:42 +10:00
rc-swag
cbf3bd5454 fix(windows): remove sentry report on firstrun in idle state
Remove the error message reporting to sentry if the firstrun
event is recieved in the idle state.

Fixes: #13217
2025-02-18 11:34:16 +10:00
rc-swag
fa45fd88e5 feat(windows): release ownership of mutex successful download
Added a release of ownership for the mutex download after in the
successuful download case
2025-02-11 15:54:58 +10:00
rc-swag
7ac190fc1b
feat(windows): commit review suggestion
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2025-02-11 15:47:14 +10:00
rc-swag
8281e328c9 feat(windows): review changes 2025-02-10 14:37:59 +10:00
rc-swag
ac6421e862 chore(windows): Merge branch 'feat/windows/13167/add-release-kmutex' into feat/windows/13119/handle-reset-downloading
# 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
2025-02-10 14:04:56 +10:00
rc-swag
01690ed483 feat(windows): remove redunant FreeAndNil 2025-02-10 10:05:14 +10:00
rc-swag
85b8a72be6 feat(windows): change condition at the end of download
Only go to the installing state if apply now has been set.
Otherwise go to WaitingRestart. Can revist in stage 2
2025-02-07 13:24:13 +10:00
rc-swag
0fa9792718 feat(windows): mutex used to check download process
Using the KeymanMutex wrapper to check if a download process is occuring
if it isn't and we are in the downloading state this means the download
process exited early. We can then clean up any downloaded files and
reset the statemachine and check for updates again.
2025-02-05 15:26:13 +10:00
rc-swag
9eec271011 feat(windows): check updates and automatic update merged
Check updates meaning has slightly changed it is now automatic updates
and it will now check, download and when possible start the install.

Previously it just meant a check for upates was made and notified
the user of updates.

Fixes:#13114
2025-02-03 14:25:44 +10:00
rc-swag
adb095bac9
Merge pull request #12956 from keymanapp/feat/windows/kmshell-switch-handling
feat(windows): kmshell switch handling for the installing state
2025-01-31 09:59:55 +10:00
rc-swag
39b8bb6378 feat(windows): update comments for clarity 2025-01-29 22:26:37 +10:00
rc-swag
eebf0bb108
fix(windows): Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-01-23 09:54:36 +10:00
rc-swag
e949637e60 fix(windows): continue if keyboard package is not found 2025-01-22 13:55:17 +10:00
rc-swag
1118a062b1 fix(windows): del cached files when download fails
When download fails it could leave files in the cached foler
this change leans them up before returning to idle.
2025-01-22 13:26:57 +10:00
rc-swag
7ed6206401 chore(windows): Merge branch 'master' into fix/windows/12491/keyboard-not-found-crash
# 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
2025-01-22 12:29:30 +10:00
rc-swag
14b411821a feat(windows): improve switch handling for installing state
Also handle the case where the SM seems to be stuck in the installing
state. MSI may have failed.
2025-01-21 14:57:36 +10:00
rc-swag
5e6fd79ec6 fix(windows): catch report file not found 2025-01-21 08:34:11 +10:00