Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix/android/arrows-…
Browse files Browse the repository at this point in the history
…longpress-menu
  • Loading branch information
darcywong00 committed Aug 22, 2024
2 parents 10f46f3 + 62babbb commit 7e95bfb
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
10 changes: 10 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Keyman Version History

## 18.0.94 alpha 2024-08-21

* fix(core): look for `emcc` instead of `emcc.py` (#12235)
* fix(web): improve tokenization output when wordbreaker breaks spec for span properties in output (#12229)
* chore(android): Use RTL-aware alignment and padding for layouts (#12225)
* fix(web): disable fat-finger data use when mayCorrect = false (#12220)
* fix(android): Auto-mirror back and forward arrows for RTL support (#12227)
* feat(android): Add localization for Arabic (#12228)
* fix(android): Auto-mirror increment and decrement arrows for RTL support (#12230)

## 18.0.93 alpha 2024-08-20

* (#12188)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.94
18.0.95
7 changes: 7 additions & 0 deletions developer/src/kmcmplib/src/CompilerInterfacesWasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,16 @@ struct BindingType<std::vector<T, Allocator>> {
using ValBinding = BindingType<val>;
using WireType = ValBinding::WireType;

#if __EMSCRIPTEN_major__ == 3 && __EMSCRIPTEN_minor__ == 1 && __EMSCRIPTEN_tiny__ >= 60
// emscripten-core/emscripten#21692
static WireType toWireType(const std::vector<T, Allocator> &vec, rvp::default_tag) {
return ValBinding::toWireType(val::array(vec), rvp::default_tag{});
}
#else
static WireType toWireType(const std::vector<T, Allocator> &vec) {
return ValBinding::toWireType(val::array(vec));
}
#endif

static std::vector<T, Allocator> fromWireType(WireType value) {
return vecFromJSArray<T>(ValBinding::fromWireType(value));
Expand Down
3 changes: 1 addition & 2 deletions resources/build/minimum-versions.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ KEYMAN_MIN_TARGET_VERSION_CHROME=95.0 # Final version that runs on Andro
# Dependency versions
KEYMAN_MIN_VERSION_NODE_MAJOR=20 # node version source of truth is /package.json:/engines/node
KEYMAN_MIN_VERSION_NPM=10.5.1 # 10.5.0 has bug, discussed in #10350
KEYMAN_MIN_VERSION_EMSCRIPTEN=3.1.44 # Warning: 3.1.45 is bad (#9529); newer versions work
KEYMAN_MAX_VERSION_EMSCRIPTEN=3.1.58 # See #9529
KEYMAN_MIN_VERSION_EMSCRIPTEN=3.1.58 # Use KEYMAN_USE_EMSDK to automatically update to this version
KEYMAN_MIN_VERSION_VISUAL_STUDIO=2019
KEYMAN_MIN_VERSION_MESON=1.0.0

Expand Down
36 changes: 36 additions & 0 deletions resources/locate_emscripten.inc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# shellcheck shell=bash
# no hashbang for .inc.sh

. "$KEYMAN_ROOT/resources/build/minimum-versions.inc.sh"

#
# We don't want to rely on emcc being on the path, because Emscripten puts far
# too many things onto the path (in particular for us, node).
Expand Down Expand Up @@ -34,4 +36,38 @@ locate_emscripten() {
fi
[[ -f ${EMSCRIPTEN_BASE}/${EMCC_EXECUTABLE} && ! -x ${EMSCRIPTEN_BASE}/${EMCC_EXECUTABLE} ]] && builder_die "locate_emscripten: Variable EMSCRIPTEN_BASE ($EMSCRIPTEN_BASE) contains ${EMCC_EXECUTABLE} but it is not executable"
[[ -x ${EMSCRIPTEN_BASE}/${EMCC_EXECUTABLE} ]] || builder_die "locate_emscripten: Variable EMSCRIPTEN_BASE ($EMSCRIPTEN_BASE) does not point to ${EMCC_EXECUTABLE}'s folder"

verify_emscripten_version
}

# Ensure that we use correct version of emsdk on build agents.
# For developers, define KEYMAN_USE_SDK to do this on your
# build machine.
verify_emscripten_version() {
if [[ "$VERSION_ENVIRONMENT" != local || ! -z "${KEYMAN_USE_EMSDK+x}" ]]; then
_select_emscripten_version_with_emsdk
fi
}

# Use emsdk to select the appropriate version of Emscripten
# according to minimum-versions.inc.sh
_select_emscripten_version_with_emsdk() {
if [[ -z "${EMSCRIPTEN_BASE+x}" ]]; then
builder_die "Variable EMSCRIPTEN_BASE must be set"
fi

if [[ -z "${KEYMAN_MIN_VERSION_EMSCRIPTEN+x}" ]]; then
builder_die "Variable KEYMAN_MIN_VERSION_EMSCRIPTEN must be set"
fi

pushd "${EMSCRIPTEN_BASE}/../.." > /dev/null
if [[ ! -f emsdk ]]; then
builder_die "emsdk[.bat] should be in $(pwd)"
fi

export EMSDK_KEEP_DOWNLOADS=1
git pull
./emsdk install "$KEYMAN_MIN_VERSION_EMSCRIPTEN"
./emsdk activate "$KEYMAN_MIN_VERSION_EMSCRIPTEN"
popd > /dev/null
}

0 comments on commit 7e95bfb

Please sign in to comment.