Skip to content

feat(developer): add kmx metadata to kmxplus compiles 🙀#7286

Merged
mcdurdin merged 1 commit intofeature-ldmlfrom
feat/developer/7273-store-metadata-for-kmc--epic-ldml
Sep 18, 2022
Merged

feat(developer): add kmx metadata to kmxplus compiles 🙀#7286
mcdurdin merged 1 commit intofeature-ldmlfrom
feat/developer/7273-store-metadata-for-kmc--epic-ldml

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

Fixes #7273.

Adds 4 kmx system stores to allow existing configuration tools to load and process KMXPlus files without modification:

  • TSS_NAME (first <name>)
  • TSS_COMPILEDVERSION (only if options.addCompilerVersion == true)
  • TSS_KEYBOARDVERSION (from <version number>)
  • TSS_TARGETS (currently always 'desktop', will later include more targets)

In order for TSS_COMPILEDVERSION to be handled correctly, needed to plumb in the new CompilerOptions interface. This could be a separate PR, but the changes are not huge, so opted to append the changes here.

Updates related tests and fixtures. Refactored some of the e2e helpers into helpers/index.ts for use with the metadata-compiler tests.

@keymanapp-test-bot skip

Fixes #7273.

Adds 4 kmx system stores to allow existing configuration tools to load
and process KMXPlus files without modification:

* `TSS_NAME` (first `<name>`)
* `TSS_COMPILEDVERSION` (only if `options.addCompilerVersion == true`)
* `TSS_KEYBOARDVERSION` (from `<version number>`)
* `TSS_TARGETS` (currently always 'desktop', will later include more
  targets)

In order for `TSS_COMPILEDVERSION` to be handled correctly, needed to
plumb in the new `CompilerOptions` interface. This could be a separate
PR, but the changes are not huge, so opted to append the changes here.

Updates related tests and fixtures. Refactored some of the e2e helpers
into helpers/index.ts for use with the metadata-compiler tests.
@mcdurdin mcdurdin self-assigned this Sep 13, 2022
@mcdurdin mcdurdin added this to the A16S10 milestone Sep 13, 2022
@mcdurdin mcdurdin requested a review from srl295 September 13, 2022 23:58
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

@mcdurdin mcdurdin marked this pull request as ready for review September 14, 2022 01:54
@mcdurdin mcdurdin removed the request for review from darcywong00 September 14, 2022 03:54
Copy link
Copy Markdown
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM…really shaping up!

// TSS_NAME: User friendly name of keyboard
keyboard.stores.push({
dpName: '&NAME',
dpString: kmxplus.name?.names?.[0]?.value ?? 'unknown', // Empty name should not happen, so ok to use 'unknown' here
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be unnamed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably can't happen unless we abuse metadata-compiler in our code, so I'll leave this one 😁.

00 10 00 00 # KMX_DWORD dwFileVersion; // 0004 Version of the file - Keyman 4.0 is 0x0400

26 d2 24 03 # KMX_DWORD dwCheckSum; // 0008 As stored in keyboard
c1 79 c0 dd # KMX_DWORD dwCheckSum; // 0008 As stored in keyboard
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the kmxplus compiler still generates checksums. We can remove this in another patch.

@mcdurdin mcdurdin modified the milestones: A16S10, A16S11 Sep 17, 2022
@mcdurdin mcdurdin merged commit d16b110 into feature-ldml Sep 18, 2022
@mcdurdin mcdurdin deleted the feat/developer/7273-store-metadata-for-kmc--epic-ldml branch September 18, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(developer): include store() metadata in kmc-generated keyboards 🙀

2 participants