Commit graph

1686 commits

Author SHA1 Message Date
Steven R. Loomis
1b944e7578 feat(developer): update to basic.txt for key-not-found 🙀
- rest of keys.
- found that the reserved gap key was 1/10th width, but fixed

For #9451
2023-12-15 18:02:06 -06:00
Steven R. Loomis
fd5cf041ff feat(developer): update to basic.txt for key-not-found 🙀
- add the new gap key
- start adding the additional vkeys

For #9451
2023-12-14 19:06:49 -06:00
Steven R. Loomis
5fd1f98f7f feat(developer): fix import 🙀
For #9451
2023-12-13 18:28:55 -06:00
Steven R. Loomis
c3dfc9422f feat(developer): add reserved gap keys to fill out the layer 🙀
- fix the row loop

For #9451
2023-12-12 18:51:12 -06:00
Steven R. Loomis
a4f20f99e4 feat(developer): add reserved gap keys to fill out the layer 🙀
- add keys on each row and add rows, mapping to a new reserved "gap (reserved)" key.
- add a mechanism for reserved keys, in case we have others…

For #9451
2023-12-12 18:42:25 -06: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
ff87042974 chore(developer): make getOption synchronous 2023-12-11 21:16:16 +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
a63070d4db
Merge pull request #10158 from keymanapp/feat/developer/10147-hint-if-old-project-file-version
feat(developer): kmc emit hint if project file is old version 🦕
2023-12-12 01:12:18 +11:00
Marc Durdin
e57766d1b1 feat(developer): retry on locked file when reading options 2023-12-11 21:00:51 +07:00
Marc Durdin
67379f4603 feat(developer): use ~/.keymandeveloper/options.json for TS sentry 2023-12-11 16:01:56 +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
e5c4f7134d feat(developer): kmc emit hint if project file is old version
Fixes #10147.
2023-12-06 14:01:21 +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
cb8c114ff8 chore(developer): add unit to kmconvert 2023-12-06 11:45:03 +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
4c7b7992da
Merge pull request #10137 from keymanapp/fix/developer/10003-opening-multiple-kpj
fix(developer): prevent opening .kpj in multiple processes 🦕
2023-12-06 12:00:32 +11:00
Marc Durdin
56d5f379df
Merge pull request #10114 from keymanapp/feat/developer/multi-process-file-loading
feat(developer): Multi-process model for projects 🦕
2023-12-06 10:50:47 +11: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
4f9f71da3c chore(developer): add build.sh dep 2023-12-02 06:25:01 +07:00
Marc Durdin
c520918646 chore(developer): support publish and pack in build.sh 2023-12-02 05:49:16 +07:00
Marc Durdin
662ed0e50c fix(common): publish @keymanapp/developer-utils as npm module
Fixes #10111.
2023-12-01 14:05:51 +07:00
Marc Durdin
0bc426cf1a
Merge pull request #10092 from keymanapp/fix/developer/project-internal-paths
chore(developer): require project file to exist 🦕
2023-12-01 16:31:40 +11:00
Marc Durdin
915510b845 chore(developer): remove obsolete files 2023-12-01 12:00:56 +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
3ef4dc7f84
Merge pull request #10016 from keymanapp/fix/developer/project-internal-paths
fix(developer): projects 2.0 internal path enumeration 🦕
2023-11-29 16:50:25 +11:00
Marc Durdin
458385f6b8
Merge pull request #10064 from keymanapp/fix/developer/10027-path-separator-for-kmc-package
fix(developer): path separator for kmc-package
2023-11-29 16:01:51 +11:00
Steven R. Loomis
02c8db9fdd
Merge branch 'master' into feat/developer-9446-bad-unicode-epic-ldml 2023-11-25 14:08:41 -06:00
Steven R. Loomis
bb63ba8a66
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-11-25 13:51:53 -06: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
e5da0aacc2 chore(developer): fixup test fixture 2023-11-25 05:16:03 +10:00
Marc Durdin
b3b2825168 fix(developer): path separator for kmc-package
Fixes #10027.
2023-11-23 16:45:12 +10:00
Marc Durdin
e983818bda feat(developer): warn on usage of virtual keys in rule output
Fixes #10059.

Use of the unsupported and undocumented virtual key output, that doesn't
work in recent Keyman versions, at all, now results in a build warning.

Only a warning, because it did kinda work in old versions of Keyman.
2023-11-23 15:13:56 +10:00
Marc Durdin
94a9e91e61 fix(developer): generate version 2.0 keyboard project 2023-11-22 09:33:55 +10:00
Steven R. Loomis
c42615420d feat(developer): err/hint on illegal/pua 🙀
- also found that kmc's validate() should have been async but wasn't, a little bit of churn because of this
- unassigned not implemented yet, but tests in place for it.
- change SectionCompiler.postValidate to only be called during the validate() run of compilation. This way messages will only show once.

For: #9446
2023-11-17 22:41:58 +00:00