Commit graph

91 commits

Author SHA1 Message Date
Marc Durdin
e22ce72442
Merge pull request #5324 from keymanapp/docs/shared-build-docs
docs: start consolidation of build config docs
2021-07-01 11:57:09 +10:00
Ross
889718830e fix(common): make xcode happy about empty loop 2021-06-29 17:29:33 +10:00
Ross
e83594038f fix(common): errors in comments 2021-06-29 17:03:31 +10:00
Ross
87d35c6d1c fix(common): get handle caller buffer size small than internal Fixes #5336 2021-06-29 16:42:53 +10:00
Marc Durdin
4af39a58b0 docs: start consolidation of build config docs
As the build environment documentation is duplicated across each of the
Keyman platform projects, it has become somewhat convoluted and
inconsistent. This PR moves all the mac-based and shared documentation
into docs/build, with placeholders for Windows and Linux documentation
to be moved in the next PR.

The idea is that a developer can configure their box to build any of the
available projects for that platform (web and android build on all three
main dev platforms).

Keeping the build documentation in one place makes it much simpler to
keep it consistent and up-to-date as well, as well as keeping us aware
of potential dependency conflicts between projects.

The icing on the cake is the resources/devbox/macos/macos.sh script,
which I have tested and takes a bare metal mac box through to a full
Keyman development environment (except XCode, there's always something!)
2021-06-21 21:12:27 +10:00
Gunnar Hjalmarsson
194c697e17
chore(linux): Build also on riscv64 to facilitate migration on Ubuntu
(cherry picked from commit 5a58794f8f)
2021-06-21 11:41:36 +02:00
Eberhard Beilharz
e1a5b1d727
Merge pull request #5304 from keymanapp/chore/linux/cherry/changelog
chore(linux): Update changelogs to match Debian 🍒
2021-06-18 09:05:12 +02:00
Marc Durdin
3bd754b230
Merge pull request #5233 from keymanapp/feat/common/wasm-infrastructure
feat(common): keyboard_processor wasm build
2021-06-18 16:09:56 +10:00
Eberhard Beilharz
d29ad2d4ed
chore(linux): Update changelogs to match Debian
The changelogs should match what got uploaded (and accepted) to
Debian so that the changelog reflects the upload history to Debian.

(cherry picked from commit f91b52d3ea)
2021-06-17 15:19:39 +02:00
Marc Durdin
3bf61645f1 chore: cleanup now that build passes 2021-06-16 06:21:12 +10:00
Marc Durdin
4ba6f7cb2b chore(common): cross-platform tweaks 2021-06-16 05:43:09 +10:00
Marc Durdin
3f618d4309 chore: more path cleanups 2021-06-15 04:45:29 +10:00
Marc Durdin
853ca122c4 chore: fix typo 2021-06-14 15:50:13 +10:00
Marc Durdin
872b0c367f chore: fix typo 2021-06-14 15:34:17 +10:00
Marc Durdin
a6dd84052d chore(common): update dependency refs 2021-06-14 06:16:24 +10:00
Marc Durdin
6aae56134a chore(common): rearrange rust source
Splits the rust source into a core library crate, and two interface
library crates - native and wasm. This avoids requiring WASM
dependencies on systems that don't require them, such as Debian
autopackagers.
2021-06-14 05:55:29 +10:00
Marc Durdin
3e1fd79952
chore: Apply suggestions from code review
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2021-06-11 08:51:09 +10:00
Marc Durdin
67cb875eb0 chore(common): target-based dependencies 2021-06-10 17:08:30 +10:00
Marc Durdin
04806d389e chore(common): features by platform for cargo 2021-06-10 16:39:09 +10:00
Marc Durdin
adf25ce657 chore(common): cleanup 2021-06-10 16:24:43 +10:00
Marc Durdin
d55afc24ed chore(common): additional config for linux ba 2021-06-10 15:49:23 +10:00
Marc Durdin
236379e234 chore(common): cleanup build.sh for linux, part 1 2021-06-10 15:41:28 +10:00
Eberhard Beilharz
ec4782b9c5
feat(linux): Fix Linux packaging on i386
Debian defines multiple similar environment variables. Libraries
are expected in `/usr/lib/i386-linux-gnu`. `DEB_TARGET_MULTIARCH`
gives that value, whereas the previous `DEB_TARGET_GNU_TYPE` gives
`i686-linux-gnu` which then results in our libraries not being found.
2021-06-09 18:44:20 +02:00
Marc Durdin
556e455e42 chore(common): more building.md tweaks 2021-06-08 13:56:28 +10:00
Marc Durdin
abf82d5363 chore(common): building on mac instructions 2021-06-08 13:07:31 +10:00
Marc Durdin
246b920582 chore(common): build.sh tweaks for linux build 2021-06-08 11:23:11 +10:00
Marc Durdin
0cbd91f6ce feat(common): keyboard_processor wasm build
Relates to #5069.

* Adds infrastructure for building keyboard_processor to WASM
* Updates unit tests to work in WASM environment
* Cleanup of documentation
* Consolidation of build script for most platforms
2021-06-08 08:35:59 +10:00
Marc Durdin
d0834e1f39 chore: address review comments 2021-06-07 08:44:15 +10:00
Marc Durdin
32b4f54d58
Update BUILDING.md 2021-06-03 11:22:11 +10:00
Marc Durdin
4a09dd3b48 feat(windows): add common core libraries and includes 2021-06-02 13:52:11 +10:00
Marc Durdin
b63e543977 chore: document Linux package rules 2021-06-02 13:52:10 +10:00
Marc Durdin
4dbd0bec79 chore: Apply suggestions from code review 2021-06-02 13:52:09 +10:00
Eberhard Beilharz
54a62a05d7 feat(linux): Adjust package build for build.sh script
This change makes the necessary adjustments so that the package build
works with the new `build.sh` script. We no longer can rely on the
automatisms of debhelper. This change also adds a install target
to `build.sh`, and copies some files from the Keyman root directory
to the desktop directory because when package building we only
have access to the files in common/core/desktop. Along the same lines
it removes embedding `build-utils.h` from `build.sh`. Instead we set
the version and tier locally.
2021-06-02 13:52:08 +10:00
Eberhard Beilharz
dec8fba55e chore(linux): Downgrade meson for package building
Ubuntu 18.04 Bionic only contains Meson 0.45. The build seems
to work with that version, so we partially revert the previous
change that set the minimum version to 0.50.
2021-06-02 13:52:07 +10:00
Eberhard Beilharz
ef5df74f53 chore(linux): Update package dependencies for Rust infrastructure 2021-06-02 13:52:04 +10:00
Eberhard Beilharz
b547f7d256 docs(common): Update build documentation 2021-06-02 13:52:03 +10:00
Eberhard Beilharz
e89fe746d7 fix(common): fix two Rust warnings 2021-06-02 13:52:02 +10:00
Marc Durdin
3d2d31a717 chore(common): remove some warnings 2021-06-02 13:52:00 +10:00
Marc Durdin
4d0c7d6395 fix(common): integer precision loss 2021-06-02 13:51:57 +10:00
Marc Durdin
8103949bdc chore(linux): adjust linux build scripts for rust 2021-06-02 13:51:55 +10:00
Marc Durdin
fdbc2a309a chore(common): stub out tests to prevent build errors 2021-06-02 13:51:54 +10:00
Marc Durdin
3e0a8ffafc chore(common): tweak build script for cross platform 2021-06-02 13:51:52 +10:00
Marc Durdin
3690cdf973 chore(common): make build.sh executable 2021-06-02 13:51:51 +10:00
Marc Durdin
8052ac9bbc feat(common): Rust infrastructure
Relates to #5069.

This establishes a baseline Rust build environment and linkage with
common/core/desktop.

This includes:

* build script build.sh which handles builds on Windows, macOS, *nix,
  with multiple targets on Windows only at present (M1 on mac to come
  when we do the mac integration work.)
* a mock rust processor with a very stubbed-out implementation
* bare bones interface between Rust library and C++ code
* unit tests on Rust and integration tests on C++ side to test the
  linkage between the libraries.

This should deliver a set of libraries that can be linked into our
target applications. For ease of deployment, it may be best to make
these static libraries, but I haven't made that decision at this point.
2021-06-02 13:51:50 +10:00
Marc Durdin
c9897bb38f fix(windows): cleanup edge cases in k32_load
Matches work completed in #5169 for Keyman Core, kmx_file.cpp.

While this code will hopefully disappear in 15.0, it's good to make sure
we aren't diverging beforehand.

Also tidies up a couple of other cases in `CopyKeyboard` in Keyman Core.
2021-05-31 10:58:23 +10:00
Eberhard Beilharz
68706c9451
fix(common/core/desktop): Fix failing tests on armhf
This change fixes the FixupKeyboard method. In the .kmx files on
disk array pointers for an empty array point to the end of the file
(one byte after the end of the data structure). When we expand the
pointers in FixupKeyboard this leads to `cgp->dpKeyArray` to point to an
unallocated memory location - this shouldn't matter since we don't
try to read or write at this location if the Key array is empty,
but armhf still seems to raise a SIGBUS, probably because we cast
the value to a `LPKEY`. This change sets `cgp->dpKeyArray` to `NULL`
if we have an empty key array, similar to what's done for the strings.

Closes #5072.
2021-05-27 17:14:06 +02:00
Eberhard Beilharz
7c78fb0adb
refactor(common/core/desktop): Use StringOffset in FixupKeyboard 2021-05-27 16:53:41 +02:00
Eberhard Beilharz
9c2d30948c
fix(linux): Exclude s390x from package builds
s390x is big-endian which we currently don't support (#5111).

Only build on architectures supported by Debian. This excludes the
following little-endian architectures:
alpha arm ia64 riscv64 sh4 x32 arm64ilp32 mipsn32el
and the following big-endian ones:
avr32 hppa m68k mips mips64 mipsn32 powerpc ppc64 s390 sparc sparc64

See https://wiki.debian.org/SupportedArchitectures
and https://wiki.debian.org/ArchitectureSpecificsMemo
2021-05-27 16:53:41 +02:00
Eberhard Beilharz
6d1adee2ee
chore(linux): Update changelogs
(cherry picked from commit d2532fa335)
2021-05-25 14:28:55 +02:00
Marc Durdin
39cb018042 chore(windows): move to vc++ 2019 2021-05-25 15:56:36 +10:00