Skip to content

Commit

Permalink
Merge branch 'chore/developer/package-description-optional' into fix/…
Browse files Browse the repository at this point in the history
…developer/package-compiler-box-info-fields
  • Loading branch information
mcdurdin authored Nov 20, 2024
2 parents ce7593b + 138f3c2 commit b0000ae
Show file tree
Hide file tree
Showing 15 changed files with 299 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deb-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
strategy:
fail-fast: true
matrix:
dist: [focal, jammy, noble]
dist: [focal, jammy, noble, oracular]

steps:
- name: Checkout
Expand All @@ -142,7 +142,7 @@ jobs:
strategy:
fail-fast: true
matrix:
dist: [oracular]
dist: [plucky]

steps:
- name: Checkout
Expand Down
35 changes: 35 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Keyman Version History

## 18.0.141 alpha 2024-11-15

* chore(linux): add support for Ubuntu 25.04 Plucky Puffin (#12675)

## 18.0.140 alpha 2024-11-13

* chore(common): Add 17.0.330 - 17.0.332 to version history (#12663)
* fix(developer): reconnect `--full-test` in kmcmplib build and enable for CI (#12631)
* docs(developer): kmc-generate (#12647)

## 18.0.139 alpha 2024-11-12

* fix(windows): help links updated (#12646)

## 18.0.138 alpha 2024-11-08

* fix(common): check for invalid markers (#12613)
Expand Down Expand Up @@ -958,6 +972,27 @@
* chore(common): move to 18.0 alpha (#10713)
* chore: move to 18.0 alpha

## 17.0.332 stable 2024-11-06

* fix(developer): create Server config directory before options save (#12609)
* fix(developer): handle merge commits when checking git log date (#12628)
* fix(linux): set environment variable for rendering of downloads dialog (#12617)

## 17.0.331 stable 2024-10-30

* fix(android): Hide suggestion banner on password fields (#12466)
* fix(common): declare dep on @keymanapp/ldml-keyboard-constants (#12475)
* fix(oem/fv): Update keyboard versions and names for fv_all.kmp (#12504)
* chore(ios): renew certificate (#12513)
* fix(developer): prevent invalid string ids (#12524)
* fix(developer): ignore excess whitespace in `<row keys>` attribute (#12523)

## 17.0.330 stable 2024-09-16

* refactor(android): Move Sentry and APK to publish task (#12392)
* fix(developer): rewrite ldml visual keyboard compiler (#12406)
* fix(developer): check vars string usage before definition (#12407)

## 17.0.329 stable 2024-09-09

* chore(android,ios): Add ojibwa ifinal/rdot keyboards to FirstVoices (#12020)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.139
18.0.142
170 changes: 170 additions & 0 deletions developer/docs/help/reference/kmc/cli/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ The following parameters are available:

: Rewrites On Screen Keyboard files from source mapping

`kmc generate keyman-keyboard [options] <id>`

: Generate a .kmn keyboard project

`kmc generate ldml-keyboard [options] <id>`

: Generate an LDML .xml keyboard project

`kmc generate lexical-model [options] <id>`

: Generate a wordlist lexical model project

`kmc copy origin -o target`

: Copy and rename a keyboard project
Expand Down Expand Up @@ -306,6 +318,164 @@ For more information on the purpose of `analyze osk-char-use` and
`analyze rewrite-osk-from-char-use`, see
[`&displayMap`](/developer/language/reference/displaymap).

## `kmc generate keyman-keyboard` options

Generates a new keyboard project with .kmn format keyboard. An ID must be
specified for the output of the project, and an output folder (`-o`). A new
folder with the keyboard ID as its name will be created under the output folder,
and the files in that folder will follow the
[standard file layout](../../file-layout).

`-t, --target <target>`

: Target platforms for the project. Use the values from
[`&targets`](/developer/language/reference/targets). Multiple targets may be
specified, each prefixed with `-t`, or space-separated, surrounded by
quotation marks (e.g. `-t windows -t linux` or `-t "windows linux"`) (default:
`any`)

`-o, --out-path <path>`

: Specifies the parent folder for the project; the folder may already exist. The
project will be generated in a new folder named with the ID of the project
under this path, and that project folder must not exist.

`-n, --name <name>`

: Keyboard descriptive name, used in the
[`&name` store](/developer/language/reference/name) (default: the ID of the
project)

`-c, --copyright <copyright-name>`

: [`&copyright`](/developer/language/reference/copyright) holder for the
project. Do not include the '(C)' or '&copy;' prefixes (default: the author
of the keyboard)

`-v, --version <version-string>`

: [`&version`](/developer/language/reference/version) of the keyboard, (default:
"1.0").

`-L, --language-tag <bcp-47 tag>`

: A BCP-47 language tag with which the keyboard is associated. More than one
tag may be specified, with each tag prefixed with `-L` (default: no languages).
The tags are referenced in the package metadata.

`-a, --author <author-name>`

: The name of keyboard author (default: blank)

`-i, --icon`

: Include a generated icon. The icon will be a 16x16 pixel box with the first
letters of the first language tag (default: true, include an icon)

`-d, --description <description>`

: A short description of the project, in Markdown. (default: keyboard name)

## `kmc generate ldml-keyboard` options

Generates a new keyboard project with LDML .xml format keyboard. An ID must be
specified for the output of the project, and an output folder (`-o`). A new
folder with the keyboard ID as its name will be created under the output folder,
and the files in that folder will follow the
[standard file layout](../../file-layout).

`-t, --target <target>`

: Target platforms for the project. Use the values from
[`&targets`](/developer/language/reference/targets). Multiple targets may be
specified, each prefixed with `-t`, or space-separated, surrounded by
quotation marks (e.g. `-t windows -t linux` or `-t "windows linux"`) (default:
`any`)

`-o, --out-path <path>`

: Specifies the parent folder for the project; the folder may already exist. The
project will be generated in a new folder named with the ID of the project
under this path, and that project folder must not exist.

`-n, --name <name>`

: Keyboard descriptive name, referenced in the keyboard `<info name` attribute
(default: the ID of the project). Do not include generic terms such as
'keyboard', 'unicode', or a version number in the name.

`-c, --copyright <copyright-name>`

: Copyright holder for the project. Do not include the '(C)' or '&copy;'
prefixes (default: the author of the keyboard)

`-v, --version <version-string>`

: Version of the keyboard, referenced in the keyboard `<version number`
attribute, should be in major.minor.patch format (note: full semantic version
is not currently supported in Keyman) (defaults to "1.0.0")

`-L, --language-tag <bcp-47 tag>`

: A BCP-47 language tag with which the keyboard is associated. More than one
tag may be specified, with each tag prefixed with `-L` (default: no languages).
The first tag is referenced in the keyboard `<keyboard3 locale` attribute,
with subsequent tags referenced in `<locale id` attributes. The tags are
also referenced in the package metadata.

`-a, --author <author-name>`

: The name of keyboard author, referenced in `<info author` attribute (default:
blank)

`-d, --description <description>`

: A short description of the project, in Markdown. (default: keyboard name)

## `kmc generate lexical-model` options

Generates a new lexical model project with a TSV wordlist. An ID must be
specified for the output of the project, and an output folder (`-o`). The ID
must match the [`author.bcp47.uniq`](/developer/lexical-models) naming pattern.
A new folder with the model ID as its name will be created under the output
folder, and the files in that folder will follow the
[standard file layout](../../file-layout).

`-o, --out-path <path>`

: Specifies the parent folder for the project; the folder may already exist. The
project will be generated in a new folder named with the ID of the project
under this path, and that project folder must not exist.

`-n, --name <name>`

: Lexical model descriptive name, referenced in the package metadata (default:
the ID of the project)

`-c, --copyright <copyright-name>`

: Copyright holder for the project. Do not include the '(C)' or '&copy;'
prefixes (default: the author of the model)

`-v, --version <version-string>`

: Version of the lexical model, referenced in the package metadata (defaults to
"1.0")

`-L, --language-tag <bcp-47 tag>`

: A BCP-47 language tag with which the model is associated. More than one
tag may be specified, with each tag prefixed with `-L` (default: no languages).
The tags are referenced in the package metadata.

`-a, --author <author-name>`

: The name of model author, referenced in package metadata (default: blank)

`-d, --description <description>`

: A short description of the project, in Markdown. (default: lexical model name)

## `kmc copy` options

Copies a keyboard or lexical model project, renaming files matching the original
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Copyright URL="">© 2023 Geʾez Frontier Foundation</Copyright>
<Author URL="mailto:[email protected]">Geʾez Frontier Foundation</Author>
<Version URL="">1.0.1</Version>
<Description>The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper.</Description>
<Description URL="">The Tigrinya-Eritrea lexical model is based on the content found from 131 issues of the Haddas Eritrea (ሓዳስ ኤርትራ) newspaper.</Description>
</Info>
<Files>
<File>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<Version URL=""></Version>
<Name URL="">Kmhmu 2008</Name>
<Copyright URL="">© 2008-2018 John Durdin</Copyright>
<Description>Lao-script Kmhmu language keyboard</Description>
<Description URL="">Lao-script Kmhmu language keyboard</Description>
</Info>
<Files>
<File>
Expand Down
6 changes: 5 additions & 1 deletion developer/src/kmcmplib/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ shift
if "!COMMAND!" == "configure" (
echo === Configuring Keyman KMX Compiler for Windows !ARCH! !BUILDTYPE! ===
if exist build\!ARCH!\!BUILDTYPE! rd /s/q build\!ARCH!\!BUILDTYPE!
meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! --werror %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
if "%1"=="--full-test" (
meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! --werror -D full_test=true %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
) else (
meson setup build\!ARCH!\!BUILDTYPE! !STATIC_LIBRARY! --buildtype !BUILDTYPE! --werror %1 %2 %3 %4 %5 %6 %7 %8 %9 || exit !errorlevel!
)
shift
)

Expand Down
5 changes: 3 additions & 2 deletions developer/src/kmcmplib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
## END STANDARD BUILD SCRIPT INCLUDE

. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
. "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh"
. "$THIS_SCRIPT_PATH/checkout-keyboards.inc.sh"
. "$THIS_SCRIPT_PATH/commands.inc.sh"

Expand Down Expand Up @@ -78,7 +79,7 @@ do_action() {
done
}

if builder_has_option --full-test; then
if should_do_full_test; then
locate_keyboards_repo
fi

Expand All @@ -101,7 +102,7 @@ if builder_start_action configure; then
# We have to checkout the keyboards repo in a 'configure' action because
# otherwise meson will not get the right list of keyboard source files,
# even though we only use it in the 'test' action
if builder_has_option --full-test; then
if should_do_full_test; then
checkout_keyboards
fi

Expand Down
21 changes: 18 additions & 3 deletions developer/src/kmcmplib/commands.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@ do_configure() {
STANDARD_MESON_ARGS="--cross-file wasm.defs.build --cross-file wasm.build --default-library static"
fi

local FULL_TEST=
local FULL_TEST_WIN=
if should_do_full_test; then
FULL_TEST="-D full_test=true"
FULL_TEST_WIN=--full-test
fi

if [[ $target =~ ^(x86|x64)$ ]]; then
cmd //C build.bat $target $BUILDER_CONFIGURATION configure "${builder_extra_params[@]}"
cmd //C build.bat $target $BUILDER_CONFIGURATION configure $FULL_TEST_WIN "${builder_extra_params[@]}"
else
pushd "$THIS_SCRIPT_PATH" > /dev/null
# Additional arguments are used by Linux build, e.g. -Dprefix=${INSTALLDIR}
meson setup "$MESON_PATH" --werror --buildtype $BUILDER_CONFIGURATION $STANDARD_MESON_ARGS "${builder_extra_params[@]}"
meson setup "$MESON_PATH" --werror --buildtype $BUILDER_CONFIGURATION $STANDARD_MESON_ARGS $FULL_TEST "${builder_extra_params[@]}"
popd > /dev/null
fi
builder_finish_action success configure:$target
Expand Down Expand Up @@ -78,7 +85,7 @@ do_test() {
# Works on a local clone of keyboards repository, to avoid clobbering
# user's existing keyboards repo, if present

if builder_has_option --full-test; then
if should_do_full_test; then
checkout_keyboards
fi

Expand Down Expand Up @@ -125,4 +132,12 @@ build_meson_cross_file_for_wasm() {
local R=$(echo $EMSCRIPTEN_BASE | sed 's_/_\\/_g')
fi
sed -e "s/\$EMSCRIPTEN_BASE/$R/g" wasm.build.$BUILDER_OS.in > wasm.build
}

should_do_full_test() {
if builder_has_option --full-test || builder_is_ci_test_build; then
return 0
fi

return 1
}
1 change: 0 additions & 1 deletion developer/src/kmcmplib/src/CompilerInterfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ EXTERN bool kmcmp_CompileKeyboard(
const void* procContext,
KMCMP_COMPILER_RESULT& result
) {

FILE_KEYBOARD fk;
fk.extra = new KMCMP_COMPILER_RESULT_EXTRA;
fk.extra->kmnFilename = pszInfile;
Expand Down
5 changes: 4 additions & 1 deletion developer/src/kmcmplib/tests/get-test-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
set -eu
find "$1" -name '*.kmn' | \
grep -E '(release|experimental)/([a-z0-9_]+)/([a-z0-9_]+)/source/\3\.kmn$' | \
grep -v masaram_gondi
grep -vE 'masaram_gondi|anii|sil_kmhmu|fv_statimcets|fv_nuucaanul'
# #12623: exclude masaram_gondi due to #11806
# #12631: exclude anii, sil_kmhmu as ico references have mismatching case
# #12631: exclude fv_statimcets, fv_nuucaanul as these include U+2002 which is not
# treated as whitespace on mac arch
Loading

0 comments on commit b0000ae

Please sign in to comment.