Skip to content
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): background updates go from downloading to waiting for a restart except if the apply now flag is set #13159

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

rc-swag
Copy link
Contributor

@rc-swag rc-swag commented Feb 7, 2025

Only go to the installing state if apply now has been set. Otherwise go to WaitingRestart. This can be Revistied in Stage 2 #8993
Fixes: #13155

User Testing

TEST_IDLE_KMSHELL_UPDATEDS_KBDS_ONLY

To Test this PR we need it so there are no newer updates available. If there are let me know and
I will merge in the lastest master again.

  1. Download the Keyman attached to this PR
  2. Start Keyman.
  3. Open the Keyman Configuration dialog.
  4. Install the euro latin keyboard attached to this PR 3.0.0 sil_euro_latin.zip
  5. In Options tab under General, check "Automatically check for updates and download"
  6. Open Regedit WinR type regedit
  7. Go to the current user key update state found at (Computer\HKEY_CURRENT_USER\SOFTWARE\Keyman\Keyman Engine).
  8. If required set the state back to usIdle
  9. Open Windows explorer at "C:\Users"yourusername"\AppData\Local\Keyman\UpdateCache" folder.
  10. Delete cache.json, any *.kmp and *.exe files.
  11. Open a command prompt (kbd>WinR type cmd)
  12. Change to the directory where kmshell is installed
    cd "c:\Program Files (x86)\Keyman\Keyman Desktop"
  13. Type kmshell.exe -buc
  14. In the Regedit window verify the update state has advanced to usUpdateAvailable then usDownloading and finally usWaitngRestart. Press F5 to refresh the view.

TEST_IDLE_KMSHELL_UPDATEDS_KBDS_ONLY_APPLY_NOW

To Test this PR we need it so there are no newer updates available. If there are let me know and
I will merge in the lastest master again.

  1. Download the Keyman attached to this PR
  2. Start Keyman.
  3. Open the Keyman Configuration dialog.
  4. Install the euro latin keyboard attached to this PR 3.0.0 sil_euro_latin.zip
  5. In Options tab under General, check "Automatically check for updates and download"
  6. Open Regedit WinR type regedit
  7. Go to the current user key update state found at (Computer\HKEY_CURRENT_USER\SOFTWARE\Keyman\Keyman Engine).
  8. If required set the state back to usIdle
  9. Open Windows explorer at "C:\Users"yourusername"\AppData\Local\Keyman\UpdateCache" folder.
  10. Delete cache.json, any *.kmp and *.exe files.
  11. Open the Update Tab in Keyman Configuration Click the check for updates
  12. Once the table updates press the Apply Now button.
  13. With the pop click the update button
  14. If elevate permissions prompt comes up click allow
  15. Check in Keyman Configuration the Keyboard has been updated to the latest version
  16. Check the update state in the regedit window is back usIdle

Only go to the installing state if apply now has been set.
Otherwise go to WaitingRestart. Can revist in stage 2
@rc-swag rc-swag self-assigned this Feb 7, 2025
@rc-swag rc-swag requested a review from ermshiperete as a code owner February 7, 2025 03:35
@keymanapp-test-bot keymanapp-test-bot bot added the user-test-missing User tests have not yet been defined for the PR label Feb 7, 2025
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Feb 7, 2025

User Test Results

Test specification and instructions

  • TEST_IDLE_KMSHELL_UPDATEDS_KBDS_ONLY (PASSED) (notes)
  • TEST_IDLE_KMSHELL_UPDATEDS_KBDS_ONLY_APPLY_NOW (PASSED) (notes)

Test Artifacts

@keymanapp-test-bot keymanapp-test-bot bot added this to the B18S1 milestone Feb 7, 2025
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed and removed user-test-missing User tests have not yet been defined for the PR labels Feb 7, 2025
@rc-swag rc-swag changed the title feat(windows): go from downloading to waiting for a restart feat(windows): Background updates go from downloading to waiting for a restart except if the apply now flag is set Feb 7, 2025
@rc-swag rc-swag changed the title feat(windows): Background updates go from downloading to waiting for a restart except if the apply now flag is set feat(windows): background updates go from downloading to waiting for a restart except if the apply now flag is set Feb 7, 2025
@dinakaranr
Copy link

Test Results

I tested this issue with the attached Keyman"18.0.184-alpha-test-13159" build(08/02/2025) on Windows 10. Here I am sharing my observation.

  • TEST_IDLE_KMSHELL_UPDATEDS_KBDS_ONLY (Passed):
  1. Installed the Keyman-18.0.184.exe file which is attached to this PR
  2. Start Keyman.
  3. Open the Keyman Configuration dialog.
  4. Install the Euro Latin keyboard attached to this PR 3.0.0 sil_euro_latin.zip
  5. In the Options tab under General, check "Automatically check for updates and download"
  6. Open Regedit WinR type regedit
  7. Go to the current user key update state found at (Computer\HKEY_CURRENT_USER\SOFTWARE\Keyman\Keyman Engine).
  8. If required set the state back to usIdle
  9. Open Windows explorer at "C:\Users"yourusername"\AppData\Local\Keyman\UpdateCache" folder.
  10. Delete cache.json, any *.kmp and *.exe files.
  11. Open a command prompt (kbd>WinR type cmd)
  12. Change to the directory where kmshell is installed (cd "c:\Program Files (x86)\Keyman\Keyman Desktop")
  13. Type kmshell.exe -buc
  14. In the Regedit window.
  15. Verified that the "update state" has changed to "usUpdateAvailable" --> "usDownloading" --> usWaitngRestart.(Press F5 to refresh the view.)
    It works well. Thank you.
  • TEST_IDLE_KMSHELL_UPDATEDS_KBDS_ONLY_APPLY_NOW (Passed):
  1. Installed the Keyman-18.0.184.exe file which is attached to this PR
  2. Start Keyman.
  3. Open the Keyman Configuration dialog.
  4. Install the Euro Latin keyboard attached to this PR 3.0.0 sil_euro_latin.zip
  5. In the Options tab under General, check "Automatically check for updates and download"
  6. Open Regedit WinR type regedit
  7. Go to the current user key update state found at (Computer\HKEY_CURRENT_USER\SOFTWARE\Keyman\Keyman Engine).
  8. If required set the state back to usIdle
  9. Open Windows Explorer at "C:\Users"yourusername"\AppData\Local\Keyman\UpdateCache" folder.
  10. Delete cache.json, any *.kmp and *.exe files.
  11. Open the Update Tab in Keyman Configuration. Click the "Check for new updates"
  12. Once the table updates press the "Apply update now" button.
  13. With the pop click the update button.
  14. If the elevate permissions prompt comes up click allow
  15. Verified that the table is empty on the Update tab.
  16. Navigate to the "Keyboard Layouts" tab.
  17. Verified that the Keyboard updated to the latest version.
  18. In the Regedit window.
  19. Verified that the "update state" has changed to "usIdle"
    It works well. Thank you.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Feb 8, 2025
Base automatically changed from fix/windows/13153/download-keyman-file-status to master February 9, 2025 23:10
@rc-swag rc-swag merged commit 6fde1a5 into master Feb 9, 2025
7 checks passed
@rc-swag rc-swag deleted the feat/windows/13155/download-to-waitingrestart branch February 9, 2025 23:11
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.188-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

feat(windows): condition to go from downloading to waitingrestart changed for keyman update state machine
4 participants