mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-14 12:49:25 +00:00
Fixes #4467. Background: in some scenarios, e.g. files in use, Setup must restart before it completes. This is particularly the case if kmcomapi.dll is locked and Windows will move the new version into place after a restart. In this scenario, we would end up calling the old version of kmcomapi.dll to install keyboards, etc, which is definitely not desirable. Problem: Setup was not saving complete state before the restart, so when it resumed post-restart, would get a blank slate to work from, losing command-line options passed in and any choices that the end user may have made during the installation. Fix: This PR adds serialization of the `TInstallInfo` state data, so that the install state can be saved to disk before restart, and reloaded after the restart. This also means that the `-c` parameter now takes a filename, being the temporary state JSON file, and when in "ContinueSetup" mode, no longer needs to perform all the checks it did previously, making the second half of Setup somewhat faster. Testing: Added a unit test for the serialization of `TInstallInfo`, and have tested on a VM in various scenarios without problems. This fix is somewhat broader than I really like to make while in Beta, but I don't think there was a viable alternative. |
||
|---|---|---|
| .. | ||
| Keyman.System.Test.InstallInfoTest.pas | ||
| Makefile | ||
| WindowsSetupTest.dpr | ||
| WindowsSetupTest.dproj | ||
| WindowsSetupTest.res | ||