- 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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
- 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