Fixes#3801.
Fixes#3802.
Fixes KEYMAN-WINDOWS-5M.
Fixes KEYMAN-WINDOWS-5N.
This is a two-part fix for Keyman Configuration where it appears there
was a race with creating a temporary file, and which caused a cascading
exception.
The first part resolves the race; the second part (in
UfrmInstallKeyboard.pas) adds a little extra robustness (probably not
totally necessary).
Fixes#3797.
Fixes KEYMAN-WINDOWS-5H.
Report unexpected errors creating or deleting scheduled task, and ignore
expected errors better, handling a potential race condition where two
processes both attempt to create a folder at the same time.
Note that creating the task should not be a race because we use the
`TASK_CREATE_OR_UPDATE` flag.
If the list of actions that Setup will perform is too long, a scrollbar
will now be shown. This will probably not arise frequently but certainly
helps if it does.
Fixes#3689.
When Setup is starting, it can sometimes take a few seconds to show the
main form because it is querying an online server and unzipping various
files. This shows a small progress bar window so that the user doesn't
wonder what is going on.
The progress bar is fairly basic: it has only 4 steps, and because all
actions are happening on the main thread, does not animate well or
smoothly. In my view, it is not worth redesigning into a multi-threaded
process for the sake of this progress bar dialog.
Relates to #3689.
Where more than one source of a file is available, e.g. a local
keymandesktop.msi which is older than the current published version
online, then Setup will choose the newer, online version by default,
but allows the user to change the install source in the Options dialog
to have an offline setup if they prefer.
This means that the 'best' location is now chosen at startup, and then
the user can override that.
Relates to #3689.
There were a number of obsolete values in setup.inf, and removing those
led to a small cascade of changes:
1. `MSIOptions` and `Version` properties were removed.
2. `Version` is now read directly from the .msi if it is present.
3. Package name and version are now read directly from local .kmp files,
rather than relying on metadata in setup.inf.
4. Setup now only loads .kmp files that are referenced in setup.inf, to
avoid scenarios where a user downloads the installer into a common
location that already includes .kmp files and is then confused by
why it is offering to install those files as well.
5. `Strings` property is not used outside of `TInstallInfo`.
Fixes#3650.
This removes the bad call to `FreeLibrary` that was still present in
a callee of `DllMain` in keyman32. The refactor moves responsibility for
loading TSF to the `SelectKeyboard` functions and gets rid of the
associated thread globals.
The `TSFINTERFACES` struct is of course a future candidate for a class.
In the process I removed a lot of cruft from keyman32.cpp which was
either obsolete, irrelevant or just plain wrong. None of which had
material impact on the running code.
1. Remove unused variables
2. Remove invalid build configurations
3. Move hotkey checks before touch keyboard panel check, so hotkeys
still work when touch panel is active; the touch keyboard panel check
is there to disable serialised input which conflicts with it.