spiegel-keyman/developer/server/postbuild.sh
Marc Durdin 0d4a6e428a fix(windows): base layout support in Keyman Core
While Keyman Core already supported the base layout flags, they were not
being passed in from Keyman Engine for Windows. This meant that any
rules that used `baselayout` would fail, such as in sil_ipa with AltGr+0
for }

0bf72bed74/release/sil/sil_ipa/source/sil_ipa.kmn (L348-L350)

This patch adds support for the following properties:

* KM_KBP_KMX_ENV_BASELAYOUT: the legacy base layout name, e.g. kbdus.dll
* KM_KBP_KMX_ENV_BASELAYOUTALT: the BCP 47 base layout name, e.g. en-US
* KM_KBP_KMX_ENV_SIMULATEALTGR: whether the user has selected to emulate
  AltGr with Ctrl+Alt, for example on laptops without a right alt key.
* KM_KBP_KMX_ENV_BASELAYOUTGIVESCTRLRALTFORRALT: whether the system base
  layout in use generates Ctrl+RAlt when RAlt is pressed, which can be
  true for many European system layouts. This is necessary when
  associating the keyboard with a European language because the base
  keyboard becomes the language's default keyboard, rather than kbdus.
2022-11-14 12:27:04 +11:00

24 lines
850 B
Bash
Executable file

#!/bin/bash
#
# postbuild script run by npm during/after a build
#
# Exit on command failure and when using unset variables:
set -eu
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
. "$(dirname "$THIS_SCRIPT")/../../resources/build/build-utils.sh"
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
## END STANDARD BUILD SCRIPT INCLUDE
LOCAL_ROOT="$(dirname "$THIS_SCRIPT")"
mkdir -p "$LOCAL_ROOT/dist/site/"
mkdir -p "$LOCAL_ROOT/dist/win32/"
cp -r "$LOCAL_ROOT/src/site/"** "$LOCAL_ROOT/dist/site/"
cp -r "$LOCAL_ROOT/src/win32/"** "$LOCAL_ROOT/dist/win32/"
replaceVersionStrings "$LOCAL_ROOT/dist/site/lib/sentry/init.js.in" "$LOCAL_ROOT/dist/site/lib/sentry/init.js"
rm "$LOCAL_ROOT/dist/site/lib/sentry/init.js.in"