Commit graph

3302 commits

Author SHA1 Message Date
Marc Durdin
d59701ca7d
Merge pull request #4383 from keymanapp/fix/windows/4185-uninstall-exit-keyman
fix(windows): When uninstalling, exit Keyman
2021-02-09 13:25:01 +11:00
Marc Durdin
a353c1572a chore(windows): cleanup dproj 2021-02-09 12:26:36 +11:00
Marc Durdin
35fe8f2132 chore(windows): address review comments 2021-02-09 10:16:55 +11:00
Marc Durdin
c966f297cb
Merge branch 'beta' into feat/developer/improve-bcp47-canonicalization 2021-02-09 07:03:28 +11:00
Marc Durdin
7a59d073ff chore(windows): address review comments, add test 2021-02-09 06:56:43 +11:00
Marc Durdin
9b0daf5652
Merge pull request #4410 from keymanapp/fix/developer/4280-if-nul-start-of-context
fix(developer): Compiler check for if and nul at start of context
2021-02-09 06:47:14 +11:00
Marc Durdin
3a4038a74e
Merge pull request #4408 from keymanapp/fix/developer/4250-debug-information-with-unicode-identifiers
fix(developer): debug information with unicode identifiers
2021-02-09 06:45:58 +11:00
Marc Durdin
70e6aa9f4e chore(windows): rename variable per review 2021-02-08 20:12:24 +11:00
Darcy Wong
9938af36a5
Merge pull request #4420 from keymanapp/chore/common/crowdin-fr
chore(common): Check in crowdin files for French
2021-02-08 16:05:36 +07:00
Darcy Wong
90bb475bcd chore(common): Move help-keyman-com.sh for refactoring 2021-02-08 08:37:52 +07:00
Marc Durdin
dab52774c2 fix(common): support quotes 2021-02-05 20:12:01 +11:00
Marc Durdin
2dbb928852 chore(windows): update unit tests 2021-02-05 18:45:55 +11:00
Marc Durdin
558c8013ee feat(developer): improve BCP 47 canonicalization
Ensures we get a canonical tag per langtags.json as far as we possibly
can. This is a breaking change for the compiler as tags which were
formerly regarded as canonical are no longer regarded that way. This
mostly relates to script subtag but a secondary bug meant that some
other tags would have lost data in the canonicalization process
(because we did a lookup based only on the language subtag previously,
which is a no-no).

See keymanapp/keyboards#1452 for related work.
2021-02-05 16:56:21 +11:00
Darcy Wong
26f57f02a6 chore(windows): Check in crowdin files for fr 2021-02-04 08:28:23 +07:00
Darcy Wong
138d3070a1 chore(windows/resources): Fix typo 2021-02-03 14:28:21 +07:00
Marc Durdin
cc54c2c158
Merge pull request #4407 from keymanapp/fix/windows/3336-model-wordlist-forward-slashes
fix(windows): Use forward slashes in wordlist paths
2021-02-03 16:52:35 +11:00
Marc Durdin
6cbf8de840
Merge pull request #4406 from keymanapp/fix/windows/4393-crash-deleting-wordlist
fix(windows): crash deleting wordlist
2021-02-03 16:52:03 +11:00
Marc Durdin
12834c618a
Merge pull request #4405 from keymanapp/chore/windows/case-sensitive-tests
chore(windows): tests should be case-sensitive
2021-02-03 16:51:50 +11:00
Marc Durdin
0c782e22d3 fix(developer): Compiler check for if and nul at start of context
Fixes #4280.

Adds checks to verify that `if()`, `platform()`, `baselayout()` and
`nul` are at the start of the context in the appropriate order.

Adds unit tests to validate these checks.

These are conditions that have been present in earlier versions of
Keyman but not enforced until now. Keyboards that do not meet these
conditions would not work correctly in all circumstances and should be
updated to meet the requirements.

An alternative would have been to reorder the context string but that is
much more complex as manipulation would also have been required for the
output string. The enforced order is logical and reduces confusion in
any case.

Updated documentation coming along shortly.
2021-02-03 15:28:53 +11:00
Marc Durdin
171b6fac54 fix(developer): debug information with unicode identifiers
Fixes #4250.

This implements @jahorton's suggestion of including the original name
in a comment alongside the munged name, as well as appending the unique
integer identifier of each symbol.

Note: the error reporting code needed a massage to support Unicode error
strings; in the future we should update the C++ compiler to emit
Unicode error strings also.
2021-02-03 10:54:20 +11:00
Marc Durdin
953cb15581 fix(windows): Use forward slashes in wordlist paths
Fixes #3336.
2021-02-03 10:15:30 +11:00
Marc Durdin
8f1fc61cc6 fix(windows): crash deleting wordlist
Fixes #4393.
Fixes KEYMAN-DEVELOPER-46.
Fixes KEYMAN-DEVELOPER-45.

This arose because deleting a tab caused Delphi VCL to switch to another
tab in the page control, which is IMHO a bug in the TPageControl VCL
component. Furthermore, when the active page is changed under these
circumstances, the normal OnChange and OnChanging events are not fired,
which means that the Source tab (which is the lucky tab to be activated)
never gets initialised. This cascades eventually to a crash due to the
Source tab's text editor not being properly loaded.

Two parts to this fix:

1. Restore the active page when we delete a wordlist tab (RSP-32327);
   this does not resolve the crash but does avoid weird side-effect of
   the active tab changing.
2. Initialise the source tab when we load the form so that the
   initialisation issue described above is avoided.

A separate fix in modelTsProjectFile avoids a (handled) null variant
conversion exception.
2021-02-03 09:43:48 +11:00
Marc Durdin
01645ff8c5
Merge pull request #4400 from keymanapp/fix/developer/2657-import-support-targets
fix(developer): Import Keyboard support for Targets
2021-02-03 07:08:45 +11:00
Marc Durdin
4a1ee301f1
Merge pull request #4399 from keymanapp/fix/developer/2679-template-for-web-not-touch
fix(developer): Generate platforms correctly from template
2021-02-03 07:08:25 +11:00
Marc Durdin
d603c77cd7
Merge pull request #4386 from keymanapp/fix/windows/4192-show-balloon-when-keyman-is-already-running
fix(windows): Show balloon when Keyman is already running
2021-02-03 07:08:00 +11:00
Marc Durdin
aebdec42bf
Merge pull request #4398 from keymanapp/fix/developer/4354-setup-redist-check
fix(developer): don't check both setup.exe and setup-redist.exe
2021-02-03 07:07:37 +11:00
Marc Durdin
e123b1a667
Merge pull request #4392 from keymanapp/fix/windows/setup-should-ignore-cert-revocation
fix(windows): setup should ignore cert revocation
2021-02-03 07:07:16 +11:00
Marc Durdin
d8df94c2e0
Merge pull request #4384 from keymanapp/fix/windows/3936-uac-foreground
fix(windows): Ensure UAC window comes to foreground
2021-02-03 07:06:14 +11:00
Marc Durdin
83b8c4af08 chore(windows): tests should be case-sensitive
DUnitX by default does case-insensitive string equality assertions, and
we don't really want to make that assumption.

There was one minor fail uncovered in Keyman.System.UILanguageManager as
a result of this -- it now returns a matching entry as found in the
list of UI languages, rather than the input, to get same case as the UI
language list entry.

Thank you @ermshiperete.
2021-02-03 06:52:52 +11:00
Marc Durdin
adafdb9c84 fix(developer): Import Keyboard support for Targets
Fixes #2657.

Importing a Windows Keyboard had an option to select default targets for
the imported keyboard, but the option was ignored. This propagates the
option setting through the import process.
2021-02-02 16:12:45 +11:00
Marc Durdin
5208404cd6 fix(developer): Generate platforms correctly from template
Fixes #2679.

If web is specified but not a touch platform, exclude touch layout from
a generated project. Also, fixup list of supported platforms in the
generated README.md.
2021-02-02 15:50:56 +11:00
Marc Durdin
d311886a7e fix(developer): don't check both setup.exe and setup-redist.exe
Fixes #4354.

The redistributable build should be checking for the existence of either
setup.exe or setup-redist.exe. Note that the only difference between the
two is whether or not the file has a digital signature (as we should not
put a digital signature on an executable that will later have a .zip
appended, rather the final file should be signed).
2021-02-02 15:32:14 +11:00
Marc Durdin
3850087109 fix(windows): rename RefreshTag_Process variable
`RefreshTag_Process` should be named `RefreshTag_Thread`.
2021-02-02 14:58:59 +11:00
Marc Durdin
ca7ab8a7d8 fix(windows): improve cross-process refresh
Two changes here:

1. Only post the refresh message to the master controller, so that we
   get a single refresh regardless of how many controllers are
   registered.

2. When Keyman is restarted, the global RefreshTag is reset to 0, so we
   need to do a `!=` comparison rather than a `<` comparison to ensure
   that apps with an existing keyman32.dll/keyman64.dll in memory get
   refresh notifications (as their local `RefreshTag_Process` will
   likely already be greater than `0`).

Also a small additional debug statement.
2021-02-02 14:55:02 +11:00
Marc Durdin
7a16b07465
Merge pull request #4381 from keymanapp/fix/windows/4343-avoid-invalid-custom-languages
fix(windows): avoid invalid language codes in Add Language dialog
2021-02-02 08:41:35 +11:00
Marc Durdin
d81ff153b7
Merge pull request #4379 from keymanapp/fix/windows/4336-hotkey-show-keyboard-usage-plus-strings
fix(windows): remove Show Keyboard Usage hotkey
2021-02-02 08:41:28 +11:00
Marc Durdin
11bde6fc7e fix(windows): setup should ignore cert revocation
Fixes #4385.

Chrome has ignored certificate revocation for many years. If it's
good enough for Chrome, it's good enough for us. Right?

More seriously, sometimes Windows has trouble with its certificate
revocation cache, and it seems to be difficult to predict when this
will happen. This results in error 12057.

https://knowledge.broadcom.com/external/article/169185/ssl-visibility-how-to-resolve-the-certi.html
https://www.imperialviolet.org/2012/02/05/crlsets.html
2021-02-02 06:29:50 +11:00
Marc Durdin
f83c8ebbe5 fix(windows): Show balloon when Keyman is already running
Fixes #4192.

If Keyman is already running, and the user attempts to start Keyman
again, a balloon will be shown to direct the user to the right place on
the screen.

Note: this worked in earlier versions of Keyman but stopped working due
to name changes for windows in the app.

I have also added a new string for balloon that will need translation.
2021-02-01 16:06:08 +11:00
Marc Durdin
ba9ecb6095 fix(windows): Ensure UAC window comes to foreground
Fixes #3936.

This is a trial change as I am not able to reproduce the problem on my
machine, probably due to timing.

@makarasok, can you please test if this resolves the UAC window not
coming to foreground on your test scenario for #3936?
2021-02-01 15:29:06 +11:00
Marc Durdin
302107baa6 fix(windows): When uninstalling, exit Keyman
Fixes #4185.

Make sure Keyman is shut down during the uninstall so that it isn't left
in a weird state with missing files. This also reduces the need for a
reboot after uninstall.
2021-02-01 15:25:17 +11:00
Marc Durdin
348b29687e fix(windows): avoid invalid language codes in Add Language dialog
Fixes #4343.

This patch makes all language codes from the langtags.json dataset
visible through the Add Language dialog. This avoids situations where
an incomplete code such as "cmo" can result in an error (a script is
required for "cmo" as it is written in either Latn or Khmr).
2021-02-01 10:20:19 +11:00
Marc Durdin
fdcb8191a8 fix(windows): crash for Sinhala mitigation
Fixes #4337.

The Sinhala language installation mitigation needed the BCP 47 code as
well as the language code with the new language installation process.
2021-02-01 08:30:16 +11:00
Marc Durdin
335f06661d fix(windows): remove Show Keyboard Usage hotkey
Fixes #4336.

Removes the "Show Keyboard Usage Page" hotkey entry as it has no effect,
and cleans up Keyboard Usage and OSK Hint strings from all the current
locales.
2021-02-01 07:58:05 +11:00
Marc Durdin
07e9402f0c fix(windows): Refresh setings on 64-bit apps
Fixes #4289.

Some settings changes would not apply immediately for 64-bit apps, as
the refresh was not being processed until keymanx64 received focus (i.e.
never, as keymanx64 does not have a visible window!)
2021-02-01 07:42:20 +11:00
Marc Durdin
95e086feb9
Merge pull request #4349 from keymanapp/fix/windows/4186-enter-spacebar-in-config
fix(windows): Enter and Spacebar handling in Configuration
2021-02-01 06:29:08 +11:00
Marc Durdin
240ce8d3d6
Merge pull request #4360 from keymanapp/fix/windows/4196-surrogate-pair-deletions-tsf-aware
fix(windows): SMP-aware deletion in TSF-aware apps
2021-02-01 06:25:37 +11:00
Darcy Wong
a0b2fdb625
Merge pull request #4367 from keymanapp/chore/windows/more-titles-and-todos
chore(windows/resources): Fix more titles and TODOs in help
2021-01-29 10:05:53 +07:00
Darcy Wong
7bd55db3fa chore(windows/resources): Tweak formatting in locale_edit 2021-01-28 14:56:48 +07:00
Darcy Wong
57c78625c6 chore(windows/resources): Add link to troubleshooting/hidden 2021-01-28 14:44:47 +07:00
Darcy Wong
2d0e8490bb chore(windows/resources): Add troubleshooting/hidden 2021-01-28 14:38:08 +07:00