Commit graph

46 commits

Author SHA1 Message Date
Marc Durdin
4f36c3c2df chore(developer): Merge branch 'master' into chore/developer/js-to-lmc 2022-06-25 05:48:57 +10:00
Marc Durdin
36b70758a9 chore(windows): remove unused OnlineConstants 2022-06-12 14:26:53 +10:00
Ross
6b5c0fad24 fix(windows): remove white space 2022-04-28 20:44:33 +10:00
Ross
13b72e0ba5 fix(windows): removed debug logging 2022-04-28 13:58:49 +10:00
Ross
a52f9c59e9 fix(windows): add continuesetup flag
We can not set the InstallDefalults flag entirely in the
bootstrapmain.pas. Because we do not yet have the Msi Version info.
So we need to do that in RunTools.pas. However, we need to know
if this is continuing set up after a reboot, as we don't look at
previous version info if it is, as it would have been removed.
This is why the ContinueSetup flag has been made available to Runtools
2022-04-27 11:31:31 +10:00
Ross
b7ed7c1974 fix(windows): add install defaults flag to cmd line
The install defaults flag will set the registry values
to their default values.

This flag can also be used by the installer itself when it needs to
do a restart to continue installing. It can check to see if this is
a fresh install or an upgrade and set the flag accordingly.
2022-04-20 15:19:43 +10:00
Ross
951a17d372 fix(windows): only check for any previous version installed
There was a time, pre version 11 when the Product version GUID was
the same between versions. That is no longer the case.
Now we only set defaults if no previous installed version exists.
2022-04-07 11:22:43 +10:00
Marc Durdin
a71e2f8a4a chore(windows): add comment 2022-02-09 15:03:41 +11:00
Marc Durdin
60390ed08b fix(windows): create Keyman/Diag folder in redirected profile
Fixes #6221.

If Keyman is being installed under the SYSTEM profile, e.g. when using
tools such as SCCM or Intune, then the installer runs with a redirected
folder for %LocalAppData%, under C:\Windows\SysWow64\config, but is
given the name C:\Windows\System32\config\....

Keyman Setup then creates %LocalAppData%\Keyman\Diag, which it thinks is
in C:\Windows\System32\config\... But in reality it is in SysWow64\...
Keyman Setup passes a file under this folder to Windows Installer,
running as 64 bit, which immediately falls over because the path does
not exist to it, in the real System32\config folder.

This patch disables redirection temporarily just to create the folder
under both 32 and 64 bit versions of the profile. It has no effect on
normal user accounts (apart from verifying that the folder is present
twice rather than once).
2022-02-09 15:03:38 +11:00
Marc Durdin
35c82ea128 fix(windows): handle invalid package names during install
Fixes #4886.

This patch includes 5 separate fixes for the various scenarios we
encountered during package installation.

1. RunTools.pas: don't attempt to install TIPs if package is not also
   being installed.

2. Keyman.Setup.System.OnlineResourceCheck.pas, OnlineUpdateCheck.pas:
   handle online update check for packages with spaces or periods in the
   id (legacy packages only).

3. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
   downloaded files with `(n)` and `[n]` patterns as well as the current
   ` (n)` pattern.

4. Keyman.Setup.System.InstallInfo.pas: Handle browsers renaming
   downloaded files with `_n` pattern. See code comments for details.

5. Keyman.Configuration.System.TIPMaintenance.pas: Avoid crashing if
   `kmshell -install-tips-for-packages` is passed an invalid package
   name.

The crash is actually fixed in point 5 above, but the root causes are
addressed in the other points.
2021-04-19 08:25:31 +10:00
Marc Durdin
4e518f660d fix(windows): backup start with windows value during setup
The value is not restored for upgrades unless we back it up, because
Setup does not change these settings if they are not present :)
2021-03-19 14:40:16 +11:00
Marc Durdin
b97fc4c82c fix(windows): Avoid double start during setup
Fixes #4724.
2021-03-19 14:24:55 +11:00
Marc Durdin
bd4f5b5c67 fix(windows): start Keyman after setup only if not running
Fixes #4520.

Start Keyman after Setup finishes only if Keyman is not already running.

The pattern in this code change is found in a few places. It would be
nice to centralise that in a unit somewhere but I don't want to do
that much refactoring at this point in beta.
2021-03-16 05:32:34 +11:00
Marc Durdin
c3b70d0186 fix(windows): setup must save install start for restarts
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.
2021-03-11 15:15:26 +11:00
Marc Durdin
9e46b555d9 fix(windows): Rename to Keyman
Fixes #4003.

This addresses the majority of locations where we use the name "Keyman
Desktop" in code. There will be some filenames and paths that do not
change at this point -- particularly at a source level. For now, the
focus is on the user interface changes.

While making these changes, I also made the VERSION and MANIFEST
resources more consistent.
2020-12-02 09:56:14 +11:00
Marc Durdin
3415724966 fix(windows): setup now allows choice of source
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.
2020-10-29 11:18:25 +11:00
Marc Durdin
95af280a6c fix(windows): download error dialog could be blank
Fixes #3688.

If a user cancelled the download dialog, a blank error dialog would be
shown.
2020-10-25 13:15:24 +11:00
Marc Durdin
c45f4fafa0 fix(windows): setup status showed only 'removing older versions'
Fixes #3690.

This applies an 'Installing Keyman' label during the install. While
Windows Installer does supply some status messages, at present we are
not using those. Also fixed a missing i18n string.
2020-10-20 07:08:06 +11:00
Marc Durdin
048b4d5de1 fix(windows): bootstrap should skip install of failed downloads 2020-09-24 07:34:20 +10:00
Marc Durdin
f08fd6090d fix(windows): hint dialog was blank when elevated
Fixes #3110. The hint dialog must be launched unelevated. Refactors
the UCreateProcessAsShellUser unit into the TUtilExecute class.
2020-09-22 20:04:44 +10:00
Marc Durdin
69227beb2a fix(windows): upgrade of profiles from 13.0
This upgrades a 11.0-13.0 install to the 14.0 model for registered TIPs.
It does not yet deal with transient TIPs or disabled keyboards (these
will come in a separate PR). There is also more tidy up coming in a
future PR for language names.
2020-09-02 16:46:58 +10:00
Marc Durdin
0ad1789dad feat(windows): split language registration on app install
This splits the registration and installation of TIPs according to the
elevation context during the installation process, so that the current
user gets the correct configuration, regardless of who the elevated user
is.
2020-08-27 10:38:04 +10:00
Marc Durdin
c564e01064 feat(windows): set UI language from Setup preference on first install 2020-08-04 09:24:22 +10:00
Marc Durdin
2697535b28 fix(windows): make sure silent is actually silent for setup 2020-07-23 07:26:23 +10:00
Marc Durdin
af4630f449 refactor(windows): PackagesOnly parameter 2020-07-08 15:54:46 +10:00
Marc Durdin
5926b3c635 chore: remove old todo comment 2020-07-08 11:07:26 +10:00
Marc Durdin
4cbaca5c3e chore(windows): code cleanup
Fixup constant strings; remove old dependencies; add update param
2020-07-08 11:05:52 +10:00
Marc Durdin
cdbca4d8bb chore: cleanup logging 2020-07-07 07:23:44 +10:00
Marc Durdin
640f523485 chore: cleanup global ExtPath 2020-07-07 06:57:08 +10:00
Marc Durdin
d1fb87a6f9 chore: cleanup 2020-07-06 15:18:00 +10:00
Marc Durdin
967f8df353 feat(windows): Replace http downloader and bug fixes
Uses THTTPClient standard library instead of (very old) THTTPUploader,
and prepare to remove UfrmDownloadProgress in a future PR.
2020-07-06 09:15:03 +10:00
Marc Durdin
a0c0141092 feat: more work towards bootstrap 2020-07-03 13:42:12 +10:00
Marc Durdin
268ec6ce3c feat(windows): Keyman Setup online bootstrap
This starts the refactoring of Keyman Setup for Windows
for a more online-first bootstrap approach for bundling.
For users who are offline, the traditional bundled approach
works, as does throwing package files into the same folder
as setup.exe. This makes the whole installer much simpler
to deploy and test.

At this stage, there are a lot of rough edges, so need to
refine these, including setup strings, language choices,
and error and logging management.
2020-07-01 20:59:25 +10:00
Marc Durdin
00e58c13ec feat(windows): user control for upload to sentry 2020-03-27 17:50:51 +11:00
Marc Durdin
9779792059 fix(windows): remove errlogpath and cleanup 2020-03-27 11:23:51 +11:00
Marc Durdin
e2d2aeb871 Address review comments 2019-10-20 05:48:32 +07:00
Marc Durdin
769d343a56 [Windows] Ensure keyboards are not lost when upgrading from 11.0. Fixes #2207 2019-10-19 16:32:23 +07:00
Marc Durdin
eb4b8da7f4 [Windows] Support installing packages with keyboards that are disabled by default; support opening configuration at first run 2019-08-12 15:38:24 +10:00
Marc Durdin
6d8451b818 [Windows] Fixes #1279. Avoid crash when security software blocks Keyman Configuration from setting various registry values. 2018-12-10 18:08:17 +11:00
Marc Durdin
c58410aa7c [Windows] Upgrade keyboard configuration from Keyman 10 when installing version 11 2018-10-22 14:20:53 +11:00
Marc Durdin
1e1240cbe3 [Windows] Avoid errors appearing when online update check fails for any reason 2018-09-17 08:55:41 +10:00
Marc Durdin
1779dac6fc Fixes #374, Keyman Desktop restarting Windows pathway is a little unclear if user chooses not to restart 2018-05-08 13:50:49 +07:00
Marc Durdin
f4d1856695 Refactor of JSON response processing. Full refactor of the update check comes in a later version 2018-02-15 10:35:12 +07:00
Marc Durdin
2b0d5465c8 Initial rework of automatic update checks; small refactor coming up for repeated code 2018-02-15 09:13:30 +07:00
Marc Durdin
9b026c423e x64 support for COM API - first steps: build of kmcomapi.dll for x64, and rename of registry keys 2017-12-24 13:47:56 +07:00
Marc Durdin
b65b982584 Keyman Desktop and Keyman Developer open source 10.0 alpha seed (#121)
* Keyman for Windows 10.0 Open Source

* Squashed 'windows/src/ext/jedi/jedi/' content from commit f444ad2

git-subtree-dir: windows/src/ext/jedi/jedi
git-subtree-split: f444ad2da4693851e523f1ea6bd541f701904c24

* Squashed 'windows/src/ext/jedi/jcl/' content from commit d63d3c9fd

git-subtree-dir: windows/src/ext/jedi/jcl
git-subtree-split: d63d3c9fd9ff84efdd8159084ec6a60313644243

* Squashed 'windows/src/ext/jedi/jvcl/' content from commit bee19f3b4

git-subtree-dir: windows/src/ext/jedi/jvcl
git-subtree-split: bee19f3b46909fde2fa92c06cd2706f41d99f6c3

* Add required .res files

* Add required .res files

* Add docbook files (forced)

* Add required libxslt

* Add required jedi files

* Add installation files

* Tweak .gitignore for open

* CI

* Remove KMW from Developer source (#122)

* Remove KMW from Developer source (copies during build)

* Remove KMW from Developer source (copies during build)

* Remove KMW from Developer source (copies during build)

* Fixup release build and copy license, readme from kmw during build

* Remove obsolete build help documentation

* Keyman Engine 10 on Windows regression for shift states (#129)

* Improve #128 -- cleaner debug messages

* Fixes #127, shift state now resets correctly; and more work for #128

* Fixes #130 (#131)
2017-07-25 10:53:06 +07:00