Commit graph

12 commits

Author SHA1 Message Date
Eberhard Beilharz
0f9d4e488a
Merge pull request #14347 from keymanapp/maint/linux/13464_emscripten
If the `$EMSCRIPTEN_BASE` dir is missing (which usually points to `emsdk/upstream/emscripten`), but we have the `emsdk` root directory with `emsdk/emsdk`, we can have everything we need to install the desired emscripten version.

Issue #13464 describes an error where the `upstream/emscripten` directory was missing - probably because the build got interrupted while installing emscripten. This change fixes this.

Fixes: #13464
2025-07-23 16:15:13 +02:00
Eberhard Beilharz
e634f20313
maint(linux): fix locate_emscripten if $EMSCRIPTEN_BASE dir missing
If the `$EMSCRIPTEN_BASE` dir is missing (which usually points to
`emsdk/upstream/emscripten`), but we have the `emsdk` root directory
with `emsdk/emsdk`, we can have everything we need to install the
desired emscripten version.

Issue #13464 describes an error where the `upstream/emscripten` directory
was missing - probably because the build got interrupted while installing
emscripten. This change fixes this.

Fixes: #13464
Test-bot: skip
2025-07-11 21:37:26 +02:00
Eberhard Beilharz
3b136fcec9
maint(common): consolidate functions to determine OS
- add `builder_is_windows`, `builder_is_macos` and `builder_is_linux`
  functions
- add/move `BUILDER_OS` env variable to `resources/builder.inc.sh`
- use the new functions and env variable

Fixes: #14109
Test-bot: skip
2025-07-09 18:33:09 +02:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Eberhard Beilharz
ef4f829737
chore(common): add offline support for emscripten
This change allows to build with emscripten if offline (when
passing the `--offline` parameter). Previously this failed because
as part of locating emscripten we try to pull the latest repo
version and install the desired emscripten version. With this change
when `--offline` is specified we try to use the currently installed
version of emsdk. If it isn't installed or if the wrong version
is installed we will fail the build.
2024-11-28 14:21:17 +01:00
Eberhard Beilharz
4540a501f6
docs(common): mention KEYMAN_USE_NVM in minimum versions doc
Also fix a typo in a comment in a script file.
2024-09-30 16:03:03 +02:00
Marc Durdin
47b952f960 chore(common): npm install should be in emscripten folder 2024-08-23 07:10:48 +02:00
Marc Durdin
d461c4872a chore(common): use npm install in emsdk update 2024-08-23 07:04:54 +02:00
Marc Durdin
b0bd95d276 chore(common): allow build agents to automatically select emsdk version
The build agents will now automatically install and activate the
Emscripten version found in minimum-versions.inc.sh when configuring
WASM projects. For developer machines, this behaviour can be enabled by
setting the environment variable `KEYMAN_USE_EMSDK` (recommended).

This will be back-ported to 17.0 so that we can ensure that all builds
use a consistent Emscripten version.
2024-08-21 15:02:18 +02:00
Eberhard Beilharz
ab3722ecfa
fix(core): look for emcc instead of emcc.py on Linux and Mac
`emcc.py` is not marked as executable in emcripten's git repo so the
build failed when trying to locate emscripten. However, it turns out
that `emcc` is marked as executable, so we use that instead.

On Windows however, we still need to use `emcc.py` because otherwise
Meson won't detect it as valid compiler.
2024-08-20 15:52:52 +02:00
Steven R. Loomis
afd0eb172c fix(common): give warning if emcc.py is present but not executable
- change the common emscripten locator to warn if $EMCC  or $EMSCRIPTEN_BASE/emcc.py is present but not executable
- emscripten v3.1.50 via homebrew seems to be not executable
2023-12-20 18:25:53 -06:00
Marc Durdin
044a14f1d9 chore(core): look for emcc.py, not emcc
Relates to #8913.
2023-06-06 07:07:07 +07:00