Commit graph

114 commits

Author SHA1 Message Date
Marc Durdin
c155325d73 fix(developer): Select BCP47 Code dialog inconsistencies
Fixes #8157.

There are some limitations in this dialog as it stands; we will rework
it completely when we revisit BCP 47 tagging.

However, for now, this addresses some strange behaviours around the
Reset button and the displayed output:

* The Reset button will only be enabled if you change the text in the
  Language Name field.
* The messaging around a missing language subtag is clearer -- tells
  the user that they need to enter something there.
* The Reset button will now never insert default text strings into the
  Language Name field.

One example of something that is slightly weird, is if you enter a
two-letter region subtag into the script box, it will show what looks
like a valid tag in the output box (e.g. `en-Au`), but it will be
considered invalid, because that two letter subtag needs to be entered
into the region box.
2023-02-07 12:40:31 +07:00
Marc Durdin
8ee8325c74 feat(developer): check for duplicated language codes in package editor and compiler
Fixes #8119.
2023-02-02 15:06:15 +07:00
Marc Durdin
239d7762d9 chore: fix Delphi build error on VersionGitTag 2023-01-23 14:34:23 +07:00
Marc Durdin
067028cec2 chore: revise tag variable name to VERSION_GIT_TAG
Introduce new $VERSION_GIT_TAG environment variable, and update all
references to release@version in all projects to use the new variable.
2023-01-21 17:02:50 +07:00
Marc Durdin
34ece2182d fix(common): update sentry release identifiers to support semver
Fixes #7895.

This should mean that Sentry reports start to track semantic versions. I
have reviewed each project and I _think_ I've captured all the locations
where we need to construct release identifiers. Note that one of them
was fixed from a plain version number.

Docs on release format: https://docs.sentry.io/platforms/node/guides/serverless-cloud/configuration/releases/#bind-the-version
2023-01-17 17:04:24 +07:00
Marc Durdin
d9eae3869d
Merge branch 'master' into chore/a17s2-beta-to-master 2022-12-23 08:44:42 +11:00
Marc Durdin
8e90efe14a fix(developer): invalid charmap cell selection when updating to empty search result
Fixes #7879.

If we enter a search string that results in zero results, the grid
resize to one row attempts to select row zero. However, we prevent this.
This leaves the current row outside the range of valid rows, which means
the grid is in an invalid state.

This later causes a crash if the user attempts to mousewheel up. There
may be other similar crashes in this situation, but I haven't found any
yet.

Fix is to allow selection of row zero when there is only one row. I have
not found any problems caused by allowing this.
2022-12-10 06:04:17 +07:00
Marc Durdin
25abcbc10a
Merge branch 'master' into chore/beta-to-master 2022-12-09 20:47:31 +11:00
Marc Durdin
6eefb3a771 fix(developer): EncodeURL was not handling spaces
Fixes #7810.

This addresses a regression introduced in #7631, where URL parameters
with spaces would be encoded into `+` instead of `%20`. Looking a bit
deeper at the Delphi `TNetEncoding.URL.Encode` function I realised that
it was entirely inadequate. Some guy named Marc Durdin wrote a blog a
good few years ago about the problem, and that's what I ended up using.

This encoding issue caused filenames with spaces (by default, project
paths in Developer have spaces) to give a 404 when editing a touch
layout, which meant that the touch keyboards could not be saved.

Also fixes KEYMAN-DEVELOPER-74, where the + encoding caused multiple
entries to appear in the filename cache.

Amusing to Google this problem, find solid answer on SO, which pointed
to my very own blog. Embarrassing that my own code didn't already
include my own fix.

A secondary issue is also fixed here, where request parameters were
double-decoded for formencoded POST requests. The fix for broken URL
encodings was only required for GET requests.

This also showed up in KEYMAN-DEVELOPER-74, with double-encoded paths
being registered as source files.
2022-11-26 07:09:53 +07:00
Darcy Wong
fded9721e2 chore(common): Merge branch 'beta' into chore/common/beta-b16s2 2022-11-25 07:58:23 +07:00
Marc Durdin
8a6faf9241 fix(developer): cast to prevent ERangeError for failed http reqs in CEF 2022-11-21 09:01:40 +11:00
Marc Durdin
5c5ee29c74 chore(windows): tweak sentry client for cross-module messages 2022-11-18 09:18:26 +11:00
Marc Durdin
c18f1a7e63
Merge pull request #7631 from keymanapp/fix/developer/7628-utf8-urls
fix(developer): URL parameters should be UTF-8
2022-11-11 08:03:00 +11:00
Marc Durdin
4738b6a514 fix(windows): Improve shutdown robustness
Relates to KEYMAN-WINDOWS-B.

While this doesn't address the root cause of the exception, it should
prevent this unhandled exception, and adds breadcrumbs to help us see
which code path might be triggering the issue.
2022-11-10 16:10:49 +11:00
Marc Durdin
31513d657e fix(developer): handle utf-8 paths safely 2022-11-10 15:26:27 +11:00
Marc Durdin
ec1af3de97 fix(developer): handle crash reports without Keyman Engine installed
Fixes #7656.

If Keyman Developer is installed, but not Keyman for Windows, then
tsysinfo.exe is not present. If a crash occurs, this causes a secondary
crash when trying to display the error handler dialog. In this
situation, we now just show a dialog box with a short message rather
than the more friendly dialog available via tsysinfo.exe.

We could consider adding tsysinfo.exe into Keyman Developer for a future
release.
2022-11-09 08:46:30 +11:00
Marc Durdin
b8f5ebd40a fix(developer): prevent exception in charmap when unable to focus
It appears that components within a docking form are unable to be
focused in some, rare contexts. We don't want to crash, and the end
result of not focusing  is not really all that tragic, so let's just
mask the exception.
2022-11-07 08:49:11 +11:00
Marc Durdin
0f2fbd443d fix(developer): URL parameters should be UTF-8
Fixes #7628.

Indy components do not treat URLs as UTF-8. Our legacy EncodeURL
function (sourced from Indy components) was the same. Discovered we
needed to fixup the parsing of URLs as well as the construction of them;
there may be other places we need to fix, although I did do a search for
the relevant types in TIKE source.
2022-11-05 07:19:31 +11:00
Marc Durdin
d9a9c651f9
Merge pull request #7601 from keymanapp/fix/developer/7599-range-error-on-language-switch
fix(developer): handle high-bit-set HKL correctly
2022-11-03 09:02:13 +11:00
Marc Durdin
d01fe7551d fix(developer): handle high-bit-set HKL correctly
Fixes #7599.

MSKLC HKLs have high bit set, which means that we need to explicitly
cast from Integer to DWord to avoid range check errors.
2022-11-02 17:12:28 +11:00
Marc Durdin
3e220e33c4 fix(developer): generate a default icon for basic keyboard projects
Fixes #2803.

The new basic project template will now include a default icon,
generated either from the first BCP 47 tag, or else from the first 3
letters of the filename of the keyboard.

The icon will not be included if the keyboard does not target desktop
platforms, as web/touch do not currently support the icon.
2022-11-01 15:14:13 +11:00
Marc Durdin
a4ca7968b9 chore(common): make scripts executable and add pre-commit test 2022-09-19 13:59:09 +10:00
Marc Durdin
fbb3375ed9 fix(developer): show more useful error if out of space during Setup
Fixes #7261.
2022-09-12 12:02:09 +10:00
Marc Durdin
f836574cbc chore: use keyman.com instead of keyman-staging.com
Fixes #7227.

We want to use keyman.com for now even for alpha builds, as
keyman-staging.com is going to be used for transition to Docker-based
hosting, and it will be problematic to try and share that process with
alpha builds.
2022-09-08 14:32:39 +10:00
Marc Durdin
e30871f01e chore(linux): add common/include to further paths 2022-08-11 14:56:46 +02:00
Marc Durdin
767927bf16 chore(common): use /usr/bin/env bash
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.

This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:

```
if [[ -v _builder_params[$e] ]]; then
```
2022-07-25 14:59:37 +10:00
Marc Durdin
1909d92b47 chore(common): keymansentry UNICODE for Winapi 2022-07-11 11:19:53 +10:00
Marc Durdin
b700432583 fix(developer): kmdecomp stability tweaks
Adds kmdecomp to kmcomp-<version>.zip and fixes a couple of stability
issues:

* Increase buffer sizes (this fix very much a hack)
* Ensures that .bmp/.ico files are saved to correct output folder
* Disable loading sentry.dll when running on WINE
2022-07-11 10:42:33 +10:00
Marc Durdin
27eb1b9f19 fix(developer): add no-ops for symbol builds for components
Fixes the release build where we do `nmake symbols` for developer/src,
which was failing on calls to these two sets of components. (In
windows/src, the build structure is different due to an additional layer
of folders, so we end up with no `nmake symbols` call on the common
components).
2022-07-08 05:04:10 +10:00
Marc Durdin
7ec9859838 fix(developer): Show full version number
Updated various places in Keyman Developer to show the full
VersionWithTag rather than the short version number we had been
previously showing:

- About dialog
- Welcome screen
- Installer
- kmcomp help
- kmconvert help
- kmanalyze help
- kmdecomp help

This should help when testing to verify that we are testing the right
version.

Also fixed the keymansentry path when running command line C++ programs
from source repo.
2022-06-29 10:58:40 +10:00
Marc Durdin
3464cbac35 chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-general-developer-files 2022-06-25 05:42:39 +10:00
Marc Durdin
018eb6cd53 chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-packages-files 2022-06-25 05:41:23 +10:00
Marc Durdin
4eaee2217a
Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-keyboards-files 2022-06-25 05:40:25 +10:00
Marc Durdin
c108008440 chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-general-files 2022-06-25 05:39:26 +10:00
Marc Durdin
f22ed1a4a7
Merge pull request #6815 from keymanapp/chore/windows/delete-unused-general-files
chore(windows): delete unused files from global/delphi/general 🎢
2022-06-25 05:32:03 +10:00
Marc Durdin
a0fe8b16f8
Merge branch 'chore/developer/js-to-lmc' into chore/developer/move-common-components 2022-06-24 14:23:02 +10:00
Marc Durdin
bbb0f9d3d5 chore(developer): cleanup some manual tests 2022-06-24 14:21:03 +10:00
Marc Durdin
d8b5e214cf
Merge pull request #6781 from keymanapp/chore/windows/remove-unused-components
chore(windows): remove unused components 🎢
2022-06-24 09:35:59 +10:00
Marc Durdin
34d4706a9b
Merge pull request #6760 from keymanapp/chore/windows/move-delphi-global-ui-units
chore(windows): rearrange global/delphi/ui units 🎢
2022-06-24 09:35:52 +10:00
Marc Durdin
1910ac85f5 chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-delphi-common-units 2022-06-23 15:56:15 +10:00
Marc Durdin
0902c730c0
Merge pull request #6756 from keymanapp/chore/windows/move-keymanversion-h
chore(windows): move keymanversion.h to common 🎢
2022-06-23 15:55:06 +10:00
Marc Durdin
45969da17b chore(windows): Merge branch 'chore/developer/js-to-lmc' into chore/windows/cleanup-keyman64-h 2022-06-23 15:54:11 +10:00
Marc Durdin
5075b54343
Merge branch 'chore/developer/js-to-lmc' into chore/windows/move-common-headers 2022-06-23 15:52:06 +10:00
Marc Durdin
385045e978 chore(windows): fixup refs and move StockFileNames
* StockFileNames.pas was missed in earlier moves.
* Cleaned up references in various dproj files
* Fixed up broken references to common files
2022-06-23 09:47:59 +10:00
Marc Durdin
8cbebf7ade chore(windows): move general package units to common 2022-06-23 06:36:23 +10:00
Marc Durdin
2aaa31eae2 chore(windows): move general keyboard units to common 2022-06-23 06:33:16 +10:00
Marc Durdin
bd68d0dacc
Merge pull request #6753 from keymanapp/chore/windows/move-windows-headers
chore(windows): relocate windows headers 🎢
2022-06-22 14:33:09 +10:00
Marc Durdin
3d0294769d
Merge pull request #6752 from keymanapp/chore/windows/cleanup-vkeys-h
chore(windows): merge vkeys.h and move to common 🎢
2022-06-22 14:33:00 +10:00
Marc Durdin
0c6142350b
Merge pull request #6751 from keymanapp/chore/developer/move-headers
chore(developer): move developer-specific headers 🎢
2022-06-22 14:32:45 +10:00
Marc Durdin
d7ddcd722d
Merge pull request #6750 from keymanapp/chore/windows/remove-obsolete-headers
chore(windows): remove unused, obsolete headers 🎢
2022-06-22 14:32:38 +10:00