Commit graph

68 commits

Author SHA1 Message Date
rc-swag
ad34a44c9f chore(windows): Merge branch 'epic/win-arm' into feat/windows/11905/keymanx64-keymanarm64 2025-11-21 18:36:13 +10:00
rc-swag
c9753f6ba2 feat(windows): handle arch type in build.bat skip build.sh
Add a host check for build.bat and run the architecture tests
that match the host. for the meson builds from build.h
for now just skip the arm64 tests.
2025-11-19 11:50:57 +10:00
Eberhard Beilharz
2d8a4aeebc
maint(core): fix option defaults for Meson >= 1.1
Meson 1.1 changed the name of the options file from `meson_options.txt`
to `meson.options`. Currently we're stuck with Meson 1.0 as minimum
Meson version because we still support Ubuntu 22.04 Jammy, but on some
machines a newer version of meson gets installed which causes the
options to be ignored.

The first attempt to simply symlink or copy `meson_options.txt` to
`meson.options` failed because git on Windows doesn't support symlinks
by default, and Meson complains if it finds two options files (#15127).

Fortunately not having an options file is only a problem for Core where
we have one option in the options file that defaults to true. The solution
implemented in this change is to always pass the option to Meson.

Test-bot: skip
2025-11-10 15:24:46 +01:00
rc-swag
1340c4f9e5 feat(windows): add arm64 to wxs and core build
Add cross-arm64 and cross-x64 build
Add the arm64 binaries to the wxs installers with guids
update build.sh files
2025-10-14 16:00:40 +10:00
rc-swag
5ac167977b Merge branch 'epic/win-arm' into feat/windows/11905/keymanx64-keymanarm64 2025-10-01 14:11:23 +10:00
Marc Durdin
f394245636 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
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 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
2025-08-02 06:58:40 +10:00
rc-swag
99d9d68e66 Initial addition of arm64 configuration 2025-07-31 16:30:23 +10:00
Eberhard Beilharz
ee93d0d27a
maint(linux): add --no-werror option to not report warnings as errors
By default we add the `--werror` option to meson builds. This might cause
problems when compiling with a different compiler, so this option adds
the `--no-werror` option to our build scripts. This enables integrators
to compile with other compiler versions.

Fixes: #13970
Test-bot: skip
2025-05-20 09:01:22 +02:00
Marc Durdin
9d2db4faf3 maint(common): consolidate standard.meson.build configuration
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
2025-04-30 09:16:43 +07:00
Marc Durdin
f8917d2454 maint(common): cleanup meson versioning
* Adds `VERSION_WITH_TAG` variable to standard.meson.build
* Consistently uses `file('VERSION.md')` to retrieve version number

Note that VERSION_WITH_TAG is not yet used but should be used for
version tagged files later.
2025-04-30 08:23:05 +07:00
Marc Durdin
3cdaa2fee0 chore(core): add clean actions for :mac and :win targets
Fixes: #13381
2025-03-10 07:53:32 +07:00
Marc Durdin
d83454ab77 chore(windows): ensure dependencies for keyman32 exclude core:wasm
Fixes: #13374
2025-02-28 17:52:27 +01:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Steven R. Loomis
2913ba45a8 fix(common): dx: don't call exit(0) on failure 🙀
- always use std::exit(EXIT_FAILURE) if there is an error.
- use --print-errorlogs with meson to show errors to the log

Fixes: #10004
2023-11-14 07:16:32 -06:00
Marc Durdin
0e44cfdcaf
Merge pull request #9820 from keymanapp/fix/core/9816-build-test-params
fix(core): build: support -t parameter correctly
2023-10-28 17:50:05 +11:00
Marc Durdin
835e29363e fix(core): build: support -t parameter correctly
Now allows any of the following. Quote marks are significant for
multiple tests with `-t`:

```bash
core/build.sh test:wasm --no-deps -- state-api debug-api
core/build.sh test:wasm --no-deps -- "state-api debug-api"
core/build.sh test:wasm --no-deps -t "state-api debug-api"
core/build.sh test:wasm --no-deps --test "state-api debug-api"
```

The `-t` / `--test` option takes a single string parameter which is
passed on to `meson test`, whereas the `--` "end of parameters" marker
allows arbitrary remaining parameters to be passed on to `meson test`.
2023-10-22 07:16:52 +07:00
Eberhard Beilharz
52bb859817
chore(linux): Rename (lib)kmnkbp to (lib)keymancore 2023-10-19 10:35:09 +02:00
Marc Durdin
062b947363 chore: Merge branch 'feature-kmcompx' into chore/merge-master-into-feature-kmcompx-a17s9 2023-03-23 10:08:59 +07:00
Marc Durdin
549a8e009e chore(common): define BUILDER_CONFIGURATION env var 2023-03-23 09:21:55 +07:00
Marc Durdin
d1c8061b5f chore: Merge branch 'feature-kmcompx' into chore/merge-master-into-kmcompx 2023-03-16 12:29:17 +07:00
Marc Durdin
92ed99c4d6 chore(common): build script performance improvements
Improves build script performance by:
* using built-ins wherever possible (e.g. string splitting)
* eliminating redundant code
* using absolute (to $KEYMAN_ROOT) rather than relative paths to avoid realpath
* removing unnecessary `npm run` calls

BEFORE                         | AFTER
-------------------------------|----------------------
time ./core/build.sh --help    |
real    0m2.116s               | real    0m0.874s
user    0m0.578s               | user    0m0.198s
sys     0m0.984s               | sys     0m0.289s
-------------------------------|----------------------
time ./web/build.sh --help     |
real    0m3.523s               | real    0m0.757s
user    0m1.166s               | user    0m0.320s
sys     0m2.273s               | sys     0m0.455s
-------------------------------|----------------------
time ./web/build.sh -d         |
real    1m34.750s              | real    0m59.974s
user    0m9.721s               | user    0m6.284s
sys     0m19.652s              | sys     0m13.202s

@keymanapp-test-bot skip
2023-03-13 07:18:09 +07:00
Marc Durdin
732e622b3f
Merge branch 'master' into chore/core/8395-breadth-first-build 2023-03-10 09:22:09 +11:00
Eberhard Beilharz
d0ec73825a
Merge pull request #8376 from keymanapp/chore/core/obsoleteOption
chore(core): Remove obsolete `--target-path` option
2023-03-09 16:27:23 +01:00
Marc Durdin
d7111eeaa1 chore(core): breadth-first build
Fixes #8395 for core.
2023-03-09 12:50:12 +07:00
Marc Durdin
691dc8e618 chore(core): split flags into standard.meson.build 2023-03-09 11:34:54 +07:00
Marc Durdin
8251ec861a chore: cleanup additional --debug references 2023-03-08 05:46:32 +07:00
Marc Durdin
00017350d3 chore(common): clean up --debug usage in build scripts
Fixes #8373.

Note that the core functionality requested in #8373 is already in place;
this commit just does some cleanup to make this easier to maintain in
the future:

* Uses `builder_is_debug_build` function to test for debug build
  (instead of `builder_has_option --debug`, which would also work but
  using the other function avoids typo issues with the option name).

* Renames `$_builder_debug` to `$_builder_debug_internal` to reduce
  naming confusion

* Documents `$builder_debug`, `builder_is_debug_build`, and clarifies
  usage of `--debug` option.

* Logs command line for dep builds (we could hide this in the future,
  but it certainly doesn't hurt for now!)
2023-03-08 05:40:40 +07:00
Eberhard Beilharz
794557f7d5
chore(core): Remove obsolete --target-path option
Linux package builds no longer require a different target path, so
we can remove the `--target-path` parameter.
2023-03-07 13:38:31 +01:00
Marc Durdin
3c175bfc63 feat(core): run tests for current arch 2023-03-01 13:41:23 +07:00
Marc Durdin
e85bbaa069 feat(core): build both archs for mac 2023-03-01 13:02:48 +07:00
Marc Durdin
78f18c38ee feat(core): mac fat library -- testing 2023-03-01 11:00:15 +07:00
Marc Durdin
38603e8421
Merge pull request #8279 from keymanapp/chore/core/cleanup-meson-build
chore(core): cleanup meson build
2023-02-23 13:28:02 +11:00
Marc Durdin
9eb472579c chore: Merge branch 'feature-ldml' into chore/merge-master-to-feature-ldml-A17S7-2 2023-02-23 08:05:31 +07:00
Marc Durdin
b968bcfdfd
Merge branch 'feature-ldml' into chore/core/cleanup-meson-build 2023-02-23 08:49:56 +11:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Marc Durdin
84d1446cb7 chore(core): update os_id to BUILDER_OS 2023-02-22 09:08:15 +07:00
Marc Durdin
e645b8665f chore: Merge branch 'feature-ldml' into chore/A17S7-master-to-feature-ldml
* core/build.sh -- accept feature-ldml changes (remove call to get_builder_OS)
* developer/src/kmlmc/build.sh -- delete file
*	linux/debian/rules -- accept master changes, fixup call to core/build.sh
*	linux/ibus-keyman/tests/Makefile.am -- accept master changes, fixup call to core/build.sh
*	linux/scripts/build.sh -- accept master changes, fixup call to core/build.sh
*	linux/scripts/reconf.sh -- accept master changes
2023-02-22 08:00:08 +07:00
Marc Durdin
21af2c1234 chore(core): restore bat wrapper for vc++ build 2023-02-21 21:49:19 +07:00
Marc Durdin
29ddeeb67b chore(core): remove cl from path before build, build static lib 2023-02-21 13:11:31 +07:00
Marc Durdin
d74b08f37c chore(core): handle meson version 0.53.2 2023-02-21 12:41:44 +07:00
Marc Durdin
19101c6a2a chore(core): cleanup meson build
This updates our meson min version on Windows to 1.0, which means that
we can avoid having Visual Studio on the path, as meson can find it
anyway. With this change, we can eliminate the batch-wrapper for the
build, significantly improving build performance and simplifying the
scripts.

This also adds a change to disable tests for dependency builds of core,
along with the `--no-tests` command line option for doing builds without
tests.

Minor cleanup includes eliminating various warnings from meson.build
files, and standardizing WASM cross-platform build options for Windows.
2023-02-21 12:12:28 +07:00
Eberhard Beilharz
33ed91e970
chore(linux): Merge branch 'master' into chore/linux/5981_addBuild.sh 2023-02-20 09:54:05 +01:00
Marc Durdin
a004978863 chore: use builder_heading, remove echo_heading 2023-02-20 09:17:51 +07:00
Marc Durdin
4d53a277f3 chore: use builder_die, remove fail 2023-02-20 09:15:38 +07:00
Marc Durdin
8f5997a3e6 chore: rename os_id to BUILDER_OS 2023-02-20 08:44:03 +07:00
Eberhard Beilharz
3dbdef651d
chore(linux): Add build.sh to ibus-keyman 2023-02-01 08:49:26 +01:00
Marc Durdin
cbb15b2cb9 chore(core): tweak scripts 2022-10-14 16:32:57 +11:00