Commit Graph

23 Commits

Author SHA1 Message Date
73f9cd2ca4 Cargo.toml: use xkbcommon 0.8
This is the latest upstream version.

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/697>
2024-11-05 18:01:23 +01:00
9b9a95c6d2 Cargo.toml: Change accepted version-range to SemVer-compatible versions
instead of updating only to newer bugfix-releases with `x.y.*`, or
newer major versions with `>=`.

For more information about how Cargo handles this, read:
https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/676>
2024-09-20 23:22:52 +00:00
2668827ed9 Cargo.toml: Simplify versions
This should not change the selection of the versions to update to.

Cargo considers the leftmost non-zero part of the version, to be the
number that changes compatibility, and will not update to a version that
it considers to be incompatible.

For more information, read:
https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/676>
2024-09-20 23:22:52 +00:00
34564edf32 Port to crate xkbcommon 0.7
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/656>
2024-08-14 15:18:43 +00:00
0403fe4cde Build: Use meson_Cargo.toml.in for setting up the build
to make rust-analyzer work correctly.

When the paths in Cargo.toml have '@path@' in them,
rust-analyzer cannot find the correct paths.

Before this change, rust-analyzer was unable to offer information
about code (in files other than main.rs), and instead
showed an error-message:
"1:1 unused: This file is not included anywhere in the module tree,
so rust-analyzer can't offer IDE services.".

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/657>
2024-08-11 08:17:03 +00:00
332e5f91c8 Update to serde_yaml 0.9.*
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/624>
2024-03-22 11:53:35 +01:00
5806b14628 Simplify build-system further
Remove Fragile from the list of dependencies

It is not necessary for building 'gio' anymore,
since the upgrade to 'glib v2_58'.

Remove "online" and "reset_lock" Meson-options

Building Squeekboard should work offline.

Use a single "Cargo.toml"-file instead of splitting it into parts

and putting it back together when building.

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/623>
2024-03-11 17:45:57 +01:00
ecfc45c2de build: Make compatible with Debian Bullseye
This commit is a bit bigger than it could have: Meson changes could have gone in separately from CI and Debian.

This commit looks more complicated than it should reasonably be. Alas, Cargo is a piece of work, and it doesn't let honest people just choose different versions of dependencies, leading to a cascade of misery. Several things were tried to curb the disaster:

- Cargo [feature] supports choosing dependencies, but doesn't support specifying dependency versions
- Cargo has a cfg() syntax in sections for choosing dependencies by build options, but it explicitly doesn't support selecting on features…
- Cargo allows choosing different dependencies based on features, so perhaps dependencies with different versions could live in stub crates pulled in as needed? Nope! If a dependency doesn't exist in the repo (and that's the point here), Cargo throws up its hands.

This means Cargo.toml needs to be generated based on the build type. More misery:

- we lose the simplicity of just doing `cargo.sh` for simple housekeeping like deps updates. HACKING.md was updated to reflect that. Perhaps that's inevitable - build options need to be like this.
- Some flaky adjustments needed in `cargo.sh` because of an additional argument that can be mistaken for an argument to the exec in `cargo run`.
- Specifying a custom `Cargo.toml` means Cargo can no longer find any tests, examples, benchmarks, or binaries, because it searches relative to the directory of `Cargo.toml`, which is now the build dir. Extra care needed to not forget about them now.

As soon as Cargo allows anything better for managing deps versions, the above should be undone in its favor.

Good side is that a couple bugs went away:

- build flags not always making it to Cargo
- arm64 builds were optional while they shouldn't
- test layouts in unit tests are loaded from an explicit directory now

The Bullseye versions of dependencies are canonical now, Buster considered legacy.
2020-06-24 15:51:21 +00:00
acfa48886d build: Strip clap of optional features
This makes the build marginally faster at the cost of losing non-essential command line parsing in test_layout.
2020-01-25 17:25:02 +00:00
432e4fe1e5 Merge branch 'drop_key' into 'master'
Simplify renderer

See merge request Librem5/squeekboard!272
2019-12-15 16:38:31 +00:00
cfa66d8182 squeekboard-test-layout: add argument parsing and some more output 2019-12-14 10:55:37 +00:00
f9fbd3fb2d rendering: Simplify Cairo context usage, remove unneeded calls.
Moved Cairo context usage to Rust, and rearranged ctx setup (position) to happen in one place.

Removed render calls that were overwritten on each draw call anyway.
2019-12-07 12:47:47 +00:00
9f88660d99 locale: Add translations for layout names
Pulled in some Unix-specific code from https://github.com/rust-locale/locale_config to reduce dependencies.

First reason to reduce dependencies: gettext-rs is not in Debian. Copying gettext-sys might have made sense, but the interface is somewhat confusing.

For translating a couple identifiers, detection and some hand-rolled hash map is all that is needed, and the option to move to gettext later remains.

locale_config has been stripped of the lazy_static dependency, which, messing with the strtup sequence, might be a source of debugging woes. Plus setting language once in the beginning is somewhat inflexible regarding runtime changes.
2019-11-08 10:21:27 +00:00
47c4119ab7 Add a popover menu to switch languages 2019-11-05 13:10:55 +00:00
150fb3cf6a deps: Accept only bugfix version changes 2019-09-24 11:18:35 +00:00
28e0c26671 build: Change dependencies to match Debian packages 2019-09-20 09:40:18 +00:00
8e654346a2 keysyms: Derive from Unicode labels 2019-09-11 12:03:57 +00:00
015ba79f65 Merge branch 'fix_tests' into reparse 2019-09-11 12:03:24 +00:00
0922d4a87a tests: Allow the building of doctests
Also allows for standalone tests and examples to be built and run with Cargo.
2019-09-10 09:34:25 +00:00
99c577be60 Merge remote-tracking branch 'upstream/master' into reparse 2019-09-10 09:11:57 +00:00
521796a46d deps: Remove bitflags
This removes the need to use a modified copy and makes running tests easier.
2019-09-09 19:00:40 +00:00
b84c402c4a WIP
WIP

WIP: keymap generation test passes

meta: Update features and version

WiP: cargo.lock

WIP: don't crash

WIP: no outlines

parsing: New tests

WIP: base level works

WIP: remove old keyboard

symbols correctly input

WIP: lodaing files

WIP: fallback works

Valid fallback
2019-09-04 09:44:31 +00:00
3413021d30 rust: Use Cargo to build the Rust portion
Pros: Ability to use Rust libraries from crates.io
Problems: Need to lock library versions and document their reproducible building, either via Cargo.lock or vendoring.
2019-08-30 09:00:34 +00:00