Commit graph

1840 commits

Author SHA1 Message Date
Eberhard Beilharz
4bad36089f
fix(linux): Use temp dir if we can't create cache dir
If we can't create the cache dir, e.g. if `~/.cache` doesn't exist or
if we don't have enough permissions, we now return a temporary directory.

Fixes #10033.
2024-02-09 18:01:40 +01: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
94f8d17ab4
Merge pull request #10652 from keymanapp/fix/linux/warning
fix(linux): Use raw string for regex
2024-02-07 16:02:04 +11:00
Eberhard Beilharz
6722faab4d
fix(linux): Use raw string for regex
This change fixes a syntax warning with Python 3.12. See
https://stackoverflow.com/a/50504635/487503 and
https://docs.python.org/3/whatsnew/3.12.html#other-language-changes.
2024-02-06 17:01:59 +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
Eberhard Beilharz
883b9fc4c8
chore(linux): Fix API check if lines got removed in .symbols file
If lines got removed in the .symbols file we won't find the current
version number in the .symbols file. This change fixes the expectations.

Also, if a major API change happens during the Alpha cycle we don't expect
another API version increment if one already happened since we released
the stable version.

This change also adds some unit tests for the new functionality. These
can be run manually and won't run during CI builds.

Fixes #10453.
2024-02-02 20:15:22 +01:00
Eberhard Beilharz
97bbcee3ef
Merge pull request #10596 from keymanapp/chore/linux/cherry-pick/changelog
chore(linux): Update debian changelog 🍒
2024-02-02 09:28:53 +01: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
a5e0ce0702
chore(linux): Update debian changelog
(cherry picked from commit 8d0f102936)
2024-02-01 12:58:21 +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
Eberhard Beilharz
5643d2690d
Merge pull request #10561 from keymanapp/chore/linux/noble
chore(linux): Replace Lunar with Noble
2024-01-31 11:34:02 +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
325ab78881
chore(linux): Replace Lunar with Noble
This change removes Ubuntu 23.04 Lunar and adds support for
Ubuntu 24.04 Noble.
2024-01-30 15:40:41 +01: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
9183185b8c
Merge pull request #10480 from keymanapp/refactor/linux/10353_actionstruct
refactor(linux): Use `km_core_actions` struct instead of queue 🌱
2024-01-29 16:59:17 +01:00
Marc Durdin
41cc2f4d1e feat(developer): make context_get and context_length public again
Rolls back the privatisation of the km_core_context_get and
km_core_context_length APIs because the debugger uses them.
2024-01-26 06:37:09 +07:00
Eberhard Beilharz
a79e64b02d
chore(linux): Add more debug output 2024-01-25 20:02:22 +01:00
Eberhard Beilharz
e33d5effdd
chore(linux): Fix changelog
Should be a new version...
2024-01-24 17:42:41 +01:00
Eberhard Beilharz
052ac3eae3
chore(linux): Update changelog 2024-01-24 17:33:50 +01:00
Eberhard Beilharz
29c71253db
chore(core): Update debian package to use webkit2 4.1
Ubuntu 20.04 Focal doesn't have webkit2 4.1. The API is the same as
with 4.0, so we use that if we can't find 4.1.
2024-01-24 16:47:22 +01:00
Eberhard Beilharz
c713cd02cc
refactor(linux): address code review comments 2024-01-24 14:27:43 +01:00
Jeremy Bícha
7ea8d9648b chore(linux): Build with webkitgtk 4.1 instead of 4.0 2024-01-23 14:40:57 -05: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
91f5177e0c
chore(linux): update symbols 2024-01-18 16:41:15 +11:00
Eberhard Beilharz
2f9a7de87c
chore(core): Update symbols file 2024-01-16 09:14:02 +01:00
Marc Durdin
166e4bce97
Merge pull request #10379 from keymanapp/refactor/linux/10365-context-debug
refactor(linux): use `km_core_state_context_debug` 🌱
2024-01-16 13:38:46 +11:00
Marc Durdin
df177569a5 chore(linux): libkeymancore.symbols to .244 2024-01-16 05:55:02 +07:00
Marc Durdin
ba3290de75 chore(core): Merge branch 'master' into feat/core/10365-context-debug
Note: resolved merge conflict with action_api.cpp by shifting new code
into state_context_api.cpp.
2024-01-16 05:46:36 +07:00
Eberhard Beilharz
15d87963b2
chore(core): Ignore C++ symbols
We have a C API, but (internal) C++ template instantiations are visible
and so get flagged by `dpkg-gensymbols`. This change ignores the one
use of C++ by marking it optional. This is listed as a usage scenario
in the dpkg-gensymbols man page.

Note this requires a change how we call dpkg-gensymbols: if the `-O`
parameter is specified, the file is not treated as being a template file
(see man deb-src-symbols) and so the tags are not interpreted.
Additionally the file gets overwritten with the non-tag version. So this
change removes the `-O` parameter, and changes the archiving of the
generated file.
2024-01-15 18:47:53 +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
1b29ad32f9 chore(linux): update .symbols 2024-01-15 08:26:43 +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
1cb288144c chore(core): Merge branch 'master' into fix/core/clear-core-context-invalidate 2023-12-19 09:13:43 +10:00
rc-swag
aef718c56b fix(core): update linux test load_source call 2023-12-15 14:05:37 +10:00
Steven R. Loomis
2c852e7530 chore(linux): docker: make emscripten version customizable
Fixes: chore(linux): script deprecation warning from nodesource #10024
2023-12-13 23:23:55 +00:00
Steven R. Loomis
bf08c73f22 chore(linux): docker: fix Node.js install, make customizable
- fix the Node.js install script deprecation
- also make items configurable such as Ubuntu version and Node version

Fixes: chore(linux): script deprecation warning from nodesource #10024
2023-12-13 18:26:01 +00:00
Eberhard Beilharz
5069d8c67b
chore(linux): Small refactoring to make it easier to read 2023-12-08 18:50:38 +01:00
Weng Xuetian
4517c03f1d
Do not restart Fcitx
1. Fcitx does not need restart to load newly installed keyman keyboard
2. Restart fcitx may cause issue on kwin/weston Wayland where input
   method have to be spawned by compositor process.
2023-12-07 13:41:21 -08:00
Eberhard Beilharz
742ae5379e
chore(linux): Update debian changelog
(cherry picked from commit e4385e284e)
2023-12-01 15:09:55 +01:00
Eberhard Beilharz
688f9f34d9
chore(linux): Add support for loong64 architecture
Closes Debian bug
[#1057134](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057134).

(cherry picked from commit f50eccc4c0)
2023-11-30 18:01:18 +01:00
Eberhard Beilharz
fb347bba8d
chore(linux): Update debian changelog
(cherry picked from commit 97d7f3a11c)
2023-11-22 15:27:31 +01:00
Eberhard Beilharz
5badb17d4a
chore(linux): reduce number of checkouts
Addresses code review comment.
2023-11-14 10:26:29 +01:00
Eberhard Beilharz
afc63278b8
chore(linux): Address code review comments 2023-11-13 18:14:55 +01:00