Commit graph

902 commits

Author SHA1 Message Date
Marc Durdin
865a18d0e1 chore(core): kmldmlc to kmc, pre-merge of feature-ldml branch 2022-09-13 07:22:49 +10:00
Marc Durdin
3e6d9356c3
Merge pull request #7255 from keymanapp/chore/7222-optional-checksum
chore: make checksum optional 🙀
2022-09-13 06:30:04 +10:00
Marc Durdin
6987a170c0 chore(core): fixup paths for linux build 2022-09-12 17:22:21 +10:00
Marc Durdin
74a6c65710
Merge branch 'feature-ldml' into chore/merge-master-into-feature-ldml 2022-09-12 15:24:19 +10:00
Marc Durdin
ca098628a2 chore(core): verify StartGroup in kmx load
This is the first baby step in good verification of a .kmx file. A place
to add more tests.

@keymanapp-test-bot skip
2022-09-12 10:31:40 +10:00
Marc Durdin
c3dd066291 chore(core): cleanup commands.inc.sh slightly 2022-09-12 10:12:34 +10:00
Marc Durdin
0e5943c266 chore(core): add core/.build-builder as CI signal
The presence of this file tells CI to use the new builder_ style
parameters for build.sh.

Once all branches for 16.0+ are updated to merge the
chore/core/7247-use-builder-for-build-sh branch, then we can remove this
file and the corresponding bash test branches in CI.
2022-09-12 10:06:29 +10:00
Marc Durdin
91d375ac81 chore(core): use builder_ for build.sh
Refactoring of build.sh to use the builder_ functions. The script should
now be a lot cleaner. Usage is available with `core/build.sh --help`

Targets are :x86, :x64, :wasm, :arch (linux/mac).

Supports additional requirements of Linux build (--target-path,
--configure).

By default will attempt to build all available targets.

Actions are: clean, configure, build, test, install, uninstall.

The install and uninstall actions only work for linux and mac targets at
present.
2022-09-12 09:56:32 +10:00
Marc Durdin
31a34f73d7 chore(core): add unit test for zero checksum 2022-09-12 05:46:13 +10:00
Marc Durdin
89ccc393ab chore: make checksum optional
Fixes #7222.
2022-09-09 17:23:07 +10:00
Marc Durdin
5a3dad0298 chore(core): fixup km_kbp_event docs 2022-09-09 15:32:48 +10:00
Marc Durdin
ac27082e6d chore(developer): configure before build for kmc 2022-09-09 12:14:01 +10:00
Marc Durdin
561899a2a0 refactor(developer): rename kmldmlc to kmc
Fixes #7237.

Full clean, configure and build will be required for Core, Developer
after this change.

kmc is much less unwieldy a name than kmldmlc, and becomes our platform
for future compiler integration. Start of implementation for #5283 also.
2022-09-09 09:13:39 +10:00
Marc Durdin
b6c4e21c1d chore(developer): remove name from meta section
Fixes #7214.
2022-09-09 08:57:52 +10:00
Marc Durdin
e086b8f45a
Merge pull request #7244 from keymanapp/chore/core/7134-unirename
chore(core): improve xstring macros 🙀
2022-09-09 05:22:23 +10:00
Marc Durdin
0def7dd97d
Merge pull request #7212 from keymanapp/feat/developer/kmldmlc-transform-sections
feat(developer): kmldmlc compiler for transforms 🙀
2022-09-09 05:21:54 +10:00
Steven R. Loomis
90131728e8 chore(core): improve xstring macros 🙀
- move Utf32CharToUtf16 to inline
- remove Is_SMP and call sites, use Utf32CharToUtf16 instead.

For: #7134
2022-09-08 12:29:04 -05:00
Steven R. Loomis
82443a610d
fix(core): ldml Update core/src/kmx/kmx_plus.h
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-09-08 12:04:04 -05:00
Steven R. Loomis
029a2737bf fix(core): ldml: improve utf-32 handling++ 🙀
- review comments
- kmx_xstring: add and document macros, add Utf32CharToUtf16
- unit tests for kmx_xstring macros

Fixes: #7134
2022-09-08 11:45:23 -05:00
Steven R. Loomis
7a71ed84cc fix(core): ldml: improve utf-32 handling 🙀
- remove hacky utf-32 processing
- add utf-32 test case to test_kmx_plus.cpp
- change kmx_plus to return std::u16string
- kmx_xstring: add Uni_IsBMP() macro

Fixes: #7134
2022-09-07 18:08:26 -05:00
Marc Durdin
ec5a83a3fa
Merge pull request #7204 from keymanapp/feat/core/ldml-transform-table-specs-and-constants
feat(core): ldml keyboard transform elements 🙀
2022-09-07 11:28:42 +10:00
Marc Durdin
2e7aef39e7
Merge pull request #7197 from keymanapp/chore/core/section-order
chore(core): order sections according to binary format 🙀
2022-09-07 11:27:54 +10:00
Marc Durdin
5e1d898527
Merge pull request #7196 from keymanapp/feat/core/ldml-name-section
feat(core): add 'name' section 🙀
2022-09-07 11:27:46 +10:00
Marc Durdin
f1b2be168f
Merge pull request #7193 from keymanapp/chore/core/kmxplus-zero-length-string
chore(core): define zero length string vs null string for kmxplus 🙀
2022-09-07 11:27:30 +10:00
Marc Durdin
8678a0d35b chore(core): mark unused parameters 2022-09-07 10:36:35 +10:00
Marc Durdin
5104914672 feat(core): add km_kbp_event API endpoint
Adds infrastructure required to support caps lock control on keyboard
activation per #5822.

Keyboardprocessor implementation is currently a stub, and engines will
need corresponding updates to support the new API.
2022-09-07 10:24:01 +10:00
Marc Durdin
690290bdfe
chore(core): add comment for KMXPLUS_STR
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2022-09-07 08:14:23 +10:00
Marc Durdin
8e5ce35f4d feat(developer): kmldmlc compiler and tests for transforms
Adds compilers and minimal unit tests for transform sections bksp,
finl, ordr, and tran, and cleans up problems in the corresponding
builders.

Adds a utility script for building test fixtures for manual analysis:
  ./build.sh build-fixtures

Refactors constants to give us design-time type safety once more.
2022-09-06 10:15:31 +10:00
Marc Durdin
9f5f8e976e feat(core): ldml keyboard transform elements
Adds definitions for LDML keyboard transform elements `transforms`,
`backspaces`, and `reorders`, and the binary format sections `bksp`,
`elem`, `finl`, `ordr`, and `tran`.

Minimally updates the compiler so that it will build, but no other
changes to the compiler.

Compiler and Typescript updates to support building these sections will
come in the next PR.
2022-09-05 13:11:51 +10:00
Marc Durdin
0222ed308a chore: remove extra files 2022-09-04 06:14:53 +10:00
Marc Durdin
ea6bd8f09f chore(core): order sections according to binary format
Just reorders all work around the various sections to match the binary
format order -- that is, 'sect' first, then all other sections
alphabetically.

This also means the compiler now emits the sections in the expected
order.

No other changes to functionality.
2022-09-04 06:10:34 +10:00
Marc Durdin
b17805df3a feat(core): add 'name' section
Updates compiler, headers and documentation for the 'name' section,
which will always be present as the LDML keyboard spec requires at least
one name in the `<names>` element.
2022-09-04 05:45:43 +10:00
Marc Durdin
a274a44979 chore(core): wrap text on C7043_ldml.md 2022-09-03 06:12:36 +10:00
Marc Durdin
aef38f12df chore(core): define zero length string vs null string for kmxplus 2022-09-03 06:11:24 +10:00
Marc Durdin
702db90a71 feat(core): add version field to meta
Also adds semver package for validating the version field.
2022-09-02 14:13:10 +10:00
Marc Durdin
d141274aed chore(core): update hextobin files with new format 2022-09-02 14:06:26 +10:00
Steven R. Loomis
f3f498e923 fix(core): fix validators 🙀
- copy over asserts from 'old' code

#7136
2022-08-31 17:37:55 -05:00
Steven R. Loomis
3684cc43d0 fix(core): fix validators 🙀
yes, a kmxplus file does not start with a 'sect' !

#7136
2022-08-31 17:37:55 -05:00
Steven R. Loomis
90be01385b chore(core): split out validators 🙀
#7136
2022-08-31 17:37:55 -05:00
Marc Durdin
696ae9964d
Merge pull request #7153 from keymanapp/refactor/developer/kmldmlc-pure-functional-section-compilers
refactor(developer): each section compiler is a pure function 🙀
2022-08-30 19:04:05 -05:00
Steven R. Loomis
bef0013bf8 feat(core): set -DDEBUG for debug 🙀
- set -DDEBUG for 'debug' meson builds
- default KXPLUS_DEBUG  to 1 for -DDEBUG

#7136
2022-08-30 11:49:22 -05:00
Marc Durdin
91283464ca
Merge pull request #7150 from keymanapp/chore/merge-master-feature-ldml
chore: merge master into feature-ldml 🙀
2022-08-29 20:52:44 -05:00
Marc Durdin
db11553c9a refactor(developer): each section compiler is a pure function
Well, almost. There are still callback side-effects for messages. These
may in future be returned as an array as well, eliminating the need for
a message callback.

But restructures each section compiler so that it is self-contained and
responsible only for writing its own section. Also tightens up the types
for the sections constants.

Last, but not least, moves responsibility for writing the output .kmx
out of compiler.ts and into its callers -- removing one dependency from
the compiler. Reading input files still needs to be done in the
compiler, as there may be multiple input files with `<import>` that we
cannot know about until we start parsing xml.
2022-08-30 11:13:11 +10:00
Steven R. Loomis
f03abf2ea5
Update core/src/ldml/ldml_processor.cpp
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-08-29 17:23:17 -05:00
Steven R. Loomis
46d7c96823 fix(core): ldml: fix validator 🙀
- allow keys section to exactly fit in data size, as in #7140
2022-08-29 17:16:45 -05:00
Steven R. Loomis
8c65dea9b3
Merge pull request #7132 from keymanapp/feat/core/5015-fileread
feat(core): ldml: improve file reading/validation 🙀
2022-08-29 16:45:56 -05:00
Steven R. Loomis
c03ab40d5d feat(core): ldml: update spec per code review
#7043
2022-08-29 16:41:39 -05:00
Steven R. Loomis
1c7188f9fd
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-08-29 16:41:12 -05:00
Marc Durdin
655c872dc8 chore: Merge branch 'master' into chore/merge-master-feature-ldml 2022-08-30 06:31:04 +10:00
Marc Durdin
9edabec297 chore(core): emcc off path for linux 2022-08-30 06:20:48 +10:00