Commit graph

413 commits

Author SHA1 Message Date
Eberhard Beilharz
248f01f1e3
chore(linux): change SIL International to SIL Global 2024-12-10 10:26:44 +01:00
Marc Durdin
9a01ac166d chore(core): Merge branch 'master' into fix/core/12619-disable-assertions-vcwin-release-build 2024-12-01 16:17:21 +07:00
Eberhard Beilharz
b8c120dd5c
Merge pull request #12721 from keymanapp/chore/core/cherry-pick/load-from-blob-api
feat(core,linux,developer,windows): implement loading KMX from blob 🍒
2024-11-29 12:40:51 +01:00
Marc Durdin
ffae5bab1c chore(core): typo in meson 2024-11-28 11:56:50 +07:00
Marc Durdin
faf479c105 chore(linux): include common test source files 2024-11-28 10:54:01 +07:00
Eberhard Beilharz
767d7c65be
fix(linux): disable assertions in release builds
This change uses the G_DISABLE_ASSERT flag to disable assertions
for release builds.

See https://docs.gtk.org/glib/func.assert.html
2024-11-27 18:04:35 +01:00
Eberhard Beilharz
8492b12fdb
feat(linux): use new km_core_keyboard_load_from_blob API method
Fixes: #12498
Cherry-pick: #12683
2024-11-27 16:16:36 +01:00
Eberhard Beilharz
4a852c9522
chore(linux): rename test files
This change rename the test files for Linux according to the discussion
at the Keyman conference in November 2024.

Python is pretty opinionated about the naming of files, so we have to
use `*_tests.py` as test filename instead of the usual `*.tests.py`.
2024-11-26 19:06:02 +01:00
Eberhard Beilharz
07a2cb5bad
Merge pull request #11852 from keymanapp/feat/linux/7697_SimulateAltGr
feat(linux): implement Linux side of SimulateAltGr option 🏁
2024-06-26 12:34:08 +02:00
Eberhard Beilharz
bcc09b78c8
chore(linux): use shared meson config
Fixes: #8406
2024-06-24 19:08:12 +02:00
Eberhard Beilharz
3169cc0fa5
feat(linux): implement engine side of SimulateAltGr option
- read value from dconf
- set up Core environment
- if dconf value changes re-create the Core environment

Fixes: #7697
2024-06-21 18:27:06 +02:00
Eberhard Beilharz
d93fb6aa0b
refactor(linux): rename methods that deal with keyboard options
This renames the existing methods that read and write keyboard options
so that it's visible from the name that they read/write keyboard options.
This is in preparation of new methods that read and write more general
options.
2024-06-21 18:22:29 +02:00
Eberhard Beilharz
1e67022a44
change(linux): restart ibus only when manually running tests
If we try to restart ibus when we run the tests as part of a build we
run into a timeout in the test teardown.
2024-06-14 15:37:43 +02:00
Eberhard Beilharz
407cfa8f33
chore(linux): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-06-14 15:09:13 +02:00
Eberhard Beilharz
b93c459515
fix(linux): restart ibus after manual integration test run
Previously keyboard input was no longer input after manually running
the integration tests. This change fixes this by restarting ibus after
the tests. However, we only want to do that if the ibus instance we
started for the tests got killed. The cleanup script might get called
multiple times, so we need this check.
2024-06-13 17:50:41 +02:00
Marc Durdin
900f248558 chore(common): cleanup meson deprecations and warnings
Most warnings have been cleaned up:

* min meson version is now 1.0
* additional parameters such as check, recursive added
* uses now global_source_root() instead of source_root()
* catting files on Windows wasn't actually working -- used in unit
  tests. This is because meson passes paths with forward slashes to
  cmd.exe `type` command, which doesn't understand them. This is bad,
  because we were running effectively null tests for the affected tests.
  Fortunately, the same tests were configured correctly on macOS and
  Linux, and were all passing, so no serious damage.

There is one significant warning left:

`WARNING: Project targets '>=1.0' but uses feature deprecated since
'0.64.0': copy arg in configure_file. Use fs.copyfile instead`

Refer to mesonbuild/meson#12792. I have opened a PR against that to
undeprecate `copy` kwarg in a future version of meson.

Fixes: #8399
2024-05-24 08:46:52 +07:00
Steven R. Loomis
1fe76bcd26
Merge branch 'master' into chore/core/11033-points-not-units 2024-05-07 09:26:07 -05:00
Steven R. Loomis
6706ae0957 chore(core): km_core_cp -> km_core_cu
- km_core_cp represents a 16 bit code unit, not a code point.

Fixes: #11033
2024-05-02 17:39:15 -05: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
Eberhard Beilharz
a08fbd1346
fix(linux): Ignore keys with IBUS_MOD4_MASK set
If we process keys that have the (Super/Meta/Windows) IBUS_MOD4_MASK
modifier set we ignore the key. Core doesn't handle the Meta modifier
state and so would treat it as regular key. This fixes switching keyboards
in Ubuntu 23.10/24.04 on Wayland.

Fixes #10476.
2024-02-07 18:14:05 +01:00
Marc Durdin
70ba1d1c1e
Merge branch 'chore/core/10520-hide-old-action-apis' into fix/core/10582-km_core_state_get_actions-idempotency 2024-02-05 13:44:47 +11:00
Marc Durdin
8156a8b19d
Merge pull request #10576 from keymanapp/fix/linux/9593_version-comparison
fix(linux): Fix version comparison
2024-02-02 09:47:37 +11:00
Eberhard Beilharz
13eb1002ae
refactor(linux): Deal with invalid version numbers 2024-02-01 17:26:38 +01:00
Eberhard Beilharz
df24cfda0a
chore(linux): Use correct format specifier for g_utf8_strlen
The package build on armhf failed because of the wrong format specifier
which expects a `size_t` instead of `glong` that `g_utf8_strlen` returns.
2024-02-01 16:51:10 +01:00
Eberhard Beilharz
f3efb244dc chore(linux): Adjust test expectations for ICU >= 73
ICU 73 comes with CLDR 43 which contains various corrections. This means
that we get different results when we minimize `bmf-Latn`. This change
sets the test expectations based on the ICU version and so allows tests
to pass on Ubuntu 24.04 which comes with ICU 74.
2024-02-01 14:55:36 +07:00
Marc Durdin
1b88ab99be fix(core): make km_core_state_get_actions() idempotent
Fixes #10582.

Returned struct from the `km_core_state_get_actions()` API is now owned
by the state object. This is a change in API contract. The corresponding
`km_core_actions_dispose()` API has been made private, because there is
never any need for API consumers to call it. As this change is happening
in alpha, we won't bump the ABI version.

`state->app_context` is now guaranteed to be in sync with
`state->context` after `km_core_process_event()`, with the actions
struct populated at that point.

The next and final step in this refactor is to remove the actions queue
altogether from the Core and make that a kmn-only concept, but that will
wait until 18.0. The only consumers of the actions queue are the
kmn-specific interactive debugger in Keyman Developer, and kmn-specific
Input Method eXtensions in Keyman Engine for Windows.
2024-02-01 11:28:08 +07:00
Eberhard Beilharz
02008dc585
fix(linux): Fix version comparison
Implement proper comparison of versions so that 1.10 is newer than 1.9.

Fixes #9593.
2024-01-31 14:47:35 +01:00
Eberhard Beilharz
6d5accdaa4
chore(linux): Adjust test expectations for ICU >= 73
ICU 73 comes with CLDR 43 which contains various corrections. This means
that we get different results when we minimize `bmf-Latn`. This change
sets the test expectations based on the ICU version and so allows tests
to pass on Ubuntu 24.04 which comes with ICU 74.
2024-01-31 12:05:14 +01:00
Marc Durdin
f546c44048
Merge pull request #10390 from keymanapp/epic/core/9999-normalization
epic: Keyman Core normalization 🌱
2024-01-31 10:45:51 +11:00
Eberhard Beilharz
60746e02d0
chore(core): Fix compilation error 2024-01-29 18:00:14 +01:00
Eberhard Beilharz
6b5b44eddd
fix(linux): Fix packaging on Ubuntu and Debian servers
When building packages warnings are treated as errors. When building on
Ubuntu and Debian servers we don't have a patched ibus version but still
want to build the packages. So this change outputs a message instead of
a warning when building packages.
2024-01-29 17:50:04 +01:00
Eberhard Beilharz
a79e64b02d
chore(linux): Add more debug output 2024-01-25 20:02:22 +01:00
Eberhard Beilharz
c713cd02cc
refactor(linux): address code review comments 2024-01-24 14:27:43 +01:00
Eberhard Beilharz
372af218ca
refactor(linux): Use km_core_state_action_items struct instead of queue
Implements #10353.
2024-01-23 17:05:49 +01:00
Marc Durdin
307f7da846 refactor(linux): use km_core_state_context_debug
Relates to #10365.
Fixes #10378.
2024-01-15 08:27:01 +07:00
Marc Durdin
9830f9ea24 refactor(core): use km_core_state_context_clear where possible
Relates to #10365.

Use `km_core_state_context_clear()` instead of `km_core_context_clear()`
as part of eliminating use of `km_core_state_context()`.
2024-01-12 12:05:00 +07:00
Eberhard Beilharz
9b768c57d7
refactor(linux): Use km_core_state_context_set_if_needed
Also update comment on `km_core_state_context_set_if_needed` to make it
clearer that it's expecting a UTF-16 string.

Closes #10212.
2024-01-10 18:57:41 +01:00
rc-swag
aef718c56b fix(core): update linux test load_source call 2023-12-15 14:05:37 +10:00
Eberhard Beilharz
604fbc1a75
chore(linux): Rename namespace kbp to core 2023-10-19 10:39:55 +02:00
Eberhard Beilharz
52bb859817
chore(linux): Rename (lib)kmnkbp to (lib)keymancore 2023-10-19 10:35:09 +02:00
Eberhard Beilharz
7b06beb7b9
Merge pull request #9781 from keymanapp/chore/linux/fixbuild
chore(linux): Fix build scripts
2023-10-18 11:38:46 +02:00
Eberhard Beilharz
337018a24b
chore(linux): Add missing tests
This adds (and fixes) two tests that were previously left out by
accident.
2023-10-17 20:29:28 +02:00
Eberhard Beilharz
08a259c6e2
chore(linux): Fix build scripts
Creating the coverage option to ninja previously didn't work reliably.
This change re-orders the parameters passed to `meson setup` and seems
to work better. Additionally this change refactors the scripts and makes
use of `builder_run_action`.
2023-10-17 20:01:05 +02:00
Eberhard Beilharz
0eb5065bf4
chore(linux): Unnecessary to check for NULL before calling g_free
`g_free` will return if the parameter is NULL, so we don't have to
check for that.

See glib [documentation](https://docs.gtk.org/glib/func.free.html).
2023-10-16 18:24:56 +02:00
Eberhard Beilharz
b0dd74ca59
feat(linux): Ignore invalid values in custom keyboards list 🏘️ 2023-10-12 18:31:42 +02:00
Eberhard Beilharz
8e1ee9ea7b
feat(linux): Allow loading of keyboards with arbitrary language 🏘️
Part of #8598.
2023-10-12 18:31:42 +02:00
Eberhard Beilharz
2a7d1758ae
feat(linux): Store user-added keyboards in GSettings 🏘️ 2023-10-12 18:31:41 +02:00
Eberhard Beilharz
7bab603b5b
refactor(linux): Simplify adding keyboard
Before we add a keyboard we check if we already added this keyboard
(in a different area). If we did (with the same or newer version) we
skip this keyboard. This change now immediately returns whereas previously
we set a flag and then didn't execute the rest of the method.
2023-10-10 18:00:05 +02:00
Eberhard Beilharz
7340c6be1f
chore(linux): Improve process check 2023-10-10 15:52:52 +02:00