From 06f1489dd86aa522da5976d2880949e0791c0c73 Mon Sep 17 00:00:00 2001 From: Meng-Heng Date: Fri, 20 Jun 2025 16:18:30 +0700 Subject: [PATCH 01/79] chore: include more valid bcp 47 tags and add markdown alerts into docs --- developer/docs/help/reference/bcp-47.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index f5c8a49539..671c9e52a9 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -30,13 +30,21 @@ The following are all examples of valid BCP 47 tags: * `en-US`: English, in United States * `km-Khmr-KH`: Khmer, written in the Khmer script, in Cambodia * `km-fonipa`: Khmer, transcribed in IPA +* `und-cpmn`: Undetermined (Cypro-Minoan) +* `tok-Zzzz-AA`: Toki Pona (Unknown Script) + +> [!NOTE] +> `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. +> `AA` is a Private Use Code. ### The language subtag The only required option is the Language subtag, which is an [ISO 639-1][2] or [ISO 639-3][3] code. -ISO 639-1 tags are a two-letter code. ISO 639-3 tags are a three-letter code. +- ISO 639-1 tags are a two-letter code. +- ISO 639-3 tags are a three-letter code. + First, try to find your language on the list of two-letter ISO 639-1 codes. [This Wikipedia page][4] lists all of the two-letter codes. @@ -46,10 +54,11 @@ it will give you an appropriate code. In this example, I searched Glottolog for “[Saanich][6]” (name of the First Nations that speak SENĆOŦEN) and found `str` as the code for all Straits Salish languages. -The Language subtag is conventionally written in lower case. +> [!IMPORTANT] +> The Language subtag is conventionally written in lower case. -The next two subtags are **optional**, however, they allow you to be more -specific about your language. +> [!NOTE] +> The next two subtags are **optional**, however, they allow you to be more specific about your language. ### The script subtag @@ -67,8 +76,8 @@ of the **Canadian Aboriginal syllabics** family of writing systems. If I wrote a keyboard or lexical model that produced syllabics, I would choose `Cans`, as that is the **ISO 15924** tag for Canadian Aboriginal syllabics. -The Script subtag is conventionally written in title case - first letter -capitalized. +> [!IMPORTANT] +> The Script subtag is conventionally written in title case - first letter capitalized. ### The region subtag @@ -100,7 +109,8 @@ and Mexico. Another common UN M49 region code is `001` for the whole world. -Alphabetic region subtags are conventionally written in upper case. +> [!IMPORTANT] +> Alphabetic region subtags are conventionally written in upper case. [1]: https://en.wikipedia.org/wiki/IETF_language_tag [2]: https://en.wikipedia.org/wiki/ISO_639-1 From 69eede0a2871026b3125bfbf8ea2ec8c70ac3c1f Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 3 Jul 2025 18:48:47 +0200 Subject: [PATCH 02/79] maint(resources): use `tc_` prefix for all `tc-*.inc.sh` functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - added `tc_` prefix to functions in `includes/tc-*.inc.sh` - moved `includes/tc-actions.inc.sh` → `linux/linux-actions.inc.sh` - didn't change `write_download_info`. That will be done as part of #14259. - didn't change `is_*`. That will be done as part of #14109. - removed unnecessary functions that only call another function. - moved functions from `tc-windows.inc.sh` → `tc-helpers.inc.sh` because they are no longer Windows-specific (although currently only used for Windows). Fixes: #14201 Test-bot: skip --- .../android/keyman-android-release.sh | 2 +- .../developer/developer-actions.inc.sh | 4 +- .../developer/keyman-developer-release.sh | 31 +--------- .../keyman-developer-test-linux-macos.sh | 9 ++- resources/teamcity/includes/tc-helpers.inc.sh | 58 ++++++++++++++----- resources/teamcity/includes/tc-linux.inc.sh | 15 +---- resources/teamcity/includes/tc-windows.inc.sh | 30 ---------- resources/teamcity/ios/keyman-ios-release.sh | 2 +- .../teamcity/linux/keyman-linux-release.sh | 6 +- .../linux/keyman-linux-test-integration.sh | 17 ++++-- resources/teamcity/linux/keyman-linux-test.sh | 6 +- .../linux-actions.inc.sh} | 11 +--- .../teamcity/macos/keyman-macos-release.sh | 2 +- resources/teamcity/web/keyman-web-release.sh | 6 +- resources/teamcity/web/keyman-web-test.sh | 4 +- .../windows/keyman-windows-release.sh | 7 +-- 16 files changed, 86 insertions(+), 124 deletions(-) delete mode 100644 resources/teamcity/includes/tc-windows.inc.sh rename resources/teamcity/{includes/tc-actions.inc.sh => linux/linux-actions.inc.sh} (91%) diff --git a/resources/teamcity/android/keyman-android-release.sh b/resources/teamcity/android/keyman-android-release.sh index 31dd0d9c4e..bd0aa14b44 100755 --- a/resources/teamcity/android/keyman-android-release.sh +++ b/resources/teamcity/android/keyman-android-release.sh @@ -106,7 +106,7 @@ function do_publish() { _publish_to_downloads_keyman_com _publish_to_playstore - upload_help "Keyman for Android" android + tc_upload_help "Keyman for Android" android } if builder_has_option --fv; then diff --git a/resources/teamcity/developer/developer-actions.inc.sh b/resources/teamcity/developer/developer-actions.inc.sh index 66cb82756a..73e1a325df 100644 --- a/resources/teamcity/developer/developer-actions.inc.sh +++ b/resources/teamcity/developer/developer-actions.inc.sh @@ -9,8 +9,8 @@ developer_install_dependencies_on_linux_action() { builder_echo start "install dependencies" "Installing dependencies" ba_linux_check_and_install_packages devscripts jq meson - install_nvm - install_emscripten + ba_linux_install_nvm + ba_linux_install_emscripten builder_echo end "install dependencies" success "Finished installing dependencies" } diff --git a/resources/teamcity/developer/keyman-developer-release.sh b/resources/teamcity/developer/keyman-developer-release.sh index ca42536a4b..59d9f763c5 100755 --- a/resources/teamcity/developer/keyman-developer-release.sh +++ b/resources/teamcity/developer/keyman-developer-release.sh @@ -15,7 +15,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-download-info.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" -. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" ################################ Main script ################################ @@ -64,30 +63,6 @@ function _publish_sentry() { builder_echo end "publish sentry" success "Finished publishing debug information files to Sentry" } -function _download_symbol_server_index() { - # Download symbol server index from symbol server - builder_echo start "download symbol server index" "Downloading symbol server index" - ( - mkdir -p "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" - cd "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" - - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/lastid.txt" "." - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/history.txt" "." - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/server.txt" "." - ) - builder_echo end "download symbol server index" success "Finished downloading symbol server index" -} - -function _publish_new_symbols() { - # Publish new symbols to symbol server - builder_echo start "publish new symbols" "Publishing new symbols to symbol server" - ( - cd "${LOCAL_SYMBOLS_PATH}" - tc_rsync_upload "." "${REMOTE_SYMBOLS_PATH}" - ) - builder_echo end "publish new symbols" success "Finished publishing new symbols to symbol server" -} - function _publish_to_downloads_keyman_com() { # Publish to downloads.keyman.com builder_echo start "publish to downloads.keyman.com" "Publishing release to downloads.keyman.com" @@ -155,10 +130,10 @@ function publish_action() { export RSYNC_ROOT _publish_sentry - download_symbol_server_index - publish_new_symbols + tc_download_symbol_server_index + tc_publish_new_symbols _publish_to_downloads_keyman_com - upload_help "api documentation" developer + tc_upload_help "api documentation" developer } if builder_has_action all; then diff --git a/resources/teamcity/developer/keyman-developer-test-linux-macos.sh b/resources/teamcity/developer/keyman-developer-test-linux-macos.sh index c273873fe0..d6db7a4c87 100755 --- a/resources/teamcity/developer/keyman-developer-test-linux-macos.sh +++ b/resources/teamcity/developer/keyman-developer-test-linux-macos.sh @@ -14,7 +14,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/resources/teamcity/developer/developer-actions.inc.sh" -. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" @@ -46,15 +45,15 @@ fi if builder_has_action all; then developer_install_dependencies_on_linux_action - set_variables_for_nvm - set_variables_for_emscripten + tc_set_variables_for_nvm + tc_set_variables_for_emscripten build_developer_action else builder_run_action configure developer_install_dependencies_on_linux_action - set_variables_for_nvm - set_variables_for_emscripten + tc_set_variables_for_nvm + tc_set_variables_for_emscripten builder_run_action build build_developer_action fi diff --git a/resources/teamcity/includes/tc-helpers.inc.sh b/resources/teamcity/includes/tc-helpers.inc.sh index 7ec2c3d98a..94a233ccba 100644 --- a/resources/teamcity/includes/tc-helpers.inc.sh +++ b/resources/teamcity/includes/tc-helpers.inc.sh @@ -29,18 +29,26 @@ is_macos() { fi } -install_nvm() { +# Returns 0 if the OS version is greater than or equal to the specified version. +# Parameter: +# $1 - OS version to compare against (e.g., "20.04") +is_os_version_or_higher() { if ! is_ubuntu; then - # on Windows and macOS build agents are configured manually - return 0 + builder_warning "This function is only implemented for Ubuntu" + return 0 # Not Ubuntu, so we assume the version check is not applicable. fi - ba_linux_install_nvm + + local OS_VERSION=$1 + + # we use `dpkg --compare-versions` to compare the current Ubuntu version + # shellcheck disable=SC2312 + dpkg --compare-versions "$(lsb_release -r -s)" ge "${OS_VERSION}" } # Set the environment variables required to use node/nvm and set the # `KEYMAN_USE_NVM` variable so that the build can automatically install # the required node version. -set_variables_for_nvm() { +tc_set_variables_for_nvm() { if [[ -f "${HOME}/.nvm/nvm.sh" ]] && [[ -d "${HOME}/.keyman/node" ]]; then # nvm.sh uses some variables that might not be initialized, so we # disable the "unbound variable" check temporarily @@ -54,20 +62,12 @@ set_variables_for_nvm() { fi } -install_emscripten() { - if ! is_ubuntu; then - # on Windows and macOS build agents are configured manually - return 0 - fi - ba_linux_install_emscripten -} - -set_variables_for_emscripten() { +tc_set_variables_for_emscripten() { export EMSCRIPTEN_BASE="${EMSCRIPTEN_BASE:-${HOME}/emsdk/upstream/emscripten}" export KEYMAN_USE_EMSDK=1 } -upload_help() { +tc_upload_help() { local PRODUCT=$1 local PRODUCT_PATH=$2 builder_echo start "upload help" "Uploading new ${PRODUCT} help to help.keyman.com" @@ -137,3 +137,31 @@ tc_rsync_upload() { "$1" \ "${RSYNC_USER}@${RSYNC_HOST}:${RSYNC_ROOT}/$2" } + +tc_download_symbol_server_index() { + # Download symbol server index from symbol server + builder_echo start "download symbol server index" "Downloading symbol server index" + ( + # shellcheck disable=SC2154 + mkdir -p "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" + # shellcheck disable=SC2164 + cd "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" + + # shellcheck disable=SC2154 + tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/lastid.txt" "." + tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/history.txt" "." + tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/server.txt" "." + ) + builder_echo end "download symbol server index" success "Finished downloading symbol server index" +} + +tc_publish_new_symbols() { + # Publish new symbols to symbol server + builder_echo start "publish new symbols" "Publishing new symbols to symbol server" + ( + # shellcheck disable=SC2164 + cd "${LOCAL_SYMBOLS_PATH}" + tc_rsync_upload "." "${REMOTE_SYMBOLS_PATH}" + ) + builder_echo end "publish new symbols" success "Finished publishing new symbols to symbol server" +} diff --git a/resources/teamcity/includes/tc-linux.inc.sh b/resources/teamcity/includes/tc-linux.inc.sh index 8427ba765e..797c698f29 100644 --- a/resources/teamcity/includes/tc-linux.inc.sh +++ b/resources/teamcity/includes/tc-linux.inc.sh @@ -1,17 +1,6 @@ #!/usr/bin/env bash # Keyman is copyright (C) SIL Global. MIT License. -# Returns 0 if the OS version is greater than or equal to the specified version. -# Parameter: -# $1 - OS version to compare against (e.g., "20.04") -is_os_version_or_higher() { - local OS_VERSION=$1 - - # we use `dpkg --compare-versions` to compare the current Ubuntu version - # shellcheck disable=SC2312 - dpkg --compare-versions "$(lsb_release -r -s)" ge "${OS_VERSION}" -} - # Returns 0 if the specified package is installed. # Parameter: # $1 - Package name to check (e.g., "curl") @@ -59,7 +48,7 @@ ba_linux_install_nvm() { NVM_RELEASE=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | grep tag_name | cut -d : -f 2 | cut -d '"' -f 2) # shellcheck disable=SC2312 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_RELEASE}/install.sh | bash - set_variables_for_nvm + tc_set_variables_for_nvm nvm install --lts --default --save nvm use --lts fi @@ -85,7 +74,7 @@ ba_linux_install_emscripten() { ./emsdk install "${KEYMAN_MIN_VERSION_EMSCRIPTEN}" ./emsdk activate "${KEYMAN_MIN_VERSION_EMSCRIPTEN}" fi - set_variables_for_emscripten + tc_set_variables_for_emscripten builder_echo end "install emscripten" success "Finished checking and installing emscripten" } diff --git a/resources/teamcity/includes/tc-windows.inc.sh b/resources/teamcity/includes/tc-windows.inc.sh deleted file mode 100644 index b8d840a61b..0000000000 --- a/resources/teamcity/includes/tc-windows.inc.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Keyman is copyright (C) SIL Global. MIT License. - -download_symbol_server_index() { - # Download symbol server index from symbol server - builder_echo start "download symbol server index" "Downloading symbol server index" - ( - # shellcheck disable=SC2154 - mkdir -p "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" - # shellcheck disable=SC2164 - cd "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" - - # shellcheck disable=SC2154 - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/lastid.txt" "." - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/history.txt" "." - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/server.txt" "." - ) - builder_echo end "download symbol server index" success "Finished downloading symbol server index" -} - -publish_new_symbols() { - # Publish new symbols to symbol server - builder_echo start "publish new symbols" "Publishing new symbols to symbol server" - ( - # shellcheck disable=SC2164 - cd "${LOCAL_SYMBOLS_PATH}" - tc_rsync_upload "." "${REMOTE_SYMBOLS_PATH}" - ) - builder_echo end "publish new symbols" success "Finished publishing new symbols to symbol server" -} diff --git a/resources/teamcity/ios/keyman-ios-release.sh b/resources/teamcity/ios/keyman-ios-release.sh index e5fe7346e0..d8f3848289 100755 --- a/resources/teamcity/ios/keyman-ios-release.sh +++ b/resources/teamcity/ios/keyman-ios-release.sh @@ -244,7 +244,7 @@ function do_build() { function do_publish() { _publish_to_downloads_keyman_com - upload_help "Keyman for iOS" ios + tc_upload_help "Keyman for iOS" ios if [[ "${KEYMAN_TIER}" == "stable" ]]; then _publish_to_appstore diff --git a/resources/teamcity/linux/keyman-linux-release.sh b/resources/teamcity/linux/keyman-linux-release.sh index b9a9c47efb..a127078458 100755 --- a/resources/teamcity/linux/keyman-linux-release.sh +++ b/resources/teamcity/linux/keyman-linux-release.sh @@ -10,10 +10,10 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" -. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-download-info.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" +. "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" ################################ Main script ################################ @@ -141,7 +141,7 @@ if builder_has_action all; then linux_install_dependencies_action _install_additional_dependencies - set_variables_for_nvm + tc_set_variables_for_nvm linux_build_action linux_unit_tests_action --no-integration @@ -150,7 +150,7 @@ else builder_run_action configure linux_install_dependencies_action builder_run_action configure _install_additional_dependencies - set_variables_for_nvm + tc_set_variables_for_nvm builder_run_action build linux_build_action builder_run_action test linux_unit_tests_action --no-integration diff --git a/resources/teamcity/linux/keyman-linux-test-integration.sh b/resources/teamcity/linux/keyman-linux-test-integration.sh index 0868cbb835..b68ade47be 100755 --- a/resources/teamcity/linux/keyman-linux-test-integration.sh +++ b/resources/teamcity/linux/keyman-linux-test-integration.sh @@ -11,9 +11,9 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" -. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" +. "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" ################################ Main script ################################ @@ -29,19 +29,26 @@ builder_parse "$@" cd "${KEYMAN_ROOT}/linux" +# Run the clean action in the `linux` directory.` +function clean_action() { + builder_heading "Cleaning up" + # shellcheck disable=SC2154 + "${KEYMAN_ROOT}/linux/build.sh" clean +} + if builder_has_action all; then - linux_clean_action + clean_action linux_install_dependencies_action linux_additional_test_dependencies_action - set_variables_for_nvm + tc_set_variables_for_nvm linux_build_action linux_unit_tests_action else - builder_run_action clean linux_clean_action + builder_run_action clean clean_action builder_run_action configure linux_install_dependencies_action builder_run_action configure linux_additional_test_dependencies_action - set_variables_for_nvm + tc_set_variables_for_nvm builder_run_action build linux_build_action builder_run_action test linux_unit_tests_action diff --git a/resources/teamcity/linux/keyman-linux-test.sh b/resources/teamcity/linux/keyman-linux-test.sh index 7c8387d153..98298253f8 100755 --- a/resources/teamcity/linux/keyman-linux-test.sh +++ b/resources/teamcity/linux/keyman-linux-test.sh @@ -11,9 +11,9 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" -. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" +. "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" ################################ Main script ################################ @@ -40,7 +40,7 @@ if builder_has_action all; then linux_install_dependencies_action linux_additional_test_dependencies_action - set_variables_for_nvm + tc_set_variables_for_nvm linux_build_action --coverage linux_unit_tests_action --coverage --report --no-integration @@ -49,7 +49,7 @@ else builder_run_action configure linux_install_dependencies_action builder_run_action configure linux_additional_test_dependencies_action - set_variables_for_nvm + tc_set_variables_for_nvm builder_run_action build linux_build_action --coverage builder_run_action test linux_unit_tests_action --coverage --report --no-integration diff --git a/resources/teamcity/includes/tc-actions.inc.sh b/resources/teamcity/linux/linux-actions.inc.sh similarity index 91% rename from resources/teamcity/includes/tc-actions.inc.sh rename to resources/teamcity/linux/linux-actions.inc.sh index 0834c32f43..f3ad2ec02d 100644 --- a/resources/teamcity/includes/tc-actions.inc.sh +++ b/resources/teamcity/linux/linux-actions.inc.sh @@ -1,16 +1,11 @@ -#!/usr/bin/env bash +# shellcheck shell=bash # Keyman is copyright (C) SIL Global. MIT License. -# Run the clean action in the `linux` directory.` -linux_clean_action() { - builder_heading "Cleaning up" - # shellcheck disable=SC2154 - "${KEYMAN_ROOT}/linux/build.sh" clean -} - # Install required dependencies for building Keyman on Linux. linux_install_dependencies_action() { builder_echo start "install dependencies" "Installing dependencies" + + # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/linux/scripts/package-build.inc.sh" checkAndInstallRequirements builder_echo end "install dependencies" success "Finished installing dependencies" diff --git a/resources/teamcity/macos/keyman-macos-release.sh b/resources/teamcity/macos/keyman-macos-release.sh index 1fad300c60..fb73185019 100755 --- a/resources/teamcity/macos/keyman-macos-release.sh +++ b/resources/teamcity/macos/keyman-macos-release.sh @@ -72,7 +72,7 @@ function _build_publish() { function _do_publish() { _build_publish _publish_to_downloads_keyman_com - upload_help "Keyman for macOS" mac + tc_upload_help "Keyman for macOS" mac } ba_mac_unlock_keychain diff --git a/resources/teamcity/web/keyman-web-release.sh b/resources/teamcity/web/keyman-web-release.sh index a79dff946b..c7c290b5e4 100755 --- a/resources/teamcity/web/keyman-web-release.sh +++ b/resources/teamcity/web/keyman-web-release.sh @@ -89,7 +89,7 @@ function publish_web_action() { _push_release_to_skeymancom _zip_and_upload_artifacts - upload_help "Keyman for Web" web + tc_upload_help "Keyman for Web" web builder_echo end publish success "Finished publishing KeymanWeb release" } @@ -97,14 +97,14 @@ function publish_web_action() { if builder_has_action all; then web_install_dependencies_on_linux_action - set_variables_for_nvm + tc_set_variables_for_nvm web_build_action publish_web_action else builder_run_action configure web_install_dependencies_on_linux_action - set_variables_for_nvm + tc_set_variables_for_nvm builder_run_action build web_build_action builder_run_action publish publish_web_action diff --git a/resources/teamcity/web/keyman-web-test.sh b/resources/teamcity/web/keyman-web-test.sh index 0996ab7ec3..33fbe707d7 100755 --- a/resources/teamcity/web/keyman-web-test.sh +++ b/resources/teamcity/web/keyman-web-test.sh @@ -40,7 +40,7 @@ function check_build_size_action() { if builder_has_action all; then web_install_dependencies_on_linux_action - set_variables_for_nvm + tc_set_variables_for_nvm web_build_action web_test_action @@ -48,7 +48,7 @@ if builder_has_action all; then else builder_run_action configure web_install_dependencies_on_linux_action - set_variables_for_nvm + tc_set_variables_for_nvm builder_run_action build web_build_action builder_run_action test web_test_action diff --git a/resources/teamcity/windows/keyman-windows-release.sh b/resources/teamcity/windows/keyman-windows-release.sh index 7d1b79b4e0..44cdda1230 100755 --- a/resources/teamcity/windows/keyman-windows-release.sh +++ b/resources/teamcity/windows/keyman-windows-release.sh @@ -16,7 +16,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-download-info.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" -. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/windows/windows-actions.inc.sh" ################################ Main script ################################ @@ -107,10 +106,10 @@ function windows_publish_action() { "${KEYMAN_ROOT}/windows/build.sh" publish windows_upload_symbols_to_sentry - download_symbol_server_index - publish_new_symbols + tc_download_symbol_server_index + tc_publish_new_symbols _publish_to_downloads_keyman_com - upload_help "Keyman for Windows" windows + tc_upload_help "Keyman for Windows" windows builder_echo end "publish windows" success "Finished publishing Keyman for Windows" } From 2668dfc76df94acdebd89045d12872ddd31d49ce Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 4 Jul 2025 13:01:22 +1000 Subject: [PATCH 03/79] docs(resources): clarify Build-bot usage Fixes: #14266 --- docs/build-bot.md | 99 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 6 deletions(-) diff --git a/docs/build-bot.md b/docs/build-bot.md index e879154a96..ea4f28c2fa 100644 --- a/docs/build-bot.md +++ b/docs/build-bot.md @@ -29,6 +29,39 @@ Or you may want to ensure that an artifact is built for Windows: Build-bot: release windows ``` +## The Build-bot command + +The build bot is controlled through the `Build-bot` command, which can be put +into commit trailers or the PR body (not PR comments). The format of the command +is: + +``` +Build-bot: [Platforms] +``` + +* `BuildLevel` can be `skip`, `build`, or `release`. See [Build Level] for more + details. +* `Platforms` can be omitted, in which case the command applies to all platforms + (equivalent to specifying `all`). If specified, it must be a comma-separated + list, with or without spaces, of one or more of the following platform + identifiers: + + * `all`: apply to all platforms listed below + * `android` + * `developer` + * `ios` + * `linux` + * `mac` + * `web` + * `windows` + * `common`: build common components, on all three build platforms (note: + `release` is equivalent to `build` buildLevel for `common`) + * `core`: build Keyman Core, on all three build platforms, and also WASM + (note: `release` is equivalent to `build` buildLevel for `core`) + +The list of platforms can be found in the `available_platforms` variable in +trigger-definitions.inc.sh. + ## Build Level The build level specifies what we want to be run for a test build on a PR. @@ -42,8 +75,8 @@ other release distribution endpoints. The build level is controlled by the Build-bot commit trailer and PR body Build-bot/Test-bot trailers. The default build level will be 'build'. -For target branch builds, the build level will always be 'build', and Build-bot: -commit trailers are ignored. +For target branch (master, beta, stable-x.y) builds, the build level will always +be 'build', and Build-bot: commit trailers are ignored. ### 'skip' build level @@ -82,7 +115,8 @@ For a 'release' build level: * we won't upload artifacts to any release endpoint such as Debian, packages.sil.org, etc, or to the release areas for Play Store or App Store -(uploading to *.keyman.com and to release endpoints happens in the release TC build config/GHA) +(uploading to *.keyman.com and to release endpoints happens in the release TC +build config/GHA) ## Controlling the build bot with trailers @@ -113,10 +147,11 @@ The Build-bot has limited interactions with the Keyman test bot (aka keymanapp-test-bot): if a 'User Testing' section is found in the PR body, the default build level will be upgraded from 'build' to 'release'. -Build bot trailers found in the commits or in the PR body are applied after the -test bot command. +Build bot trailers found in either the commits or in the PR body are applied +after the test bot command. -WARNING: The build bot does not check PR comments for Test-bot commands. +WARNING: The build bot does not check PR comments for Test-bot commands or a +'User Testing' section. ## Example Build-bot interactions @@ -136,6 +171,58 @@ Note that other platforms are still 'skip' but not included in the build set. Finally, the PR author pushes another commit, with `Build-bot: release windows`. The build set is now: `(android:skip ios:skip windows:release)`. +# FAQ +* How do I specify commands for multiple platforms, e.g. building on Windows and Linux? + +``` +Build-bot: build windows,linux +``` + +* If I modify a file that would cause a build on all platforms, does `Build-bot: + build android` then cause a build only on Android and skip all others? Or is + it only additive? + +The commands are additive. To skip all others, you would do: + +``` +Build-bot: skip +Build-bot: build android +``` + +* What happens in the following scenario: I have a PR that I only want to build + on Android and I add `Build-bot: build android`. Later on I merge in the + changes from `master` and add another commit. If I still only want to build on + Android, do I have to add `Build-bot: build android` on my new commit again? + Or what happens with merges that touch other files which would cause builds + for other platforms? + +First, you would need to specify `skip` for all other platforms in order to only +build on Android: + +``` +Build-bot: skip +Build-bot: build android +``` + +Then, the build bot scans all the commits in the PR, and additively builds the +final build set from the `Build-bot` commands from all the commits (up to 2000 +in one PR). Thus, earlier bot commands commits will continue to be honoured. +This makes it easier to apply merge commits, for example, or small fixups, +without needing to think about what needs to be built again. + +* How can I re-trigger builds after changing my build bot commands? + +In [TeamCity - Trigger Test Builds](https://build.palaso.org/buildConfiguration/Keyman_Test), +select a custom Run (small button attached to right of Run button), and in the +"Changes" tab, "Build branch" field, enter the PR number to re-run the builds. +Any test builds currently running against that PR will be cancelled and +restarted. + +Note: if you reduce the build set (with `skip`), and re-run builds in this way +without pushing a new commit, you will end up with stale status checks on the +latest commit in your PR for the builds that are now skipped on the new run, so +in this scenario it is safest to push a new commit with the updated build bot +commands. [Build Level]: #Build_Level \ No newline at end of file From 4d373c6cfe52147138e11af2be2033daa7fa924d Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 7 Jul 2025 18:41:16 +0200 Subject: [PATCH 04/79] maint(resources): address code review comments Co-authored-by: Marc Durdin --- .../developer/keyman-developer-release.sh | 5 ++- resources/teamcity/includes/tc-helpers.inc.sh | 33 +--------------- resources/teamcity/includes/tc-linux.inc.sh | 18 +++++++++ resources/teamcity/includes/tc-mac.inc.sh | 2 + resources/teamcity/includes/tc-windows.inc.sh | 38 +++++++++++++++++++ resources/teamcity/linux/linux-actions.inc.sh | 4 +- resources/teamcity/web/web-actions.inc.sh | 2 +- .../windows/keyman-windows-release.sh | 5 ++- 8 files changed, 69 insertions(+), 38 deletions(-) create mode 100644 resources/teamcity/includes/tc-windows.inc.sh diff --git a/resources/teamcity/developer/keyman-developer-release.sh b/resources/teamcity/developer/keyman-developer-release.sh index 59d9f763c5..963f74fdcb 100755 --- a/resources/teamcity/developer/keyman-developer-release.sh +++ b/resources/teamcity/developer/keyman-developer-release.sh @@ -15,6 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # shellcheck disable=SC2154 . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-download-info.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" +. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" ################################ Main script ################################ @@ -130,8 +131,8 @@ function publish_action() { export RSYNC_ROOT _publish_sentry - tc_download_symbol_server_index - tc_publish_new_symbols + ba_win_download_symbol_server_index + ba_win_publish_new_symbols _publish_to_downloads_keyman_com tc_upload_help "api documentation" developer } diff --git a/resources/teamcity/includes/tc-helpers.inc.sh b/resources/teamcity/includes/tc-helpers.inc.sh index 94a233ccba..065df7fe9e 100644 --- a/resources/teamcity/includes/tc-helpers.inc.sh +++ b/resources/teamcity/includes/tc-helpers.inc.sh @@ -32,10 +32,9 @@ is_macos() { # Returns 0 if the OS version is greater than or equal to the specified version. # Parameter: # $1 - OS version to compare against (e.g., "20.04") -is_os_version_or_higher() { +ba_linux_is_os_version_or_higher() { if ! is_ubuntu; then - builder_warning "This function is only implemented for Ubuntu" - return 0 # Not Ubuntu, so we assume the version check is not applicable. + builder_die "ba_linux_is_os_version_or_higher() is only implemented for Ubuntu" fi local OS_VERSION=$1 @@ -137,31 +136,3 @@ tc_rsync_upload() { "$1" \ "${RSYNC_USER}@${RSYNC_HOST}:${RSYNC_ROOT}/$2" } - -tc_download_symbol_server_index() { - # Download symbol server index from symbol server - builder_echo start "download symbol server index" "Downloading symbol server index" - ( - # shellcheck disable=SC2154 - mkdir -p "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" - # shellcheck disable=SC2164 - cd "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" - - # shellcheck disable=SC2154 - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/lastid.txt" "." - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/history.txt" "." - tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/server.txt" "." - ) - builder_echo end "download symbol server index" success "Finished downloading symbol server index" -} - -tc_publish_new_symbols() { - # Publish new symbols to symbol server - builder_echo start "publish new symbols" "Publishing new symbols to symbol server" - ( - # shellcheck disable=SC2164 - cd "${LOCAL_SYMBOLS_PATH}" - tc_rsync_upload "." "${REMOTE_SYMBOLS_PATH}" - ) - builder_echo end "publish new symbols" success "Finished publishing new symbols to symbol server" -} diff --git a/resources/teamcity/includes/tc-linux.inc.sh b/resources/teamcity/includes/tc-linux.inc.sh index 797c698f29..7e219f7e28 100644 --- a/resources/teamcity/includes/tc-linux.inc.sh +++ b/resources/teamcity/includes/tc-linux.inc.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash # Keyman is copyright (C) SIL Global. MIT License. +# +# Shared functions for any builds that run on Linux agents, +# e.g. linux, android, web, ... # Returns 0 if the specified package is installed. # Parameter: @@ -112,3 +115,18 @@ ba_linux_stop_xvfb() { rm -f "${PID_FILE}" fi } + +# Returns 0 if the OS version is greater than or equal to the specified version. +# Parameter: +# $1 - OS version to compare against (e.g., "20.04") +ba_linux_is_os_version_or_higher() { + if ! is_ubuntu; then + builder_die "ba_linux_is_os_version_or_higher() is only implemented for Ubuntu" + fi + + local OS_VERSION=$1 + + # we use `dpkg --compare-versions` to compare the current Ubuntu version + # shellcheck disable=SC2312 + dpkg --compare-versions "$(lsb_release -r -s)" ge "${OS_VERSION}" +} diff --git a/resources/teamcity/includes/tc-mac.inc.sh b/resources/teamcity/includes/tc-mac.inc.sh index 911fec97ff..a5de278343 100644 --- a/resources/teamcity/includes/tc-mac.inc.sh +++ b/resources/teamcity/includes/tc-mac.inc.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash # Keyman is copyright (C) SIL Global. MIT License. +# +# Shared functions for any builds that run on Mac agents ba_mac_unlock_keychain() { if [[ -z "${MAC_BUILDAGENT_PASSWORD}" ]]; then diff --git a/resources/teamcity/includes/tc-windows.inc.sh b/resources/teamcity/includes/tc-windows.inc.sh new file mode 100644 index 0000000000..4c0411eda6 --- /dev/null +++ b/resources/teamcity/includes/tc-windows.inc.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Keyman is copyright (C) SIL Global. MIT License. +# +# Shared functions for any builds that run on Windows agents + +ba_win_download_symbol_server_index() { + if ! is_windows; then + builder_die "ba_win_download_symbol_server_index should only be run on Windows agents" + fi + + builder_echo start "download symbol server index" "Downloading symbol server index" + ( + # shellcheck disable=SC2154 + mkdir -p "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" + # shellcheck disable=SC2164 + cd "${LOCAL_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}" + + # shellcheck disable=SC2154 + tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/lastid.txt" "." + tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/history.txt" "." + tc_rsync_download "${REMOTE_SYMBOLS_PATH}/${SYMBOLS_SUBDIR}/server.txt" "." + ) + builder_echo end "download symbol server index" success "Finished downloading symbol server index" +} + +ba_win_publish_new_symbols() { + if ! is_windows; then + builder_die "ba_win_publish_new_symbols should only be run on Windows agents" + fi + + builder_echo start "publish new symbols" "Publishing new symbols to symbol server" + ( + # shellcheck disable=SC2164 + cd "${LOCAL_SYMBOLS_PATH}" + tc_rsync_upload "." "${REMOTE_SYMBOLS_PATH}" + ) + builder_echo end "publish new symbols" success "Finished publishing new symbols to symbol server" +} diff --git a/resources/teamcity/linux/linux-actions.inc.sh b/resources/teamcity/linux/linux-actions.inc.sh index f3ad2ec02d..0b96f4c07c 100644 --- a/resources/teamcity/linux/linux-actions.inc.sh +++ b/resources/teamcity/linux/linux-actions.inc.sh @@ -16,14 +16,14 @@ linux_additional_test_dependencies_action() { builder_echo start additional_dependencies "Installing additional dependencies" local TOINSTALL="lcov libdatetime-perl gcovr python3-venv jq" - if is_os_version_or_higher 24.04; then + if ba_linux_is_os_version_or_higher 24.04; then TOINSTALL="${TOINSTALL} libgirepository-2.0-dev python3-coverage" fi # shellcheck disable=SC2086 ba_linux_check_and_install_packages ${TOINSTALL} - if ! is_os_version_or_higher 24.04; then + if ! ba_linux_is_os_version_or_higher 24.04; then builder_heading "Installing python3-coverage from pip" pip3 install --user coverage fi diff --git a/resources/teamcity/web/web-actions.inc.sh b/resources/teamcity/web/web-actions.inc.sh index 60665e01f2..d12b846e96 100644 --- a/resources/teamcity/web/web-actions.inc.sh +++ b/resources/teamcity/web/web-actions.inc.sh @@ -18,7 +18,7 @@ web_install_dependencies_on_linux_action() { } _install_playwright_dependencies() { - if ! is_ubuntu || ! is_os_version_or_higher 24.04; then + if ! is_ubuntu || ! ba_linux_is_os_version_or_higher 24.04; then return 0 fi diff --git a/resources/teamcity/windows/keyman-windows-release.sh b/resources/teamcity/windows/keyman-windows-release.sh index 44cdda1230..ec3fbe671b 100755 --- a/resources/teamcity/windows/keyman-windows-release.sh +++ b/resources/teamcity/windows/keyman-windows-release.sh @@ -16,6 +16,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-download-info.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" +. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/windows/windows-actions.inc.sh" ################################ Main script ################################ @@ -106,8 +107,8 @@ function windows_publish_action() { "${KEYMAN_ROOT}/windows/build.sh" publish windows_upload_symbols_to_sentry - tc_download_symbol_server_index - tc_publish_new_symbols + ba_win_download_symbol_server_index + ba_win_publish_new_symbols _publish_to_downloads_keyman_com tc_upload_help "Keyman for Windows" windows builder_echo end "publish windows" success "Finished publishing Keyman for Windows" From 314c606aece55cbd1bbf9519622e5680dfce19bd Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:27:14 +1000 Subject: [PATCH 05/79] fix(windows): add check a fix for registry datatypes Fixes: #14342 The Windows system level keyboard hotkeys controlled in registry have sometimes been incorrectly written as a DWORD datatype. There 106 events in sentry for just July. When opening the Windows setting dialog and the registry has DWORDS it will show unassinged in the dialog if apply is pressed it will convert the keys to REG_SZ. This fix follows a similar pattern it will check the data type of the registry key if it is DWORD it will remove it and add a new key of the same name as REG_SZ and set it to the unassigned value. Fixes: KEYMAN-WINDOWS-4NK --- .../keyman/langswitch/LangSwitchManager.pas | 93 ++++++++++++++----- 1 file changed, 70 insertions(+), 23 deletions(-) diff --git a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas index 80da078728..0a375695e0 100644 --- a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas +++ b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas @@ -1,4 +1,4 @@ -(* +(* Name: LangSwitchManager Copyright: Copyright (C) SIL International. Documentation: @@ -47,6 +47,7 @@ unit LangSwitchManager; interface uses + ErrorControlledRegistry, System.Classes, System.Contnrs, System.SysUtils, @@ -230,6 +231,7 @@ type FLanguageToggle: string; FLayoutToggle: string; procedure LoadCurrentHotkey; + function FixRegistryDataType(RegistryKey: TRegistryErrorControlled; const ValueName: string): Boolean; procedure DisableWindowsHotkey; procedure RestoreWindowsHotkey; public @@ -251,7 +253,6 @@ uses InterfaceHotkeys, kmint, LoadIndirectStringUnit, - ErrorControlledRegistry, Registry, RegistryKeys, UfrmKeyman7Main, @@ -981,38 +982,73 @@ begin FCurrentHotkey := FindHotkey(kmcom.Hotkeys); end; +function TLangSwitchConfiguration.FixRegistryDataType( + RegistryKey: TRegistryErrorControlled; + const ValueName: string +): Boolean; +var + RegType: TRegDataType; + const CHotkeyNotAssigned = '3'; +begin + Result := False; + + if RegistryKey.ValueExists(ValueName) then + begin + RegType := RegistryKey.GetDataType(ValueName); + if not ((RegType = rdString) or (RegType = rdExpandString)) then + begin + RegistryKey.DeleteValue(ValueName); + RegistryKey.WriteString(ValueName, CHotkeyNotAssigned); + Result := True; + end; + end; + +end; + procedure TLangSwitchConfiguration.DisableWindowsHotkey; var MatchValue: string; - FReset: Boolean; + KeyboardToggleReg: TRegistryErrorControlled; + FReset, FFixed: Boolean; + const CHotkeyNotAssigned = '3'; begin if FCurrentHotkey = (HK_ALT or HK_SHIFT) then MatchValue := '1' else if FCurrentHotkey = (HK_CTRL or HK_SHIFT) then MatchValue := '2' else Exit; - FLanguageToggle := '3'; - FLayoutToggle := '3'; + FLanguageToggle := CHotkeyNotAssigned; + FLayoutToggle := CHotkeyNotAssigned; + //FFixed := False; FReset := False; - with TRegistryErrorControlled.Create do // I2890 + KeyboardToggleReg := TRegistryErrorControlled.Create; // I2890 try - if not OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 - RaiseLastRegistryError; + if not KeyboardToggleReg.OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 + KeyboardToggleReg.RaiseLastRegistryError; + // Fix potential corrupted registry keys + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_Hotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LanguageHotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LayoutHotkey) then + FReset := True; - if ValueExists(SRegValue_Toggle_Hotkey) then FLanguageToggle := ReadString(SRegValue_Toggle_Hotkey); + if KeyboardToggleReg.ValueExists(SRegValue_Toggle_Hotkey) then + FLanguageToggle := KeyboardToggleReg.ReadString(SRegValue_Toggle_Hotkey); if FLanguageToggle = MatchValue then begin - WriteString(SRegValue_Toggle_Hotkey, '3'); - WriteString(SRegValue_Toggle_LanguageHotkey, '3'); + KeyboardToggleReg.WriteString(SRegValue_Toggle_Hotkey, CHotkeyNotAssigned); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LanguageHotkey, CHotkeyNotAssigned); FReset := True; end; - if ValueExists(SRegValue_Toggle_LayoutHotkey) then FLayoutToggle := ReadString(SRegValue_Toggle_LayoutHotkey); + if KeyboardToggleReg.ValueExists(SRegValue_Toggle_LayoutHotkey) then + FLayoutToggle := KeyboardToggleReg.ReadString(SRegValue_Toggle_LayoutHotkey); if FLayoutToggle = MatchValue then begin - WriteString(SRegValue_Toggle_LayoutHotkey, '3'); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LayoutHotkey, CHotkeyNotAssigned); FReset := True; end; finally @@ -1024,31 +1060,42 @@ end; procedure TLangSwitchConfiguration.RestoreWindowsHotkey; var - FReset: Boolean; + FReset, Changed: Boolean; + KeyboardToggleReg: TRegistryErrorControlled; begin FReset := False; if FLanguageToggle = '' then Exit; - with TRegistryErrorControlled.Create do // I2890 + KeyboardToggleReg := TRegistryErrorControlled.Create; // I2890 try - if not OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 - RaiseLastRegistryError; + if not KeyboardToggleReg.OpenKey(SRegKey_KeyboardLayoutToggle, True) then // I2890 + KeyboardToggleReg.RaiseLastRegistryError; - if not ValueExists(SRegValue_Toggle_Hotkey) or (ReadString(SRegValue_Toggle_Hotkey) <> FLanguageToggle) then + // Fix potential corrupted registry keys + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_Hotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LanguageHotkey) then + FReset := True; + if FixRegistryDataType(KeyboardToggleReg, SRegValue_Toggle_LayoutHotkey) then + FReset := True; + + if not KeyboardToggleReg.ValueExists(SRegValue_Toggle_Hotkey) or + (KeyboardToggleReg.ReadString(SRegValue_Toggle_Hotkey) <> FLanguageToggle) then begin - WriteString(SRegValue_Toggle_Hotkey, FLanguageToggle); - WriteString(SRegValue_Toggle_LanguageHotkey, FLanguageToggle); + KeyboardToggleReg.WriteString(SRegValue_Toggle_Hotkey, FLanguageToggle); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LanguageHotkey, FLanguageToggle); FReset := True; end; - if not ValueExists(SRegValue_Toggle_LayoutHotkey) or (ReadString(SRegValue_Toggle_LayoutHotkey) <> FLayoutToggle) then + if not KeyboardToggleReg.ValueExists(SRegValue_Toggle_LayoutHotkey) or + (KeyboardToggleReg.ReadString(SRegValue_Toggle_LayoutHotkey) <> FLayoutToggle) then begin - WriteString(SRegValue_Toggle_LayoutHotkey, FLayoutToggle); + KeyboardToggleReg.WriteString(SRegValue_Toggle_LayoutHotkey, FLayoutToggle); FReset := True; end; finally - Free; + KeyboardToggleReg.Free; end; if FReset then From 1525cd305883275817a130ec3b97dd8f1265b280 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 02:03:46 +0000 Subject: [PATCH 06/79] build(deps): bump multer from 2.0.1 to 2.0.2 Bumps [multer](https://github.com/expressjs/multer) from 2.0.1 to 2.0.2. - [Release notes](https://github.com/expressjs/multer/releases) - [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md) - [Commits](https://github.com/expressjs/multer/compare/v2.0.1...v2.0.2) --- updated-dependencies: - dependency-name: multer dependency-version: 2.0.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- developer/src/server/package.json | 2 +- package-lock.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/developer/src/server/package.json b/developer/src/server/package.json index 99cd6bb260..37192ca6f3 100644 --- a/developer/src/server/package.json +++ b/developer/src/server/package.json @@ -13,7 +13,7 @@ "@sentry/node": "^7.57.0", "chalk": "^4.1.2", "express": "^4.20.0", - "multer": "^2.0.1", + "multer": "^2.0.2", "ngrok": "^5.0.0-beta.2", "open": "^8.4.0", "restructure": "^3.0.1", diff --git a/package-lock.json b/package-lock.json index 5262663a45..436e7ed2ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1153,7 +1153,7 @@ "@sentry/node": "^7.57.0", "chalk": "^4.1.2", "express": "^4.20.0", - "multer": "^2.0.1", + "multer": "^2.0.2", "ngrok": "^5.0.0-beta.2", "open": "^8.4.0", "restructure": "^3.0.1", @@ -10493,9 +10493,9 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.1.tgz", - "integrity": "sha512-Ug8bXeTIUlxurg8xLTEskKShvcKDZALo1THEX5E41pYCD2sCVub5/kIRIGqWNoqV6szyLyQKV6mD4QUrWE5GCQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", "license": "MIT", "dependencies": { "append-field": "^1.0.0", From 3ec1338b36469e3cd4f3aff50b02be6a17d1de05 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 21 Jul 2025 17:20:52 +0200 Subject: [PATCH 07/79] test(developer): add unit tests for `isValidUtf8` Follow-up-of: #14369 Test-bot: skip --- developer/src/kmcmplib/src/Compiler.cpp | 2 +- .../kmcmplib/tests/gtest-compiler.tests.cpp | 98 ++++++++++++++++++- 2 files changed, 98 insertions(+), 2 deletions(-) diff --git a/developer/src/kmcmplib/src/Compiler.cpp b/developer/src/kmcmplib/src/Compiler.cpp index b09e9e704d..ab6296609b 100644 --- a/developer/src/kmcmplib/src/Compiler.cpp +++ b/developer/src/kmcmplib/src/Compiler.cpp @@ -3874,7 +3874,7 @@ bool isValidUtf8(KMX_BYTE* str, int sz) { // 2-byte sequence if (remaining < 2 || (str[i + 1] & 0xC0) != 0x80 || - str[i] == 0xC0 || + str[i] == 0xC0 || // C0 and C1 are illegal values str[i] == 0xC1) { return false; } diff --git a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp index 5589056d7e..0f0f726337 100644 --- a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp +++ b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp @@ -24,7 +24,8 @@ KMX_DWORD GetRHS(PFILE_KEYBOARD fk, PKMX_WCHAR p, PKMX_WCHAR buf, int bufsize, i bool isIntegerWstring(PKMX_WCHAR p); bool hasPreamble(std::u16string result); KMX_DWORD ProcessKeyLineImpl(PFILE_KEYBOARD fk, PKMX_WCHAR str, KMX_BOOL IsUnicode, PKMX_WCHAR pklIn, PKMX_WCHAR pklKey, PKMX_WCHAR pklOut); -bool UTF16TempFromUTF8(KMX_BYTE* infile, int sz, KMX_BYTE** tempfile, int* sz16); +extern bool UTF16TempFromUTF8(KMX_BYTE* infile, int sz, KMX_BYTE** tempfile, int* sz16); +extern bool isValidUtf8(KMX_BYTE* str, int sz); namespace kmcmp { extern int nErrors; @@ -2160,3 +2161,98 @@ TEST(UTF16TempFromUTF8, HandlesEmptyInput) { EXPECT_EQ(tempfile, nullptr); EXPECT_EQ(sz16, 0); } + +TEST(IsValidUtf8Test, ValidAscii) { + std::vector v = {'h', 'e', 'l', 'l', 'o'}; + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Valid2Byte) { + std::vector v = {0xC2, 0xA2}; // U+00A2: ¢ + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Valid3Byte) { + std::vector v = {0xE2, 0x82, 0xAC}; // U+20AC: € + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Valid4Byte) { + std::vector v = {0xF0, 0x9F, 0x98, 0x80}; // U+1F600: 😀 + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidOverlongEncoding) { + std::vector v = {0xC1, 0x81}; // Overlong encoding for ASCII + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidMissingContinuation) { + std::vector v = {0xE2, 0x82}; // Missing one continuation byte + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidLoneContinuation) { + std::vector v = {0x80}; // Continuation byte without starter + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteOutOfRange) { + std::vector v = {0xF4, 0x90, 0x80, 0x80}; // > U+10FFFF + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, ValidMixedAsciiAndMultiByte) { + std::vector v = {'A', 0xC2, 0xA2, 0xE2, 0x82, 0xAC, 0xF0, 0x9F, 0x98, 0x80}; + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid2ByteBadSecondByte) { + std::vector v = {0xD2, 0x28}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid2ByteBadSecondByteToHigh) { + std::vector v = {0xD2, 0xC8}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid3ByteBadSecondByte) { + std::vector v = {0xE2, 0x28, 0xA1}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid3ByteBadThirdByte) { + std::vector v = {0xE2, 0xA8, 0xD1}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteBadSecondByte) { + std::vector v = {0xF2, 0xC8, 0xB2, 0x88}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteBadThirdByte) { + std::vector v = {0xF2, 0xB8, 0x02, 0x88}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, Invalid4ByteBadFourthByte) { + std::vector v = {0xF2, 0xB8, 0xA2, 0xD8}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidByteC0) { + std::vector v = {0xC1}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, InvalidByteF5) { + std::vector v = {0xF5}; + EXPECT_FALSE(isValidUtf8(v.data(), v.size())); +} + +TEST(IsValidUtf8Test, ValidEmptyInput) { + std::vector v = {}; + EXPECT_TRUE(isValidUtf8(v.data(), v.size())); +} From 6148495e27bc79d0fd03ee0d0fbcc8c27f0955d3 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 23 Jul 2025 08:47:57 +0700 Subject: [PATCH 08/79] refactor(android): Update minimum required Chrome version to 95.0 * Change from 57.0 to 95.0 as the minimum target version of Chrome * Refactor Chrome version check to use constants, and updated applicable strings --- .../java/com/tavultesoft/kmapro/MainActivity.java | 3 +++ .../res/layout/check_chrome_webview_layout.xml | 2 +- .../KMAPro/kMAPro/src/main/res/values/strings.xml | 5 ++++- .../java/com/keyman/engine/util/WebViewUtils.java | 13 +++++++++++-- .../com/keyman/engine/util/WebViewUtilsTest.java | 14 ++++++++------ 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java index 3eec444fbd..40b41b6176 100644 --- a/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java +++ b/android/KMAPro/kMAPro/src/main/java/com/tavultesoft/kmapro/MainActivity.java @@ -864,6 +864,9 @@ public class MainActivity extends BaseActivity implements OnKeyboardEventListene private void displayUpdateChrome() { // TextView's default string is to update Chrome + TextView textView = (TextView)findViewById(R.id.kmWebViewChromeTextView); + textView.setText(String.format(getString(R.string.text_require_chrome_version), + WebViewUtils.KEYMAN_MIN_TARGET_VERSION_ANDROID_CHROME)); Button button = (Button)findViewById(R.id.webViewChromeButton); button.setText(getString(R.string.button_update_chrome)); diff --git a/android/KMAPro/kMAPro/src/main/res/layout/check_chrome_webview_layout.xml b/android/KMAPro/kMAPro/src/main/res/layout/check_chrome_webview_layout.xml index 09716bdd8a..ea5a9220d5 100644 --- a/android/KMAPro/kMAPro/src/main/res/layout/check_chrome_webview_layout.xml +++ b/android/KMAPro/kMAPro/src/main/res/layout/check_chrome_webview_layout.xml @@ -15,7 +15,7 @@ android:background="@android:color/white" android:gravity="start" android:layout_gravity="center_vertical" - android:text="@string/text_require_chrome_57" + android:text="@string/text_require_chrome_version" android:layout_marginStart="@dimen/button_playstore_margin" android:textSize="@dimen/update_chrome_label_textsize" /> diff --git a/android/KMAPro/kMAPro/src/main/res/values/strings.xml b/android/KMAPro/kMAPro/src/main/res/values/strings.xml index a0447d0f89..32cdf07f1a 100644 --- a/android/KMAPro/kMAPro/src/main/res/values/strings.xml +++ b/android/KMAPro/kMAPro/src/main/res/values/strings.xml @@ -30,10 +30,13 @@ Version: %1$s - + Keyman requires Chrome version 57 or newer. + + Keyman requires Chrome version %1$s or newer. + Update Chrome diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java b/android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java index de8b37f73e..0586ecbcc8 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/util/WebViewUtils.java @@ -32,6 +32,13 @@ public final class WebViewUtils { FULL; // WebView installed and enabled } + // Min version of Chrome for Keyman for Android for EngineWebViewVersionStatus.DEGRADED + public static final String KEYMAN_MIN_TARGET_VERSION_DEGRADED_ANDROID_CHROME = "37.0"; + + // Min version of Chrome for Keyman for Android (EngineWebViewVersionStatus.FULL) + // TODO: Keep this version in sync with resources/build/minimum-versions.inc.sh + public static final String KEYMAN_MIN_TARGET_VERSION_ANDROID_CHROME = "95.0"; + private static final String CHROME_INSTALL_PATTERN_FORMATSTR = "^.*Chrome/([\\d.]+).*$"; private static final Pattern installPattern = Pattern.compile(CHROME_INSTALL_PATTERN_FORMATSTR); @@ -52,9 +59,11 @@ public final class WebViewUtils { chromeVersion = getChromeVersion(context, webView); } - if (FileUtils.compareVersions("37.0", chromeVersion) == FileUtils.VERSION_GREATER) { + if (FileUtils.compareVersions(KEYMAN_MIN_TARGET_VERSION_DEGRADED_ANDROID_CHROME, chromeVersion) + == FileUtils.VERSION_GREATER) { return EngineWebViewVersionStatus.DISABLED; - } else if (FileUtils.compareVersions("57.0", chromeVersion) == FileUtils.VERSION_GREATER) { + } else if (FileUtils.compareVersions(KEYMAN_MIN_TARGET_VERSION_ANDROID_CHROME, chromeVersion) + == FileUtils.VERSION_GREATER) { return EngineWebViewVersionStatus.DEGRADED; } diff --git a/android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java b/android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java index 344b01879a..342934200a 100644 --- a/android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java +++ b/android/KMEA/app/src/test/java/com/keyman/engine/util/WebViewUtilsTest.java @@ -32,28 +32,30 @@ public class WebViewUtilsTest { @Test public void test_Chrome36_EngineWebViewVersionStatusDisabled() { - String chromeVersion = "36.0"; + double chromeVersionFloat = Float.parseFloat(WebViewUtils.KEYMAN_MIN_TARGET_VERSION_DEGRADED_ANDROID_CHROME) - 1.0; + String chromeVersion = String.valueOf(chromeVersionFloat); Assert.assertEquals(WebViewUtils.getEngineWebViewVersionStatus(context, null, chromeVersion), WebViewUtils.EngineWebViewVersionStatus.DISABLED); } @Test public void test_Chrome37_EngineWebViewVersionStatusDegraded() { - String chromeVersion = "37.0"; + String chromeVersion = WebViewUtils.KEYMAN_MIN_TARGET_VERSION_DEGRADED_ANDROID_CHROME; Assert.assertEquals(WebViewUtils.getEngineWebViewVersionStatus(context, null, chromeVersion), WebViewUtils.EngineWebViewVersionStatus.DEGRADED); } @Test - public void test_Chrome56_EngineWebViewVersionStatusDegraded() { - String chromeVersion = "56.0"; + public void test_Chrome94_EngineWebViewVersionStatusDegraded() { + double chromeVersionFloat = Float.parseFloat(WebViewUtils.KEYMAN_MIN_TARGET_VERSION_ANDROID_CHROME) - 1.0; + String chromeVersion = String.valueOf(chromeVersionFloat); Assert.assertEquals(WebViewUtils.getEngineWebViewVersionStatus(context, null, chromeVersion), WebViewUtils.EngineWebViewVersionStatus.DEGRADED); } @Test - public void test_Chrome57_EngineWebViewVersionStatusFull() { - String chromeVersion = "57.0"; + public void test_Chrome95_EngineWebViewVersionStatusFull() { + String chromeVersion = WebViewUtils.KEYMAN_MIN_TARGET_VERSION_ANDROID_CHROME; Assert.assertEquals(WebViewUtils.getEngineWebViewVersionStatus(context, null, chromeVersion), WebViewUtils.EngineWebViewVersionStatus.FULL); } From c472b5a03d85eaed2ac71b3c8d028dc76930405e Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Wed, 23 Jul 2025 08:48:24 +0700 Subject: [PATCH 09/79] docs(android): Update system-requirements help on minimum Chrome version --- android/docs/help/about/system-requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/docs/help/about/system-requirements.md b/android/docs/help/about/system-requirements.md index 16efbf28af..ae43794793 100644 --- a/android/docs/help/about/system-requirements.md +++ b/android/docs/help/about/system-requirements.md @@ -9,7 +9,7 @@ Keyman for Android will run on Android phones and tablets that have a minimum ve [Android 5.0 (Lollipop)](https://developer.android.com/about/versions/lollipop). ### Minimum Chrome Version -Keyman for Android requires a minimum version 53.0 of [Google +Keyman for Android requires a minimum version 95.0 of [Google Chrome](https://play.google.com/store/apps/details?id=com.android.chrome). If you have an older device, you may need to upgrade Chrome before you can use Keyman, e.g. through the Play Store. From 3c311a5aaae030af88d0a3e23f4b40944a6170da Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Thu, 24 Jul 2025 16:59:41 +1000 Subject: [PATCH 10/79] fix(windows): free the correct object KeyboardToggleReg --- .../engine/keyman/langswitch/LangSwitchManager.pas | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas index 0a375695e0..04a8b91392 100644 --- a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas +++ b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas @@ -231,6 +231,18 @@ type FLanguageToggle: string; FLayoutToggle: string; procedure LoadCurrentHotkey; + (** + * Ensures that the specified registry value has a valid string data type. + * If the registry value exists but is not of type `rdString` or `rdExpandString`, + * the function deletes the existing value and writes a default string value + * of `'3'`. + * + * @param RegistryKey The registry key object wrapper used to access the registry. + * @param ValueName The name of the registry value to check and correct. + * + * @returns True if the data type was incorrect and the value was reset; + * False if the value did not exist or was already a valid string type. + *) function FixRegistryDataType(RegistryKey: TRegistryErrorControlled; const ValueName: string): Boolean; procedure DisableWindowsHotkey; procedure RestoreWindowsHotkey; @@ -1052,7 +1064,7 @@ begin FReset := True; end; finally - Free; + KeyboardToggleReg.Free; end; if FReset then SystemParametersInfo(SPI_SETLANGTOGGLE, 0, nil, 0); From e493ba238c322ad2fcf26542d71f3ad78d7120dd Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 24 Jul 2025 14:59:15 +0200 Subject: [PATCH 11/79] chore(linux): fix merge --- resources/teamcity/includes/tc-linux.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/teamcity/includes/tc-linux.inc.sh b/resources/teamcity/includes/tc-linux.inc.sh index c59017cd78..362873189d 100644 --- a/resources/teamcity/includes/tc-linux.inc.sh +++ b/resources/teamcity/includes/tc-linux.inc.sh @@ -120,7 +120,7 @@ ba_linux_stop_xvfb() { # Parameter: # $1 - OS version to compare against (e.g., "20.04") ba_linux_is_os_version_or_higher() { - if ! is_ubuntu; then + if ! builder_is_linux; then builder_die "ba_linux_is_os_version_or_higher() is only implemented for Ubuntu" fi From 07f6fba23801fde74cbb4abcbf01d38b4ac65cab Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 24 Jul 2025 16:33:42 +0200 Subject: [PATCH 12/79] maint(common): fix standalone use of `resources/builder.inc.sh` `resources/builder.inc.sh` is designed to be used on other non-builder scripts, so not all variables can be assumed to be set. This change fixes some "unbound variable" errors. Test-bot: skip --- resources/builder.inc.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/builder.inc.sh b/resources/builder.inc.sh index ae6d9ff105..9d086f95c5 100755 --- a/resources/builder.inc.sh +++ b/resources/builder.inc.sh @@ -1542,7 +1542,7 @@ _builder_parse_expanded_parameters() { # Per #11106, local builds use --debug by default. # Second condition prevents the block (and message) from executing when --debug is already specified explicitly. - if [[ $KEYMAN_VERSION_ENVIRONMENT == "local" ]] && [[ $builder_debug != --debug ]] && ! $is_release; then + if [[ ${KEYMAN_VERSION_ENVIRONMENT:-} == "local" ]] && [[ $builder_debug != --debug ]] && ! $is_release; then builder_echo grey "Local build environment detected: setting --debug" _params+=(--debug) _builder_chosen_options+=(--debug) @@ -2208,7 +2208,7 @@ builder_is_ci_build() { # Returns 0 if current build is running as a release build in CI # builder_is_ci_release_build() { - if [[ "$KEYMAN_VERSION_ENVIRONMENT" =~ ^alpha|beta|stable$ ]]; then + if [[ "${KEYMAN_VERSION_ENVIRONMENT:-}" =~ ^alpha|beta|stable$ ]]; then return 0 fi return 1 @@ -2219,7 +2219,7 @@ builder_is_ci_release_build() { # mainline branch test # builder_is_ci_test_build() { - if [[ "$KEYMAN_VERSION_ENVIRONMENT" == test ]]; then + if [[ "${KEYMAN_VERSION_ENVIRONMENT:-}" == test ]]; then return 0 fi return 1 @@ -2233,7 +2233,7 @@ builder_is_ci_build_level_release() { if builder_is_ci_release_build; then return 0 fi - if [[ "$KEYMAN_BUILD_LEVEL" == release ]]; then + if [[ "${KEYMAN_BUILD_LEVEL:-}" == release ]]; then return 0 fi return 1 From 2c0158f050c3ccbd6fa84a02624f90cb1b087af3 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Thu, 24 Jul 2025 14:01:39 -0400 Subject: [PATCH 13/79] auto: increment master version to 19.0.90 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index cb0b00a11b..361eee78bf 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 19.0.89 alpha 2025-07-24 + +* docs(common): Document minimum version of Chrome 95.0 for Android (#14385) +* refactor(android): Update minimum target Chrome version to 95.0 and refactor to use constants (#14391) + ## 19.0.88 alpha 2025-07-23 * maint(windows): consider `GO_FAST` env variable in `add_zip_files` (#14338) diff --git a/VERSION.md b/VERSION.md index 48ee77477d..c0ee65d3de 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.89 \ No newline at end of file +19.0.90 \ No newline at end of file From 183a8455b0fda96dd298f2944d528b9cfeb3a58d Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 24 Jul 2025 19:16:18 +0200 Subject: [PATCH 14/79] maint(linux): fix stopping of test server --- .../tests/dbus-test-server/KmDbusTestServer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp b/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp index 80ae444185..50007e2b9e 100644 --- a/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp +++ b/linux/ibus-keyman/tests/dbus-test-server/KmDbusTestServer.cpp @@ -98,11 +98,9 @@ void KmDbusTestServer::Loop() return; } - guint exitFlag = FALSE; - // Install the object ret = sd_bus_add_object_vtable(bus, NULL, KEYMAN_TESTSVC_OBJECT_PATH, - KEYMAN_TESTSVC_INTERFACE_NAME, test_service_vtable, &exitFlag); + KEYMAN_TESTSVC_INTERFACE_NAME, test_service_vtable, this); if (ret < 0) { g_error("Failed to issue method call: %s", strerror(-ret)); return; @@ -118,12 +116,12 @@ void KmDbusTestServer::Loop() for (;;) { // Process requests ret = sd_bus_process(bus, NULL); - g_debug("sd_bus_process returned %d, exitFlag=%d", ret, exitFlag); + g_debug("sd_bus_process returned %d, exitFlag=%d", ret, this->exitFlag); if (ret < 0) { g_error("Failed to process bus: %s", strerror(-ret)); return; } - if (exitFlag) { + if (this->exitFlag) { // `exitFlag` can be modified by the callback function // `on_exit_method` which can be called by `sd_bus_process` g_debug("Exiting loop"); From bfc3aa345610c97f67152f720cc86efaefdca892 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 25 Jul 2025 19:37:30 +0200 Subject: [PATCH 15/79] refactor(linux): move dbus defines to common include This got missed in #14372. Fixes: #13281 Follow-up-of: #14372 Test-bot: skip --- linux/ibus-keyman/src/KeymanSystemServiceClient.cpp | 4 +--- linux/include/km_linux_common.h | 4 ++++ linux/keyman-system-service/src/KeymanSystemService.cpp | 4 +--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp b/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp index 1c2867778e..ca3f077afc 100644 --- a/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp +++ b/linux/ibus-keyman/src/KeymanSystemServiceClient.cpp @@ -5,11 +5,9 @@ #else #include #endif +#include #include "KeymanSystemServiceClient.h" -#define KEYMAN_BUS_NAME "com.keyman.SystemService1" -#define KEYMAN_INTERFACE_NAME "com.keyman.SystemService1.System" -#define KEYMAN_OBJECT_PATH "/com/keyman/SystemService1/System" extern gboolean testing; diff --git a/linux/include/km_linux_common.h b/linux/include/km_linux_common.h index 374ae01251..65204d9ccf 100644 --- a/linux/include/km_linux_common.h +++ b/linux/include/km_linux_common.h @@ -4,4 +4,8 @@ #define KEYMAN_F24_KEYCODE_OUTPUT_SENTINEL 194 // 0xC2 +#define KEYMAN_BUS_NAME "com.keyman.SystemService1" +#define KEYMAN_INTERFACE_NAME "com.keyman.SystemService1.System" +#define KEYMAN_OBJECT_PATH "/com/keyman/SystemService1/System" + #endif // __KM_LINUX_COMMON_H__ diff --git a/linux/keyman-system-service/src/KeymanSystemService.cpp b/linux/keyman-system-service/src/KeymanSystemService.cpp index f226ff2b2f..88cfa09ffa 100644 --- a/linux/keyman-system-service/src/KeymanSystemService.cpp +++ b/linux/keyman-system-service/src/KeymanSystemService.cpp @@ -17,12 +17,10 @@ #else #include #endif +#include #include "KeymanSystemService.h" #include "KeyboardDevice.h" -#define KEYMAN_BUS_NAME "com.keyman.SystemService1" -#define KEYMAN_INTERFACE_NAME "com.keyman.SystemService1.System" -#define KEYMAN_OBJECT_PATH "/com/keyman/SystemService1/System" using namespace std; From c08ac71b304e2eece356a6067ee5dcd65b226b8b Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 25 Jul 2025 19:42:33 +0200 Subject: [PATCH 16/79] docs(linux): update readme for test service Build-bot: skip Test-bot: skip --- linux/keyman-system-service/tests/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux/keyman-system-service/tests/README.md b/linux/keyman-system-service/tests/README.md index af77363b65..477a776c63 100644 --- a/linux/keyman-system-service/tests/README.md +++ b/linux/keyman-system-service/tests/README.md @@ -9,3 +9,11 @@ keyman-system-service. The differences are: The keyman-test-service gets called/used by the ibus-keyman integration tests. + +This test service goes hand in hand with `linux/ibus-keyman/tests/dbus-test-server`: +during test setup the dbus-test-server gets started (and registers its +class), but also adds our `services` subdir (`linux/keyman-system-service/tests/services`) +to the list of directories to be searched for services. + +When during the test `ibus-engine-keyman` calls a method on +`keyman-test-service` it will be started by dbus. From 08746e24a2ad0f65f5f708a26376009847136292 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 25 Jul 2025 19:51:09 +0200 Subject: [PATCH 17/79] refactor(linux): remove shellcheck warnings Test-bot: skip --- linux/ibus-keyman/tests/scripts/run-tests.sh | 45 ++--- .../tests/scripts/test-helper.inc.sh | 154 +++++++++--------- 2 files changed, 103 insertions(+), 96 deletions(-) diff --git a/linux/ibus-keyman/tests/scripts/run-tests.sh b/linux/ibus-keyman/tests/scripts/run-tests.sh index 1f26b39a41..c2b9d796df 100755 --- a/linux/ibus-keyman/tests/scripts/run-tests.sh +++ b/linux/ibus-keyman/tests/scripts/run-tests.sh @@ -1,20 +1,24 @@ #!/usr/bin/env bash +# shellcheck disable=SC2312 + set -eu +# shellcheck disable=SC2034 TOP_SRCDIR=${top_srcdir:-$(realpath "$(dirname "$0")/../..")} -TESTBASEDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman +TESTBASEDIR=${XDG_DATA_HOME:-${HOME}/.local/share}/keyman TESTDIR=${TESTBASEDIR}/test_kmx CLEANUP_FILE=/tmp/ibus-keyman-test-cleanup PID_FILE=/tmp/ibus-keyman-test.pids ENV_FILE=/tmp/keyman-env.txt +# shellcheck disable=SC1091 . "$(dirname "$0")"/test-helper.inc.sh local_cleanup() { - cleanup "$CLEANUP_FILE" + cleanup "${CLEANUP_FILE}" } -if [ -v KEYMAN_PKG_BUILD ]; then +if [[ -v KEYMAN_PKG_BUILD ]]; then # During package builds we skip these tests that require to start ibus because # ibus requires to find /var/lib/dbus/machine-id or /etc/machine-id, otherwise it fails with: # "Bail out! IBUS-FATAL-WARNING: Unable to load /var/lib/dbus/machine-id: Failed to open file @@ -23,7 +27,7 @@ if [ -v KEYMAN_PKG_BUILD ]; then exit 0 fi -if ! which Xvfb > /dev/null || ! which Xephyr > /dev/null || ! which metacity > /dev/null || ! which mutter > /dev/null; then +if ! command -v Xvfb > /dev/null || ! command -v Xephyr > /dev/null || ! command -v metacity > /dev/null || ! command -v mutter > /dev/null; then echo "Please install Xvfb, Xephyr, metacity and mutter before running these tests!" echo "sudo apt install xvfb xserver-xephyr metacity mutter" exit 1 @@ -54,9 +58,9 @@ function run_tests() { DISPLAY_SERVER=$1 shift - if [ -d "$(dirname "$0")/../../../build/$(arch)/debug" ]; then + if [[ -d "$(dirname "$0")/../../../build/$(arch)/debug" ]]; then CONFIG=debug - elif [ -d "$(dirname "$0")/../../../build/$(arch)/release" ]; then + elif [[ -d "$(dirname "$0")/../../../build/$(arch)/release" ]]; then CONFIG=release else echo "Cannot find ../../../build/$(arch)/debug or ../../../build/$(arch)/release" @@ -74,19 +78,20 @@ function run_tests() { fi echo "" - if [ $# -gt 0 ]; then + if [[ $# -gt 0 ]]; then #shellcheck disable=SC2206 TESTFILES=($@) else - pushd "$TESTDIR" > /dev/null || exit + pushd "${TESTDIR}" > /dev/null || exit TESTFILES=(*.kmx) popd > /dev/null || exit fi echo "# Starting tests..." # shellcheck disable=SC1090 - source "$ENV_FILE" - echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" + source "${ENV_FILE}" + # shellcheck disable=SC2154 + echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" if [[ -n ${REMOTE_DEBUG:-} ]]; then echo "===> Now attach debugger to ${REMOTE_HOST}" @@ -97,10 +102,10 @@ function run_tests() { #shellcheck disable=SC2086 ${REMOTE_DEBUG:-} "${G_TEST_BUILDDIR:-../../build/$(arch)/${CONFIG}/tests}/ibus-keyman-tests" ${ARG_K-} ${ARG_TAP-} \ ${ARG_VERBOSE-} ${ARG_DEBUG-} ${ARG_SURROUNDING_TEXT-} ${ARG_NO_SURROUNDING_TEXT-} \ - --directory "$TESTDIR" "${DISPLAY_SERVER}" ${TESTFILES[@]} + --directory "${TESTDIR}" "${DISPLAY_SERVER}" ${TESTFILES[@]} echo "# Finished tests." - cleanup "$CLEANUP_FILE" + cleanup "${CLEANUP_FILE}" } USE_WAYLAND=1 @@ -124,34 +129,34 @@ while (( $# )); do shift || (echo "Error: The last argument is missing a value. Exiting."; false) || exit 5 done -if ! can_run_wayland && [ "$USE_WAYLAND" == "0" ]; then +if ! can_run_wayland && [[ "${USE_WAYLAND}" == "0" ]]; then # support for --headless got added in mutter 40.x echo "# WARNING: mutter doesn't support running headless. Skipping Wayland tests." USE_WAYLAND=0 - if [ "$USE_X11" == "0" ]; then + if [[ "${USE_X11}" == "0" ]]; then echo "ERROR: no tests to run. Can't run Wayland tests, and --no-x11 is specified." exit 8 fi fi -if [ "$USE_WAYLAND" == "0" ] && [ "$USE_X11" == "0" ]; then +if [[ "${USE_WAYLAND}" == "0" ]] && [[ "${USE_X11}" == "0" ]]; then echo "ERROR: I'll have to run somewhere. Specifying both --no-wayland and --no-x11 is not allowed." exit 6 fi G_TEST_BUILDDIR="${G_TEST_BUILDDIR:-../../build/$(arch)/debug/tests}" -if [ ! -f "${G_TEST_BUILDDIR}/ibus-keyman-tests" ]; then +if [[ ! -f "${G_TEST_BUILDDIR}/ibus-keyman-tests" ]]; then G_TEST_BUILDDIR="${G_TEST_BUILDDIR:-../../build/$(arch)/release/tests}" fi -echo > "$CLEANUP_FILE" -echo > "$PID_FILE" +echo > "${CLEANUP_FILE}" +echo > "${PID_FILE}" trap local_cleanup EXIT SIGINT -if [ "$USE_WAYLAND" == "1" ]; then +if [[ "${USE_WAYLAND}" == "1" ]]; then run_tests --wayland "$@" fi -if [ "$USE_X11" == "1" ]; then +if [[ "${USE_X11}" == "1" ]]; then run_tests --x11 "$@" fi diff --git a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh index e9732cc478..2a6b38be3d 100755 --- a/linux/ibus-keyman/tests/scripts/test-helper.inc.sh +++ b/linux/ibus-keyman/tests/scripts/test-helper.inc.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# shellcheck shell=bash function can_run_wayland() { local MUTTER_VERSION @@ -13,9 +13,9 @@ function can_run_wayland() { function _generate_kmpjson() { local TESTDIR TESTDIR="$1" - pushd "$TESTDIR" > /dev/null || exit + pushd "${TESTDIR}" > /dev/null || exit KMPFILE="${TESTDIR}/kmp.json" - cat <<-EOF > "$KMPFILE" + cat <<-EOF > "${KMPFILE}" { "system": { "keymanDeveloperVersion": "10.0.1099.0", @@ -36,33 +36,33 @@ function _generate_kmpjson() { } EOF for f in k_*.kmx; do - keyboard=$(basename "$f") + keyboard=$(basename "${f}") keyboard="${keyboard%.*}" - echo " ," >> "$KMPFILE" - cat <<-EOF >> "$KMPFILE" + echo " ," >> "${KMPFILE}" + cat <<-EOF >> "${KMPFILE}" { - "name": "$keyboard", - "description": "$keyboard" + "name": "${keyboard}", + "description": "${keyboard}" } EOF done - cat <<-EOF >> "$KMPFILE" + cat <<-EOF >> "${KMPFILE}" ], "keyboards": [ EOF FIRST=true for f in k_*.kmx; do - keyboard=$(basename "$f") + keyboard=$(basename "${f}") keyboard="${keyboard%.*}" - if $FIRST; then + if ${FIRST}; then FIRST=false else - echo " ," >> "$KMPFILE" + echo " ," >> "${KMPFILE}" fi - cat <<-EOF >> "$KMPFILE" + cat <<-EOF >> "${KMPFILE}" { - "name": "$keyboard", - "id": "$keyboard", + "name": "${keyboard}", + "id": "${keyboard}", "version": "0.0", "languages": [ { @@ -73,8 +73,8 @@ EOF } EOF done - echo " ]" >> "$KMPFILE" - echo "}" >> "$KMPFILE" + echo " ]" >> "${KMPFILE}" + echo "}" >> "${KMPFILE}" popd > /dev/null || exit } @@ -84,9 +84,9 @@ function _link_test_keyboards() { TESTBASEDIR=$3 if [[ $(find "${KMX_TEST_DIR}/" -name k_\*.kmx 2>/dev/null | wc -l) -gt 0 ]]; then - mkdir -p "$(realpath --canonicalize-missing "$TESTBASEDIR")" - rm -f "$TESTDIR" - ln -sf "$(realpath "${KMX_TEST_DIR}")" "$TESTDIR" + mkdir -p "$(realpath --canonicalize-missing "${TESTBASEDIR}")" + rm -f "${TESTDIR}" + ln -sf "$(realpath "${KMX_TEST_DIR}")" "${TESTDIR}" else echo "Can't find test kmx files in ${KMX_TEST_DIR}" exit 3 @@ -99,31 +99,31 @@ function _setup_init() { CLEANUP_FILE=$2 PID_FILE=$3 - if [ -z "${TOP_SRCDIR:-}" ]; then + if [[ -z "${TOP_SRCDIR:-}" ]]; then TOP_SRCDIR=${G_TEST_SRCDIR:-$(realpath "$(dirname "$0")/..")}/.. fi - if [ -z "${TOP_BINDIR:-}" ]; then + if [[ -z "${TOP_BINDIR:-}" ]]; then TOP_BINDIR=${G_TEST_BUILDDIR:-$(realpath "$(dirname "$0/..")")}/.. fi - echo > "$ENV_FILE" + echo > "${ENV_FILE}" - if [ -f "$CLEANUP_FILE" ]; then + if [[ -f "${CLEANUP_FILE}" ]]; then # kill previous instances - "$(dirname "$0")"/teardown-tests.sh "$CLEANUP_FILE" || true + "$(dirname "$0")"/teardown-tests.sh "${CLEANUP_FILE}" || true fi - echo > "$CLEANUP_FILE" - echo > "$PID_FILE" + echo > "${CLEANUP_FILE}" + echo > "${PID_FILE}" TEMP_DATA_DIR=$(mktemp --directory) echo "rm -rf \"${TEMP_DATA_DIR}\" || true # TEMP_DATA_DIR" >> "${CLEANUP_FILE}" COMMON_ARCH_DIR= - [ -d "${TOP_SRCDIR}"/../../core/build/arch ] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch + [[ -d "${TOP_SRCDIR}"/../../core/build/arch ]] && COMMON_ARCH_DIR=${TOP_SRCDIR}/../../core/build/arch - if [ -d "${COMMON_ARCH_DIR}"/release ]; then + if [[ -d "${COMMON_ARCH_DIR}"/release ]]; then COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/release - elif [ -d "${COMMON_ARCH_DIR}"/debug ]; then + elif [[ -d "${COMMON_ARCH_DIR}"/debug ]]; then COMMON_ARCH_DIR=${COMMON_ARCH_DIR}/debug else echo "Can't find neither ${COMMON_ARCH_DIR}/release nor ${COMMON_ARCH_DIR}/debug" @@ -131,7 +131,7 @@ function _setup_init() { fi export LD_LIBRARY_PATH=${COMMON_ARCH_DIR}/src:${LD_LIBRARY_PATH-} - echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> "$ENV_FILE" + echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> "${ENV_FILE}" } function _setup_test_dbus_server() { @@ -143,12 +143,14 @@ function _setup_test_dbus_server() { "${TOP_BINDIR}/tests/dbus-test-server/km-dbus-test-server" &> /tmp/km-test-server.log & sleep 1 - cat /tmp/km-test-server.env >> "$ENV_FILE" - cat /tmp/km-test-server.env >> "$CLEANUP_FILE" - echo "${TOP_BINDIR}/tests/dbus-test-server/stop-test-server" >> "$CLEANUP_FILE" + cat /tmp/km-test-server.env >> "${ENV_FILE}" + cat /tmp/km-test-server.env >> "${CLEANUP_FILE}" + echo "${TOP_BINDIR}/tests/dbus-test-server/stop-test-server" >> "${CLEANUP_FILE}" + # shellcheck disable=SC1091 source /tmp/km-test-server.env - echo "# DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" + # shellcheck disable=SC2154 + echo "# DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" } function _setup_display_server() { @@ -158,7 +160,7 @@ function _setup_display_server() { PID_FILE=$3 DISPLAY_SERVER=$4 - if [ "$DISPLAY_SERVER" == "--wayland" ]; then + if [[ "${DISPLAY_SERVER}" == "--wayland" ]]; then if ! can_run_wayland; then # support for --headless got added in mutter 40.x echo "ERROR: mutter doesn't support running headless. Can't run Wayland tests." @@ -168,49 +170,49 @@ function _setup_display_server() { echo "Starting mutter..." TMPFILE=$(mktemp) # mutter-Message: 18:56:15.422: Using Wayland display name 'wayland-1' - mutter --wayland --headless --no-x11 --virtual-monitor 1024x768 &> "$TMPFILE" & + mutter --wayland --headless --no-x11 --virtual-monitor 1024x768 &> "${TMPFILE}" & PID=$! - echo "kill -9 ${PID} || true # mutter" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # mutter" >> "${CLEANUP_FILE}" echo "${PID} mutter" >> "${PID_FILE}" sleep 1s export WAYLAND_DISPLAY - WAYLAND_DISPLAY=$(grep "Using Wayland display" "$TMPFILE" | cut -d"'" -f2) - rm "$TMPFILE" - echo "export WAYLAND_DISPLAY=\"$WAYLAND_DISPLAY\"" >> "$ENV_FILE" + WAYLAND_DISPLAY=$(grep "Using Wayland display" "${TMPFILE}" | cut -d"'" -f2) + rm "${TMPFILE}" + echo "export WAYLAND_DISPLAY=\"${WAYLAND_DISPLAY}\"" >> "${ENV_FILE}" else echo "Running on X11:" while true; do echo "Starting Xvfb..." - DISP_XVFB=$RANDOM - Xvfb -screen 0 1024x768x24 :${DISP_XVFB} &> /dev/null & + DISP_XVFB=${RANDOM} + Xvfb -screen 0 1024x768x24 ":${DISP_XVFB}" &> /dev/null & PID=$! sleep 1 - if ps --no-headers --pid="$PID" > /dev/null; then + if ps --no-headers --pid="${PID}" > /dev/null; then break fi done - echo "kill -9 ${PID} || true # Xvfb" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # Xvfb" >> "${CLEANUP_FILE}" echo "${PID} Xvfb" >> "${PID_FILE}" while true; do echo "Starting Xephyr..." - DISP_XEPHYR=$RANDOM - DISPLAY=:${DISP_XVFB} Xephyr :${DISP_XEPHYR} -screen 1024x768 &> /dev/null & + DISP_XEPHYR=${RANDOM} + DISPLAY=:${DISP_XVFB} Xephyr ":${DISP_XEPHYR}" -screen 1024x768 &> /dev/null & PID=$! sleep 1 - if ps --no-headers --pid="$PID" > /dev/null; then + if ps --no-headers --pid="${PID}" > /dev/null; then break fi done - echo "kill -9 ${PID} || true # Xephyr" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # Xephyr" >> "${CLEANUP_FILE}" echo "${PID} Xephyr" >> "${PID_FILE}" echo "Starting metacity" - metacity --display=:${DISP_XEPHYR} &> /dev/null & + metacity --display=":${DISP_XEPHYR}" &> /dev/null & PID=$! - echo "kill -9 ${PID} || true # metacity" >> "$CLEANUP_FILE" + echo "kill -9 ${PID} || true # metacity" >> "${CLEANUP_FILE}" echo "${PID} metacity" >> "${PID_FILE}" export DISPLAY=:${DISP_XEPHYR} - echo "export DISPLAY=\"$DISPLAY\"" >> "$ENV_FILE" + echo "export DISPLAY=\"${DISPLAY}\"" >> "${ENV_FILE}" fi } @@ -219,23 +221,23 @@ function _setup_schema_and_gsettings() { ENV_FILE=$1 # Install schema to temporary directory. This removes the build dependency on the keyman package. - SCHEMA_DIR=$TEMP_DATA_DIR/glib-2.0/schemas - export XDG_DATA_DIRS=$TEMP_DATA_DIR:${XDG_DATA_DIRS-} - echo "export XDG_DATA_DIRS=$XDG_DATA_DIRS" >> "$ENV_FILE" + SCHEMA_DIR=${TEMP_DATA_DIR}/glib-2.0/schemas + export XDG_DATA_DIRS=${TEMP_DATA_DIR}:${XDG_DATA_DIRS-} + echo "export XDG_DATA_DIRS=${XDG_DATA_DIRS}" >> "${ENV_FILE}" export GSETTINGS_SCHEMA_DIR=${SCHEMA_DIR} - echo "export GSETTINGS_SCHEMA_DIR=\"$SCHEMA_DIR\"" >> "$ENV_FILE" + echo "export GSETTINGS_SCHEMA_DIR=\"${SCHEMA_DIR}\"" >> "${ENV_FILE}" - mkdir -p "$SCHEMA_DIR" - cp "${TOP_SRCDIR}"/../keyman-config/resources/com.keyman.gschema.xml "$SCHEMA_DIR"/ - glib-compile-schemas "$SCHEMA_DIR" + mkdir -p "${SCHEMA_DIR}" + cp "${TOP_SRCDIR}"/../keyman-config/resources/com.keyman.gschema.xml "${SCHEMA_DIR}"/ + glib-compile-schemas "${SCHEMA_DIR}" # Ubuntu 18.04 Bionic doesn't have ibus-memconf, and glib is not compiled with the keyfile # backend enabled, so we just use the default backend. Otherwise we use the keyfile # store which interferes less when running on a dev machine. - if [ -f /usr/libexec/ibus-memconf ]; then + if [[ -f /usr/libexec/ibus-memconf ]]; then export GSETTINGS_BACKEND=keyfile - echo "export GSETTINGS_BACKEND=\"$GSETTINGS_BACKEND\"" >> "$ENV_FILE" + echo "export GSETTINGS_BACKEND=\"${GSETTINGS_BACKEND}\"" >> "${ENV_FILE}" IBUS_CONFIG=--config=/usr/libexec/ibus-memconf fi } @@ -264,7 +266,7 @@ function _setup_ibus() { IBUS_ADDRESS=$(ibus address) export IBUS_ADDRESS - echo "export IBUS_ADDRESS=\"$IBUS_ADDRESS\"" >> "$ENV_FILE" + echo "export IBUS_ADDRESS=\"${IBUS_ADDRESS}\"" >> "${ENV_FILE}" echo "Starting ibus-engine-keyman..." #shellcheck disable=SC2086 @@ -285,12 +287,12 @@ function setup() { _setup_init "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" - TESTBASEDIR=${XDG_DATA_HOME:-$HOME/.local/share}/keyman + TESTBASEDIR=${XDG_DATA_HOME:-${HOME}/.local/share}/keyman TESTDIR=${TESTBASEDIR}/test_kmx - _link_test_keyboards "${TOP_SRCDIR}/../../common/test/keyboards/baseline" "$TESTDIR" "$TESTBASEDIR" + _link_test_keyboards "${TOP_SRCDIR}/../../common/test/keyboards/baseline" "${TESTDIR}" "${TESTBASEDIR}" - _generate_kmpjson "$TESTDIR" + _generate_kmpjson "${TESTDIR}" _setup_test_dbus_server "${ENV_FILE}" "${CLEANUP_FILE}" _setup_display_server "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" "${DISPLAY_SERVER}" @@ -314,10 +316,10 @@ function cleanup() { local CLEANUP_FILE CLEANUP_FILE=$1 - if [ -f "$CLEANUP_FILE" ]; then + if [[ -f "${CLEANUP_FILE}" ]]; then echo echo "# Shutting down processes..." - bash "$CLEANUP_FILE" # > /dev/null 2>&1 + bash "${CLEANUP_FILE}" # > /dev/null 2>&1 rm "$CLEANUP_FILE" echo "# Finished shutdown of processes." fi @@ -333,7 +335,7 @@ function cleanup() { } function exit_on_package_build() { - if [ -v KEYMAN_PKG_BUILD ]; then + if [[ -v KEYMAN_PKG_BUILD ]]; then # Skip setup during package builds - can't run headless and we won't # run the other tests anyway exit 0 @@ -346,12 +348,12 @@ function _get_missing_processes() { MISSING_PROCS="" while read -r LINE; do - if [ -z "$LINE" ]; then + if [[ -z "${LINE}" ]]; then continue fi - PID=$(echo "$LINE" | cut -d' ' -f1) - if ! ps --no-headers --pid="$PID" > /dev/null; then - MISSING_PROCS="${MISSING_PROCS} $(echo "$LINE" | cut -d' ' -f2)" + PID=$(echo "${LINE}" | cut -d' ' -f1) + if ! ps --no-headers --pid="${PID}" > /dev/null; then + MISSING_PROCS="${MISSING_PROCS} $(echo "${LINE}" | cut -d' ' -f2)" break fi done < "${PID_FILE}" @@ -364,19 +366,19 @@ function check_processes_running() { CLEANUP_FILE=$3 PID_FILE=$4 TEST_NAME=$5 - MISSING_PROCS=$(_get_missing_processes "$PID_FILE") + MISSING_PROCS=$(_get_missing_processes "${PID_FILE}") - if [ "$MISSING_PROCS" != "" ]; then + if [[ "${MISSING_PROCS}" != "" ]]; then echo "# Some background processes no longer running. Restarting..." { echo "Some background processes no longer running (running ${TEST_NAME}):" ; \ - echo "$MISSING_PROCS" ; \ + echo "${MISSING_PROCS}" ; \ echo "Restarting..." ; } >> /tmp/debug.output mv /tmp/ibus-engine-keyman.log{,"-${TEST_NAME}-$(date -Iseconds)"} cleanup "${CLEANUP_FILE}" > /dev/null 2>&1 setup "${DISPLAY_SERVER}" "${ENV_FILE}" "${CLEANUP_FILE}" "${PID_FILE}" > /dev/null 2>&1 fi - if [ "$(_get_missing_processes "$PID_FILE")" != "" ]; then + if [[ "$(_get_missing_processes "$PID_FILE")" != "" ]]; then echo "# WARNING: Expected background processes are still missing after restart: ${MISSING_PROCS}" echo "# Maybe an old process is still running?" fi From ebc398620183a6ac356a20a9017aa28d896c91c2 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Fri, 25 Jul 2025 14:02:19 -0400 Subject: [PATCH 18/79] auto: increment master version to 19.0.91 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 361eee78bf..f6cd8dd9c2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 19.0.90 alpha 2025-07-25 + +* maint(common): fix standalone use of `resources/builder.inc.sh` (#14399) +* maint(resources): use `tc_` prefix for all `tc-*.inc.sh` functions (#14267) + ## 19.0.89 alpha 2025-07-24 * docs(common): Document minimum version of Chrome 95.0 for Android (#14385) diff --git a/VERSION.md b/VERSION.md index c0ee65d3de..1918e1122c 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.90 \ No newline at end of file +19.0.91 \ No newline at end of file From 6542953d1c7a991cfc2a9ded752ee51d47dc35cc Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Sat, 26 Jul 2025 11:16:39 +0200 Subject: [PATCH 19/79] maint(windows): fix calls of renamed functions A recent change (#14324) consolidated (and thus renamed) some functions that were in several places. A PR that got created earlier but merged later (#14267) added new functionality that still used the old function names. This lead to release build failures on Windows and Developer. This change fixes the names of the called functions. Fixes: #14412 Follow-up-of: #14324 Test-bot: skip --- resources/teamcity/includes/tc-windows.inc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/teamcity/includes/tc-windows.inc.sh b/resources/teamcity/includes/tc-windows.inc.sh index d7170fd191..7b64e052fb 100644 --- a/resources/teamcity/includes/tc-windows.inc.sh +++ b/resources/teamcity/includes/tc-windows.inc.sh @@ -4,7 +4,7 @@ # Shared functions for any builds that run on Windows agents ba_win_download_symbol_server_index() { - if ! is_windows; then + if ! builder_is_windows; then builder_die "ba_win_download_symbol_server_index should only be run on Windows agents" fi @@ -24,7 +24,7 @@ ba_win_download_symbol_server_index() { } ba_win_publish_new_symbols() { - if ! is_windows; then + if ! builder_is_windows; then builder_die "ba_win_publish_new_symbols should only be run on Windows agents" fi From 854b84c139bc80a0a1eb183254ca7ca8ab781011 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Sat, 26 Jul 2025 14:01:15 -0400 Subject: [PATCH 20/79] auto: increment master version to 19.0.92 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index f6cd8dd9c2..ea259c5a99 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 19.0.91 alpha 2025-07-26 + +* maint(windows): fix calls of renamed functions (#14413) + ## 19.0.90 alpha 2025-07-25 * maint(common): fix standalone use of `resources/builder.inc.sh` (#14399) diff --git a/VERSION.md b/VERSION.md index 1918e1122c..145ea8990d 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.91 \ No newline at end of file +19.0.92 \ No newline at end of file From ad962172e9a94f5d9e9fddcb29f56dff58abe5cb Mon Sep 17 00:00:00 2001 From: rc-swag <58423624+rc-swag@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:54:37 +1000 Subject: [PATCH 21/79] fix(windows): remove dead code --- windows/src/engine/keyman/langswitch/LangSwitchManager.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas index 04a8b91392..31481be316 100644 --- a/windows/src/engine/keyman/langswitch/LangSwitchManager.pas +++ b/windows/src/engine/keyman/langswitch/LangSwitchManager.pas @@ -1021,7 +1021,7 @@ procedure TLangSwitchConfiguration.DisableWindowsHotkey; var MatchValue: string; KeyboardToggleReg: TRegistryErrorControlled; - FReset, FFixed: Boolean; + FReset: Boolean; const CHotkeyNotAssigned = '3'; begin if FCurrentHotkey = (HK_ALT or HK_SHIFT) then MatchValue := '1' @@ -1031,7 +1031,6 @@ begin FLanguageToggle := CHotkeyNotAssigned; FLayoutToggle := CHotkeyNotAssigned; - //FFixed := False; FReset := False; KeyboardToggleReg := TRegistryErrorControlled.Create; // I2890 From 73605727a0f372e1ee527759a49c5119e071f5b9 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Mon, 28 Jul 2025 15:01:13 +0200 Subject: [PATCH 22/79] Update developer/src/kmcmplib/tests/gtest-compiler.tests.cpp Co-authored-by: Marc Durdin --- developer/src/kmcmplib/tests/gtest-compiler.tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp index 0f0f726337..757767762f 100644 --- a/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp +++ b/developer/src/kmcmplib/tests/gtest-compiler.tests.cpp @@ -2212,7 +2212,7 @@ TEST(IsValidUtf8Test, Invalid2ByteBadSecondByte) { EXPECT_FALSE(isValidUtf8(v.data(), v.size())); } -TEST(IsValidUtf8Test, Invalid2ByteBadSecondByteToHigh) { +TEST(IsValidUtf8Test, Invalid2ByteBadSecondByteTooHigh) { std::vector v = {0xD2, 0xC8}; EXPECT_FALSE(isValidUtf8(v.data(), v.size())); } From 3bd6ee18a0d66a6c4f1c281d4ad57864963aead7 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Mon, 28 Jul 2025 14:02:03 -0400 Subject: [PATCH 23/79] auto: increment master version to 19.0.93 --- HISTORY.md | 8 ++++++++ VERSION.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index ea259c5a99..50b8063143 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ # Keyman Version History +## 19.0.92 alpha 2025-07-28 + +* build(deps): bump multer from 2.0.1 to 2.0.2 (#14373) +* refactor(linux): remove shellcheck warnings (#14409) +* refactor(linux): move dbus defines to common include (#14407) +* docs(linux): update readme for test service (#14408) +* fix(windows): add check a fix for registry datatypes (#14358) + ## 19.0.91 alpha 2025-07-26 * maint(windows): fix calls of renamed functions (#14413) diff --git a/VERSION.md b/VERSION.md index 145ea8990d..66287cb816 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.92 \ No newline at end of file +19.0.93 \ No newline at end of file From 052c8b611b48cc948fb08d50252ac8031275132c Mon Sep 17 00:00:00 2001 From: Meng-Heng Date: Tue, 29 Jul 2025 15:25:22 +0700 Subject: [PATCH 24/79] docs: apply @srl296 suggestions --- developer/docs/help/reference/bcp-47.md | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 671c9e52a9..edd467b657 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -31,27 +31,23 @@ The following are all examples of valid BCP 47 tags: * `km-Khmr-KH`: Khmer, written in the Khmer script, in Cambodia * `km-fonipa`: Khmer, transcribed in IPA * `und-cpmn`: Undetermined (Cypro-Minoan) -* `tok-Zzzz-AA`: Toki Pona (Unknown Script) +* `tok-Zzzz`: Toki Pona (Unknown Script) > [!NOTE] > `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. -> `AA` is a Private Use Code. ### The language subtag The only required option is the Language subtag, which is an [ISO 639-1][2] or -[ISO 639-3][3] code. - -- ISO 639-1 tags are a two-letter code. -- ISO 639-3 tags are a three-letter code. +[ISO 639-3][3] code. Essentially, it is an [ISO-639][4] that uses two-letter and three-letter codes. First, try to find your language on the list of two-letter ISO 639-1 codes. -[This Wikipedia page][4] lists all of the two-letter codes. +[This Wikipedia page][5] lists all of the two-letter codes. If the two-letter code is available, it is used instead of the three-letter code. If you can't find a two-letter code, you'll need to find the closest -three-letter code. You can use [Glottolog][5] to search for your language, and +three-letter code. You can use [Glottolog][6] to search for your language, and it will give you an appropriate code. In this example, I searched Glottolog for -“[Saanich][6]” (name of the First Nations that speak SENĆOŦEN) and found `str` +“[Saanich][7]” (name of the First Nations that speak SENĆOŦEN) and found `str` as the code for all Straits Salish languages. > [!IMPORTANT] @@ -67,7 +63,7 @@ model or keyboard. If your language only uses one writing system, omit the Script subtag. Otherwise, in cases where a language can be written in many different writing -systems, you can choose the four letter [ISO 15924][7] script tag that your +systems, you can choose the four letter [ISO 15924][8] script tag that your keyboard or lexical model produces. For example, Plains Cree can either be written in _standard Roman orthography_, @@ -97,11 +93,11 @@ Latin America. Additionally, regions may have vocabulary that doesn't exist in the other regions where the language is spoken. If I were working with a language specific to one country, I would use the [ISO -3166-1 alpha-2][8] country code for the region subtag. For example, `ES` for +3166-1 alpha-2][9] country code for the region subtag. For example, `ES` for Spain or `MX` for Mexico. However, if I were working with Latin American Spanish (a group of countries), I -would need to specify Latin America's [UN M49][9] region code. For Latin +would need to specify Latin America's [UN M49][10] region code. For Latin America, its code is `419`. My lexical model would not suggest words that are common in Spain, but vulgar in Latin America, however it would predict words like "pupupsas" and "chuchitos", which are words that are uncommon in both Spain @@ -115,9 +111,10 @@ Another common UN M49 region code is `001` for the whole world. [1]: https://en.wikipedia.org/wiki/IETF_language_tag [2]: https://en.wikipedia.org/wiki/ISO_639-1 [3]: https://en.wikipedia.org/wiki/ISO_639-3 -[4]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes -[5]: https://glottolog.org/glottolog/language -[6]: https://glottolog.org/resource/languoid/id/saan1246 -[7]: https://en.wikipedia.org/wiki/ISO_15924 -[8]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 -[9]: https://en.wikipedia.org/wiki/UN_M49 +[4]: https://en.wikipedia.org/wiki/ISO_639 +[5]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes +[6]: https://glottolog.org/glottolog/language +[7]: https://glottolog.org/resource/languoid/id/saan1246 +[8]: https://en.wikipedia.org/wiki/ISO_15924 +[9]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +[10]: https://en.wikipedia.org/wiki/UN_M49 From dee4c154c604f9a94b334c8e48f676ddadf808a4 Mon Sep 17 00:00:00 2001 From: Meng-Heng Date: Tue, 29 Jul 2025 15:27:52 +0700 Subject: [PATCH 25/79] docs: change valid bcp47 tag --- developer/docs/help/reference/bcp-47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index edd467b657..0f8e90f911 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -31,7 +31,7 @@ The following are all examples of valid BCP 47 tags: * `km-Khmr-KH`: Khmer, written in the Khmer script, in Cambodia * `km-fonipa`: Khmer, transcribed in IPA * `und-cpmn`: Undetermined (Cypro-Minoan) -* `tok-Zzzz`: Toki Pona (Unknown Script) +* `tok-Zzzz`: Toki Pona (Code for uncoded script) > [!NOTE] > `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. From 480c98ab32e6c0c1522d857f7d685fb107f82f59 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Tue, 29 Jul 2025 14:01:37 -0400 Subject: [PATCH 26/79] auto: increment master version to 19.0.94 --- HISTORY.md | 5 +++++ VERSION.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 50b8063143..46cf4737ec 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Keyman Version History +## 19.0.93 alpha 2025-07-29 + +* test(developer): add unit tests for `isValidUtf8` (#14381) +* maint(linux): fix stopping of test server (#14403) + ## 19.0.92 alpha 2025-07-28 * build(deps): bump multer from 2.0.1 to 2.0.2 (#14373) diff --git a/VERSION.md b/VERSION.md index 66287cb816..533bdf0adf 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.93 \ No newline at end of file +19.0.94 \ No newline at end of file From 0d20e49567caf641d0790b12c38015025a300dfb Mon Sep 17 00:00:00 2001 From: MengHeng <90595388+Meng-Heng@users.noreply.github.com> Date: Wed, 30 Jul 2025 14:53:06 +0700 Subject: [PATCH 27/79] Apply suggestions from code review Co-authored-by: Darcy Wong --- developer/docs/help/reference/bcp-47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 0f8e90f911..0d09f4dfdc 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -34,7 +34,7 @@ The following are all examples of valid BCP 47 tags: * `tok-Zzzz`: Toki Pona (Code for uncoded script) > [!NOTE] -> `Zzzz` is an uncoded script of IOS 15924 and one of the Special codes of the Script subtag. +> `Zzzz` is an uncoded script of ISO 15924 and one of the Special codes of the Script subtag. ### The language subtag From 53f9ede409368134518ae45bdca14069a8a4f51d Mon Sep 17 00:00:00 2001 From: MengHeng <90595388+Meng-Heng@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:23:13 +0700 Subject: [PATCH 28/79] Apply suggestions from code review Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com> --- developer/docs/help/reference/bcp-47.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 0d09f4dfdc..84acce1b19 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -38,8 +38,7 @@ The following are all examples of valid BCP 47 tags: ### The language subtag -The only required option is the Language subtag, which is an [ISO 639-1][2] or -[ISO 639-3][3] code. Essentially, it is an [ISO-639][4] that uses two-letter and three-letter codes. +The only required option is the Language subtag, which is an [ISO 639][4] code. If a two-letter code[ISO 639-1][2] is available, it is used instead of the three-letter code [ISO 639-3][3]. First, try to find your language on the list of two-letter ISO 639-1 codes. [This Wikipedia page][5] lists all of the two-letter codes. If the two-letter code is available, it is used instead of the three-letter code. From 6bed9162b1694243d19e1af1b55f58bf64a211e5 Mon Sep 17 00:00:00 2001 From: MengHeng <90595388+Meng-Heng@users.noreply.github.com> Date: Thu, 31 Jul 2025 15:34:27 +0700 Subject: [PATCH 29/79] Apply suggestions from code review --- developer/docs/help/reference/bcp-47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/docs/help/reference/bcp-47.md b/developer/docs/help/reference/bcp-47.md index 84acce1b19..0d087911e2 100644 --- a/developer/docs/help/reference/bcp-47.md +++ b/developer/docs/help/reference/bcp-47.md @@ -41,7 +41,7 @@ The following are all examples of valid BCP 47 tags: The only required option is the Language subtag, which is an [ISO 639][4] code. If a two-letter code[ISO 639-1][2] is available, it is used instead of the three-letter code [ISO 639-3][3]. First, try to find your language on the list of two-letter ISO 639-1 codes. -[This Wikipedia page][5] lists all of the two-letter codes. If the two-letter code is available, it is used instead of the three-letter code. +[This Wikipedia page][5] lists all of the two-letter codes. If you can't find a two-letter code, you'll need to find the closest three-letter code. You can use [Glottolog][6] to search for your language, and From 808b6557d656f0b1efe1f59c423f03303eafc7f2 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Fri, 1 Aug 2025 10:20:39 +1000 Subject: [PATCH 30/79] 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 --- core/meson.build | 1 + developer/src/kmcmplib/meson.build | 2 +- linux/ibus-keyman/meson.build | 1 + linux/keyman-system-service/meson.build | 1 + linux/mcompile/keymap/meson.build | 1 + mac/mcompile/meson.build | 1 + resources/build/meson/standard.meson.build | 6 ------ 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/meson.build b/core/meson.build index a5dffb5ede..01e016ad27 100644 --- a/core/meson.build +++ b/core/meson.build @@ -9,6 +9,7 @@ project('keyman_core', 'cpp', 'c', version: files('../VERSION.md'), license: 'MIT', default_options : ['buildtype=release', + 'cpp_std=c++17', 'b_vscrt=static_from_buildtype', 'warning_level=2', 'debug=true'], diff --git a/developer/src/kmcmplib/meson.build b/developer/src/kmcmplib/meson.build index 0493c504f4..935f8496f1 100644 --- a/developer/src/kmcmplib/meson.build +++ b/developer/src/kmcmplib/meson.build @@ -8,7 +8,7 @@ project('kmcmplib', 'cpp', 'c', version: files('../../../VERSION.md'), license: 'MIT', default_options : ['buildtype=release', - 'cpp_std=c++14', + 'cpp_std=c++17', 'b_vscrt=static_from_buildtype', 'default_library=static', 'debug=true']) diff --git a/linux/ibus-keyman/meson.build b/linux/ibus-keyman/meson.build index 3d0bbf0fce..f7a0eb7c7f 100644 --- a/linux/ibus-keyman/meson.build +++ b/linux/ibus-keyman/meson.build @@ -1,5 +1,6 @@ project('ibus-keyman', 'c', 'cpp', version: files('../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'GPL-2+', meson_version: '>=1.0') diff --git a/linux/keyman-system-service/meson.build b/linux/keyman-system-service/meson.build index b6f16e82f8..6f950ba59f 100644 --- a/linux/keyman-system-service/meson.build +++ b/linux/keyman-system-service/meson.build @@ -1,5 +1,6 @@ project('keyman-system-service', 'c', 'cpp', version: files('../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'MIT', meson_version: '>=1.0') diff --git a/linux/mcompile/keymap/meson.build b/linux/mcompile/keymap/meson.build index b6d489902c..af9c84017e 100644 --- a/linux/mcompile/keymap/meson.build +++ b/linux/mcompile/keymap/meson.build @@ -1,6 +1,7 @@ project( 'mcompile', 'c', 'cpp', version: files('../../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'MIT', meson_version: '>=1.0', ) diff --git a/mac/mcompile/meson.build b/mac/mcompile/meson.build index 2429799442..6a156752ab 100644 --- a/mac/mcompile/meson.build +++ b/mac/mcompile/meson.build @@ -1,5 +1,6 @@ project('mcompile', 'c', 'cpp', version: files('../../VERSION.md'), + default_options: ['cpp_std=c++17'], license: 'MIT', meson_version: '>=1.0') diff --git a/resources/build/meson/standard.meson.build b/resources/build/meson/standard.meson.build index 300a00d8e9..6345e67fb2 100644 --- a/resources/build/meson/standard.meson.build +++ b/resources/build/meson/standard.meson.build @@ -16,12 +16,6 @@ cpp_compiler = meson.get_compiler('cpp') c_compiler = meson.get_compiler('c') -# Unfortunately this outputs a warning: 'Consider using the built-in option -# for language standard version instead of using "-std=c++17".' -# But that is not possible to do after creating the project... -# See also https://github.com/mesonbuild/meson/issues/10685 -add_project_arguments('-std=c++17', language: 'cpp') - # # Standard informational messages for our builds # From f2d60427205d3342f5048c09ad9c38887c144660 Mon Sep 17 00:00:00 2001 From: Keyman Build Agent Date: Fri, 1 Aug 2025 14:37:21 -0400 Subject: [PATCH 31/79] auto: increment master version to 19.0.95 --- HISTORY.md | 4 ++++ VERSION.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 46cf4737ec..d774cd3454 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # Keyman Version History +## 19.0.94 alpha 2025-08-01 + +* maint(common): use `cpp_std=c++17` in meson project default_options (#14433) + ## 19.0.93 alpha 2025-07-29 * test(developer): add unit tests for `isValidUtf8` (#14381) diff --git a/VERSION.md b/VERSION.md index 533bdf0adf..d0f6206d48 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -19.0.94 \ No newline at end of file +19.0.95 \ No newline at end of file From 65158a0526c2f98e2572fbb6572a4104f6fd34f4 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 2 Aug 2025 06:58:40 +1000 Subject: [PATCH 32/79] 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 --- android/KMAPro/build.sh | 2 +- android/KMEA/build.sh | 2 +- android/Samples/KMSample1/build.sh | 4 +- android/Samples/KMSample2/build.sh | 4 +- android/Tests/KeyboardHarness/build.sh | 4 +- android/build.sh | 2 +- .../issue/6254-invalid-version-99/build.sh | 2 +- common/tools/hextobin/build.sh | 2 +- common/tools/sourcemap-path-remapper/build.sh | 2 +- common/web/keyman-version/build.sh | 2 +- common/web/langtags/build.sh | 2 +- common/web/types/build.sh | 2 +- common/windows/cef-checkout.sh | 2 +- core/build.sh | 2 +- core/include/ldml/build.sh | 2 +- core/tools/ldml-const-builder/build.sh | 2 +- developer/src/build.sh | 2 +- .../src/common/web/test-helpers/build.sh | 2 +- developer/src/common/web/utils/build.sh | 2 +- developer/src/inst/build.sh | 2 +- developer/src/kmc-analyze/build.sh | 2 +- developer/src/kmc-copy/build.sh | 2 +- developer/src/kmc-generate/build.sh | 2 +- developer/src/kmc-keyboard-info/build.sh | 2 +- developer/src/kmc-kmn/build.sh | 2 +- developer/src/kmc-ldml/build.sh | 2 +- developer/src/kmc-model-info/build.sh | 2 +- developer/src/kmc-model/build.sh | 2 +- developer/src/kmc-package/build.sh | 2 +- developer/src/kmc/build.sh | 2 +- developer/src/kmc/test/command-line-tests.sh | 2 +- developer/src/kmcmplib/build.sh | 2 +- developer/src/server/build.sh | 2 +- ios/build.sh | 2 +- ios/ci.sh | 2 +- ios/engine/build.sh | 6 +- ios/i18n-export.sh | 2 +- ios/keyman/build.sh | 6 +- ios/samples/KMSample1/build.sh | 2 +- ios/samples/KMSample2/build.sh | 2 +- ios/tools/prepRelease.sh | 4 +- linux/build.sh | 2 +- linux/mcompile/keymap/build.sh | 2 +- linux/scripts/upload-to-debian.sh | 2 +- mac/Keyman4MacIM/make-km-dmg.sh | 16 +-- mac/build.sh | 6 +- mac/setup/build.sh | 2 +- oem/firstvoices/android/build.sh | 2 +- oem/firstvoices/ios/build.sh | 7 +- oem/firstvoices/windows/src/inst/build.sh | 2 +- resources/build/build-utils-ci.test.sh | 2 +- resources/build/builder.inc.sh | 2 +- resources/build/history/history-utils.sh | 2 +- resources/build/report-history.sh | 2 +- .../build/test/build-utils-traps.test.sh | 2 +- resources/build/test/builder-deps.test.sh | 2 +- resources/build/test/test.sh | 2 +- .../utils.inc.sh} | 115 ++++-------------- resources/build/version/build.sh | 2 +- resources/docker-images/build.sh | 2 +- resources/docker-images/docker-build.inc.sh | 2 +- resources/docker-images/run.sh | 2 +- resources/stats/stats.sh | 2 +- .../android/keyman-android-release.sh | 2 +- .../android/keyman-android-test-samples.sh | 2 +- .../teamcity/android/keyman-android-test.sh | 2 +- .../developer/keyman-developer-release.sh | 2 +- resources/teamcity/ios/keyman-ios-release.sh | 2 +- resources/teamcity/ios/keyman-ios-test.sh | 2 +- .../teamcity/linux/keyman-linux-release.sh | 2 +- .../linux/keyman-linux-test-integration.sh | 2 +- resources/teamcity/linux/keyman-linux-test.sh | 2 +- .../teamcity/macos/keyman-macos-release.sh | 2 +- resources/teamcity/macos/keyman-macos-test.sh | 2 +- resources/teamcity/web/keyman-web-release.sh | 2 +- resources/teamcity/web/keyman-web-test.sh | 2 +- .../windows/keyman-windows-release.sh | 2 +- .../teamcity/windows/keyman-windows-test.sh | 2 +- resources/tools/check-markdown/build.sh | 2 +- web/build.sh | 2 +- web/ci.sh | 2 +- web/src/app/browser/build.sh | 2 +- web/src/app/ui/build.sh | 2 +- web/src/app/webview/build.sh | 2 +- web/src/engine/attachment/build.sh | 2 +- web/src/engine/common/web-utils/build.sh | 2 +- web/src/engine/dom-utils/build.sh | 2 +- web/src/engine/element-wrappers/build.sh | 2 +- web/src/engine/events/build.sh | 2 +- web/src/engine/interfaces/build.sh | 2 +- web/src/engine/js-processor/build.sh | 2 +- web/src/engine/keyboard-storage/build.sh | 2 +- web/src/engine/keyboard/build.sh | 2 +- web/src/engine/main/build.sh | 2 +- web/src/engine/osk/build.sh | 2 +- web/src/engine/osk/gesture-processor/build.sh | 2 +- .../osk/gesture-processor/src/tools/build.sh | 2 +- web/src/engine/predictive-text/build.sh | 2 +- .../engine/predictive-text/templates/build.sh | 2 +- .../predictive-text/wordbreakers/build.sh | 2 +- .../predictive-text/worker-main/build.sh | 2 +- .../worker-main/unit_tests/test.sh | 2 +- .../predictive-text/worker-thread/build.sh | 2 +- web/src/engine/sentry-manager/build.sh | 2 +- web/src/samples/build.sh | 2 +- web/src/test/manual/build.sh | 2 +- web/src/tools/build.sh | 2 +- .../tools/building/sourcemap-root/build.sh | 2 +- web/src/tools/es-bundling/build.sh | 2 +- web/src/tools/testing/bulk_rendering/build.sh | 2 +- web/src/tools/testing/recorder-core/build.sh | 2 +- web/src/tools/testing/recorder/build.sh | 2 +- web/test.sh | 2 +- windows/src/build.sh | 2 +- windows/src/desktop/build.sh | 2 +- windows/src/desktop/help/build.sh | 2 +- windows/src/desktop/inst/build.sh | 2 +- windows/src/engine/inst/build.sh | 2 +- 118 files changed, 159 insertions(+), 229 deletions(-) rename resources/{shellHelperFunctions.sh => build/utils.inc.sh} (73%) mode change 100755 => 100644 diff --git a/android/KMAPro/build.sh b/android/KMAPro/build.sh index fd54215d1c..66ce1d09c3 100755 --- a/android/KMAPro/build.sh +++ b/android/KMAPro/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/resources/build/build-help.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" diff --git a/android/KMEA/build.sh b/android/KMEA/build.sh index 4d4ea7f8e3..45a770308f 100755 --- a/android/KMEA/build.sh +++ b/android/KMEA/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" # ################################ Main script ################################ diff --git a/android/Samples/KMSample1/build.sh b/android/Samples/KMSample1/build.sh index 172ef6c5e7..752e72b91e 100755 --- a/android/Samples/KMSample1/build.sh +++ b/android/Samples/KMSample1/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ @@ -23,7 +23,7 @@ builder_describe "Build KMSample1 app for Android." \ "configure" \ "build" \ "test" \ - ":app KMSample1" + ":app KMSample1" # parse before describe_outputs to check debug flags builder_parse "$@" diff --git a/android/Samples/KMSample2/build.sh b/android/Samples/KMSample2/build.sh index 2f7a99c764..5538d5dee6 100755 --- a/android/Samples/KMSample2/build.sh +++ b/android/Samples/KMSample2/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ @@ -23,7 +23,7 @@ builder_describe "Build KMSample2 app for Android." \ "configure" \ "build" \ "test" \ - ":app KMSample2" + ":app KMSample2" # parse before describe_outputs to check debug flags builder_parse "$@" diff --git a/android/Tests/KeyboardHarness/build.sh b/android/Tests/KeyboardHarness/build.sh index c23f8ca0f5..af85c7c55a 100755 --- a/android/Tests/KeyboardHarness/build.sh +++ b/android/Tests/KeyboardHarness/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ @@ -23,7 +23,7 @@ builder_describe "Build KeyboardHarness test app for Android." \ "configure" \ "build" \ "test" \ - ":app KeyboardHarness" + ":app KeyboardHarness" # parse before describe outputs to check debug flags builder_parse "$@" diff --git a/android/build.sh b/android/build.sh index eeaa3f6e9a..ebf30aeb43 100755 --- a/android/build.sh +++ b/android/build.sh @@ -14,7 +14,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/build/build-utils-ci.inc.sh" . "${KEYMAN_ROOT}/resources/build/zip.inc.sh" diff --git a/common/test/keyboards/issue/6254-invalid-version-99/build.sh b/common/test/keyboards/issue/6254-invalid-version-99/build.sh index 7bf37f54e4..462908042c 100755 --- a/common/test/keyboards/issue/6254-invalid-version-99/build.sh +++ b/common/test/keyboards/issue/6254-invalid-version-99/build.sh @@ -4,7 +4,7 @@ # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/build-utils.sh" -# . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +# . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE THIS_DIR="$(dirname "$THIS_SCRIPT")" diff --git a/common/tools/hextobin/build.sh b/common/tools/hextobin/build.sh index 073b008bf2..0d8075b83b 100755 --- a/common/tools/hextobin/build.sh +++ b/common/tools/hextobin/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/common/tools/sourcemap-path-remapper/build.sh b/common/tools/sourcemap-path-remapper/build.sh index 3d50eccf83..c3b7e24536 100755 --- a/common/tools/sourcemap-path-remapper/build.sh +++ b/common/tools/sourcemap-path-remapper/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/common/web/keyman-version/build.sh b/common/web/keyman-version/build.sh index 9de3da3f8f..aa9287ea6c 100755 --- a/common/web/keyman-version/build.sh +++ b/common/web/keyman-version/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ diff --git a/common/web/langtags/build.sh b/common/web/langtags/build.sh index f125448d4a..58fc6d10cf 100755 --- a/common/web/langtags/build.sh +++ b/common/web/langtags/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman langtags.js common module" \ diff --git a/common/web/types/build.sh b/common/web/types/build.sh index 5a9243e6cd..679fcfc018 100755 --- a/common/web/types/build.sh +++ b/common/web/types/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman common file types module" \ diff --git a/common/windows/cef-checkout.sh b/common/windows/cef-checkout.sh index b8326561b8..184769a198 100755 --- a/common/windows/cef-checkout.sh +++ b/common/windows/cef-checkout.sh @@ -14,7 +14,7 @@ set -u # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" -# . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +# . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE pushd $KEYMAN_CEF4DELPHI_ROOT > /dev/null diff --git a/core/build.sh b/core/build.sh index 94e8ae4e38..6bdb52d936 100755 --- a/core/build.sh +++ b/core/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$THIS_SCRIPT_PATH/commands.inc.sh" ################################ Main script ################################ diff --git a/core/include/ldml/build.sh b/core/include/ldml/build.sh index 17902411d3..4188b758f5 100755 --- a/core/include/ldml/build.sh +++ b/core/include/ldml/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman ldml-keyboard-constants package" \ diff --git a/core/tools/ldml-const-builder/build.sh b/core/tools/ldml-const-builder/build.sh index 26c7c0a60e..01082bca0a 100755 --- a/core/tools/ldml-const-builder/build.sh +++ b/core/tools/ldml-const-builder/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" CORE_LDML_H_FILE="../../include/ldml/keyman_core_ldml.h" diff --git a/developer/src/build.sh b/developer/src/build.sh index d81762aa2c..b774b6c943 100755 --- a/developer/src/build.sh +++ b/developer/src/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/developer/src/packages.inc.sh" diff --git a/developer/src/common/web/test-helpers/build.sh b/developer/src/common/web/test-helpers/build.sh index c1664cfddd..f7b9bb49b0 100755 --- a/developer/src/common/web/test-helpers/build.sh +++ b/developer/src/common/web/test-helpers/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Keyman Developer unit test helpers" \ "@/developer/src/common/web/utils" \ diff --git a/developer/src/common/web/utils/build.sh b/developer/src/common/web/utils/build.sh index 251588e2f6..4bd0885dcf 100755 --- a/developer/src/common/web/utils/build.sh +++ b/developer/src/common/web/utils/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman Developer web utility module" \ diff --git a/developer/src/inst/build.sh b/developer/src/inst/build.sh index 504811eb4b..be26678e5c 100755 --- a/developer/src/inst/build.sh +++ b/developer/src/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" source "$KEYMAN_ROOT/resources/build/jq.inc.sh" builder_describe "Installation files for Keyman Developer" \ diff --git a/developer/src/kmc-analyze/build.sh b/developer/src/kmc-analyze/build.sh index ace83ffbbe..1d069b3b81 100755 --- a/developer/src/kmc-analyze/build.sh +++ b/developer/src/kmc-analyze/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman Developer Compiler Analysis Tools" \ diff --git a/developer/src/kmc-copy/build.sh b/developer/src/kmc-copy/build.sh index b681757be2..a5f8febdc1 100755 --- a/developer/src/kmc-copy/build.sh +++ b/developer/src/kmc-copy/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman kmc-copy module" \ diff --git a/developer/src/kmc-generate/build.sh b/developer/src/kmc-generate/build.sh index 7db46acd56..6b790ad3ff 100755 --- a/developer/src/kmc-generate/build.sh +++ b/developer/src/kmc-generate/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman kmc-generate module" \ diff --git a/developer/src/kmc-keyboard-info/build.sh b/developer/src/kmc-keyboard-info/build.sh index 87902b6876..5d41665e5f 100755 --- a/developer/src/kmc-keyboard-info/build.sh +++ b/developer/src/kmc-keyboard-info/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Build Keyman kmc keyboard-info Compiler module" \ "@/common/web/langtags" \ diff --git a/developer/src/kmc-kmn/build.sh b/developer/src/kmc-kmn/build.sh index c6ed29b6f9..7ff15520b5 100755 --- a/developer/src/kmc-kmn/build.sh +++ b/developer/src/kmc-kmn/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman Developer Compiler Module for .kmn to .kmx" \ diff --git a/developer/src/kmc-ldml/build.sh b/developer/src/kmc-ldml/build.sh index 689291b247..e1b879f438 100755 --- a/developer/src/kmc-ldml/build.sh +++ b/developer/src/kmc-ldml/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Keyman kmc Keyboard Compiler module" \ "@/common/web/keyman-version" \ diff --git a/developer/src/kmc-model-info/build.sh b/developer/src/kmc-model-info/build.sh index 766c9be413..21cd3e52f5 100755 --- a/developer/src/kmc-model-info/build.sh +++ b/developer/src/kmc-model-info/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Build Keyman kmc Lexical Model model-info Compiler module" \ "@/common/web/types" \ diff --git a/developer/src/kmc-model/build.sh b/developer/src/kmc-model/build.sh index 9e7166f8b7..53f7b44b12 100755 --- a/developer/src/kmc-model/build.sh +++ b/developer/src/kmc-model/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Keyman kmc Lexical Model Compiler module" \ diff --git a/developer/src/kmc-package/build.sh b/developer/src/kmc-package/build.sh index 81f8b928c7..93ba6c4ade 100755 --- a/developer/src/kmc-package/build.sh +++ b/developer/src/kmc-package/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" builder_describe "Build Keyman kmc Package Compiler module" \ diff --git a/developer/src/kmc/build.sh b/developer/src/kmc/build.sh index b7f06852c4..1fc897949a 100755 --- a/developer/src/kmc/build.sh +++ b/developer/src/kmc/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/developer/src/packages.inc.sh" builder_describe "Build Keyman Keyboard Compiler kmc" \ diff --git a/developer/src/kmc/test/command-line-tests.sh b/developer/src/kmc/test/command-line-tests.sh index 74447afd41..c76a641376 100755 --- a/developer/src/kmc/test/command-line-tests.sh +++ b/developer/src/kmc/test/command-line-tests.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -# . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +# . "$KEYMAN_ROOT/resources/build/utils.inc.sh" # . "$KEYMAN_ROOT/developer/src/packages.inc.sh" builder_describe "Test Keyman Keyboard Compiler kmc command line e2e" \ diff --git a/developer/src/kmcmplib/build.sh b/developer/src/kmcmplib/build.sh index 77036cc990..457f597f4c 100755 --- a/developer/src/kmcmplib/build.sh +++ b/developer/src/kmcmplib/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$THIS_SCRIPT_PATH/checkout-keyboards.inc.sh" . "$THIS_SCRIPT_PATH/commands.inc.sh" diff --git a/developer/src/server/build.sh b/developer/src/server/build.sh index 6741bb68de..d2bd8575dd 100755 --- a/developer/src/server/build.sh +++ b/developer/src/server/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/jq.inc.sh" builder_describe "Build Keyman Developer Server" \ diff --git a/ios/build.sh b/ios/build.sh index f260b07f8b..c1fd7efa32 100755 --- a/ios/build.sh +++ b/ios/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Builds Keyman Engine and the Keyman app for use on iOS devices - iPhone and iPad." \ "@/resources/tools/check-markdown test:help" \ diff --git a/ios/ci.sh b/ios/ci.sh index fbcb46409f..547170a42f 100755 --- a/ios/ci.sh +++ b/ios/ci.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" cd "$THIS_SCRIPT_PATH" # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. verify_on_mac diff --git a/ios/engine/build.sh b/ios/engine/build.sh index fd473a2cdf..d9ac60f69d 100755 --- a/ios/engine/build.sh +++ b/ios/engine/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. @@ -133,7 +133,9 @@ function build_engine() { KEYMAN_VERSION_ENVIRONMENT=$KEYMAN_VERSION_ENVIRONMENT \ UPLOAD_SENTRY=$UPLOAD_SENTRY - assertDirExists "$KEYMAN_XCFRAMEWORK" + if ! [[ -d "${KEYMAN_XCFRAMEWORK}" ]]; then + builder_die "Build failed: directory '${KEYMAN_XCFRAMEWORK}' missing" + fi } builder_run_action clean do_clean diff --git a/ios/i18n-export.sh b/ios/i18n-export.sh index 5ae87a6f97..18f6b83d7c 100755 --- a/ios/i18n-export.sh +++ b/ios/i18n-export.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # This script runs from its own folder cd "$(dirname "$THIS_SCRIPT")" diff --git a/ios/keyman/build.sh b/ios/keyman/build.sh index cc43d42e60..bb9379fdba 100755 --- a/ios/keyman/build.sh +++ b/ios/keyman/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-help.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. @@ -92,7 +92,9 @@ function build_app() { KEYMAN_VERSION_ENVIRONMENT=$KEYMAN_VERSION_ENVIRONMENT \ UPLOAD_SENTRY=$UPLOAD_SENTRY - assertDirExists "$ARCHIVE_PATH" + if ! [[ -d "${ARCHIVE_PATH}" ]]; then + builder_die "Build failed: directory '${ARCHIVE_PATH}' missing" + fi if ! builder_is_debug_build; then echo "Preparing .ipa file for deployment to real devices" diff --git a/ios/samples/KMSample1/build.sh b/ios/samples/KMSample1/build.sh index f7bb8798c7..e2302474ba 100755 --- a/ios/samples/KMSample1/build.sh +++ b/ios/samples/KMSample1/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" cd "$THIS_SCRIPT_PATH" # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. verify_on_mac diff --git a/ios/samples/KMSample2/build.sh b/ios/samples/KMSample2/build.sh index 0b0fdc542d..6e88e39704 100755 --- a/ios/samples/KMSample2/build.sh +++ b/ios/samples/KMSample2/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" cd "$THIS_SCRIPT_PATH" # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. verify_on_mac diff --git a/ios/tools/prepRelease.sh b/ios/tools/prepRelease.sh index c9e47edd20..2c4027b0ee 100755 --- a/ios/tools/prepRelease.sh +++ b/ios/tools/prepRelease.sh @@ -27,7 +27,7 @@ fi #Include script dependency . $KEYMAN_ROOT/resources/build/history/history-utils.sh #includes the following -#. ../resources/shellHelperFunctions.sh +#. ../resources/build/utils.inc.sh BUILD_NUMBER=`cat ../VERSION.md` KEYMAN_TIER=`cat ../TIER.md` @@ -50,12 +50,10 @@ mkdir -p "${UPLOAD_DIR}" echo "Writing changelog to $CHANGELOG_PATH" get_version_notes "ios" "${BUILD_NUMBER}" "$KEYMAN_TIER" > $CHANGELOG_PATH echo "* Minor fixes and performance improvements" >> $CHANGELOG_PATH -assertFileExists "${CHANGELOG_PATH}" # Strip emoji as App Store does not allow emoji in changelogs node "$KEYMAN_ROOT/resources/tools/strip-emoji" < "$CHANGELOG_PATH" > "$CHANGELOG_PATH.1" mv -f "$CHANGELOG_PATH.1" "$CHANGELOG_PATH" -assertFileExists "${CHANGELOG_PATH}" # # Keyman Engine diff --git a/linux/build.sh b/linux/build.sh index ae5e5d3bd4..d4cfcef976 100755 --- a/linux/build.sh +++ b/linux/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/linux/mcompile/keymap/build.sh b/linux/mcompile/keymap/build.sh index d7c6aac34f..96b958f4eb 100755 --- a/linux/mcompile/keymap/build.sh +++ b/linux/mcompile/keymap/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/meson-utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -#. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +#. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/linux/scripts/upload-to-debian.sh b/linux/scripts/upload-to-debian.sh index 3b2c5ba1dd..eb6c7aff26 100755 --- a/linux/scripts/upload-to-debian.sh +++ b/linux/scripts/upload-to-debian.sh @@ -36,7 +36,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" NOOP= PUSH= diff --git a/mac/Keyman4MacIM/make-km-dmg.sh b/mac/Keyman4MacIM/make-km-dmg.sh index 21559b59ff..63384408c3 100755 --- a/mac/Keyman4MacIM/make-km-dmg.sh +++ b/mac/Keyman4MacIM/make-km-dmg.sh @@ -46,7 +46,7 @@ cd `dirname ${KEYMAN_MACIM_BASE_PATH}` > /dev/null KEYMAN_MACIM_BASE_PATH=`pwd`; popd > /dev/null -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" KM_APP_NAME="Install Keyman.app" OUTPUT_DIR="$KEYMAN_MACIM_BASE_PATH/output" @@ -141,14 +141,14 @@ fi # Step 1 - Copy template to working copy to prevent unintended changes WORKING_COPY_OF_IMAGE="$OUTPUT_DIR/Keyman-temp-$KEYMAN_VERSION.dmg" -displayInfo "Copying \"$TEMPLATE_IMAGE\" to \"$WORKING_COPY_OF_IMAGE\"..." +builder_echo info "Copying \"$TEMPLATE_IMAGE\" to \"$WORKING_COPY_OF_IMAGE\"..." if [[ -e "$WORKING_COPY_OF_IMAGE" && "$VERBOSITY" != "-quiet" ]] ; then builder_warn "Overwriting: $WORKING_COPY_OF_IMAGE" fi cp -f "$TEMPLATE_IMAGE" "$WORKING_COPY_OF_IMAGE" # Step 2 - Mount (copy of) template image - writeable -displayInfo "Attaching \"$WORKING_COPY_OF_IMAGE\"" "Mounting as \"$STAGING_DIR\"..." +builder_echo info "Attaching \"$WORKING_COPY_OF_IMAGE\"" "Mounting as \"$STAGING_DIR\"..." if [[ -e "$STAGING_DIR" ]]; then builder_die "Mount folder $STAGING_DIR is already present. Unmount it first." fi @@ -170,7 +170,7 @@ ls -la "$STAGING_DIR/background" echo "---- End Listing ----" # Step 3 - Replace existing application files with new version -displayInfo "Copying files from \"$SOURCE_KM_APP\"..." +builder_echo info "Copying files from \"$SOURCE_KM_APP\"..." find "$DEST_KM_APP" -mindepth 1 -maxdepth 1 echo "---------" find "$DEST_KM_APP" -mindepth 1 -maxdepth 1 -print0 | xargs -0 rm -rf @@ -184,7 +184,7 @@ ls -la "$STAGING_DIR/background" echo "---- End Listing ----" # Step 4 - Detach/unmount the temporary image/staging area -displayInfo "Detaching \"$WORKING_COPY_OF_IMAGE\"" +builder_echo info "Detaching \"$WORKING_COPY_OF_IMAGE\"" # Attempt to detach 10 times, waiting 5 seconds each time # because macOS may still be working in the folder in the @@ -213,7 +213,7 @@ fi # Step 5 - Convert image to a compressed readonly DMG image DMG_FILE_PATH="$DEST_DIR/keyman-$KEYMAN_VERSION.dmg" -displayInfo "Converting/compressing image to create \"$DMG_FILE_PATH\"" +builder_echo info "Converting/compressing image to create \"$DMG_FILE_PATH\"" if [[ -e "$DMG_FILE_PATH" ]] ; then if [[ "$VERBOSITY" != "-quiet" ]] ; then builder_warn "Overwriting: $DMG_FILE_PATH" @@ -226,8 +226,8 @@ if ! [[ $? == 0 && -f "$DMG_FILE_PATH" ]]; then fi # Step 6 - Clean up -displayInfo "Cleaning up..." +builder_echo info "Cleaning up..." rm "$WORKING_COPY_OF_IMAGE" -displayInfo "Make DMG completed successfully." +builder_echo info "Make DMG completed successfully." exit 0 diff --git a/mac/build.sh b/mac/build.sh index 6bd91d73a5..302edce27b 100755 --- a/mac/build.sh +++ b/mac/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-help.inc.sh" . "$KEYMAN_ROOT/mac/mac-utils.inc.sh" @@ -102,7 +102,7 @@ execBuildCommand() { shift declare -r cmnd="$*" - displayInfo "Building $component:" "$cmnd" + builder_echo heading "Building $component:" "$cmnd" set +e local ret_code=0 eval "$cmnd" || ret_code=$? @@ -276,7 +276,7 @@ do_install() { builder_heading "Attempting local deployment with command:" KM4MIM_APP_BASE_PATH="$KM4MIM_BASE_PATH/build/$CONFIG" - displayInfo "$KM4MIM_BASE_PATH/localdeploy.sh \"$KM4MIM_APP_BASE_PATH\"" + builder_echo info "$KM4MIM_BASE_PATH/localdeploy.sh \"$KM4MIM_APP_BASE_PATH\"" "$KM4MIM_BASE_PATH/localdeploy.sh" "$KM4MIM_APP_BASE_PATH" } diff --git a/mac/setup/build.sh b/mac/setup/build.sh index af39660b6a..d31292bd23 100755 --- a/mac/setup/build.sh +++ b/mac/setup/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/mac/mac-utils.inc.sh" # Please note that this build script (understandably) assumes that it is running on Mac OS X. diff --git a/oem/firstvoices/android/build.sh b/oem/firstvoices/android/build.sh index 2e10dd5b83..7270ba0a9b 100755 --- a/oem/firstvoices/android/build.sh +++ b/oem/firstvoices/android/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" diff --git a/oem/firstvoices/ios/build.sh b/oem/firstvoices/ios/build.sh index 1b13248f98..04cd385f1f 100755 --- a/oem/firstvoices/ios/build.sh +++ b/oem/firstvoices/ios/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # Include our resource functions; they're pretty useful! -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-download-resources.sh" # ################################ Main script ################################ @@ -109,8 +109,9 @@ function do_build() { KEYMAN_VERSION=$KEYMAN_VERSION \ KEYMAN_VERSION_WITH_TAG=$KEYMAN_VERSION_WITH_TAG - assertDirExists "$ARCHIVE_PATH" - + if ! [[ -d "${ARCHIVE_PATH}" ]]; then + builder_die "Build failed: directory '${ARCHIVE_PATH}' missing" + fi # Do NOT use the _EXT variant here; there's no scheme to ref, which will lead # Xcode to generate a build error. diff --git a/oem/firstvoices/windows/src/inst/build.sh b/oem/firstvoices/windows/src/inst/build.sh index 0d0767ae66..16cd7a5b69 100755 --- a/oem/firstvoices/windows/src/inst/build.sh +++ b/oem/firstvoices/windows/src/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" source "$KEYMAN_ROOT/resources/build/build-download-resources.sh" builder_describe "Installation files for FirstVoices Keyboards" \ diff --git a/resources/build/build-utils-ci.test.sh b/resources/build/build-utils-ci.test.sh index 8251156d27..c2b63baf53 100755 --- a/resources/build/build-utils-ci.test.sh +++ b/resources/build/build-utils-ci.test.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Tests diff --git a/resources/build/builder.inc.sh b/resources/build/builder.inc.sh index 70d7d07c16..9e137cea8b 100644 --- a/resources/build/builder.inc.sh +++ b/resources/build/builder.inc.sh @@ -44,7 +44,7 @@ __builder_find_keyman_root trap __builder_not_a_builder_script exit # This will also import /resources/builder.inc.sh -# TODO: rename build-utils.sh to utils.sh +# TODO: merge build-utils.sh with utils.inc.sh . "$KEYMAN_ROOT/resources/build/build-utils.sh" # All builder scripts start in their own folder diff --git a/resources/build/history/history-utils.sh b/resources/build/history/history-utils.sh index a7a8b3e837..9a1f8f6b5e 100755 --- a/resources/build/history/history-utils.sh +++ b/resources/build/history/history-utils.sh @@ -5,7 +5,7 @@ _hu_base_dir=$(dirname "$BASH_SOURCE")/../../.. -. $_hu_base_dir/resources/shellHelperFunctions.sh +. $_hu_base_dir/resources/build/utils.inc.sh _hu_debug() { if [[ ! -z ${DEBUG+x} ]] && [[ $DEBUG == 1 ]]; then echo "$1"; fi diff --git a/resources/build/report-history.sh b/resources/build/report-history.sh index 44eaa5843c..c753beff6b 100755 --- a/resources/build/report-history.sh +++ b/resources/build/report-history.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" BUILD=false BASE=`git branch --show-current` diff --git a/resources/build/test/build-utils-traps.test.sh b/resources/build/test/build-utils-traps.test.sh index 3ed6d89a37..2265227ec6 100755 --- a/resources/build/test/build-utils-traps.test.sh +++ b/resources/build/test/build-utils-traps.test.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" # END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ############## diff --git a/resources/build/test/builder-deps.test.sh b/resources/build/test/builder-deps.test.sh index 7be2d6a37c..d2199c19fd 100755 --- a/resources/build/test/builder-deps.test.sh +++ b/resources/build/test/builder-deps.test.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" # END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe \ "Tests dependency builds" \ diff --git a/resources/build/test/test.sh b/resources/build/test/test.sh index 788af8c338..86ad94ee32 100755 --- a/resources/build/test/test.sh +++ b/resources/build/test/test.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" # END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" cd "$THIS_SCRIPT_PATH" diff --git a/resources/shellHelperFunctions.sh b/resources/build/utils.inc.sh old mode 100755 new mode 100644 similarity index 73% rename from resources/shellHelperFunctions.sh rename to resources/build/utils.inc.sh index 4e22f2ee55..bf60019dcd --- a/resources/shellHelperFunctions.sh +++ b/resources/build/utils.inc.sh @@ -12,62 +12,6 @@ verify_on_mac() { fi } -# The list of valid platforms that our build scripts ought expect. -platforms=("android" "ios" "linux" "lmlayer" "mac" "web" "win") - -# Used to validate a specified 'platform' parameter. -_verify_platform() { - match=false - for proj in "${platforms[@]}" - do - if [[ "${proj}" = "$1" ]]; then - match=true - fi - done - - if [[ ${match} = false ]]; then - builder_die "Invalid project specified!" - fi -} - -displayInfo() { - # TODO: can we replace this function with builder_debug? - if [[ "${QUIET}" != true ]]; then - while [[ $# -gt 0 ]] ; do - echo "$1" - shift # past argument - done - fi -} - -assertFileExists() { - if ! [[ -f $1 ]]; then - builder_die "Build failed: missing $1" - fi -} - -assertDirExists() { - if ! [[ -d $1 ]]; then - builder_die "Build failed: missing $1" - fi -} - -assertValidVersionNbr() -{ - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - if [[ "$1" == "" || ! "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - builder_die "Specified version not valid: '$1'. Version should be in the form Major.Minor.BuildCounter" - fi -} - -assertValidPRVersionNbr() -{ - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - if [[ "$1" == "" || ! "$1" =~ ^[0-9]+\.[0-9]+\.pull\.[0-9]+$ ]]; then - builder_die "Specified version not valid: '$1'. Version should be in the form Major.Minor.pull.BuildCounter" - fi -} - # # Write ${UPLOAD_DIR}/${ARTIFACT_FILENAME}.download_info file for the target # artifact @@ -88,7 +32,9 @@ write_download_info() { local DATE HASH SIZE DOWNLOAD_INFO STAT_FLAGS - _verify_platform "${PLATFORM}" + if [[ ! "${PLATFORM}" =~ ^(android|ios|linux|mac|web|win)$ ]]; then + builder_die "Invalid project ${PLATFORM}" + fi # shellcheck disable=SC2312 if builder_is_macos && [[ $(command -v stat) == /usr/bin/stat ]]; then @@ -128,40 +74,6 @@ write_download_info() { echo "${DOWNLOAD_INFO}" | "${JQ}" . >> "${UPLOAD_DIR}/${ARTIFACT_FILENAME}.download_info" } -# set_version sets the file version on mac/ios projects -set_version ( ) { - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - PRODUCT_PATH=$1 - - if [ $KEYMAN_VERSION ]; then - if [ $2 ]; then # $2 = product name. - echo "Setting version numbers in $2 to $KEYMAN_VERSION." - fi - /usr/libexec/Plistbuddy -c "Set CFBundleVersion $KEYMAN_VERSION" "$PRODUCT_PATH/Info.plist" - /usr/libexec/Plistbuddy -c "Set CFBundleShortVersionString $KEYMAN_VERSION" "$PRODUCT_PATH/Info.plist" - fi -} - - -# Uses npm to set the current package version (package.json). -# -# This sets the version according to the current KEYMAN_VERSION_WITH_TAG. -# -# Usage: -# -# set_npm_version -# -set_npm_version () { - # REVIEW: this function doesn't seem to be used anywhere in the codebase. - - # We use --no-git-tag-version because our CI system controls version numbering and - # already tags releases. We also want to have the version of this match the - # release of Keyman Developer -- these two versions should be in sync. Because this - # is a large repo with multiple projects and build systems, it's better for us that - # individual build systems don't take too much ownership of git tagging. :) - npm version --allow-same-version --no-git-tag-version --no-commit-hooks "$KEYMAN_VERSION_WITH_TAG" -} - # # Re-runs the specified command-line instruction up to 5 times should it fail, waiting a # random delay between each attempt. No re-runs are attempted after successful commands. @@ -214,6 +126,7 @@ _try_multiple_times ( ) { # Verifies that node is installed, and installs npm packages, but only once per # build invocation # +# TODO: rename to builder_node_select_version_and_npm_ci, move to builder.node.inc.sh verify_npm_setup() { # We'll piggy-back on the builder module dependency build state to determine # if npm ci has been called in the current script invocation. Adding the @@ -250,16 +163,22 @@ verify_npm_setup() { popd > /dev/null } +# TODO: rename to _node_print_expected_version, move to builder.node.inc.sh _print_expected_node_version() { "$JQ" -r '.engines.node' "$KEYMAN_ROOT/package.json" } # Use nvm to select a node version according to package.json # see /docs/build/node.md +# +# TODO: rename to _node_select_version_with_nvm, move to builder.node.inc.sh _select_node_version_with_nvm() { local REQUIRED_NODE_VERSION CURRENT_NODE_VERSION REQUIRED_NODE_VERSION="$(_print_expected_node_version)" + if [[ -z "$REQUIRED_NODE_VERSION" ]]; then + builder_die "Could not find expected Node.js version in $KEYMAN_ROOT/package.json" + fi if builder_is_windows; then CURRENT_NODE_VERSION="$(node --version)" @@ -284,6 +203,15 @@ _select_node_version_with_nvm() { fi } +# +# Wrapper for check-markdown tool to verify links within and validity of all .md +# files in a folder and its sub-folders +# +# Usage: +# check-markdown path_root +# Parameters: +# 1: path_root path to base folder containing .md files to be checked +# check-markdown() { node "$KEYMAN_ROOT/resources/tools/check-markdown" --root "$1" } @@ -297,9 +225,8 @@ check-markdown() { # 1: coverage_threshold optional, minimum coverage for c8 to pass tests, # defaults to 90 (percent) # -# Todo: -# Move to builder.typescript.inc.sh when this is established -# +# TODO: move to builder.typescript.inc.sh when this is established, rename to +# builder_typescript_do_tests builder_do_typescript_tests() { local MOCHA_FLAGS= diff --git a/resources/build/version/build.sh b/resources/build/version/build.sh index f6e01bcec3..076867db39 100755 --- a/resources/build/version/build.sh +++ b/resources/build/version/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/resources/docker-images/build.sh b/resources/docker-images/build.sh index b650b9ce55..1d77d56a54 100755 --- a/resources/docker-images/build.sh +++ b/resources/docker-images/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ################################ Main script ################################ . "${KEYMAN_ROOT}/resources/build/minimum-versions.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/docker-images/docker-build.inc.sh" builder_describe \ diff --git a/resources/docker-images/docker-build.inc.sh b/resources/docker-images/docker-build.inc.sh index 9685116955..44c129ac20 100644 --- a/resources/docker-images/docker-build.inc.sh +++ b/resources/docker-images/docker-build.inc.sh @@ -1,7 +1,7 @@ # shellcheck shell=bash # no hashbang for .inc.sh -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" _add_build_args() { local var=$1 diff --git a/resources/docker-images/run.sh b/resources/docker-images/run.sh index 2c8cd3e51d..88db4d436f 100755 --- a/resources/docker-images/run.sh +++ b/resources/docker-images/run.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${KEYMAN_ROOT}/resources/build/minimum-versions.inc.sh" . "${KEYMAN_ROOT}/resources/docker-images/docker-build.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/resources/stats/stats.sh b/resources/stats/stats.sh index 949d137e4b..cc175460b5 100755 --- a/resources/stats/stats.sh +++ b/resources/stats/stats.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" cd "$THIS_SCRIPT_PATH" diff --git a/resources/teamcity/android/keyman-android-release.sh b/resources/teamcity/android/keyman-android-release.sh index 1485f038f7..b19491f565 100755 --- a/resources/teamcity/android/keyman-android-release.sh +++ b/resources/teamcity/android/keyman-android-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/build/zip.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/android/android-actions.inc.sh" diff --git a/resources/teamcity/android/keyman-android-test-samples.sh b/resources/teamcity/android/keyman-android-test-samples.sh index 1faa1b6c66..cfb644bea0 100755 --- a/resources/teamcity/android/keyman-android-test-samples.sh +++ b/resources/teamcity/android/keyman-android-test-samples.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/android/android-actions.inc.sh" ################################ Main script ################################ diff --git a/resources/teamcity/android/keyman-android-test.sh b/resources/teamcity/android/keyman-android-test.sh index ca856e1ff4..39035341a9 100755 --- a/resources/teamcity/android/keyman-android-test.sh +++ b/resources/teamcity/android/keyman-android-test.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/android/android-actions.inc.sh" ################################ Main script ################################ diff --git a/resources/teamcity/developer/keyman-developer-release.sh b/resources/teamcity/developer/keyman-developer-release.sh index 1b0b2a5e72..1a63e8acbc 100755 --- a/resources/teamcity/developer/keyman-developer-release.sh +++ b/resources/teamcity/developer/keyman-developer-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" diff --git a/resources/teamcity/ios/keyman-ios-release.sh b/resources/teamcity/ios/keyman-ios-release.sh index b9386a3ed3..b00e62bf52 100755 --- a/resources/teamcity/ios/keyman-ios-release.sh +++ b/resources/teamcity/ios/keyman-ios-release.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/ios/ios-actions.inc.sh" diff --git a/resources/teamcity/ios/keyman-ios-test.sh b/resources/teamcity/ios/keyman-ios-test.sh index 9f918b8d8f..633aa2e0a2 100755 --- a/resources/teamcity/ios/keyman-ios-test.sh +++ b/resources/teamcity/ios/keyman-ios-test.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/ios/ios-actions.inc.sh" diff --git a/resources/teamcity/linux/keyman-linux-release.sh b/resources/teamcity/linux/keyman-linux-release.sh index 0f2265ffeb..146b1ff30f 100755 --- a/resources/teamcity/linux/keyman-linux-release.sh +++ b/resources/teamcity/linux/keyman-linux-release.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" diff --git a/resources/teamcity/linux/keyman-linux-test-integration.sh b/resources/teamcity/linux/keyman-linux-test-integration.sh index b68ade47be..6be6689bb9 100755 --- a/resources/teamcity/linux/keyman-linux-test-integration.sh +++ b/resources/teamcity/linux/keyman-linux-test-integration.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" diff --git a/resources/teamcity/linux/keyman-linux-test.sh b/resources/teamcity/linux/keyman-linux-test.sh index 98298253f8..ecdaf68e15 100755 --- a/resources/teamcity/linux/keyman-linux-test.sh +++ b/resources/teamcity/linux/keyman-linux-test.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/linux/linux-actions.inc.sh" diff --git a/resources/teamcity/macos/keyman-macos-release.sh b/resources/teamcity/macos/keyman-macos-release.sh index 0f19668583..2fc8037cfa 100755 --- a/resources/teamcity/macos/keyman-macos-release.sh +++ b/resources/teamcity/macos/keyman-macos-release.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/macos/macos-actions.inc.sh" diff --git a/resources/teamcity/macos/keyman-macos-test.sh b/resources/teamcity/macos/keyman-macos-test.sh index cea4e8ab86..5e9593122d 100755 --- a/resources/teamcity/macos/keyman-macos-test.sh +++ b/resources/teamcity/macos/keyman-macos-test.sh @@ -15,7 +15,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-mac.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/macos/macos-actions.inc.sh" diff --git a/resources/teamcity/web/keyman-web-release.sh b/resources/teamcity/web/keyman-web-release.sh index ce1058d246..5adc918947 100755 --- a/resources/teamcity/web/keyman-web-release.sh +++ b/resources/teamcity/web/keyman-web-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/web/web-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" diff --git a/resources/teamcity/web/keyman-web-test.sh b/resources/teamcity/web/keyman-web-test.sh index 33fbe707d7..ec6d56c3a2 100755 --- a/resources/teamcity/web/keyman-web-test.sh +++ b/resources/teamcity/web/keyman-web-test.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/web/web-actions.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-linux.inc.sh" diff --git a/resources/teamcity/windows/keyman-windows-release.sh b/resources/teamcity/windows/keyman-windows-release.sh index 10bf60cbb6..679a709bbc 100755 --- a/resources/teamcity/windows/keyman-windows-release.sh +++ b/resources/teamcity/windows/keyman-windows-release.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-windows.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/windows/windows-actions.inc.sh" diff --git a/resources/teamcity/windows/keyman-windows-test.sh b/resources/teamcity/windows/keyman-windows-test.sh index 8685fff4e3..690ae38957 100755 --- a/resources/teamcity/windows/keyman-windows-test.sh +++ b/resources/teamcity/windows/keyman-windows-test.sh @@ -13,7 +13,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh" . "${KEYMAN_ROOT}/resources/teamcity/windows/windows-actions.inc.sh" diff --git a/resources/tools/check-markdown/build.sh b/resources/tools/check-markdown/build.sh index c288b9a6be..d211bef171 100755 --- a/resources/tools/check-markdown/build.sh +++ b/resources/tools/check-markdown/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/build.sh b/web/build.sh index 51301682ca..b38d965a1b 100755 --- a/web/build.sh +++ b/web/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" # ################################ Main script ################################ diff --git a/web/ci.sh b/web/ci.sh index 77210ae224..2a35a6373e 100755 --- a/web/ci.sh +++ b/web/ci.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../resources/build/build-utils.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" . "${KEYMAN_ROOT}/resources/build/zip.inc.sh" . "${KEYMAN_ROOT}/resources/build/ci/pull-requests.inc.sh" diff --git a/web/src/app/browser/build.sh b/web/src/app/browser/build.sh index 85c696ba4a..a34f3db826 100755 --- a/web/src/app/browser/build.sh +++ b/web/src/app/browser/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=app/browser . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/app/ui/build.sh b/web/src/app/ui/build.sh index 3a431f9a0a..c308c37ff5 100755 --- a/web/src/app/ui/build.sh +++ b/web/src/app/ui/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=app/ui . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/app/webview/build.sh b/web/src/app/webview/build.sh index 1c2b2fe7dd..4a0da825d2 100755 --- a/web/src/app/webview/build.sh +++ b/web/src/app/webview/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=app/webview . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/attachment/build.sh b/web/src/engine/attachment/build.sh index 497e65e9a1..7364193b90 100755 --- a/web/src/engine/attachment/build.sh +++ b/web/src/engine/attachment/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" # Imports common Web build-script definitions & functions SUBPROJECT_NAME=engine/attachment -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/web/common.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/common/web-utils/build.sh b/web/src/engine/common/web-utils/build.sh index c487e22c91..92bc30d0e4 100755 --- a/web/src/engine/common/web-utils/build.sh +++ b/web/src/engine/common/web-utils/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "${KEYMAN_ROOT}/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" SUBPROJECT_NAME=engine/common/web-utils BUILD_DIR="/web/src/engine/common/web-utils/build" diff --git a/web/src/engine/dom-utils/build.sh b/web/src/engine/dom-utils/build.sh index 10cf2b660c..bc27e2ea39 100755 --- a/web/src/engine/dom-utils/build.sh +++ b/web/src/engine/dom-utils/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Imports common Web build-script definitions & functions SUBPROJECT_NAME=engine/dom-utils diff --git a/web/src/engine/element-wrappers/build.sh b/web/src/engine/element-wrappers/build.sh index aeee72241a..60038184f8 100755 --- a/web/src/engine/element-wrappers/build.sh +++ b/web/src/engine/element-wrappers/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/element-wrappers . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/events/build.sh b/web/src/engine/events/build.sh index e1f804908f..f5934e5dc2 100755 --- a/web/src/engine/events/build.sh +++ b/web/src/engine/events/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/events . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/interfaces/build.sh b/web/src/engine/interfaces/build.sh index 502e1f7172..5c1953541d 100755 --- a/web/src/engine/interfaces/build.sh +++ b/web/src/engine/interfaces/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/interfaces . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/js-processor/build.sh b/web/src/engine/js-processor/build.sh index 620670276b..05e6a2e57e 100755 --- a/web/src/engine/js-processor/build.sh +++ b/web/src/engine/js-processor/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/js-processor . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/keyboard-storage/build.sh b/web/src/engine/keyboard-storage/build.sh index 86755c613a..5067983644 100755 --- a/web/src/engine/keyboard-storage/build.sh +++ b/web/src/engine/keyboard-storage/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/keyboard-storage . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/keyboard/build.sh b/web/src/engine/keyboard/build.sh index dc1283a7f2..fbc42d6c5d 100755 --- a/web/src/engine/keyboard/build.sh +++ b/web/src/engine/keyboard/build.sh @@ -11,7 +11,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/keyboard . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/engine/main/build.sh b/web/src/engine/main/build.sh index a90e9f7660..b67762c73a 100755 --- a/web/src/engine/main/build.sh +++ b/web/src/engine/main/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/main . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/osk/build.sh b/web/src/engine/osk/build.sh index 307d5b7a08..cfb64e6edd 100755 --- a/web/src/engine/osk/build.sh +++ b/web/src/engine/osk/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/osk . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/osk/gesture-processor/build.sh b/web/src/engine/osk/gesture-processor/build.sh index 5bee378fca..6c2c355e7d 100755 --- a/web/src/engine/osk/gesture-processor/build.sh +++ b/web/src/engine/osk/gesture-processor/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/osk/gesture-processor . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" diff --git a/web/src/engine/osk/gesture-processor/src/tools/build.sh b/web/src/engine/osk/gesture-processor/src/tools/build.sh index 343d90a117..ef4d9830fb 100755 --- a/web/src/engine/osk/gesture-processor/src/tools/build.sh +++ b/web/src/engine/osk/gesture-processor/src/tools/build.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" diff --git a/web/src/engine/predictive-text/build.sh b/web/src/engine/predictive-text/build.sh index ff0029ec40..c558243628 100755 --- a/web/src/engine/predictive-text/build.sh +++ b/web/src/engine/predictive-text/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh index 2dda929d27..4434f8d222 100755 --- a/web/src/engine/predictive-text/templates/build.sh +++ b/web/src/engine/predictive-text/templates/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$(dirname "$THIS_SCRIPT")/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ diff --git a/web/src/engine/predictive-text/wordbreakers/build.sh b/web/src/engine/predictive-text/wordbreakers/build.sh index 9e449030d8..7a4224205d 100755 --- a/web/src/engine/predictive-text/wordbreakers/build.sh +++ b/web/src/engine/predictive-text/wordbreakers/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$(dirname "$THIS_SCRIPT")/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" ################################ Main script ################################ diff --git a/web/src/engine/predictive-text/worker-main/build.sh b/web/src/engine/predictive-text/worker-main/build.sh index 6642e18b86..b25a0c687e 100755 --- a/web/src/engine/predictive-text/worker-main/build.sh +++ b/web/src/engine/predictive-text/worker-main/build.sh @@ -11,7 +11,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/test.sh b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh index 4732ac6167..6f905534bb 100755 --- a/web/src/engine/predictive-text/worker-main/unit_tests/test.sh +++ b/web/src/engine/predictive-text/worker-main/unit_tests/test.sh @@ -7,7 +7,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # This script runs from its own folder cd "$THIS_SCRIPT_PATH" diff --git a/web/src/engine/predictive-text/worker-thread/build.sh b/web/src/engine/predictive-text/worker-thread/build.sh index d72d5f2d22..3817048dac 100755 --- a/web/src/engine/predictive-text/worker-thread/build.sh +++ b/web/src/engine/predictive-text/worker-thread/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" WORKER_OUTPUT=build/obj diff --git a/web/src/engine/sentry-manager/build.sh b/web/src/engine/sentry-manager/build.sh index e91b78ce7e..1fac3dfc57 100755 --- a/web/src/engine/sentry-manager/build.sh +++ b/web/src/engine/sentry-manager/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "${KEYMAN_ROOT}/web/common.inc.sh" -. "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" +. "${KEYMAN_ROOT}/resources/build/utils.inc.sh" builder_describe "Builds the Sentry-reporting module used with Keyman Engine for Web" \ "@/common/web/keyman-version" \ diff --git a/web/src/samples/build.sh b/web/src/samples/build.sh index fe5817e6e5..710f1cb489 100755 --- a/web/src/samples/build.sh +++ b/web/src/samples/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # Imports common Web build-script definitions & functions . "$KEYMAN_ROOT/web/common.inc.sh" diff --git a/web/src/test/manual/build.sh b/web/src/test/manual/build.sh index 8b564480b8..22ea7bff84 100755 --- a/web/src/test/manual/build.sh +++ b/web/src/test/manual/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # ################################ Main script ################################ diff --git a/web/src/tools/build.sh b/web/src/tools/build.sh index b9d1e27bda..5b3a2baed3 100755 --- a/web/src/tools/build.sh +++ b/web/src/tools/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/building/sourcemap-root/build.sh b/web/src/tools/building/sourcemap-root/build.sh index 3e9a9759f1..f64ba7f094 100755 --- a/web/src/tools/building/sourcemap-root/build.sh +++ b/web/src/tools/building/sourcemap-root/build.sh @@ -8,7 +8,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/es-bundling/build.sh b/web/src/tools/es-bundling/build.sh index ec2deee862..348fd5a970 100755 --- a/web/src/tools/es-bundling/build.sh +++ b/web/src/tools/es-bundling/build.sh @@ -6,7 +6,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/testing/bulk_rendering/build.sh b/web/src/tools/testing/bulk_rendering/build.sh index 53ad43da17..eb5f6169e6 100755 --- a/web/src/tools/testing/bulk_rendering/build.sh +++ b/web/src/tools/testing/bulk_rendering/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=tools/testing/bulk_rendering . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/testing/recorder-core/build.sh b/web/src/tools/testing/recorder-core/build.sh index 0b89ce7701..e601bc0133 100755 --- a/web/src/tools/testing/recorder-core/build.sh +++ b/web/src/tools/testing/recorder-core/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/src/tools/testing/recorder/build.sh b/web/src/tools/testing/recorder/build.sh index 91f27d09e5..93fe071bc2 100755 --- a/web/src/tools/testing/recorder/build.sh +++ b/web/src/tools/testing/recorder/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=tools/testing/recorder . "$KEYMAN_ROOT/web/common.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" ################################ Main script ################################ diff --git a/web/test.sh b/web/test.sh index ea4f9e0abc..5cb8dd257d 100755 --- a/web/test.sh +++ b/web/test.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" # This script runs from its own folder cd "$THIS_SCRIPT_PATH" diff --git a/windows/src/build.sh b/windows/src/build.sh index c6cbbaa82b..9ed2a09466 100755 --- a/windows/src/build.sh +++ b/windows/src/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe \ "Keyman for Windows" \ diff --git a/windows/src/desktop/build.sh b/windows/src/desktop/build.sh index 96d0324cfd..e933165ff3 100755 --- a/windows/src/desktop/build.sh +++ b/windows/src/desktop/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" . "$KEYMAN_ROOT/developer/src/packages.inc.sh" diff --git a/windows/src/desktop/help/build.sh b/windows/src/desktop/help/build.sh index 807f7047ab..e5e74be2f9 100755 --- a/windows/src/desktop/help/build.sh +++ b/windows/src/desktop/help/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +. "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Help documentation for Keyman for Windows" \ clean configure build test install \ diff --git a/windows/src/desktop/inst/build.sh b/windows/src/desktop/inst/build.sh index d0678fb3d0..e541e79b46 100755 --- a/windows/src/desktop/inst/build.sh +++ b/windows/src/desktop/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Installation files for Keyman for Windows" \ @/common/windows/data \ diff --git a/windows/src/engine/inst/build.sh b/windows/src/engine/inst/build.sh index 42374c140e..e0e9d65fa7 100755 --- a/windows/src/engine/inst/build.sh +++ b/windows/src/engine/inst/build.sh @@ -5,7 +5,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -source "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" +source "$KEYMAN_ROOT/resources/build/utils.inc.sh" builder_describe "Installation files for Keyman Engine for Windows" \ clean configure build test publish From f394245636d4238f15cff570eacdae4ece71a423 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 2 Aug 2025 07:53:42 +1000 Subject: [PATCH 33/79] 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 --- .github/workflows/deb-packaging.yml | 2 +- .gitignore | 2 +- android/KMAPro/build.sh | 2 +- android/KMEA/build.sh | 2 +- android/Samples/KMSample1/build.sh | 2 +- android/Samples/KMSample2/build.sh | 2 +- android/Tests/KeyboardHarness/build.sh | 2 +- android/build.sh | 16 +++- android/utility/i18n-check-unused-strings.sh | 2 +- build.sh | 2 +- common/build.sh | 2 +- common/include/build.sh | 2 +- common/linux/build.sh | 2 +- common/mac/build.sh | 2 +- common/test/keyboards/baseline/build.sh | 2 +- common/test/keyboards/build.sh | 2 +- .../issue/6254-invalid-version-99/build.sh | 2 +- .../test/resources/test_kill_browserstack.sh | 2 +- common/tools/hextobin/build.sh | 2 +- common/tools/sourcemap-path-remapper/build.sh | 2 +- common/web/build.sh | 2 +- common/web/keyman-version/build.sh | 2 +- common/web/langtags/build.sh | 2 +- common/web/types/build.sh | 2 +- common/windows/build.sh | 2 +- common/windows/cef-checkout.sh | 2 +- common/windows/data/build.sh | 2 +- common/windows/delphi/build.sh | 2 +- common/windows/delphi/components/build.sh | 2 +- .../delphi/general/KeymanVersionInfo.inc | 2 +- .../delphi/general/keymanversion_build.in | 2 +- common/windows/delphi/tools/build.sh | 2 +- .../tools/build_standards_data/build.sh | 2 +- .../delphi/tools/buildunidata/build.sh | 2 +- .../delphi/tools/certificates/build.sh | 2 +- common/windows/delphi/tools/devtools/build.sh | 2 +- .../windows/delphi/tools/sentrytool/build.sh | 2 +- .../windows/delphi/tools/test-klog/build.sh | 2 +- .../delphi/tools/verify_signatures/build.sh | 2 +- common/windows/mkver.sh | 2 +- core/build.sh | 2 +- core/include/ldml/build.sh | 2 +- core/tools/api-header-extractor/build.sh | 2 +- core/tools/ldml-const-builder/build.sh | 2 +- developer/build.sh | 2 +- developer/src/build.sh | 2 +- developer/src/common/build.sh | 2 +- developer/src/common/delphi/build.sh | 2 +- developer/src/common/web/build.sh | 2 +- .../src/common/web/test-helpers/build.sh | 2 +- developer/src/common/web/utils/build.sh | 2 +- developer/src/inst/build.sh | 2 +- developer/src/kmanalyze/build.sh | 2 +- developer/src/kmc-analyze/build.sh | 2 +- developer/src/kmc-copy/build.sh | 2 +- developer/src/kmc-generate/build.sh | 2 +- developer/src/kmc-keyboard-info/build.sh | 2 +- developer/src/kmc-kmn/build.sh | 2 +- developer/src/kmc-ldml/build.sh | 2 +- developer/src/kmc-model-info/build.sh | 2 +- developer/src/kmc-model/build.sh | 2 +- developer/src/kmc-package/build.sh | 2 +- developer/src/kmc/build.sh | 2 +- developer/src/kmc/test/command-line-tests.sh | 2 +- developer/src/kmcmplib/build.sh | 2 +- .../src/kmcmplib/tests/get-test-source.sh | 2 +- developer/src/kmcmplib/tests/prep.sh | 2 +- developer/src/kmconvert/build.sh | 2 +- developer/src/kmdbrowserhost/build.sh | 2 +- developer/src/kmdecomp/build.sh | 2 +- developer/src/samples/build.sh | 2 +- developer/src/samples/imsample/build.sh | 2 +- developer/src/server/build.sh | 2 +- developer/src/server/src/version-data.ts | 2 +- developer/src/setup/build.sh | 2 +- developer/src/test/auto/build.sh | 2 +- .../compile-supplementary-support/build.sh | 2 +- .../src/test/auto/keyboard-js-info/build.sh | 2 +- developer/src/test/auto/kmcomp/build.sh | 2 +- .../src/test/auto/kmx-file-languages/build.sh | 2 +- .../src/test/auto/model-ts-parser/build.sh | 2 +- developer/src/test/auto/package-info/build.sh | 2 +- developer/src/test/build.sh | 2 +- developer/src/tike/build.sh | 2 +- developer/src/tools/sentry-upload-difs.sh | 2 +- docs/builder.md | 12 +-- ios/build.sh | 2 +- ios/ci.sh | 2 +- ios/engine/build.sh | 2 +- ios/i18n-export.sh | 2 +- ios/keyman/build.sh | 2 +- ios/samples/KMSample1/build.sh | 2 +- ios/samples/KMSample2/build.sh | 2 +- ios/samples/common.inc.sh | 2 +- ios/scripts/kme-universal.sh | 2 +- ios/tools/prepRelease.sh | 2 +- linux/build.sh | 2 +- linux/ibus-keyman/build.sh | 2 +- linux/keyman-config/build.sh | 2 +- linux/keyman-system-service/build.sh | 2 +- linux/mcompile/keymap/build.sh | 2 +- linux/scripts/deb-packaging.sh | 4 +- linux/scripts/debian.sh | 2 +- linux/scripts/dist.sh | 2 +- linux/scripts/launchpad.sh | 4 +- linux/scripts/reconf.sh | 2 +- linux/scripts/test/deb-packaging.tests.sh | 2 +- linux/scripts/test/verify_api.tests.sh | 2 +- linux/scripts/upload-to-debian.sh | 2 +- linux/scripts/verify_api.inc.sh | 2 +- mac/Keyman4MacIM/make-km-dmg.sh | 2 +- mac/build.sh | 2 +- mac/is_same_version.sh | 2 +- mac/mcompile/build.sh | 2 +- mac/setup/build.sh | 2 +- oem/firstvoices/android/build.sh | 2 +- oem/firstvoices/common/build_csv_languages.sh | 2 +- oem/firstvoices/ios/build.sh | 2 +- oem/firstvoices/windows/src/inst/build.sh | 2 +- resources/build.sh | 2 +- resources/build/README.md | 17 +++- resources/build/build-utils-ci.test.sh | 2 +- .../{build-utils.sh => builder-basic.inc.sh} | 88 +++++++------------ .../{builder.inc.sh => builder-full.inc.sh} | 28 ++---- resources/build/builder-report.sh | 2 +- resources/build/ci/test/test-pull-requests.sh | 2 +- resources/build/help-keyman-com.sh | 2 +- resources/build/increment-version.sh | 2 +- resources/build/jq.inc.sh | 2 +- resources/build/pr-build-status/build.sh | 2 +- resources/build/publish-minimum-versions.sh | 2 +- resources/build/report-history.sh | 2 +- resources/build/run-required-test-builds.sh | 2 +- .../test/build-bot/trigger-build-bot.test.sh | 2 +- .../build/test/build-utils-traps.test.sh | 4 +- resources/build/test/build.sh | 2 +- resources/build/test/builder-deps.test.sh | 2 +- .../test/builder-invalid-script-1.test.sh | 2 +- .../test/builder-invalid-script-2.test.sh | 2 +- .../test/builder-invalid-script-3.test.sh | 2 +- .../build/test/debug-deps/child/build.sh | 2 +- .../build/test/debug-deps/child/dep/build.sh | 2 +- resources/build/test/debug-deps/dep/build.sh | 2 +- .../build/test/debug-deps/dep/child/build.sh | 2 +- resources/build/test/debug-deps/test.sh | 2 +- .../test/dependencies/basic/app/build.sh | 2 +- .../test/dependencies/basic/library/build.sh | 2 +- .../test/dependencies/error/app/build.sh | 2 +- .../test/dependencies/error/error/build.sh | 2 +- .../test/dependencies/targets/app/build.sh | 2 +- .../dependencies/targets/library/build.sh | 2 +- resources/build/test/dependencies/test.sh | 2 +- resources/build/test/ignored-flags/build.sh | 2 +- .../build/test/ignored-flags/child/build.sh | 2 +- resources/build/test/ignored-flags/test.sh | 2 +- .../build/test/locate_emscripten.tests.sh | 2 +- resources/build/test/test.sh | 4 +- .../build/test/testing-framework.tests.sh | 2 +- resources/build/test/trap-test-builds.test.sh | 2 +- resources/build/test/trees/build.sh | 2 +- resources/build/test/trees/child1/build.sh | 2 +- resources/build/test/trees/child2/build.sh | 2 +- .../test/trees/child3_renamed/src/build.sh | 2 +- resources/build/test/trees/dep/build.sh | 2 +- resources/build/test/trees/test.sh | 2 +- resources/build/test/verify-colors.test.sh | 2 +- resources/build/test/zip.inc.tests.sh | 2 +- resources/build/version/build.sh | 2 +- resources/build/xcode-utils.sh | 14 +-- resources/builder.inc.sh | 2 +- resources/docker-images/build.sh | 2 +- resources/docker-images/run.sh | 2 +- .../ldml-keyboards/fetch-latest-cldr.sh | 2 +- .../unicode-character-database/download.sh | 2 +- resources/stats/stats.sh | 2 +- .../android/keyman-android-release.sh | 2 +- .../android/keyman-android-test-samples.sh | 2 +- .../teamcity/android/keyman-android-test.sh | 2 +- .../teamcity/common/common-test-common-web.sh | 2 +- .../teamcity/common/common-test-common.sh | 2 +- .../teamcity/common/common-test-core-wasm.sh | 2 +- resources/teamcity/common/common-test-core.sh | 2 +- .../developer/keyman-developer-release.sh | 2 +- .../keyman-developer-test-linux-macos.sh | 2 +- .../keyman-developer-test-windows.sh | 2 +- resources/teamcity/ios/keyman-ios-release.sh | 2 +- .../teamcity/ios/keyman-ios-test-samples.sh | 2 +- resources/teamcity/ios/keyman-ios-test.sh | 2 +- .../teamcity/linux/keyman-linux-release.sh | 2 +- .../linux/keyman-linux-test-integration.sh | 2 +- resources/teamcity/linux/keyman-linux-test.sh | 2 +- .../teamcity/macos/keyman-macos-release.sh | 2 +- resources/teamcity/macos/keyman-macos-test.sh | 2 +- resources/teamcity/web/keyman-web-release.sh | 2 +- resources/teamcity/web/keyman-web-test.sh | 2 +- .../windows/keyman-windows-release.sh | 2 +- .../teamcity/windows/keyman-windows-test.sh | 2 +- resources/tools/check-markdown/build.sh | 2 +- web/build.sh | 2 +- web/ci.sh | 2 +- web/src/app/browser/build.sh | 2 +- web/src/app/ui/build.sh | 2 +- web/src/app/webview/build.sh | 2 +- web/src/engine/attachment/build.sh | 2 +- web/src/engine/common/web-utils/build.sh | 2 +- web/src/engine/dom-utils/build.sh | 2 +- web/src/engine/element-wrappers/build.sh | 2 +- web/src/engine/events/build.sh | 2 +- web/src/engine/interfaces/build.sh | 2 +- web/src/engine/js-processor/build.sh | 2 +- web/src/engine/keyboard-storage/build.sh | 2 +- web/src/engine/keyboard/build.sh | 2 +- web/src/engine/main/build.sh | 2 +- web/src/engine/osk/build.sh | 2 +- web/src/engine/osk/gesture-processor/build.sh | 2 +- .../osk/gesture-processor/src/tools/build.sh | 2 +- web/src/engine/predictive-text/build.sh | 2 +- .../engine/predictive-text/templates/build.sh | 2 +- .../predictive-text/wordbreakers/build.sh | 2 +- .../predictive-text/worker-main/build.sh | 2 +- .../worker-main/unit_tests/test.sh | 2 +- .../predictive-text/worker-thread/build.sh | 2 +- web/src/engine/sentry-manager/build.sh | 2 +- web/src/samples/build.sh | 2 +- web/src/test/manual/build.sh | 2 +- .../manual/embed/android-harness/build.sh | 2 +- web/src/tools/build.sh | 2 +- web/src/tools/building/check-build-size.sh | 2 +- .../tools/building/sourcemap-root/build.sh | 2 +- web/src/tools/es-bundling/build.sh | 2 +- web/src/tools/testing/bulk_rendering/build.sh | 2 +- web/src/tools/testing/recorder-core/build.sh | 2 +- web/src/tools/testing/recorder/build.sh | 2 +- web/test.sh | 2 +- windows/build.sh | 2 +- windows/src/build.sh | 2 +- windows/src/buildtools/sentry-upload-difs.sh | 2 +- windows/src/desktop/build.sh | 2 +- windows/src/desktop/help/build.sh | 2 +- windows/src/desktop/inst/build.sh | 2 +- windows/src/desktop/insthelp/build.sh | 2 +- windows/src/desktop/kmbrowserhost/build.sh | 2 +- windows/src/desktop/kmconfig/build.sh | 2 +- windows/src/desktop/kmshell/build.sh | 2 +- windows/src/desktop/locale/crowdin-control.sh | 2 +- windows/src/desktop/setup/build.sh | 2 +- windows/src/engine/build.sh | 2 +- windows/src/engine/inst/build.sh | 2 +- windows/src/engine/insthelper/build.sh | 2 +- windows/src/engine/keyman/build.sh | 2 +- windows/src/engine/keyman32/build.sh | 2 +- windows/src/engine/keymanmc/build.sh | 2 +- windows/src/engine/keymanx64/build.sh | 2 +- windows/src/engine/kmcomapi/build.sh | 2 +- windows/src/engine/kmrefresh/build.sh | 2 +- windows/src/engine/kmtip/build.sh | 2 +- windows/src/engine/mcompile/build.sh | 2 +- windows/src/engine/testhost/build.sh | 2 +- windows/src/engine/tsysinfo/build.sh | 2 +- windows/src/engine/tsysinfox64/build.sh | 2 +- windows/src/global/delphi/build.sh | 2 +- windows/src/support/build.sh | 2 +- windows/src/support/etl2log/build.sh | 2 +- windows/src/support/oskbulkrenderer/build.sh | 2 +- windows/src/support/texteditor/build.sh | 2 +- .../i18n-check-unused-strings.sh | 2 +- .../build.sh | 2 +- windows/src/test/unit-tests/build.sh | 2 +- .../unit-tests/group-helper-rsp19902/build.sh | 2 +- windows/src/test/unit-tests/jsonutil/build.sh | 2 +- .../src/test/unit-tests/shared-data/build.sh | 2 +- .../test/unit-tests/shared-data/cpp/build.sh | 2 +- .../unit-tests/shared-data/delphi/build.sh | 2 +- .../test/unit-tests/standards-data/build.sh | 2 +- .../unit-tests/ui-language-manager/build.sh | 2 +- .../test/unit-tests/windows-setup/build.sh | 2 +- 276 files changed, 354 insertions(+), 369 deletions(-) rename resources/build/{build-utils.sh => builder-basic.inc.sh} (89%) mode change 100755 => 100644 rename resources/build/{builder.inc.sh => builder-full.inc.sh} (52%) diff --git a/.github/workflows/deb-packaging.yml b/.github/workflows/deb-packaging.yml index a06d7ed3cd..674b90e9c4 100644 --- a/.github/workflows/deb-packaging.yml +++ b/.github/workflows/deb-packaging.yml @@ -86,7 +86,7 @@ jobs: shell: bash run: | THIS_SCRIPT="$GITHUB_WORKSPACE/.github/workflows/deb-packaging.yml" - . "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" + . "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" echo "KEYMAN_VERSION=${KEYMAN_VERSION:-${VERSION}}" >> $GITHUB_OUTPUT - name: Set prerelease tag as output parameter diff --git a/.gitignore b/.gitignore index 6c8fbfbec8..6316adb5d2 100644 --- a/.gitignore +++ b/.gitignore @@ -164,7 +164,7 @@ tsconfig.tsbuildinfo # Windows system files Thumbs.db -# Temporary file for logging scripts in xcode runs, see build-utils.sh for +# Temporary file for logging scripts in xcode runs, see builder-basic.inc.sh for # details /xcodebuild-scripts.log diff --git a/android/KMAPro/build.sh b/android/KMAPro/build.sh index 66ce1d09c3..525b951138 100755 --- a/android/KMAPro/build.sh +++ b/android/KMAPro/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/KMEA/build.sh b/android/KMEA/build.sh index 45a770308f..9b6d0d4892 100755 --- a/android/KMEA/build.sh +++ b/android/KMEA/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/Samples/KMSample1/build.sh b/android/Samples/KMSample1/build.sh index 752e72b91e..65e5619815 100755 --- a/android/Samples/KMSample1/build.sh +++ b/android/Samples/KMSample1/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/Samples/KMSample2/build.sh b/android/Samples/KMSample2/build.sh index 5538d5dee6..08c5261778 100755 --- a/android/Samples/KMSample2/build.sh +++ b/android/Samples/KMSample2/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/Tests/KeyboardHarness/build.sh b/android/Tests/KeyboardHarness/build.sh index af85c7c55a..66f2b0496e 100755 --- a/android/Tests/KeyboardHarness/build.sh +++ b/android/Tests/KeyboardHarness/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/android/build.sh b/android/build.sh index ebf30aeb43..e00c99e634 100755 --- a/android/build.sh +++ b/android/build.sh @@ -10,7 +10,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # shellcheck disable=SC2154 @@ -108,8 +108,18 @@ function archive_artifacts() { fi } -# Override JAVA_HOME to OpenJDK 11 -set_java_home + +# For CI compatibility of building Keyman for Android 18.0 with OpenJDK 11, +# this overrides JAVA_HOME for the builder script to use OpenJDK 21. +android_set_java_home() { + if [[ ! -z ${JAVA_HOME_21+x} ]]; then + builder_echo "Setting JAVA_HOME to JAVA_HOME_21 (${JAVA_HOME_21})" + export JAVA_HOME="${JAVA_HOME_21}" + fi +} + +# Override JAVA_HOME +android_set_java_home # This script also responsible for cleaning up /android/upload builder_run_child_actions clean diff --git a/android/utility/i18n-check-unused-strings.sh b/android/utility/i18n-check-unused-strings.sh index 062ff8cff4..9e3a0a21c3 100755 --- a/android/utility/i18n-check-unused-strings.sh +++ b/android/utility/i18n-check-unused-strings.sh @@ -25,7 +25,7 @@ set -u # die on undefined variables ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # Preparation diff --git a/build.sh b/build.sh index a455d3307f..2589a162b1 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyman -- all projects" \ diff --git a/common/build.sh b/common/build.sh index 5119bca8ac..a066cf15d3 100755 --- a/common/build.sh +++ b/common/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyman common and resources modules" \ diff --git a/common/include/build.sh b/common/include/build.sh index 9115bd661a..962d13d5c7 100755 --- a/common/include/build.sh +++ b/common/include/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build keymanversion_build.h" configure build clean diff --git a/common/linux/build.sh b/common/linux/build.sh index b52102313e..2df05e03ba 100755 --- a/common/linux/build.sh +++ b/common/linux/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # diff --git a/common/mac/build.sh b/common/mac/build.sh index 44a7064c83..1acf2f3ccd 100755 --- a/common/mac/build.sh +++ b/common/mac/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # diff --git a/common/test/keyboards/baseline/build.sh b/common/test/keyboards/baseline/build.sh index 065e2593c5..1428b5e0c4 100755 --- a/common/test/keyboards/baseline/build.sh +++ b/common/test/keyboards/baseline/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Baseline keyboards tests -- built with 16.0 compiler" \ diff --git a/common/test/keyboards/build.sh b/common/test/keyboards/build.sh index 2d6a986b87..489bf17543 100755 --- a/common/test/keyboards/build.sh +++ b/common/test/keyboards/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/zip.inc.sh" diff --git a/common/test/keyboards/issue/6254-invalid-version-99/build.sh b/common/test/keyboards/issue/6254-invalid-version-99/build.sh index 462908042c..80c5e575e6 100755 --- a/common/test/keyboards/issue/6254-invalid-version-99/build.sh +++ b/common/test/keyboards/issue/6254-invalid-version-99/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-basic.inc.sh" # . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE THIS_DIR="$(dirname "$THIS_SCRIPT")" diff --git a/common/test/resources/test_kill_browserstack.sh b/common/test/resources/test_kill_browserstack.sh index f6ea16a36b..cbca52da45 100755 --- a/common/test/resources/test_kill_browserstack.sh +++ b/common/test/resources/test_kill_browserstack.sh @@ -8,7 +8,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/common/tools/hextobin/build.sh b/common/tools/hextobin/build.sh index 0d8075b83b..28eaa853d5 100755 --- a/common/tools/hextobin/build.sh +++ b/common/tools/hextobin/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/tools/sourcemap-path-remapper/build.sh b/common/tools/sourcemap-path-remapper/build.sh index c3b7e24536..44c3692dae 100755 --- a/common/tools/sourcemap-path-remapper/build.sh +++ b/common/tools/sourcemap-path-remapper/build.sh @@ -6,7 +6,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/web/build.sh b/common/web/build.sh index 2370e3ecf4..182de85d62 100755 --- a/common/web/build.sh +++ b/common/web/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyman common web modules" \ diff --git a/common/web/keyman-version/build.sh b/common/web/keyman-version/build.sh index aa9287ea6c..95730b2793 100755 --- a/common/web/keyman-version/build.sh +++ b/common/web/keyman-version/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/web/langtags/build.sh b/common/web/langtags/build.sh index 58fc6d10cf..d04319fc77 100755 --- a/common/web/langtags/build.sh +++ b/common/web/langtags/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/web/types/build.sh b/common/web/types/build.sh index 679fcfc018..b1eaa8b3ff 100755 --- a/common/web/types/build.sh +++ b/common/web/types/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/common/windows/build.sh b/common/windows/build.sh index 663a7f41c7..45941b668d 100755 --- a/common/windows/build.sh +++ b/common/windows/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # diff --git a/common/windows/cef-checkout.sh b/common/windows/cef-checkout.sh index 184769a198..c669961328 100755 --- a/common/windows/cef-checkout.sh +++ b/common/windows/cef-checkout.sh @@ -13,7 +13,7 @@ set -u ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" # . "$KEYMAN_ROOT/resources/build/utils.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/common/windows/data/build.sh b/common/windows/data/build.sh index ac559612bb..2b70c426ed 100755 --- a/common/windows/data/build.sh +++ b/common/windows/data/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/build.sh b/common/windows/delphi/build.sh index b3e0ddfc1f..81042422fd 100755 --- a/common/windows/delphi/build.sh +++ b/common/windows/delphi/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/components/build.sh b/common/windows/delphi/components/build.sh index 86bad135e0..6fe3dfa9ec 100755 --- a/common/windows/delphi/components/build.sh +++ b/common/windows/delphi/components/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Common Delphi components" clean configure build test edit diff --git a/common/windows/delphi/general/KeymanVersionInfo.inc b/common/windows/delphi/general/KeymanVersionInfo.inc index 4991b42385..41e316e051 100644 --- a/common/windows/delphi/general/KeymanVersionInfo.inc +++ b/common/windows/delphi/general/KeymanVersionInfo.inc @@ -1,6 +1,6 @@ type TKeymanVersionInfo = record - // These fields match fields in /resources/build/build-utils.sh + // These fields match fields in /resources/build/builder-basic.inc.sh Version: string; // 14.0.2 VersionWin: string; // 14.0.2.0 VersionRelease: string; // 14.0 diff --git a/common/windows/delphi/general/keymanversion_build.in b/common/windows/delphi/general/keymanversion_build.in index edd55572a6..a5ada65e15 100644 --- a/common/windows/delphi/general/keymanversion_build.in +++ b/common/windows/delphi/general/keymanversion_build.in @@ -6,7 +6,7 @@ // Keyman Version Information CKeymanVersionInfo: TKeymanVersionInfo = ( - // These fields match fields in /resources/build/build-utils.sh + // These fields match fields in /resources/build/builder-basic.inc.sh Version: '$Version'; VersionWin: '$VersionWin'; VersionRelease: '$VersionRelease'; diff --git a/common/windows/delphi/tools/build.sh b/common/windows/delphi/tools/build.sh index 6fad40a4d6..220463620b 100755 --- a/common/windows/delphi/tools/build.sh +++ b/common/windows/delphi/tools/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/tools/build_standards_data/build.sh b/common/windows/delphi/tools/build_standards_data/build.sh index 3d39aefe9d..239bde79f0 100755 --- a/common/windows/delphi/tools/build_standards_data/build.sh +++ b/common/windows/delphi/tools/build_standards_data/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build build_standards_data tool" clean configure build test edit diff --git a/common/windows/delphi/tools/buildunidata/build.sh b/common/windows/delphi/tools/buildunidata/build.sh index b4e13c264d..36b069351b 100755 --- a/common/windows/delphi/tools/buildunidata/build.sh +++ b/common/windows/delphi/tools/buildunidata/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Unicode character database build tool" \ diff --git a/common/windows/delphi/tools/certificates/build.sh b/common/windows/delphi/tools/certificates/build.sh index 10ab4c75ce..dfe4911f18 100755 --- a/common/windows/delphi/tools/certificates/build.sh +++ b/common/windows/delphi/tools/certificates/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build and install test certificates" clean configure build test \ diff --git a/common/windows/delphi/tools/devtools/build.sh b/common/windows/delphi/tools/devtools/build.sh index f514ea7578..f7b9dd52d4 100755 --- a/common/windows/delphi/tools/devtools/build.sh +++ b/common/windows/delphi/tools/devtools/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/common/windows/delphi/tools/sentrytool/build.sh b/common/windows/delphi/tools/sentrytool/build.sh index ca4e427c39..c1672b0aeb 100755 --- a/common/windows/delphi/tools/sentrytool/build.sh +++ b/common/windows/delphi/tools/sentrytool/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Sentrytool for converting Delphi symbols into sentry-readable format" \ diff --git a/common/windows/delphi/tools/test-klog/build.sh b/common/windows/delphi/tools/test-klog/build.sh index b271565cae..acdd90cd53 100755 --- a/common/windows/delphi/tools/test-klog/build.sh +++ b/common/windows/delphi/tools/test-klog/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Tool for validating klog is disabled for release builds" \ diff --git a/common/windows/delphi/tools/verify_signatures/build.sh b/common/windows/delphi/tools/verify_signatures/build.sh index f53883c70e..d1b29e89cb 100755 --- a/common/windows/delphi/tools/verify_signatures/build.sh +++ b/common/windows/delphi/tools/verify_signatures/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Tool to verify all Windows executable signatures and manifests" \ diff --git a/common/windows/mkver.sh b/common/windows/mkver.sh index 8ddb9e34ed..84886666bd 100755 --- a/common/windows/mkver.sh +++ b/common/windows/mkver.sh @@ -9,7 +9,7 @@ set -u ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE display_usage() { diff --git a/core/build.sh b/core/build.sh index 6bdb52d936..1c1d337b1c 100755 --- a/core/build.sh +++ b/core/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE diff --git a/core/include/ldml/build.sh b/core/include/ldml/build.sh index 4188b758f5..650bd7adf7 100755 --- a/core/include/ldml/build.sh +++ b/core/include/ldml/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/core/tools/api-header-extractor/build.sh b/core/tools/api-header-extractor/build.sh index fe048ce48b..bf26598ce2 100755 --- a/core/tools/api-header-extractor/build.sh +++ b/core/tools/api-header-extractor/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE CORE_ROOT="$KEYMAN_ROOT/core" diff --git a/core/tools/ldml-const-builder/build.sh b/core/tools/ldml-const-builder/build.sh index 01082bca0a..8c8bc364b5 100755 --- a/core/tools/ldml-const-builder/build.sh +++ b/core/tools/ldml-const-builder/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/build.sh b/developer/build.sh index b75967a4ce..74269abcc3 100755 --- a/developer/build.sh +++ b/developer/build.sh @@ -2,7 +2,7 @@ ## START STANDARD UTILITY SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../resources/build/builder-basic.inc.sh" ## END STANDARD UTILITY SCRIPT INCLUDE # This is not a builder script but calls a builder script diff --git a/developer/src/build.sh b/developer/src/build.sh index b774b6c943..6e23dc8c0a 100755 --- a/developer/src/build.sh +++ b/developer/src/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/common/build.sh b/developer/src/common/build.sh index b37c2bc948..8ef5a4a1f2 100755 --- a/developer/src/common/build.sh +++ b/developer/src/common/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/common/delphi/build.sh b/developer/src/common/delphi/build.sh index 63680a5624..907621194f 100755 --- a/developer/src/common/delphi/build.sh +++ b/developer/src/common/delphi/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/common/web/build.sh b/developer/src/common/web/build.sh index 7ca90bd986..9be3a521fa 100755 --- a/developer/src/common/web/build.sh +++ b/developer/src/common/web/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/common/web/test-helpers/build.sh b/developer/src/common/web/test-helpers/build.sh index f7b9bb49b0..81042fff19 100755 --- a/developer/src/common/web/test-helpers/build.sh +++ b/developer/src/common/web/test-helpers/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/common/web/utils/build.sh b/developer/src/common/web/utils/build.sh index 4bd0885dcf..a8f6a1585f 100755 --- a/developer/src/common/web/utils/build.sh +++ b/developer/src/common/web/utils/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/inst/build.sh b/developer/src/inst/build.sh index be26678e5c..8b37048e1e 100755 --- a/developer/src/inst/build.sh +++ b/developer/src/inst/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE source "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmanalyze/build.sh b/developer/src/kmanalyze/build.sh index ecd9fd263f..a72381557f 100755 --- a/developer/src/kmanalyze/build.sh +++ b/developer/src/kmanalyze/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Legacy keyboard source analysis tool" \ diff --git a/developer/src/kmc-analyze/build.sh b/developer/src/kmc-analyze/build.sh index 1d069b3b81..4c09fabb43 100755 --- a/developer/src/kmc-analyze/build.sh +++ b/developer/src/kmc-analyze/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-copy/build.sh b/developer/src/kmc-copy/build.sh index a5f8febdc1..9dd7d3d2e2 100755 --- a/developer/src/kmc-copy/build.sh +++ b/developer/src/kmc-copy/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-generate/build.sh b/developer/src/kmc-generate/build.sh index 6b790ad3ff..ca8b9615f4 100755 --- a/developer/src/kmc-generate/build.sh +++ b/developer/src/kmc-generate/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-keyboard-info/build.sh b/developer/src/kmc-keyboard-info/build.sh index 5d41665e5f..7eaac99c02 100755 --- a/developer/src/kmc-keyboard-info/build.sh +++ b/developer/src/kmc-keyboard-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-kmn/build.sh b/developer/src/kmc-kmn/build.sh index 7ff15520b5..dc33cfd9c1 100755 --- a/developer/src/kmc-kmn/build.sh +++ b/developer/src/kmc-kmn/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-ldml/build.sh b/developer/src/kmc-ldml/build.sh index e1b879f438..7f9ff0ad15 100755 --- a/developer/src/kmc-ldml/build.sh +++ b/developer/src/kmc-ldml/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-model-info/build.sh b/developer/src/kmc-model-info/build.sh index 21cd3e52f5..60c1d23b0b 100755 --- a/developer/src/kmc-model-info/build.sh +++ b/developer/src/kmc-model-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-model/build.sh b/developer/src/kmc-model/build.sh index 53f7b44b12..550bb8a302 100755 --- a/developer/src/kmc-model/build.sh +++ b/developer/src/kmc-model/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc-package/build.sh b/developer/src/kmc-package/build.sh index 93ba6c4ade..1e260c7b3e 100755 --- a/developer/src/kmc-package/build.sh +++ b/developer/src/kmc-package/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmc/build.sh b/developer/src/kmc/build.sh index 1fc897949a..0654bfd247 100755 --- a/developer/src/kmc/build.sh +++ b/developer/src/kmc/build.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" diff --git a/developer/src/kmc/test/command-line-tests.sh b/developer/src/kmc/test/command-line-tests.sh index c76a641376..41652bcdfd 100755 --- a/developer/src/kmc/test/command-line-tests.sh +++ b/developer/src/kmc/test/command-line-tests.sh @@ -5,7 +5,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # . "$KEYMAN_ROOT/resources/build/build-utils-ci.inc.sh" diff --git a/developer/src/kmcmplib/build.sh b/developer/src/kmcmplib/build.sh index 457f597f4c..952c0732b8 100755 --- a/developer/src/kmcmplib/build.sh +++ b/developer/src/kmcmplib/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/kmcmplib/tests/get-test-source.sh b/developer/src/kmcmplib/tests/get-test-source.sh index fe6cded2f1..af647ee311 100755 --- a/developer/src/kmcmplib/tests/get-test-source.sh +++ b/developer/src/kmcmplib/tests/get-test-source.sh @@ -3,7 +3,7 @@ # Finds all keyboards in the keyboards repo (passed in $1) that are valid source # keyboards (i.e. ///source/.kmn) # -# Called from meson.build, so this script does not use build-utils.sh. Do not run this +# Called from meson.build, so this script does not use builder-basic.inc.sh. Do not run this # script directly. # set -eu diff --git a/developer/src/kmcmplib/tests/prep.sh b/developer/src/kmcmplib/tests/prep.sh index 8ad9b81171..e00f2fc1fd 100755 --- a/developer/src/kmcmplib/tests/prep.sh +++ b/developer/src/kmcmplib/tests/prep.sh @@ -11,7 +11,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE cd "$THIS_SCRIPT_PATH" diff --git a/developer/src/kmconvert/build.sh b/developer/src/kmconvert/build.sh index 3ba94c21dc..e18977f05b 100755 --- a/developer/src/kmconvert/build.sh +++ b/developer/src/kmconvert/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Keyboard project generation and conversion tool" \ diff --git a/developer/src/kmdbrowserhost/build.sh b/developer/src/kmdbrowserhost/build.sh index 55e7ae8d14..8996b17bc4 100755 --- a/developer/src/kmdbrowserhost/build.sh +++ b/developer/src/kmdbrowserhost/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Chromium browser host process for Keyman Developer" \ diff --git a/developer/src/kmdecomp/build.sh b/developer/src/kmdecomp/build.sh index 494b8afde5..069e3e836a 100755 --- a/developer/src/kmdecomp/build.sh +++ b/developer/src/kmdecomp/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/samples/build.sh b/developer/src/samples/build.sh index 703a2691a8..c60602bf85 100755 --- a/developer/src/samples/build.sh +++ b/developer/src/samples/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/samples/imsample/build.sh b/developer/src/samples/imsample/build.sh index 2cdd11ac70..50447040ac 100755 --- a/developer/src/samples/imsample/build.sh +++ b/developer/src/samples/imsample/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/server/build.sh b/developer/src/server/build.sh index d2bd8575dd..bd19066948 100755 --- a/developer/src/server/build.sh +++ b/developer/src/server/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/build/utils.inc.sh" diff --git a/developer/src/server/src/version-data.ts b/developer/src/server/src/version-data.ts index 05f266c5c6..a082a65170 100644 --- a/developer/src/server/src/version-data.ts +++ b/developer/src/server/src/version-data.ts @@ -1,5 +1,5 @@ /* - Version information from build-utils.sh: + Version information from builder-basic.inc.sh: # KEYMAN_VERSION: Full current build version, e.g. "14.0.1" # [KEYMAN_VERSION_WIN: Full current build version for Windows, e.g. "14.0.1.0"] diff --git a/developer/src/setup/build.sh b/developer/src/setup/build.sh index ef84122fdb..1e4ab94a68 100755 --- a/developer/src/setup/build.sh +++ b/developer/src/setup/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/test/auto/build.sh b/developer/src/test/auto/build.sh index 043711e752..a2bca0e0dd 100755 --- a/developer/src/test/auto/build.sh +++ b/developer/src/test/auto/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/test/auto/compile-supplementary-support/build.sh b/developer/src/test/auto/compile-supplementary-support/build.sh index b004605b1d..4f8acf40a9 100755 --- a/developer/src/test/auto/compile-supplementary-support/build.sh +++ b/developer/src/test/auto/compile-supplementary-support/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "test if KS=1 is in the right files, both in debug and non-debug versions" clean configure build test diff --git a/developer/src/test/auto/keyboard-js-info/build.sh b/developer/src/test/auto/keyboard-js-info/build.sh index 0a19929f4b..7bbf417681 100755 --- a/developer/src/test/auto/keyboard-js-info/build.sh +++ b/developer/src/test/auto/keyboard-js-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test the read of basic keyboard info info from js files" clean configure build test diff --git a/developer/src/test/auto/kmcomp/build.sh b/developer/src/test/auto/kmcomp/build.sh index 7239010b06..8bfcd69149 100755 --- a/developer/src/test/auto/kmcomp/build.sh +++ b/developer/src/test/auto/kmcomp/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test that kmc passes various compile tests" clean configure build test diff --git a/developer/src/test/auto/kmx-file-languages/build.sh b/developer/src/test/auto/kmx-file-languages/build.sh index 58ae1492ef..9bf1821450 100755 --- a/developer/src/test/auto/kmx-file-languages/build.sh +++ b/developer/src/test/auto/kmx-file-languages/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test the read of language info from kmx files and translation from legacy ids to BCP47" clean configure build test diff --git a/developer/src/test/auto/model-ts-parser/build.sh b/developer/src/test/auto/model-ts-parser/build.sh index eaf5bb4819..e4e2208e56 100755 --- a/developer/src/test/auto/model-ts-parser/build.sh +++ b/developer/src/test/auto/model-ts-parser/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test lexical model parser" clean configure build test diff --git a/developer/src/test/auto/package-info/build.sh b/developer/src/test/auto/package-info/build.sh index e67366b26e..32f9fbbbc4 100755 --- a/developer/src/test/auto/package-info/build.sh +++ b/developer/src/test/auto/package-info/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Test lexical model parser" clean configure build test diff --git a/developer/src/test/build.sh b/developer/src/test/build.sh index 48f3e69ac5..6546dbf752 100755 --- a/developer/src/test/build.sh +++ b/developer/src/test/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe \ diff --git a/developer/src/tike/build.sh b/developer/src/tike/build.sh index b06fd1f847..0ba6c98642 100755 --- a/developer/src/tike/build.sh +++ b/developer/src/tike/build.sh @@ -2,7 +2,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE builder_describe "Build Keyman Developer IDE" \ diff --git a/developer/src/tools/sentry-upload-difs.sh b/developer/src/tools/sentry-upload-difs.sh index 34ab4c60b0..b45387ec3e 100755 --- a/developer/src/tools/sentry-upload-difs.sh +++ b/developer/src/tools/sentry-upload-difs.sh @@ -14,7 +14,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/build-utils.sh" +. "${THIS_SCRIPT%/*}/../../../resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE cd "$KEYMAN_ROOT/developer" diff --git a/docs/builder.md b/docs/builder.md index 18272accd0..66815c6325 100644 --- a/docs/builder.md +++ b/docs/builder.md @@ -1,4 +1,4 @@ -# Using the build-utils.sh builder functions +# Using the builder-basic.inc.sh builder functions The Keyman repository is standardising on bash scripts for builds. These may call project-specific builders, such as `tsc` for Typescript projects, `meson` @@ -43,7 +43,7 @@ set -eu ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "$(dirname "$THIS_SCRIPT")//resources/build/build-utils.sh" +. "$(dirname "$THIS_SCRIPT")//resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE # . "$KEYMAN_ROOT/.../foo.inc.sh" # any other includes, such as jq.inc.sh @@ -78,7 +78,7 @@ Builder scripts will inherit `set -eu` from builder.inc.sh: ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "$(dirname "$THIS_SCRIPT")//resources/build/build-utils.sh" +. "$(dirname "$THIS_SCRIPT")//resources/build/builder-basic.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE ``` @@ -100,7 +100,7 @@ search-and-replace) this section in the future as required. ## Any other includes -Once `build-utils.sh` has been included, the variable `$KEYMAN_ROOT` will be +Once `builder-basic.inc.sh` has been included, the variable `$KEYMAN_ROOT` will be available, so other include scripts should be sourced accordingly, for example: ```bash @@ -114,7 +114,7 @@ to `cd` at the start of your script. ## Standard environment -`build-utils.sh` will prepend `$KEYMAN_ROOT/node_modules/.bin` to the `PATH` +`builder-basic.inc.sh` will prepend `$KEYMAN_ROOT/node_modules/.bin` to the `PATH` variable to ensure that we run the correct versions of npm package commands, so there is no need to hard-code path references or add script wrappers to package.json (`npm run