Commit graph

3486 commits

Author SHA1 Message Date
Marc Durdin
704efc65d1 chore: cleanup delphi parser garbage in dproj 2020-10-29 16:04:04 +11:00
Marc Durdin
90dd2bc08b fix(windows): fix test dependency 2020-10-29 15:57:47 +11:00
Marc Durdin
add8f1e5e2 fix(windows): cleanup setup action list
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.
2020-10-29 15:45:25 +11:00
Marc Durdin
b16a7ab77c fix(windows): tweaks to progress dialog 2020-10-29 15:44:58 +11:00
Marc Durdin
873abda526 fix(windows): show bootstrap progress in setup
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.
2020-10-29 15:44:57 +11:00
Marc Durdin
d0a63d2b88 fix(windows): fix test dependency 2020-10-29 15:43:46 +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
18a7134378 fix(windows): cleanup setup.inf processing
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`.
2020-10-29 09:23:21 +11:00
Marc Durdin
d8e8aaa1d5 fix(windows): CompareVersions sometimes returned wrong value
If version1 was longer than version2, then CompareVersions would return
the inverse value. This issue has been present for a long, long time...
2020-10-29 09:21:12 +11:00
Marc Durdin
93d0935068
Merge pull request #3781 from keymanapp/fix/windows/3775-error-reading-kmp-inf-in-setup
fix(windows): error reading kmp.inf in setup
2020-10-29 06:43:56 +11:00
Marc Durdin
4b970fefbf
Merge pull request #3779 from keymanapp/fix/windows/3650-remove-msctf-dllmain-free
fix(windows): remove msctf free from DllMain
2020-10-29 06:43:49 +11:00
Marc Durdin
3178495e58
Merge pull request #3772 from keymanapp/fix/windows/3562-start-keyman-on-demand-keyman32
fix(windows): Start Keyman on Demand - keyman32
2020-10-29 06:43:42 +11:00
Marc Durdin
6015000492 fix(windows): error reading kmp.inf in setup
Fixes #3775.
2020-10-28 17:22:16 +11:00
Marc Durdin
fc7b51c4ca fix(windows): remove msctf free from DllMain
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.
2020-10-28 16:17:52 +11:00
Marc Durdin
3e9f397b27 chore(windows): small cleanups
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.
2020-10-28 10:27:24 +11:00
Marc Durdin
b66915bcd0 chore: code cleanup 2020-10-28 10:12:07 +11:00
Marc Durdin
c9f9bfb2c2 fix(windows): Start Keyman on Demand - tasks
Fixes #3562.

Second part of the two-part special with #3772. When Keyman
Configuration starts, it creates a task that is launched whenever a
specific Keyman event with id 256 is added to the Event Log. This task
launches keyman.exe to start Keyman (and if Keyman is already running,
the newly launched process will exit with no side effects).

This feature is behind a new feature flag `Flag_UseAutoStartTask`, so it
can be disabled in the event of compatibility issues.

The task is created or updated on each launch of Keyman Configuration
(or Keyman via the 'Keyman' shortcut in the Start Menu), and is
intended to be self-maintaining.

The test_starttask project (4 of the 12 files) is just a wrapper around
the start TKeymanStartTask class to allow for manual testing. No unit
tests for this at this time; I think it would be difficult to unit test
this effectively.
2020-10-28 08:16:38 +11:00
Marc Durdin
e8d3a0eb14 fix(windows): exclude keymanmc from sigcheck 2020-10-28 08:15:24 +11:00
Marc Durdin
c66eb49163 fix(windows): Start Keyman on Demand - keyman32
This is the first half of a two-part update to Keyman for Windows. There
are two significant changes here. These changes apply to
keyman32/keyman64, as well as kmtip/kmtip64, but will refer to the
32-bit equivalents for simplicity:

1. Instead of using `GetProcAddress` to connect to keyman32.dll, we
   now have an import library connection. This removes one particularly
   suspect piece of architecture for Keyman, as using `GetProcAddress`
   could lead to a race condition, where keyman32.dll is unloaded after
   that function is called but before we use the handle. This makes the
   kmtip.dll build dependent on keyman32.dll; loading kmtip.dll (by
   selecting a Keyman input method) also loads keyman32.dll.

2. It's not enough (yet) to load kmtip.dll. We also need to be running
   keyman.exe itself, due to global hooks that we still require (it may
   be possible, one day, to avoid these, but it doesn't look very
   hopeful). To that end, kmtip calls new function `TIPIsKeymanRunning`
   to check whether keyman32.dll is initialised (and hence keyman.exe
   has initialised it). Then, if keyman.exe is not running, it issues an
   event to the Windows Event Log, which we will pick up with a
   scheduled task in the next PR.

The first part of this is an architectural change which may lead to some
change in behaviours, as keyman32.dll now may not be unloaded from a
process when keyman.exe exits, due to the lock that kmtip.dll now has on
it. It will be important to test this (@MakaraSok) by running through
various startup and shutdown scenarios. In my initial testing, I found
that there were some situations after restarting keyman.exe where I
needed to switch in and out of the Keyman TIP, but those were not all
critical.

This change also lays groundwork for an eventual ability to run the
Keyman input method without keyman.exe running, which will be helpful
e.g. on login screen, even if missing certain additional functionality
such as the serialised input queue.
2020-10-28 06:10:22 +11:00
Marc Durdin
f7ab5def7b
Merge pull request #3766 from keymanapp/fix/windows/3750-language-list-bugs
fix(windows): Fix multiple issues with UI locales
2020-10-27 13:10:11 +11:00
Marc Durdin
9389152f19
Merge pull request #3763 from keymanapp/fix/windows/3756-keep-in-touch-link-crash
fix(windows): Crash in Keep in Touch external link
2020-10-27 13:09:58 +11:00
Marc Durdin
9988b0fd01
Merge branch 'master' into fix/windows/3750-language-list-bugs 2020-10-27 13:09:51 +11:00
Marc Durdin
b6f0449710
Merge pull request #3764 from keymanapp/fix/windows/community-button
fix(windows): Community button had wrong link
2020-10-27 13:09:10 +11:00
Marc Durdin
2a50bb107e
Merge branch 'master' into fix/windows/3756-keep-in-touch-link-crash 2020-10-27 13:08:58 +11:00
Marc Durdin
4c44296f0a
Merge pull request #3761 from keymanapp/fix/windows/3393-online-update-url
fix(windows): use new windows url for online update check
2020-10-27 13:07:55 +11:00
Marc Durdin
86b9af388a
Merge pull request #3760 from keymanapp/fix/windows/3755-question-in-title-bar
fix(windows): Make help button work
2020-10-27 13:07:35 +11:00
Marc Durdin
7a722639bb
Merge pull request #3753 from keymanapp/fix/windows/3518-config-auto-apply
fix(windows): Keyman Configuration changes apply instantly
2020-10-27 13:07:26 +11:00
Marc Durdin
79b41d0627
Merge pull request #3754 from keymanapp/fix/windows/remove-double-refresh
fix(windows): Remove double refresh
2020-10-27 10:38:25 +11:00
Marc Durdin
186cf0cf23 fix(windows): menu interactions 2020-10-27 10:35:55 +11:00
Marc Durdin
27850864cf fix(windows): config would not refresh correctly
As some of config state was cached, it would not refresh correctly
when displaying. This ensures that the config renderer uses its
own new instance of the COM API data on every refresh.
2020-10-27 10:16:53 +11:00
Marc Durdin
5831776709 fix(windows): template would never read primary locale
The template still referred to the old locale.xml format.
2020-10-27 10:15:28 +11:00
Marc Durdin
4dc171e934 fix(windows): remove unsupported loading locale from package
Locales will be distributed as part of the app, for now. We may
re-introduce package-based locales in the future, across all platforms.
2020-10-27 09:57:49 +11:00
Marc Durdin
5ea49ecb38 fix(windows): validation of locales
Locale files now use a resources tag, not a Locale tag; the validation
was treating all locales as invalid due to this.
2020-10-27 09:57:01 +11:00
Marc Durdin
6ffdce8dae fix(windows): Community button had wrong link 2020-10-27 08:29:30 +11:00
Marc Durdin
4c7e6f242f fix(windows): Crash in Keep in Touch external link
Fixes #3756.
Fixes KEYMAN-WINDOWS-5F.
Fixes KEYMAN-WINDOWS-5E.
2020-10-27 08:21:33 +11:00
Marc Durdin
80fe97213f fix(windows): use 13.0 endpoints for unchanged APIs 2020-10-26 20:45:43 +11:00
Marc Durdin
4e503131cd fix(windows): use new windows url for online update check
Fixes #3393.
2020-10-26 20:44:36 +11:00
Marc Durdin
6b62601027 fix(windows): Make help button work
Fixes #3755.

Help button in title bar of web apps will now do the same thing as F1.
2020-10-26 20:00:32 +11:00
Marc Durdin
200656f634
Merge pull request #3734 from keymanapp/feat/windows/support-control-browser-tsf
feat(windows): Apps for Controlling Browser TSF integration
2020-10-26 19:14:08 +11:00
Marc Durdin
e3dfb21d28
Merge pull request #3733 from keymanapp/feat/windows/kmconfig-gui-in-kmshell
feat(windows): kmconfig GUI (in kmshell)
2020-10-26 19:13:44 +11:00
Marc Durdin
0905096841
Merge pull request #3732 from keymanapp/feat/windows/kmconfig
feat(windows): kmconfig console app
2020-10-26 19:12:28 +11:00
Marc Durdin
9d5c38838e
Merge pull request #2456 from keymanapp/feat/windows/debug-settings-manager
feat: Keyman Settings Manager base classes
2020-10-26 19:12:14 +11:00
Marc Durdin
808326b8c3
Merge pull request #3747 from keymanapp/fix/windows/3688-blank-error-dialog
fix(windows): download error dialog could be blank
2020-10-26 15:28:43 +11:00
Marc Durdin
8a9316a244
Merge pull request #3745 from keymanapp/fix/windows/buffer-overrun-debugstr
fix(windows): buffer overrun in debug function
2020-10-26 15:28:35 +11:00
Marc Durdin
4269a4dbc4 fix(windows): Remove double refresh
Both the win32 and the win64 keyman engine libraries would receive a
refresh notification, and then they'd both broadcast the change. This
change limits the broadcast responsibility to the 32-bit engine.
2020-10-26 15:26:08 +11:00
Marc Durdin
11a2cf53c5 fix(windows): Keyman Configuration changes apply instantly
Fixes #3518.

Changes in Keyman Configuration will now apply immediately. This removes
the OK and Cancel buttons from the dialog and means that all actions
are consistent in when they are applied, unlike previously. This also
matches the Windows 10 Settings metaphor and metaphors for most modern
apps and devices.

For now, I have placed a message where the OK and Buttons were
previously, to help existing users understand the change. In time, I
expect us to be able to remove that message entirely.
2020-10-26 15:18:04 +11:00
Marc Durdin
82e15bead0 fix(windows): remove obsolete Reboot flag
The Reboot flag was never set by any Keyman code any longer. Thus,
removing to simplify code pathways for applying config changes.
2020-10-26 09:10:02 +11:00
Marc Durdin
36d6f8d242 fix(windows): remove obsolete install/uninstall functions
The Addins install command and Visual Keyboard install command are no
longer used and thus removed.
2020-10-26 08:48:12 +11:00
Marc Durdin
d86a3d2305 fix(windows): remove FRefreshKeyman parameter from Content_Render
FRefreshKeyman parameter was no longer used; clean it up.
2020-10-26 08:44:24 +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