Commit graph

10 commits

Author SHA1 Message Date
Marc Durdin
f8ce6c0ed1 fix(developer): handle failure to create destination path when generating new project
Add better error handling for situation where destination path cannot be
created, for all project types. Also report back the Windows error
message which hopefully clarifies why the directory could not be
created.

Fixes: #14348
Fixes: KEYMAN-DEVELOPER-1P1
Fixes: KEYMAN-DEVELOPER-2SN
Test-bot: skip
2025-08-30 06:15:11 +02:00
Marc Durdin
9dabcc0306 fix(developer): remove redundant keyboard fields from .kps
The fields 'name', 'version', and 'rtl' were defined in the .kps file,
but were not actually used by the compiler, as kmc-package reads the
metadata from the keyboard file rather than relying on this data, which
often is out of date. This led to confusion for keyboard authors, so
this change removes that metadata from the package.

The one visible side-effect (apart from the data disappearing from
future .kps files) is that the package editor no longer shows this
metadata in the Keyboards view (but as it may be out-of-date, this is
probably a good thing).

Fixes: #13576
Fixes: #13593
2025-03-28 14:07:23 +07:00
Marc Durdin
503d045fee fix(developer): for new projects, link welcome.htm in package; use v17 project format for new models
* Links welcome.htm in the package details for all project types
* Uses v17 project file format for new lexical model projects
* Nit: changes shortcut key for 'supported languages' from 'l' to 's'
  to fix conflict with 'full copyright'.

Fixes: #13135
2025-02-07 13:50:11 +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
94a9e91e61 fix(developer): generate version 2.0 keyboard project 2023-11-22 09:33:55 +10:00
Marc Durdin
0285993fcf feat(developer): New Project - Description field and tweaks
Fixes #9869.

Adds a 'Description' field, tweaks Copyright strings, and tweaks
default content for documentation to the New Project wizards and
kmconvert.
2023-11-07 06:04:33 +07:00
Marc Durdin
a093507a4c chore(developer): remove .keyboard_info sources
Fixes #9551.

Removes various .keyboard_info files from test fixtures and also removes
generation of .keyboard_info source files from kmconvert, alongside now-
redundant tests (cvt.dpr).
2023-09-25 12:19:26 +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
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
a160a5c709 chore(developer): move source files to /developer/src 2022-05-18 10:34:48 +10:00
Renamed from windows/src/developer/kmconvert/Keyman.Developer.System.KeyboardProjectTemplate.pas (Browse further)