Commit graph

539 commits

Author SHA1 Message Date
Marc Durdin
b452d589fb fix(developer): prevent duplicate layer name in Layer Properties dialog
Matches the test in New Layer dialog.

Fixes: #15188
Test-bot: skip
Build-bot: skip
2025-12-19 07:52:08 +11:00
Marc Durdin
5d5c46c85c fix(developer): clear message when selecting custom layer name in touch layout editor
Fixes: #15216
Test-bot: skip
2025-12-19 07:44:03 +11:00
Marc Durdin
cab9230211 fix(developer): handle Enter key in dialogs in Touch Layout Editor
Fixes: #15215
Test-bot: skip
2025-12-11 02:16:03 +08:00
Marc Durdin
6c99f33bcc
Revert "change(windows): include map2pdb generation for relevant Delphi projects" 2025-12-03 14:13:54 +01:00
Marc Durdin
3eaaacd706 fix(developer): handle errors in .keyman-touch-layout file when loading
If the .keyman-touch-layout file has validation errors, Keyman Developer
will now report the first validation error in the message window, rather
than silently closing the whole keyboard editor. The
.keyman-touch-layout file will be loaded in Code view, and once the
first validation error is addressed, switching to Design view will
report the next error.

For future improvement:
* reporting multiple validation errors
* reporting line number of error

Fixes: #15242
Test-bot: skip
2025-11-27 05:50:36 +01:00
Marc Durdin
edca16f508 change(windows): include map2pdb generation for relevant Delphi projects
Adds a call to map2pdb for Delphi projects, if map2pdb is an executable
on the path. This way, we get .pdb files we can use for debugging and
for performance profiling. This also replaces tds2dbg.

If map2dbg is available, then the build and install actions will copy
the PDB to be alongside the corresponding executable, making most debug
actions relatively seamless for finding symbols.

Also fixes up setup.exe in Windows and Developer to extend setup.exe to
a 512-byte boundary after map2pdb patches the PE.

Relates-to: #14787
Build-bot: skip release:developer,windows
Test-bot: skip
2025-11-13 14:48:18 +01:00
Marc Durdin
23b5dca1b3 fix(developer): remove package version if FollowKeyboardVersion is set in Package Editor
To reduce confusion when 'Follow Keyboard Version' is set, clear the
cached package version data from UI and .kps source when saving the
package or making changes to it.

Fixes: #11892
Test-bot: skip
2025-11-03 10:54:44 +01:00
Marc Durdin
933ea5bb58 change(developer): remove kmlmc and kmlmp
These were replaced by kmc in v17.0. We kept them as legacy alternatives
in v18.0, but it is time to remove them now to reduce the maintenance of
having multiple entry points to kmc.

Fixes: #13181
Test-bot: skip
2025-10-31 17:08:56 +01:00
Marc Durdin
344fd4bd3d
Merge pull request #15060 from keymanapp/fix/developer/handle-load-errors-for-touch-layout-builder
fix(developer): handle exceptions loading .keyman-touch-layout files
2025-10-31 06:30:42 +01:00
Marc Durdin
c255e78857
Merge pull request #15058 from keymanapp/chore/developer/11916-extra-debugging-crash-on-exit
chore(developer): add breadcrumbs to trace sporadic crashes on exit
2025-10-31 06:30:27 +01:00
Marc Durdin
0b17c632a0 fix(developer): handle exceptions loading .keyman-touch-layout files
If file is unreadable or contains invalid encoding, show a message
instead of crashing.

Build-bot: skip
Test-bot: skip
2025-10-30 15:22:47 +01:00
Marc Durdin
037e199f3c chore(developer): add breadcrumbs to trace sporadic crashes on exit
Relates-to: #11916
Test-bot: skip
2025-10-30 15:01:37 +01:00
Marc Durdin
2ba22bbe51 chore(developer): further debugging for assertion failure
Adds breadcrumbs for debug memo to try and narrow down sequence of
events leading to assertion failure with backspace.

Relates-to: #11706
Test-bot: skip
2025-10-30 14:36:25 +01:00
Marc Durdin
55d6efe482 fix(developer): prevent ANSI keyboards crashing debugger
Note: #11909 has some additional future cleanup we could do, but these
code paths are not currently accessible, so in the interest of moving
forward, am leaving them for now.

Fixes: #11909
Test-bot: skip
2025-10-24 14:45:17 +02:00
Marc Durdin
a6f476e557 fix(developer): do not treat backslash as a string escape in syntax highlighting
Adjust two incorrect rules that caused backslash to be treated as an
escape in strings in syntax highlighting in .kmn language.

Fixes: #14988
Test-bot: skip
Build-bot: skip
2025-10-23 11:55:17 +02:00
Marc Durdin
2b4a22c1cd chore(developer): use icons.res to verify that configure is done
Build-bot: skip
Test-bot: skip
2025-09-11 13:58:30 +02:00
Eberhard Beilharz
e615139348
Merge pull request #14669 from keymanapp/chore/windows/desktop 2025-09-03 11:53:46 +02:00
Eberhard Beilharz
f166f11d14
docs(common): update docs Keyman Desktop → Keyman for Windows
Also change path to engine help pages. This requires a corresponding
change in help.keyman.com.

Test-bot: skip
2025-09-02 14:29:53 +02:00
Marc Durdin
5df9e70a31 fix(developer): add clear messages about validation failures to New LM Project Parameters form
Apply new FormValidation to New Lexical Model Project Parameters form.

Follows: #14658
2025-09-01 17:07:36 +02:00
Marc Durdin
21cae0d7de fix(developer): add clear messages about validation failures to New LDML Project Parameters form
Apply new FormValidation to New LDML Project Parameters form.

Follows: #14657
2025-09-01 15:21:24 +02:00
Marc Durdin
9c656808bf chore(developer): tweak wordwrap on validation fields 2025-09-01 14:25:18 +02:00
Marc Durdin
d61bcf23da fix(developer): add clear messages about validation failures to New Project Parameters form
Add a new FormValidation class to help make a consistent declarative
field validation pattern for Keyman Developer forms, and apply that
initially to the New Keyboard Project Parameters dialog. This pattern
replaces the earlier EnableControls pattern; ideally we will replace
validation in other forms with similar validation requirements with this
over time.

Fixes: #14169
2025-09-01 13:40:40 +02:00
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
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
156bdcdd8a maint(common): rename and move builder_if_release_build_level 2025-06-16 06:45:42 +10:00
Marc Durdin
870d37f56b maint(developer): only copy .dbg/.pdb on release buildLevel 2025-06-16 05:40:30 +10:00
Marc Durdin
9f15e7c7ec maint: add empty 'scripts' tag to package.json to silence warning
Also removes './' from front of gosh.js to address another npm cleanup
(from `npm pkg fix`).

Fixes: #13833
2025-05-25 06:35:28 +07:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Marc Durdin
0f05da957f fix(developer): remove redundant Name and RTL fields from .kps LexicalModel
Follows on from the similar changes to `Keyboard` fields in #13600. This
deprecates the `RTL` and `Name` fields. `RTL` was never used. `Name` was
written but never presented to end users, so effectively irrelevant.
`Name` also was present in `File.Description` (already deprecated) for
the corresponding model.js _and_ `Info.Name`, so doubly redundant.

Also updates the schema documentation to mark the deprecated fields.

Relates-to: #13600
2025-04-02 05:39:09 +07: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
15bea6fd21 fix(developer): use '-' as placeholder for temp project name in cmdline
When launching a new instance of TIKE to open a source file that does
not have an owning project, use '-' as a placeholder for the project
filename, because passing an empty string as a parameter does not work.

Fixes: #13317
2025-03-10 08:31:04 +07:00
Marc Durdin
a62735ea4b
Merge pull request #13324 from keymanapp/feat/developer/sensible-initial-dir-for-package-add-file
feat(developer): use .kps folder as initial dir for Add Files
2025-02-28 23:35:15 +07:00
Marc Durdin
0054e76915
Merge pull request #13336 from keymanapp/fix/developer/13293-use-u0001-for-deadkey-markers-in-debugger
fix(developer): use U+0001 for deadkey markers in the debugger
2025-02-28 23:28:57 +07:00
Marc Durdin
7aa0323e74
Merge pull request #13334 from keymanapp/fix/developer/13292-handle-line-breaks-in-debugger
fix(developer): handle line breaks in debugger correctly
2025-02-28 23:27:38 +07:00
Marc Durdin
7be92a8668
Merge pull request #13327 from keymanapp/chore/add-build-edit-action-for-delphi-projects
chore: add build.sh edit action for Delphi projects
2025-02-28 23:27:03 +07:00
Marc Durdin
b92d56198b
Merge pull request #13341 from keymanapp/fix/developer/11584-prevent-opening-same-project-twice
fix(developer): prevent simultaneous opening of the same project by two processes
2025-02-27 23:18:55 +07:00
Marc Durdin
1d450f0494 fix(developer): prevent double action of editor hotkeys in debugger
With the move to the richedit control, hotkeys such as Ctrl+V are
natively managed and we no longer need to handle them separately, as
this caused actions to be applied twice.

Fixes: #13335
2025-02-25 14:47:10 +01:00
Marc Durdin
324b912a07 chore(developer): cleanup code 2025-02-25 09:22:35 +01:00
Marc Durdin
10ba3c9068 fix(developer): use hashed lockfilename for projects
For the project lock files, instead of using a filename in the same path
as the project file, with a .lock extension, use a hash of the project
filename in the Keyman Developer appdata folder, to avoid confusion and
conflict in project folders.

Fixes: #11584
2025-02-25 09:19:14 +01:00
Marc Durdin
671b1baf6e fix(developer): prevent simultaneous opening of the same project by two processes
There is a race condition where two processes may both attempt to open
the same project file. This appears to happen, for example, if an author
double-clicks on a single-click shortcut, launching Keyman Developer
twice in quick succession.

This fix adds a .lock file which is deleted automatically on close of
the project or on normal or abnormal process termination. If a second
process encounters the .lock file, it will simply open the welcome view
instead of attempting to open the project.

Fixes: #11584
Fixes: KEYMAN-DEVELOPER-1PR
2025-02-24 18:14:00 +01:00
Marc Durdin
86e141a963 chore(developer): add missing dependency reference 2025-02-24 10:56:50 +01:00
Marc Durdin
2add4d354d fix(developer): use U+0001 for deadkey markers in the debugger
Previously, we used U+FFFC as a marker in the debugger (for deadkeys and
LDML keyboard markers), which displayed as the letters OBJ in a small
dotted square. However, we switched the underlying component to
RichEdit, in order to better support rendering of many scripts (EDIT has
some problems). The RichEdit control silently converts U+FFFC to U+0020.
I switched to U+0001 as this is handled better, but has an unfortunate
missing-glyph marker.

In the future, it would be better to use a non-character marker
(leveraging RichEdit), but this is a much more complex change, and this
fix at least matches previous functionality.

Fixes: #13293
2025-02-24 10:38:33 +01:00
Marc Durdin
bdf6503eb6 chore(developer): Merge branch 'fix/developer/13292-handle-line-breaks-in-debugger' 2025-02-24 10:33:19 +01:00
Marc Durdin
cd29991697 fix(developer): additional cleanup of CRLF in debugger 2025-02-24 10:32:24 +01:00
Marc Durdin
3a9bbdaff7
Update developer/src/tike/child/UfrmDebug.pas 2025-02-24 09:51:00 +01:00
Marc Durdin
3c86ac332d fix(developer): handle line breaks in debugger correctly
The debugger memo takes input with \n but internally represents this as
\r\n, so we need to strip out \r in order to track caret position
correctly.

Fixes: #13292
2025-02-24 09:35:17 +01:00
Marc Durdin
ef60c08d7c chore: add build.sh edit action for Delphi projects
This opens up the Delphi IDE with the correct KEYMAN_ROOT environment,
which allows for debugging. This is very helpful when working with
multiple worktrees, and also helps to avoid editing a project in the
wrong tree.
2025-02-22 06:18:47 +01:00
Marc Durdin
1aaddf49c7 feat(developer): use .kps folder as initial dir for Add Files
Requested by @DavidLRowe. Default was either CWD or My Documents,
neither of which is helpful.

The initial dir will now be folder of the .kps file, and then will
remember last used folder for each additional use of the dialog for that
.kps file.
2025-02-22 06:13:03 +01:00
Marc Durdin
64410d02e9 fix(developer): Use 'desktop' for target in OSK fill temp keyboard
When the IDE fills the On Screen Keyboard on the basis of the .kmn
rules, it generates a temporary .kmn and builds it. When it does this,
it temporarily replaces the `&targets` system store with one that is
supposed to ensure that a .kmx is generated. However, previously, for
reasons long lost in history, the store was filled with the value
'windows native'.

'native' is not a valid target (this may be due to confusion with
`if(&platform)` where 'native' is permitted), and now the compiler
verifies `&targets` (as of #11918), so this broke the compile.

Now uses 'desktop' (which encompasses 'windows', 'macos', 'linux').

Fixes: #13256
Relates-to: #11918
2025-02-18 10:53:38 +07:00
Marc Durdin
7554786bc3
Merge pull request #13161 from keymanapp/fix/developer/13135-new-project-welcome-and-model-file-format
fix(developer): link welcome.htm in package for new projects; use v17 project format for new models
2025-02-10 09:10:07 +07:00