Commit graph

46 commits

Author SHA1 Message Date
Gunnar Hjalmarsson
5a58794f8f
chore(linux): Build also on riscv64 to facilitate migration on Ubuntu 2021-06-21 11:36:48 +02:00
Eberhard Beilharz
f91b52d3ea
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.
2021-06-17 15:10:59 +02:00
Marc Durdin
537fc594c3
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.

(cherry picked from commit c9897bb38f)
2021-05-31 15:00:27 +02:00
Eberhard Beilharz
38a747570b
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.

(cherry picked from commit 68706c9451)
2021-05-31 15:00:17 +02:00
Eberhard Beilharz
2c08e484a2
refactor(common/core/desktop): Use StringOffset in FixupKeyboard
(cherry picked from commit 7c78fb0adb)
2021-05-31 15:00:10 +02:00
Eberhard Beilharz
afc9cb07cd
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

(cherry picked from commit 9c2d30948c)
2021-05-31 15:00:02 +02:00
Eberhard Beilharz
8d3a7665f8
Merge pull request #5110 from keymanapp/fix/core/cherry/issue-5100
fix(common/core/desktop): Don't segfault on invalid .kmx file 🍒
2021-05-19 16:48:33 +02:00
Eberhard Beilharz
d517d9e91f
fix(common/core/desktop): Don't segfault on invalid .kmx file
(Fixes #5100)

(cherry picked from commit d91d27befa)
2021-05-19 09:02:41 +02:00
Eberhard Beilharz
d06be6a07f
fix(common/core/desktop): Fix warnings when compiling for armhf
Compiling on armhf outputs two warnings:
- NULL used in arithmetic [-Wpointer-arith] (line 289 and 290)
- unused parameter ‘dwFileSize’ [-Wunused-parameter] (line 264)

(related to #5072)

(cherry picked from commit 99e9a7cf61)
2021-05-19 08:59:48 +02:00
Eberhard Beilharz
d2532fa335
chore(linux): Update changelogs 2021-05-11 18:38:19 +02:00
Eberhard Beilharz
044e53198a
fix(linux): Fix switching to keyboard in middle of line (#4678)
Don't re-set context if it changed because the cursor location was
wrong. When the user switches to the EuroLatin keyboard in the
middle of the line, we're getting a wrong cursor location. This will
be fixed with the next keypress, but it leads to the context string
suddenly having more characters added to the front. If we re-set the
context because it's different now we will loose the information we
previously added to the context.

We now compare the end of the string. If the new context string ends
with the old context string we assume that the cursor position got
updated and don't re-set the context.

This fixes #4678.
2021-03-18 17:29:21 +01:00
Eberhard Beilharz
e371fcb8b8
chore(linux): Verify signed source packages 2021-03-08 19:29:27 +01:00
Eberhard Beilharz
3a78ef4be1
chore(linux): Fix some lintian warnings for Debian package 2021-03-08 17:38:28 +01:00
Marc Durdin
fe2c1cd187 fix(windows): incxstr could run over buffer with malformed data
Fixes #4591.

I fixed incxstr in 4 places:

1. Common/Core: kmx_xstring.cpp
2. Engine: xstring.cpp
3. Test project importkeyboard importkeyboard.cpp
4. Test project m-to-p m-to-p.cpp

I updated mcompile to remove its own copy of incxstr (identical to that
in xstring.cpp) to reduce WETness but opted not to do so for the test
apps, which are pretty much throwaway anyway.

I note that there is more work we could do here; we need to check every
character as we increment so we don't miss a `U+0000` end of string with
malformed data. But I would like to tackle that as a separate job at
some point in the future after Core integration.
2021-03-05 12:50:29 +11:00
Eberhard Beilharz
958fb3ac1f
docs(common): More readme improvements 2021-03-02 19:16:19 +01:00
Eberhard Beilharz
268a42cba4
chore(common): Fix Windows build 2021-03-02 17:37:31 +01:00
Eberhard Beilharz
2421af506e
chore(common): write debug output to console
We have a `g_debug_ToConsole` variable. However, so far this was
always set to true and output to `syslog`. This change modifies
the default to `false`, and in that case logs to `syslog`. If
`g_debug_ToConsole` is true we no output to the console.

When running the KMX unit tests we set `g_debug_ToConsole` to true.
2021-03-02 16:55:22 +01:00
Eberhard Beilharz
2593c7873f
docs(common): Add readme for unit tests 2021-03-02 16:55:22 +01:00
Eberhard Beilharz
64f9f9297a
chore(linux): Improve readme
Also ignore some more generated files.
2021-03-02 16:55:22 +01:00
Marc Durdin
1ec9577613 chore(windows): fix typo 2021-01-29 16:14:24 +11:00
Marc Durdin
081471218e fix(common): add test case and fix smp bugs
Turns out that @darcywong00's suggestion for a test case was a Very Good
Idea. The SMP handling in Keyman Core had an egregious bug where only
half of a surrogate pair was being deleted in the UTF-16 context; see
kmx_processor.cpp 425-428. This was then masked by the test runner
masking the damage in the original test case; see kmx.cpp 193-203.

The new test case exercises a number of additional ways of manipulating
the context where surrogate pairs exist, to show we handle the deletion
properly within Keyman Core and in the test runner.
2021-01-29 16:05:07 +11:00
Marc Durdin
c26b9a2e2c fix(common): tweak surrogate pair deletions
Matches the work in #4360 for Windows, tweaks to documentation.

Note that this does not add the BK_SURROGATE flag at this point. I
will add that in a future update if it proves necessary, when working on
the core integration into Windows.
2021-01-28 08:40:28 +11:00
Marc Durdin
7173f5c25a chore(windows): address review comments 2021-01-20 06:29:59 +11:00
Marc Durdin
91b0795f1d fix(common/core/desktop): context mismatch with if and dk
Fixes #4275.
2021-01-18 10:24:00 +11:00
Marc Durdin
367fe409a9 fix(common/core): context mismatch with if and deadkey automatic test 2021-01-18 10:22:59 +11:00
Eberhard Beilharz
6b999bc911
chore(linux): Update debian metadata based on Debian repos
This is a cherry-pick of PR#4223:

- Add script to create debian source package
- Update debian metadata based on Debian repos
- Remove some lintian warnings and errors
- Remove support Xenial
- Reduce size of icon
- Omit confusing values from gbp.conf
2021-01-12 18:38:18 +01:00
Marc Durdin
c5ea3a5db6 chore(common): update copyright year in various locations 2020-12-22 10:56:55 +11:00
Eberhard Beilharz
cf515cefdf
chore(linux): Fix launchpad build (closes #3875)
This change fixes the launchpad build script and also improves
updating the watch file.

If we use the variables that uscan provides we don't have to
hard-code the package name in the watch file. This makes it possible
to use a generic one for all packages.
2020-11-20 12:15:22 +01:00
jahorton
7e10c56354 docs(common): requested comment tweaks 2020-11-17 09:57:31 +07:00
jahorton
ad6489d9d3 chore(common): adds requested comments re: tentative META flag 2020-11-17 09:42:28 +07:00
Marc Durdin
79de50b13f chore: and get it actually right 2020-08-10 10:44:34 +10:00
Marc Durdin
8c10e8910c chore: cleanup keyboardprocessor.h.in
Re-applying changes from stale branch common-docs
2020-08-10 10:41:25 +10:00
Eberhard Beilharz
990eca852c
chore(linux): Update maintainer 2020-05-26 09:05:07 +02:00
Marc Durdin
080f03860e
Merge pull request #3083 from keymanapp/fix/windows/2759-force-output-keystroke-fails
fix(windows): force output keystroke failure
2020-05-11 06:09:09 +10:00
Marc Durdin
5956674a43 chore(common): add tests for Keyman Core 2020-05-08 16:53:53 +10:00
Marc Durdin
56707f18db docs(common): update BUILDING.md 2020-05-05 16:56:27 +10:00
Eberhard Beilharz
b03437b308
fix(common): Fix meson.build script
`VERSION.md` is in the root of the source directory. However, when
building a Linux package from a source package we can't access files
from the root directory. Prior to creating the source package
`VERSION.md` gets copied to `common/core/desktop` so that it is
available in the source package. However, this hack broke the
meson build everywhere else unless `VERSION.md` got copied manually.

This change uses `VERSION.md` from the root directory if it is
available and otherwise assumes that it exists in the same directory
as the `meson.build` script. This change also switches to using
scripts to get the version number rather than doing it in the meson
build itself because that gives more flexibility. It is important to
note that the Windows batch file has to be listed first in
`find_program` because Windows might detect `getversion.sh` and
tries to run it with bash but this fails because of the different
directory separators.
2020-05-04 14:40:41 +02:00
Marc Durdin
b4abb53fcc fix(common): tweak build.bat 2020-05-04 16:27:07 +10:00
Marc Durdin
3f98c6027b fix(windows): decxstr was not checking start of string properly 2020-05-04 16:18:31 +10:00
Marc Durdin
d8f81acbf3 fix(common): decxstr could run before start of buffer 2020-05-04 16:02:55 +10:00
Marc Durdin
920f754cf6 fix(common): back off on the backslashes 2020-05-04 15:10:10 +10:00
Marc Durdin
41857c65af fix(common): enable build for win x64 and use global VERSION.md 2020-05-04 15:06:08 +10:00
Eberhard Beilharz
70472872ec
fix(linux): Fix building keyboardprocessor package 2020-03-17 16:49:45 +01:00
Darcy
89a8f4abeb feat(linux): Use VERSION.md file for meson project_version 2020-03-02 08:26:13 +07:00
Darcy
5fb69a497b chore(linux): Update references from keyboardprocessor to desktop 2020-02-26 16:40:20 +07:00
Darcy
660a1459ff refactor(common): Rename keyboardprocessor to desktop 2020-02-26 16:34:29 +07:00