Commit graph

451 commits

Author SHA1 Message Date
Marc Durdin
b700cf334b
Merge pull request #5709 from keymanapp/fix/windows/5091-default-language
fix(windows): handle edge cases using default language
2021-10-02 11:12:46 +10:00
Marc Durdin
4523a04409 chore(windows): address review comments and fix installer bug 2021-09-29 15:05:41 +10:00
Marc Durdin
f82fa96449 chore(windows): Keyman Core UI and Settings
* Adds a taskbar icon to highlight to user when Keyman Core library is
  in use, with a crummy core.ico. This visual feedback will be removed
  in late beta.
* Renames the 'use common core' registry setting to match other flags
* Adds a System Setting to make the Keyman Core setting visible in
  System Settings and kmconfig.
2021-09-29 13:51:51 +10:00
rc-swag
b71fde66f9
Merge branch 'master' into feat/windows/keyman-core-integration-2 2021-09-27 21:40:22 +10:00
rc-swag
8eeaef9ae5
Merge branch 'feat/windows/keyman-core-integration-2' into feat/windows/preserving-keyboard-options-in-engine 2021-09-27 21:21:56 +10:00
Ross
71f97d46aa feat(windows): add link to mem leak github repo 2021-09-22 16:51:14 +10:00
Ross
1c405c5142 feat(windows): Address review comments 2021-09-22 16:33:30 +10:00
rc-swag
64dbaad371
feat(windows): Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-09-22 16:11:36 +10:00
Ross
deb358de5a feat(windows): add memory leak tests - fix memory leaks 2021-09-22 11:28:28 +10:00
rc-swag
00d4bcded8
feat(windows): Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-09-21 11:48:56 +10:00
Ross
d450543253 feat(windows): address review comments
Add test fixture to allow Setup and Teardown methods to be used
for all km process action tests.
Modified the DebugAssert macro to not do the early return on its own.
2021-09-21 09:59:17 +10:00
rc-swag
9305bae3ba
fix(windows): commit review suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-09-20 11:34:06 +10:00
Marc Durdin
a8a19b2a2e fix(windows): handle edge cases using default language
Fixes #5091.

If the user has a default language that is not a minimal BCP47 tag, such
as `zh-Hans-CN` vs `zh-CN`, or if the default language does not have a
mapping in our `TLanguageCodeUtils.TranslateWindowsLanguagesToBCP47`
function, then kmshell would crash on install of a keyboard that had no
language metadata specified (i.e. neither legacy metadata in .kmx nor
modern metadata in .kmp).

This crash arose because the elevated instance of kmshell would install
a local-machine reference to `zh-CN` (as it back-translated from a
LangID), but the current user install would look for `zh-Hans-CN`, read
from the Windows registry `HKCU\Control Panel\International\User Profile`.

To further complicate matters, it is possible for the current user to
have a different default language than the elevated user on the machine.
Keyman was assuming that the default language was the same in both
cases.

This fix passes in the current user's default BCP47 and LangID to the
elevated portion of the keyboard install, so we can guarantee that
keyboard install which needs to use the default language, actually
installs for the current user's actual language code, and not a
canonicalized version (or a totally different code in the case of
elevation to an alternate admin user account).
2021-09-17 06:37:23 +10:00
Marc Durdin
a00eb2c91a fix(windows): fallback to filename if &name not set
Fixes #5683.

If `store(&name)` is missing from a keyboard, then fallback to the
filename of the keyboard (sans extension). This fixes a regression in
14.0 keyboard registration.

I opted not to make this change in kmxfile but rather in places which
use it in the Keyman Engine COM API, because I wanted kmxfile to remain
truthful about all details of what it is reading from the file.

Given that the COM API will now never return an empty string for the
name of the keyboard, there are  mitigations for this in Keyman
Configuration which are unnecessary, but it is not harmful for them to
remain there.

Will cherry-pick to stable-14.0.
2021-09-14 08:24:17 +10:00
Ross
a90a99784a feat(windows): cast size_t to int for list size 2021-09-07 12:00:34 +10:00
Ross
8719a27ee9 feat(windows): add save and restore options
Add save and restore methods for saving and restoring
keyboard processor options.
2021-09-03 13:45:18 +10:00
Ross
5ffb136acf feat(windows): Added UpdateKeyboardOptions
This functions was to update the keyboard options in the
windows engine with the current options in the core

However it is not needed as first thought. This is because the options
will not be updated in first Non updatable call kmtip. This is due to
the fact the actions will not be processed. A variation on the current
core implementation. I am still pushing the branch as the unit test will
be usefull.
2021-09-02 11:57:44 +10:00
Ross
e125736e0e feat(windows): Update all TODOs with Issue numbers 2021-08-30 10:18:57 +10:00
Ross
0663fcbeb7 feat(windows): Add unit tests for process actions 2021-08-27 14:18:14 +10:00
Ross
a4801373db feat(windows): err logs, DEBUG_ASSERT macro
Added some more error logs
Added a DEBUG_ASSERT macro
Update variable names
2021-08-24 17:17:26 +10:00
rc-swag
aab8cb178c
fix(windows): apply suggestion changes core integration review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-08-23 09:51:10 +10:00
Ross
937bf8a485 feat(windows): review comments 2021-08-19 14:17:34 +10:00
Ross
4350c5a63d feat(windows): review comments rename keyman32-tests 2021-08-19 11:51:31 +10:00
rc-swag
a681f46319
feat(windows): apply review suggestions
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-08-19 09:07:30 +10:00
Marc Durdin
623315ea18
Merge branch 'master' into fix/windows/4549-welcome-in-front 2021-08-19 06:33:20 +10:00
Ross
e2b73af029 fix(windows): rename reg key prefix dw for DWORD 2021-08-18 15:44:45 +10:00
Ross
3b3ea6e75b feat(windows): clean up formating 2021-08-17 17:16:56 +10:00
Ross
4bf4106a37 chore(windows): Merge branch 'master' into feat/windows/keyman-core-integration-2 2021-08-17 16:23:38 +10:00
Ross
0f4e3d1768 feat(windows): core saving context null pointer check 2021-08-17 14:10:44 +10:00
Ross
ae9ba52ab9 fix(windows): meson build for static lib 2021-08-10 17:43:55 +10:00
Marc Durdin
f223fe7780 fix(windows): Welcome should always show in front
Fixes #4549.

The Package Welcome dialog would not always show in front because its
owner could be `nil` in some circumstances.
2021-08-05 17:10:34 +10:00
Marc Durdin
39dbd09245 fix(windows): tsysinfo format grid correctly
Minor fix to make the module list format correctly with
chromium browser instead of mshtml, plus a tweak to build
copy xsl files as well to bin
2021-08-05 16:20:20 +10:00
Ross
a901f349b0 feat(windows): fix vs project settings 2021-08-04 10:32:05 +10:00
Ross
c0826e9930 feat(windows): use static library for keyboard core 2021-08-04 09:36:42 +10:00
Ross
40b96f2a82 feat(windows): update kmprocess_event call with new arg 2021-08-02 15:07:22 +10:00
Ross
22a0fd53a0 feat(windows): add km process actions to win engine 2021-08-02 13:23:55 +10:00
Ross
09611b600d feat(windows): address review comments 2021-08-02 13:23:48 +10:00
Ross
5f4902cde9 feat(windows): revert whitespace changes 2021-08-02 13:18:32 +10:00
Ross
7d5187ae64 feat(windows): add correct memory free calls for core 2021-08-02 13:17:22 +10:00
Ross
7a9ee207a8 feat(windows): update project include paths for core 2021-08-02 13:13:03 +10:00
Ross
99b4bc73b8 feat(windows): appcontext to core kb_kmn_context 2021-08-02 13:13:02 +10:00
Ross
fb2a246f53 feat(windows): update update windows engine action que from core processor 2021-08-02 13:13:00 +10:00
Ross
01d10ce3bf feat(windows): loadKeyboardOptionsREGCore using the core api 2021-08-02 13:12:54 +10:00
Ross
f0f1e966a2 feat(windows): update project include files 2021-08-02 13:12:16 +10:00
Ross
ee43514149 refactor(windows): annotate code 2021-08-02 13:10:53 +10:00
Ross Cruickshank
5d2df77e7d feat(windows): work in progress 2021-08-02 13:09:39 +10:00
Ross Cruickshank
ece7addfed feat(windows): mark out changes with 5011 feature TODOs 2021-08-02 13:02:26 +10:00
Ross Cruickshank
18a72a1dd5 feat(windows): initial skeleton for integeration 2021-08-02 13:02:04 +10:00
Ross
905538414f chore(windows): split keyman64 header to keymanengine 2021-07-29 21:06:07 +10:00
Marc Durdin
845d65e5e4 chore(windows): remove backup build step
We no longer need to backup debug files as they are saved to the symbol
store during a release build. This reduces the amount of storage
required for a release build and should speed up the build also.

Also fixes the broken build where backup had not been updated for the
new consistent build paths.
2021-07-07 08:09:26 +10:00