Add a KMX+ file reader and tests, including a round-trip builder:reader
test.
Move basic-17.txt, basic-19.txt, and basic.xml to common test resources
folder so they can be used by unit tests in common and developer.
Test-bot: skip
fs dependency removed from the main hextobin function, only in the
filesystem.ts version. Also supports loading a segment of a hex file
for isolated tests.
Test-bot: skip
Writes a UTF-8 format file, without BOM, matching the standard file
encoding used in Keyman for many years, rather than the legacy encoding
UTF-16LE+BOM.
Note: uses codecvt for UTF-8 conversion to avoid linking in additional
deps.
Fixes: #15336
Test-bot: skip
This shows the keyboard version from the loaded keyboard .js file in the
Keyman Developer Web Debugger, once the keyboard has been loaded. The
version information is not visible in the keyboard menu, because the
version data has not been loaded at that point (being available only in
the compiled .js file).
Fixes: #14212
Test-bot: skip
If the .keyman-touch-layout file has validation errors, Keyman Developer
will now report the first validation error in the message window, rather
than silently closing the whole keyboard editor. The
.keyman-touch-layout file will be loaded in Code view, and once the
first validation error is addressed, switching to Design view will
report the next error.
For future improvement:
* reporting multiple validation errors
* reporting line number of error
Fixes: #15242
Test-bot: skip
Implement the conversion from .kvk into KMX+ format, and embed the
result into the .kmx file. This change does not yet support &displaymap.
Move some virtual key modifier state helpers out of
visual-keyboard-compiler.ts and into shared module
modifier-key-constants.ts.
This change also flags the need to update the package compiler to
rewrite the font metadata into the KMX+ tables.
Test-bot: skip
Move some modifier key conversion utilities to a shared unit and also
add touchLayoutFilename and targetVersion to the kmcmplib extra data,
in preparation for generating and embedding OSK data.
Test-bot: skip
For keyboards that are v19 or later, always reserve space for the KMX+
header that will be written out in kmc-kmn, to avoid rewriting the whole
file. At this time, zero out that space.
Test-bot: skip
Build-bot: skip build:developer
The disp and layr sections have new v19 layouts, to support the Keyman
OSK requirements for epic/embed-osk-in-kmx. This supports writing the
new versions of these sections in Developer and loading them into Core,
doing transformations where necessary so that Core always works with v19
structures after load.
This does not implement the transformations required to support the OSK
APIs; that will be implemented in a follow-up PR. Nor is support for
writing the OSK data from source .kvks and .keyman-touch-layout
supported; this is just the scaffolding for supporting the structures in
the KMX+ data.
Test-bot: skip
Adds a call to map2pdb for Delphi projects, if map2pdb is an executable
on the path. This way, we get .pdb files we can use for debugging and
for performance profiling. This also replaces tds2dbg.
If map2dbg is available, then the build and install actions will copy
the PDB to be alongside the corresponding executable, making most debug
actions relatively seamless for finding symbols.
Also fixes up setup.exe in Windows and Developer to extend setup.exe to
a 512-byte boundary after map2pdb patches the PE.
Relates-to: #14787
Build-bot: skip release:developer,windows
Test-bot: skip