Commit graph

1143 commits

Author SHA1 Message Date
Marc Durdin
74d1bc8fc2 chore(core): address review comments
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-02-01 06:47:49 +11:00
Marc Durdin
766c6992ed fix(core): normalization segment should end on NFC boundary, not NFD
When normalizing, we need to stop processing on an NFC boundary, not an
NFD boundary, to support normalizations such as in Bengali, where
appending `U+09D7` to a context of `U+0995 U+09C7` should result in
`U+0995 U+09CC`.

The specification is unclear on this; see https://unicode-org.atlassian.net/browse/CLDR-19218

This also updates the ldml keyboard unit test suite to support running
in full NFC mode (used in all Engine implementations) as well retaining
the NFD mode (now only used by the debugger).

Side note: the Bengali normalization failure case was picked up by the
improvements to the unit test suite, proving once again that good tests
are so valuable.

Fixes: #15491
Fixes: #15505
Follows: #15488
Relates-to: CLDR-19218
2026-01-28 14:32:25 +11:00
Marc Durdin
033e3eeb3f docs(core): add comments post review
Co-authored-by: srl295@gmail.com
2026-01-27 10:50:26 +11:00
Marc Durdin
f7cd0c41ba fix(core): handle backspace decomposition
Ensure that when a single backspace decomposes the last NFC character in
the app context, the remainder of the 'cluster' is preserved, matching
the implication of the CLDR keyboard specification.

This addresses the behavior in #15487 where the cached context became
out of sync with the app context after deleting an entire NFC cluster
such as ê, which caused a loop ending up with the entire context being
deleted, at which point the loop exited with a fail-safe.

Note that the LDML keyboard tests (ldml.cpp) do not currently exercise
the normalization code; this is a gap that should be addressed to ensure
that we are testing final application behavior.

Fixes: #15487
2026-01-25 07:24:15 +11:00
Marc Durdin
484acff8e8
Merge pull request #15353 from keymanapp/maint/win/15065-arm64-core-test
maint(windows): add GitHub Action for ARM64 test for Keyman Core 🦾
2025-12-16 18:49:57 +01:00
Marc Durdin
3048705c9b maint(windows): add GitHub Action for ARM64 test for Keyman Core
Add a GitHub action to test Keyman Core on Windows / ARM64. We do not
have a TeamCity ARM64 agent for this. There are a number of config
challenges in making this work as many deps do not yet support ARM64;
however the changes are isolated to the .yml.

Test-bot: skip
2025-12-16 06:48:25 +11:00
rc-swag
4ac24f7b7b chore(windows): Merge branch 'epic/win-arm' into feat/windows/64x-pure-forwarder-wix-3 2025-12-09 14:00:45 +10:00
Marc Durdin
d7f21e80ec chore: Merge remote-tracking branch 'origin/epic/win-arm' into auto/A19S17-merge-master-into-win-arm
Significant conflict resolution fixes required to:
*	windows/src/engine/keyman32/build.sh
*	windows/src/engine/keyman32/keyman-engine.vcxproj
*	windows/src/engine/keyman32/keyman32.vcxproj
*	windows/src/engine/keyman32/keyman32.vcxproj.filters
*	windows/src/engine/keyman32/tests/keyman32.tests.vcxproj
2025-12-05 10:16:37 +01:00
rc-swag
192a94e6c5 feat(windows): simplify vc config environment
With VS2022 the limitations for the -hostarch flag not being available
on arm environment and the -arch only having x86 and x64 has been
removed. There is now single command that works for 3 builds on either
host architecture.
Fixes: 15239
Test-bot: skip
2025-12-02 16:07:04 +10:00
Marc Durdin
9335a82530 maint(core): verify that keyman_core_ldml.h is in sync
Fixes: #15254
Test-bot: skip
Build-bot: skip build:linux,mac,windows
2025-12-01 17:11:57 +01:00
rc-swag
ad34a44c9f chore(windows): Merge branch 'epic/win-arm' into feat/windows/11905/keymanx64-keymanarm64 2025-11-21 18:36:13 +10:00
rc-swag
c9753f6ba2 feat(windows): handle arch type in build.bat skip build.sh
Add a host check for build.bat and run the architecture tests
that match the host. for the meson builds from build.h
for now just skip the arm64 tests.
2025-11-19 11:50:57 +10:00
Eberhard Beilharz
2d8a4aeebc
maint(core): fix option defaults for Meson >= 1.1
Meson 1.1 changed the name of the options file from `meson_options.txt`
to `meson.options`. Currently we're stuck with Meson 1.0 as minimum
Meson version because we still support Ubuntu 22.04 Jammy, but on some
machines a newer version of meson gets installed which causes the
options to be ignored.

The first attempt to simply symlink or copy `meson_options.txt` to
`meson.options` failed because git on Windows doesn't support symlinks
by default, and Meson complains if it finds two options files (#15127).

Fortunately not having an options file is only a problem for Core where
we have one option in the options file that defaults to true. The solution
implemented in this change is to always pass the option to Meson.

Test-bot: skip
2025-11-10 15:24:46 +01:00
rc-swag
1cf430bb98 chore(windows): Merge branch 'epic/win-arm' into feat/windows/11905/keymanx64-keymanarm64 2025-11-10 11:29:40 +10:00
Marc Durdin
df212364a2 maint(resources): add repository record for all published packages
While not documented as such, it appears that the repository record is
required with trusted publishing of npm packages.

Test-bot: skip
Build-bot: skip
2025-10-29 14:35:31 +01:00
rc-swag
2f2df0bb8f feat(windows): fix typos entered into the build.bat 2025-10-28 17:08:47 +10:00
Marc Durdin
fe6e8e72a8
Merge pull request #15029 from keymanapp/maint/resources/14963-npm-publish-on-gha
maint(resources): move npm package publishing to GitHub Actions
2025-10-28 07:57:35 +01:00
rc-swag
d52b48cbbb feat(windows): handle arm64 complier environment
Update the build.bat to handle configuring the build
environment with vsdevcmd correctly for arm64 2019 doesn't
work very well so have to have pretty weird if statement.
also checked in some missed updates to function name change
2025-10-28 16:40:42 +10:00
Marc Durdin
ba411774f6 maint(resources): move NPM package publishing to GitHub Actions
Due to recent changes in NPM package publishing security requirements,
we have to move from TeamCity build to a GitHub Action to publish our
NPM packages, so we can take advantage of trusted publishing. This
change also consolidates and centralizes the npm publishing into
resources/build/ci/npm-publish.sh, which removes a lot of boilerplate
from each of the build.sh scripts, and ensures consistency.

Packages will be `npm pack`ed on PR and test builds, and published in
release builds.

Ref: https://docs.npmjs.com/trusted-publishers
Ref: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/
Fixes: #14963
Test-bot: skip
Build-bot: release:developer
2025-10-27 16:31:55 +01:00
Marc Durdin
55d6efe482 fix(developer): prevent ANSI keyboards crashing debugger
Note: #11909 has some additional future cleanup we could do, but these
code paths are not currently accessible, so in the interest of moving
forward, am leaving them for now.

Fixes: #11909
Test-bot: skip
2025-10-24 14:45:17 +02:00
rc-swag
5f974775cd feat(windows): remove echo 2025-10-22 22:48:27 +10:00
rc-swag
1340c4f9e5 feat(windows): add arm64 to wxs and core build
Add cross-arm64 and cross-x64 build
Add the arm64 binaries to the wxs installers with guids
update build.sh files
2025-10-14 16:00:40 +10:00
rc-swag
5ac167977b Merge branch 'epic/win-arm' into feat/windows/11905/keymanx64-keymanarm64 2025-10-01 14:11:23 +10:00
Marc Durdin
f3fb3ac87b maint(common): move build-utils-ci.inc.sh to ci/ci-publish.inc.sh
Removes a number of unused functions from the file, renames remaining
functions to match our builder script prefix patterns, removes unused
imports from various build scripts (e.g. Android).

Fixes: #14453
2025-08-05 12:54:56 +10:00
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Marc Durdin
808b6557d6 maint(common): use cpp_std=c++17 in meson project default_options
We attempted to set the C++ version in standard.meson.build, but this
does not work well as the option name varies by platform, and it also
triggers a warning in meson. This fix moves the setting into each
meson.build project() default_options. As there are only a handful
of these, the maintenance burden is not high.

Fixes: #14432
Relates-to: #14355
Build-bot: build
Test-bot: skip
2025-08-01 10:23:57 +10:00
rc-swag
99d9d68e66 Initial addition of arm64 configuration 2025-07-31 16:30:23 +10:00
Eberhard Beilharz
51ca604b47
chore(common): Merge remote-tracking branch 'origin/master' into maint/common/14109_isOsFuncs 2025-07-21 09:20:12 +02:00
Eberhard Beilharz
faa521d82c
maint(common): set C++17 in standard.meson.build
Note that the ICU subprojects still explicitly specify C++17 since they
are maintained outside of Keyman and so shouldn't be tied to the Keyman
compiler version requirement.

Fixes: #12526
Test-bot: skip
2025-07-18 14:04:11 +02:00
Eberhard Beilharz
acebacc2b6
maint(core): explain (wrong) meson warning
Build-bot: skip
Test-bot: skip
2025-07-17 17:03:47 +02:00
Eberhard Beilharz
3b136fcec9
maint(common): consolidate functions to determine OS
- add `builder_is_windows`, `builder_is_macos` and `builder_is_linux`
  functions
- add/move `BUILDER_OS` env variable to `resources/builder.inc.sh`
- use the new functions and env variable

Fixes: #14109
Test-bot: skip
2025-07-09 18:33:09 +02:00
Steven R. Loomis
4d9551ae07
Merge pull request #14050 from keymanapp/feat/developer/13939-ln-layrcompiler
feat(developer): line numbers for layr compiler
2025-05-27 19:00:41 -05:00
Steven R. Loomis
b681885eca feat(developer): add more tests to layr compiler
- check for duplicate minDeviceWidth
- check for invalid minDeviceWidth

Fixes #13939
2025-05-26 12:30:59 -05:00
Marc Durdin
9f15e7c7ec maint: add empty 'scripts' tag to package.json to silence warning
Also removes './' from front of gosh.js to address another npm cleanup
(from `npm pkg fix`).

Fixes: #13833
2025-05-25 06:35:28 +07:00
Eberhard Beilharz
ee93d0d27a
maint(linux): add --no-werror option to not report warnings as errors
By default we add the `--werror` option to meson builds. This might cause
problems when compiling with a different compiler, so this option adds
the `--no-werror` option to our build scripts. This enables integrators
to compile with other compiler versions.

Fixes: #13970
Test-bot: skip
2025-05-20 09:01:22 +02:00
Marc Durdin
43cf66a9d4
Merge pull request #13796 from keymanapp/maint/meson-versioning-improvements
maint(common): cleanup meson versioning
2025-05-02 13:39:47 +07:00
Marc Durdin
9d2db4faf3 maint(common): consolidate standard.meson.build configuration
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
2025-04-30 09:16:43 +07:00
Marc Durdin
f8917d2454 maint(common): cleanup meson versioning
* Adds `VERSION_WITH_TAG` variable to standard.meson.build
* Consistently uses `file('VERSION.md')` to retrieve version number

Note that VERSION_WITH_TAG is not yet used but should be used for
version tagged files later.
2025-04-30 08:23:05 +07:00
Marc Durdin
7a56017f5b maint(core): batch build kmx in tests for performance
Build all the .kmx files used for kmn and ldml unit tests in batch
rather than one at a time. The ldml-test-data builds remain unbatched
for now (and are visibly slow!).

Fixes: #13495
2025-04-30 06:02:59 +07:00
Marc Durdin
ac6eb0b767 chore: use explicit node: prefix for node imports
This makes it easier for us to enumerate modules that have node
dependencies. There may be others I have not yet picked up.
2025-04-03 08:01:08 +07:00
Marc Durdin
a52437c407 chore: Merge branch 'master' into chore/b18s4-merge-beta-to-master 2025-03-29 05:38:08 +07:00
Eberhard Beilharz
1f8f979f61
Update core/include/keyman/keyman_core_api_vkeys.h
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-03-27 15:39:00 +01:00
Eberhard Beilharz
3e3a0dbce1
refactor(linux): mark undocumented keycodes as internal
Several keys that are defined in `winuser.h` were added after Keyman
defined its vkeys and so are not documented in the Keyman docs. This
change adds underscores before and after to mark them as being internal.
It's still useful to have them in the source code because it makes the
mapping between Linux keys and Keyman vkeys easier.

Addresses code review comment.
2025-03-26 16:49:31 +01:00
Eberhard Beilharz
a645fea903
fix(linux): improve key mapping to allow Core to reset context
This change tries to map all keys to corresponding Core VKeys so that
Core sees them and can reset the context if necessary. Previously we
had 0 for most of the keys, which meant that we didn't send them to
Core but instead returned right away. While this doesn't directly fix
the failing user tests described in #12968, it fixes the original tests
in #11172.

Closes: #12968
2025-03-21 18:15:46 +01:00
Steven R. Loomis
443681999d feat(core): improve kmxplus validation tests
- update per review notes

Fixes: #9446
2025-03-18 11:08:44 -05:00
Steven R. Loomis
9989217f9e feat(core): improve kmxplus validation
- restructured validation calls to be more consistent

Fixes: #9446
2025-03-17 12:09:04 -05:00
Steven R. Loomis
0011a2d10d feat(core): improve kmxplus validation
- improve an output string
- catch BMP noncharacters besides U+FFFF (H/T @mcdurdin - this was the whole point of the PR) plus test

Fixes: #9446

Co-authored-by: Marc Durdin <marc@durdin.net>
2025-03-17 11:26:57 -05:00
Steven R. Loomis
f1b3555114 feat(core,docs): improve kmxplus validation
- improve how validation works - a missing section does not mean an invalid section. distingush these.
- propagate errors for invalid sections
- update documentation of required sections

Fixes: #9446
2025-03-14 15:37:23 -05:00