Commit graph

539 commits

Author SHA1 Message Date
Marc Durdin
11359737f3 chore(developer): remove ngrok region entirely 2024-01-24 12:16:10 +07:00
Marc Durdin
de4897213d
Merge pull request #10436 from keymanapp/feat/developer/10135-create-ldml-keyboard-project
feat(developer): New LDML Keyboard Project form 🌱
2024-01-24 15:41:18 +11:00
Marc Durdin
7b0406d64d fix(developer): use keyboard3 tag rather than DTD to identify LDML keyboard xml files
Fixes #10469.
2024-01-23 13:37:57 +07:00
Marc Durdin
ebccb23c41 chore(developer): remove old proc reference 2024-01-23 13:34:41 +07:00
Marc Durdin
7e41ecb358 feat(developer): LDML keyboard test window marker support
Fixes #10458.

Refactors the LDML keyboard test window significantly, in order to be
able to support markers. Cleans up the state machine for the debug
window in the process, as that was complicating the changes. Removes
a lot of extraneous code in the debug window.
2024-01-23 12:42:28 +07:00
Marc Durdin
39b64be67a refactor(developer): use km_core_state_get_actions for LDML keyboard debugger
Relates to #10416.

Moves from using action queue to action struct for the LDML keyboard
debugger. Does not do the same for the KMX keyboard debugger, because
that relies on action items to do single-step debugging.
2024-01-23 12:42:27 +07:00
Marc Durdin
aee59db892 refactor(developer): update app context as well as cached context for KMN keyboard debugger
Fixes #10214.
2024-01-22 08:42:00 +07:00
Marc Durdin
fe88d04bdf refactor(developer): update app context as well as cached context for LDML keyboard debugger
Relates to #10214.
2024-01-22 08:30:17 +07:00
Marc Durdin
0c3b153ca0 fix(developer): support for char + code font in LDML keyboard editor
Fixes #10456.
2024-01-22 07:45:37 +07:00
Marc Durdin
ee9763d43a fix(developer): Use XML mode for LDML keyboard editor
Fixes #10457.
2024-01-22 06:50:53 +07:00
Marc Durdin
236865f046 feat(developer): LDML Keyboard Test Window
Fixes #10420.

Implements a basic LDML keyboard test window. Press F5 or Keyboard/Test
to start test. Shows a character grid for each character in the text.

Does not yet support display of markers (#10458). Does not support
interactive debugging, nor any more detailed status information.
2024-01-22 06:41:13 +07:00
Marc Durdin
cb6968b1c0 chore(developer): fixup generated xml to valid sample keyboard 2024-01-19 11:47:20 +07:00
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
83f80c061a refactor(core): remove unused context APIs
Fixes #10431.

The `km_core_` prefix has been removed from internal-only functions, and
these function declarations moved to context.hpp.

The functions have not been moved from km_core_context_api.cpp at this
stage.

Rewrote the function documentation in Javadoc style comments for the
internal use functions.
2024-01-18 12:18:07 +07:00
Eberhard Beilharz
67cf76362d
Merge pull request #10354 from keymanapp/refactor/linux/10212_set-context
refactor(linux): Use `km_core_state_context_set_if_needed`
2024-01-12 08:54:21 +01:00
Marc Durdin
9830f9ea24 refactor(core): use km_core_state_context_clear where possible
Relates to #10365.

Use `km_core_state_context_clear()` instead of `km_core_context_clear()`
as part of eliminating use of `km_core_state_context()`.
2024-01-12 12:05:00 +07:00
Marc Durdin
33f0faf4f7
Merge pull request #10323 from keymanapp/fix/developer/10276-new-file-for-2.0-projects
fix(developer): new file support for project 2.0
2024-01-11 18:40:26 +11:00
Marc Durdin
ade94d67ca
Merge pull request #10322 from keymanapp/fix/developer/10315-fill-from-layout-handle-new-file
fix(developer): cleanly handle filling a new osk file from layout
2024-01-11 18:40:14 +11:00
Marc Durdin
c5e3309c9a chore(developer): upgrade ngrok to v3
Fixes #10357.
2024-01-11 09:29:46 +07:00
Marc Durdin
070ead74cf fix(developer): new file support for handle project 2.0
Fixes #10276.

Adding new files to a v2.0 project was unsupported. This requires a
little bit of a logic change to the two new File New dialogs:

1. The New File Details dialog does not allow changing from the
   SourcePath of the project.
2. The New File dialog does allow changing to any path. If you select a
   path outside the project path, it will open in a new window.
2024-01-05 14:19:02 +07:00
Marc Durdin
beddf05afa fix(developer): cleanly handle filling a new osk file from layout
Fixes #10315.

When filling from layout, if the .kvks file did not exist, an obscure
error was generated:

    Error: 2908 Error encountered parsing eo_plus.kvks: TypeError: Cannot read properties of null (reading 'byteLength')

Fixed this by checking for file existence before attempting to process,
which then reports a more understandable error of 'file not found'.

Then, needed to tweak the caller in Keyman Developer IDE to remove the
reference to the .kvks file before attempting to build
(chicken-and-egg).
2024-01-05 13:35:43 +07:00
Marc Durdin
84ff0424c3 fix(developer): remove unused tools/customise menu 2024-01-05 12:49:39 +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
2f59e8d38b
Merge pull request #10211 from keymanapp/fix/developer/10091-10194-touch-layout-builder-errors
fix(developer): two errors in touch layout editor
2023-12-13 08:46:04 +11:00
Marc Durdin
1b45c6b8e9
Merge pull request #10155 from keymanapp/feat/developer/10138-new-project-new-process
feat(developer): New Project opens in new process 🦕
2023-12-13 08:45:53 +11:00
Marc Durdin
0b05013fc8
Merge pull request #10154 from keymanapp/feat/developer/10149-window-menu
feat(developer): Add Window menu 🦕
2023-12-13 08:45:43 +11:00
Marc Durdin
1f06224c6e
Merge pull request #10151 from keymanapp/fix/developer/10144-10145-10146-10148
fix(developer): various project fixes 🦕
2023-12-13 08:45:30 +11:00
Marc Durdin
ee7d6e67d9 chore(developer): refactor IsTemporaryProject 2023-12-13 04:43:34 +07:00
Marc Durdin
59cb7b25d3 chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-11 21:13:33 +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
39a53d439a fix(developer): error when rescaling touch layout editor keys
Fixes #10194.
2023-12-11 12:39:33 +07:00
Marc Durdin
61a0155435 fix(developer): touch layout editor wedges don't scroll
Fixes #10091.
2023-12-11 12:39:01 +07:00
Marc Durdin
22b7f5bf07 fix(developer): crash loading a project when referenced .xml is missing
Fixes #10181.
2023-12-11 12:05:56 +07:00
Marc Durdin
40b5828263 feat(developer): New Project opens in new process
Fixes #10138.

If the current instance of Keyman Developer already has a project open,
then the New Project dialog will now open the new project in a new
instance of Keyman Developer.

Note: this also moves a couple of functions out of dmActionsMain and
into UfrmMain, as their functionality belongs more closely there. The
`TmodActionsMain.OpenProject` function has been renamed to
`TfrmMain.OpenProjectInCurrentProcess` to clarify its usage and context.
2023-12-06 12:10:12 +07:00
Marc Durdin
86e1728f97 feat(developer): Add Window menu
Fixes #10149.
2023-12-06 11:45:16 +07:00
Marc Durdin
fe772e1008 fix(developer): Validate SourcePath and BuildPath in Project Settings
Fixes #10148.

We now force the SourcePath and BuildPath project properties to be a
direct subfolder of the project folder, in order to avoid issues with
paths in the future. This is only applied to v2.0 projects, and only
enforced via the UI at this point.
2023-12-06 09:55:26 +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
ccbb00db9b fix(developer): Open recent files with long paths elided with ellipsis
Fixes #10145.

Turns out we were clobbering out internal data because Delphi strings
are copy-on-write. At the same time, moved from using the Hint property
to just referencing the source filename in the array, as that is cleaner
anyway.
2023-12-06 09:52:05 +07:00
Marc Durdin
149fc5e7c8 fix(developer): Support opening .keyman-touch-layout
Fixes #10144.

Also adds .keyboard_info, for now, although it is removed in 17.0, as
there will be numerous projects which still have a .keyboard_info and
it is handy to be able to load it and view its contents while upgrading.
2023-12-06 09:50:30 +07:00
Marc Durdin
4f83c9cf14 chore(developer): remove commented code
From TODO item in #9948.
2023-12-06 09:49:55 +07:00
Marc Durdin
4641684501 fix(developer): prevent opening .kpj in multiple processes
Fixes #10003.

Multiple small fixes required here:
* Add .kpj as an editable file type
* Ensure that when OpenFile returns nil (which it always will for a
  .kpj), that we don't crash
* Ensure that projects open in a new process rather than replacing the
  current project session

Adds a TODO for New Project -- this should be opened in a new process if
we already have a project open in the current process. Will push this
into a separate PR.
2023-12-05 15:08:05 +07:00
Marc Durdin
ff5a366c45 feat(developer): Open files in per-project instances
Refactor the file-opening code so it can be used by Keyman Developer UI
as well as command-line, and then add support for opening files in
per-project instances from File|Open and friends.

Also moves the initialization code out of tike.dpr into
Keyman.Developer.System.Main.pas, which makes it easier to maintain and
read.
2023-12-04 08:47:36 +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
11ae17c7c0 chore(developer): require project file to exist
Reverts some of the version 2.0 project functionality, as there are a
number of challenges around populating files for folders that don't have
project definitions, particularly if user attempts to load a folder that
is not a project folder after all but happens, e.g. to have a source
folder in it.
2023-11-25 16:14:22 +10:00
Marc Durdin
38f9b29cc9 fix(developer): show relative path in Distribution tab
For the Project view, the Distribution tab now shows file relative
paths, which helps with organization. Have opted _not_ to show the
relative paths in the other tabs, because that information is visible
when the file details are expanded, and because those files should
always be in SourcePath anyway.
2023-11-16 11:50:54 +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
Darcy Wong
284ec099ee
Merge pull request #9993 from keymanapp/chore/common/keymanweb-osk-ttf
chore(web,developer): Move keymanweb-osk.ttf to common/resources
2023-11-15 19:10:27 +07:00
Marc Durdin
e2b7c69f61
Merge pull request #9995 from keymanapp/chore/developer/9948-only-source-path-files-in-project-views
chore(developer): show only source path files in project views 🦕
2023-11-15 13:48:37 +11:00
Marc Durdin
dce6de57c9
Merge pull request #9989 from keymanapp/feat/developer/9948-handle-errors-loading-projects
feat(developer): handle errors loading projects 🦕
2023-11-15 13:48:29 +11:00