Commit graph

146 commits

Author SHA1 Message Date
Marc Durdin
2b02d73347 feat(developer): New LDML Keyboard Project form
Fixes #10135.

Adds a new LDML Keyboard Project template and form, and allows
instantiation from kmconvert command-line and from the New Project
dialog in Keyman Developer IDE.
2024-01-18 15:19:41 +07:00
Marc Durdin
69a11c9ceb chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-13 05:05:53 +07:00
Marc Durdin
3d5506ef3e chore(windows): move reportExceptions check in exception handler to caller 2023-12-11 20:44:53 +07:00
Marc Durdin
01fe68a66d feat(developer): Move options to ~/.keymandeveloper/options.json
Fixes #10161.

Includes transition of existing options from registry to options.json,
and once options.json exists, will always read from that and ignore
registry. Was able to eliminate some of the legacy datatype usage for
several options. Reader/writer includes naive file lock retry to avoid
contention, which I am hopeful will be sufficient for our needs, given
the low chance of contention.
2023-12-11 15:31:21 +07:00
Marc Durdin
3a91c7d197 chore(developer): move IDEOptions key responsibility into KeymanDeveloperOptions
First part of addressing #10161 is to refactor the existing usage of the
registry values into the common KeymanDeveloperOptions unit. This was
mostly straightforward except for the changes to KeymanSentryClient,
which happens to be the most important part of this particular fix.
2023-12-11 13:48:43 +07:00
Marc Durdin
6c918e6aa8 fix(developer): Option to disable prompting for project upgrade
Fixes #10146.

Some developers may wish to stick with kpj-1.0 for now, and the prompt
to upgrade would annoying because it cannot be hidden. This resolves
that.

Note that I haven't at this point renamed UrlRenderer.pas, although it
may be worth considering in the future.
2023-12-06 09:54:12 +07:00
Marc Durdin
39b7c882a3 feat(developer): Multi-process model for projects 🦕
This is a bit of an omnibus commit, apologies for that. This commit
moves Keyman Developer to a proper multi-process model, where editing
files from multiple projects is handled much more cleanly, with each
project loaded in a separate process.

Files that are edited outside of a project structure are loaded into a
'temporary project' in a single process, which provides a pathway for
existing users who may have legacy files outside the normal Keyman
Developer project model.

There are several components to this:

1. Inter-process communication (Multiprocess, CopyDataHelper units and
   multiprocess test project). These modules establish a method of
   enumerating running Keyman Developer instances (with EnumWindow),
   recording relevant metadata for each instance (by thread id) in the
   registry (registry used because it manages contention without
   additional effort from us), and communicating between processes with
   WM_COPYDATA.
2. Command-line parsing (TikeCommandLine). Determines project ownership
   (ProjectOwningFile) for each filename passed on the command-line, and
   passes these over to existing instances of Keyman Developer that have
   that project loaded, or starts new instances as needed.
3. Temporary project management. Mostly in ProjectUI.

Also, moved GlobalProjectStateWnd management out of ProjectFile.pas and
into Project.pas, alongside other global project variables.

A follow-up will add functionality to determine if a file opened within
the Keyman Developer UI should open in the same instance or in a
separate instance (see TfrmKeymanDeveloper.OpenFileInProject). This will
use the same methodology as TikeCommandLine does now, so may involve
further refactoring.

This commit establishes the idea of 'keyman.kpj' as a future default
filename for Keyman Developer projects, but does not enable it, in
ProjectOwningFile. It is planned to introduce this fixed filename in
version 18.0 (see #10113).
2023-12-01 11:48:09 +07:00
Marc Durdin
55c0c6fd08 fix(developer): projects 2.0 internal path enumeration
Restricts enumeration of files for the project to the project folder and
the SourcePath folder. This prevents problems where a project may be in
a folder with many subfolders which would take a long time to enumerate,
and avoids confusion where there are source-type files in other folders.

At the same time, sorts out forward slash vs backslash in paths. While
forward slash works in many scenarios, there are several filename
manipulation functions, such as ExpandFileName, which would build valid
but non-optimal paths when forward slashes were encountered, which
cascaded into files appearing to be different and presentation issues.
2023-11-16 11:47:35 +07:00
Marc Durdin
a937f3c7de
Merge pull request #9949 from keymanapp/feat/developer/tike-2.0-projects
feat(developer): Support v2.0 projects in TIKE 🦕
2023-11-15 13:46:07 +11:00
Marc Durdin
4c5a91081f feat(developer): Support v2.0 projects in TIKE
Relates to #9948. Starts basic support for v2.0 projects.

For all operating modes:

- Remove blank projects / untitled projects mode
- Add Open Project Folder buttons and links
- Remove Project Save As
- Render uses in-memory XML
- Upgrade to v2.0 project file (along with checks)

For v2.0 projects:

- Remove 'Add File to Project'
- Populate Files to list all files in folder (note: consider efficiency
  here as currently files are parsed for subfile data)
- Version 2.0 project options and defaults
2023-11-07 05:18:25 +07:00
Marc Durdin
3336539ec5 chore(developer): remove obsolete 'Allow Multiple Instances' and 'Use Legacy Compiler' options
Fixes #9925.

Allow Multiple Instances is now always true.
Use Legacy Compiler did nothing (there is no legacy compiler!).
2023-11-03 13:24:05 +07:00
Marc Durdin
f61e65ceb9
Merge pull request #9736 from keymanapp/chore/merge-master-into-package-metadata
chore: merge master into package-metadata
2023-10-11 11:28:07 +11:00
Marc Durdin
400444933c feat(developer): introduce WelcomeFile property to packages
Fixes #9478.

This adds a property WelcomeFile to .kps and kmp.json, which allows us
to move away from the hardcoded welcome.htm filename in the future, and
makes transform from Markdown (#9477) a simpler operation, and just
generally starts the cleanup of the messiness of hard-coded filenames.

The package compiler will fallback to injecting welcome.htm into this
property if (a) welcome.htm is present, and (b) the property does not
already have a value. This doesn't buy us much because we still need to
support welcome.htm for existing legacy packages, but does mean that
our .kmp package metadata will be more consistent for packages compiled
with 17.0+ compilers.
2023-10-08 07:22:57 +07:00
Marc Durdin
982fdd0318 fix(developer): skip resource check for node addons 2023-10-07 05:49:25 +07:00
Marc Durdin
eeb755f76a fix(windows): re-enable signature check
Fixes #9692.

Signature checking was skipped because we missed a ".virtual" to force
nmake to build the test and test_i3633 targets. This opened up a small
cascade of related formatting issues on Makefiles, and the fact that the
test_i3633 (has there ever been a more poorly named project?) Makefile
did not even work.

Refactored significantly, added same tests to Developer Makefile, and
also now verifying the .msi and installer executable.

We can improve this further but I'd like to get this in to avoid further
critical issues with code signing given the current broken signing
configuration.
2023-10-06 09:14:35 +07:00
Marc Durdin
693aee5c99
Merge branch 'epic/package-metadata' into chore/merge-master-into-package-metadata 2023-10-04 19:34:16 +11:00
Marc Durdin
7adc9b5d95 feat(developer): support store(&version) '17.0'
Fixes #9541.

Also adds version 16.0 support to the kmcmplib compiler constants, and
unit tests for both versions. Does not add any support for automatic
version feature detection, because that forces an inverted dependency on
the touch layout compilation phase (done in kmc-kmw), which would be a
significant refactor. This may be something we need to support in the
future.
2023-10-02 15:30:07 +07:00
Marc Durdin
3af9f6d610 chore(developer): fixup license vs graphic file error 2023-08-17 11:22:28 +07:00
Marc Durdin
158bc28e85 feat(developer): add LicenseFile as property of package
Adds license file to .kps, kmp.json, kmc-package, package editor, and
new project templates. The intent is for LICENSE.md to be the file used,
and for any keyboards on keymanapp/keyboards, it should always be a
standard MIT license.
2023-08-16 09:13:38 +07:00
Marc Durdin
fea10f0eeb feat(developer): add web font references to package
While a package supports a .ttf or .otf font for the OSK and Display
fonts for use within the Keyman apps, on websites it also supports .woff
and .woff2. This change makes it possible to specify a set of fonts for
a package which will be provided through api.keyman.com to websites.

This means that .woff and .woff2 fonts may also be included in the
package and may not be used on target devices at this time, it further
opens the pathway to deploying .kmp packages to web in the future.

The deployment stage of keymanapp/keyboards will require a new phase to
copy web fonts from packages to s.keyman.com.
2023-08-15 15:13:24 +07:00
Marc Durdin
8a9243eba5 chore(developer): tweak Relationship values 2023-08-14 14:31:17 +07:00
Marc Durdin
38c3415eed feat(developer): add relatedPackages metadata
Adds relatedPackages support to:
* .kps schema
* .kps file format for Typescript
* kmp.json file format for Typescript
* kmc-package compiler
* Package Editor
2023-08-14 14:18:01 +07:00
Marc Durdin
d838df1c00 feat(developer): add editor of Package Description and Examples 2023-08-14 12:12:08 +07:00
Ross
7560927dca fix(windows): open pdf in an external browser
When opening a local pdf with the CEF module it causes prompt to
install an extension. This change opens the local pdf in a
browser in the same way the external pdf and webpages
are loaded.
2023-07-19 10:51:50 +10:00
Marc Durdin
7f0460172e
Merge pull request #9074 from keymanapp/chore/windows/disable-compression-for-wix-light-debug-builds
chore(windows): disable wix compression for debug builds
2023-07-17 15:01:09 +10:00
Marc Durdin
6eba701694 chore(windows): GO_FAST for 7z calls on debug builds 2023-07-14 11:53:17 +07:00
Marc Durdin
2e7162d5a9 chore(windows): remove hardcoded compression level in wxs files 2023-07-13 12:12:02 +07:00
Marc Durdin
759d23f7e0 chore(windows): detect teamcity CI for uncompressed msi 2023-07-13 11:18:14 +07:00
Marc Durdin
4af61a89bd chore(windows): turn msi compression off for test builds 2023-07-13 09:48:06 +07:00
Eberhard Beilharz
fce123e942 Revert "fix(windows): Fix Delphi makefile"
This reverts commit 88c2e1a4f2.
2023-07-10 11:31:51 +02:00
Eberhard Beilharz
f095593cd5 fix(windows): Adjust to new version of langtags.json
The new version of `langtags.json` added a new `_conformance` record
at the top of the file. This change adjusts the indexes where we expect
the `_version` record. It also introduces a const for the index of the
version record to make future updates easier.
2023-07-06 20:12:32 +02:00
Eberhard Beilharz
88c2e1a4f2 fix(windows): Fix Delphi makefile
In order to be able to build from the command line I had to change
the forward slashes to backslashes in the makefile.
2023-07-06 20:12:32 +02:00
Marc Durdin
0e89711210 chore(windows): remove dead if 2023-06-23 14:32:05 +07:00
Marc Durdin
2cc45dfa75 chore(windows): disable wix compression for debug builds
Also affects developer builds.
2023-06-23 14:18:46 +07:00
Marc Durdin
66a7a6fc4e feat(developer): support FollowKeyboardVersion in kmc-package
Fixes #7340.

Removes the unused <Version> element from <LexicalModel> element in the
.kps schema. (This needs to be copied to api.keyman.com also.)

Updates compiler to check for <FollowKeyboardVersion> and read the
version data from the .kmx in that case.

Unit tests updated. Some of the fixtures were incorrect as they had
<FollowKeyboardVersion> set for model-type packages or packages that
contained no keyboards. Fixed.
2023-04-21 14:04:06 +07:00
Marc Durdin
b58ac8fe4a fix(developer): package editor no longer loses RTL flag for LMs
Fixes #8595.
2023-04-18 05:40:50 +07:00
Marc Durdin
978b93aa64 refactor(common): move keymanversion_build.in to /common/include 2023-03-24 14:42:12 +07:00
Marc Durdin
062b947363 chore: Merge branch 'feature-kmcompx' into chore/merge-master-into-feature-kmcompx-a17s9 2023-03-23 10:08:59 +07:00
Marc Durdin
1a3cc078b5 chore(windows): sentry cleanup and signing
Addresses review comments.

Use SENTRY_SDK_VERSION where possible, and codesign sentry components
during build.
2023-03-19 07:35:06 +07:00
Marc Durdin
a127e32068 chore(windows): update sentry-native to 0.6.0
Fixes #8081.
2023-03-17 14:32:34 +07:00
Marc Durdin
9a7ebac071 chore(developer): fixup tests and build process 2023-03-17 04:31:03 +07:00
Marc Durdin
eac90588dc
Merge pull request #8336 from keymanapp/feat/developer/kmcmplib-feature-flag-tike
feat(developer): add 'Use Legacy Compiler' option to TIKE 🚑
2023-03-02 17:59:55 +11:00
Marc Durdin
2de745b3df feat(developer): add 'Use Legacy Compiler' option to TIKE 2023-02-28 15:55:38 +07:00
Steven R. Loomis
bccc1e5720 Merge remote-tracking branch 'upstream/master' into chore/merge-master-20230217-epic-ldml 2023-02-17 18:52:33 -06:00
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
Steven R. Loomis
ae45295dc6 Merge remote-tracking branch 'upstream/master' into chore/merge-master-a17s5-REDO-epic-ldml 2023-02-03 16:53:35 -06: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