Commit graph

794 commits

Author SHA1 Message Date
Eberhard Beilharz
3d006659f9 chore(linux): clarify that it's a Python test runner
Rename the directory to make it clearer that it's test runner for Python
tests. Addresses code review comments.
2025-06-02 15:20:42 +02:00
Eberhard Beilharz
581e4e03ef chore(linux): add TC test runner
This adds a modified version of JetBrains' TeamCity test runner that
makes use of the `parent` property in the service messages and thus
allows to properly indent and fold the block that contains the test
output.

Test-bot: skip
2025-06-02 15:20:42 +02:00
Eberhard Beilharz
3cb9fe2a65
fix(linux): fix variable replacements
This fixes the version numbers in `km-config` which broke with #13854.
This also fixes opening the download page in `km-config` because that
uses a version number in the URL.

Fixes: #14031
Follow-up-of: #13854
2025-05-22 16:20:18 +02:00
Eberhard Beilharz
fc79e38cc4
maint(linux): fix lintian warnings
This addresses comments from Debian review of the package.
2025-05-13 20:07:32 +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
d661905c60
Merge pull request #13779 from keymanapp/maint/linux/tcnoble
This change overrides a check added in Ubuntu 24.04+ that prevents mixing Python packages installed through apt and through pip. This allows to install the necessary Python package for TC which isn't available as Debian package. This change allows builds on Ubuntu 24.04 based TC agents.
2025-05-06 14:56:12 +02:00
Eberhard Beilharz
397b5bdf93
maint(linux): streamline use of env variables to detect running on TC
This changes the variable we use to detect if we're running on TC to
be the same as the one used on #13810.
2025-05-06 11:49:59 +02:00
Eberhard Beilharz
cf93da452f
maint(linux): add clarifying comment on why different TEAMCITY variables 2025-05-06 11:46:48 +02:00
Eberhard Beilharz
2ff9e309fa
chore(common): allow to run tests in virtual environment
This changes the shebang at the top of the file to allow use Python
from a virtual environment instead of hard-coding the path. This might
not be strictly necessary, but reduces confusion and doesn't hurt.
2025-04-29 19:20:49 +02:00
Eberhard Beilharz
b7649defd0
chore(common): override check when running on TC
This change overrides a check added in Ubuntu 24.04+ that prevents
mixing Python packages installed through apt and through pip. This
allows to install the necessary Python package for TC which isn't
available as Debian package. This change allows builds on Ubuntu 24.04
based TC agents.
2025-04-29 11:54:33 +02:00
Marc Durdin
4f829f5c8f chore: Merge remote-tracking branch 'origin/master' into chore/merge-beta-to-master-b18s5 2025-04-21 07:13:35 +07:00
Eberhard Beilharz
d1b74d0175
chore(linux): fall back to package id
This change addresses a code review comment. In the case where the kmp
doesn't contain a name, we now use the `packageID` instead.
2025-04-03 15:56:07 +02:00
Eberhard Beilharz
5df36c05a4
fix(linux): fix crash if kmp doesn't have name field
Fixes: #13647
Fixes: KEYMAN-LINUX-80
2025-04-02 18:20:11 +02:00
Marc Durdin
a52437c407 chore: Merge branch 'master' into chore/b18s4-merge-beta-to-master 2025-03-29 05:38:08 +07:00
Eberhard Beilharz
5ccbb65be2
chore(linux): some more replacements of setup.py
The recommended replacement for `setup.py build` is to use the `build`
module, so we have to add this as additional build dependency.

This change also removes the `devdist` target from the makefile - it
isn't referenced in any script, so I think we can do without.

Unfortunately the `python3-build` package available on Ubuntu 22.04 Jammy
is buggy and looks for `/usr/local/bin/python` so we can't use that.
Instead we continue to use `setup.py` for building on Jammy.
2025-03-18 19:57:37 +01:00
Eberhard Beilharz
3346a31115
chore(linux): replace deprecated setup.py
Now that we no longer support Focal we can move to more modern ways of
installing `km-config`. This change removes the deprecated use of
`setup.py` and replaces it with `pip3 install`.

Fixes: #13319
2025-03-17 18:41:25 +01:00
Marc Durdin
1a0b830c0b
Merge branch 'master' into chore/b18s3-merge-beta-to-master 2025-03-14 08:54:50 +07:00
Marc Durdin
f7bed1d2f6 chore(common): update tests where region data has been added
The 2025-02-18 release of langtags.json includes tag data for sa-Latn
and he-Latn, so tests related to those tags now need to account for
region.

Fixes: #13288
2025-03-10 09:33:01 +07:00
Darcy Wong
1380597be2
Merge branch 'beta' into chore/common/crowdin-vi 2025-03-05 19:45:39 +07:00
Marc Durdin
f61a104acf
Merge branch 'master' into chore/merge-beta-into-master-B18S2 2025-03-01 15:45:19 +07:00
Eberhard Beilharz
097a416a06
Merge pull request #13363 from keymanapp/fix/linux/13282_fcitx5-configtool
fix(linux): ignore exception when fcitx5-configtool is not found
2025-02-27 17:14:20 +01:00
Eberhard Beilharz
788e778645
Merge pull request #13356 from keymanapp/fix/linux/12902_UninstallException
fix(linux): ignore DBusException during install and uninstall
2025-02-27 15:28:52 +01:00
Eberhard Beilharz
d90b718aa5
fix(linux): ignore exception when fcitx5-configtool is not found
Fixes: #13282
Fixes: KEYMAN-LINUX-7S
2025-02-27 11:12:30 +01:00
Eberhard Beilharz
a35c6b3c29
Merge pull request #13355 from keymanapp/refactor/linux/tests
refactor(linux): extract method for setting up mocks in tests
2025-02-27 08:37:20 +01:00
Eberhard Beilharz
6fe916ca8b
fix(linux): ignore DBusException during install and uninstall
Fixes: #12902
Fixes: #13283
Fixes: KEYMAN-LINUX-7J
Fixes: KEYMAN-LINUX-7R
2025-02-26 18:24:27 +01:00
Eberhard Beilharz
a4492963e9
refactor(linux): improve dbus_util.py code 2025-02-26 17:19:09 +01:00
Eberhard Beilharz
3e09884c68
chore(linux): adjust to renamed xdg module
The `xdg` module got renamed to `xdg_base_dirs`. However, Ubuntu still
ships the `python3-xdg` package with the old module, so we'll have to
support both so that it'll work with both Ubuntu packages and in a
virtual environment.
2025-02-26 12:14:00 +01:00
Eberhard Beilharz
615d90765c
refactor(linux): extract method for setting up mocks in tests 2025-02-26 12:01:54 +01:00
Darcy Wong
1a1056ca50 chore(common): Add crowdin strings for Vietnamese 2025-02-22 07:37:36 +07:00
Marc Durdin
d6e7c0b9d1 chore: Revert "Merge branch 'master' into beta"
This reverts commit fae3932e15, reversing
changes made to 793daddb48.
2025-02-14 07:45:28 +07:00
Eberhard Beilharz
f1b32a1439
chore(linux): additional code cleanup after Focal removal 2025-02-12 12:21:49 +01:00
Eberhard Beilharz
248f01f1e3
chore(linux): change SIL International to SIL Global 2024-12-10 10:26:44 +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
a15a005648
fix(linux): set environment variable for rendering of downloads dialog
This works around a problem in webkit2gtk where the download dialog
sometimes only renders a blank screen. Setting the environment variable
seems to help, not only in the cases that the issue describes (with a
NVidia graphics card), but also in my testing in a VM.

Fixes: #12587
2024-11-04 18:53:18 +01:00
Eberhard Beilharz
0688c43253
fix(linux): properly check for missing dependencies
The previous implementation didn't work because the import of
`download_and_install_package` happened before we checked for the missing
dependencies and so the program crashed. This change fixes this and now
does the imports after checking for the missing dependencies so that we
can display an error message to the user.

Also fix a warning.
2024-11-04 18:10:19 +01:00
Marc Durdin
0e5fbb225d refactor(common): fixup help path script references
Relates-to: #12347
2024-09-16 06:19:14 +07:00
Eberhard Beilharz
5b570517b1
fix(linux): display error and abort if fonttools are missing 2024-08-28 16:14:17 +07:00
Eberhard Beilharz
50228a8266
fix(linux): properly deal with types of names
Names can be Unicode strings or byte arrays. This change allows for both
kinds. Also properly deal with the case when we can't get the name from
the .ttf file. And finally change the test so that we don't need the
`KbdKhmr.ttf` font.
2024-08-24 12:16:04 +08:00
Eberhard Beilharz
c8cbc2fefe
fix(linux): get font facename from .ttf file 2024-08-24 11:31:23 +08:00
Eberhard Beilharz
c99e833c8e
fix(linux): Add font name without file extension 2024-08-24 10:25:57 +08:00
Eberhard Beilharz
16ce5b0408
fix(linux): get oskFont from kmp.json instead of UnicodeFont 2024-08-24 10:07:36 +08:00
Eberhard Beilharz
a22a40fe2e
fix(linux): add keymanFacename to .ldml file
This change adds the `keymanFacename` attribute based on UnicodeFont
or AnsiFont to the root element of the generated .ldml file so that
onboard-keyman can display the proper font for the osk.

Fixes: #12019
2024-08-23 22:42:16 +02:00
Eberhard Beilharz
6bfa8a438f
refactor(linux): cleanup API of kvk2ldml.py
Make methods private that are only used inside of kvk2ldml.py.
2024-08-23 22:40:31 +02:00
Darcy Wong
83f46c8e5e chore(common): Update localization for Greek Polytonic 2024-08-07 05:59:35 +07:00
Eberhard Beilharz
2599487187
fix(linux): set local directory if not specified
If the user specifies just an output file without directory name, we
will now use the current directory instead of crashing.
2024-07-26 12:18:24 +02: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
582ccbec11
fix(linux): ignore exceptions trying to install cache
Using the cache when getting data from the server is just an optimization
to speed up things. However, things still work if we don't use the cache.
This change therefore catches the AttributeError that sometimes happen
on some machines for unknown reasons and falls back to not using the
cache.

Fixes: 11855
Fixes: KEYMAN-LINUX-6R
2024-06-24 18:13:28 +02:00
Eberhard Beilharz
3c800ed65a
feat(linux): implement UI part of SimulateAltGr option 2024-06-21 18:24:02 +02:00
Eberhard Beilharz
2b7d74f4b6
refactor(linux): add KeymanOption class for options 2024-06-21 18:08:56 +02:00
Eberhard Beilharz
64515b025b
feat(linux): re-create missing files at run-time
This changes re-creates the `<package>.bmp.png` as well as the
`<package>.json` files if they are missing when `km-config` starts.

- `<package.bmp.png` gets created from a `.bmp` or `.ico` file included
in the package, similar to what happens when installing the keyboard.
- `<package>.json` gets created from downloaded metadata, similar to
the installation.

If the files are missing or we can't write to the directory, e.g. if it's
the shared area, we skip the re-creation.

Fixes: #9396
2024-06-14 18:11:11 +02:00