Commit graph

264 commits

Author SHA1 Message Date
Marc Durdin
18d00c7701 fix(core): use NDEBUG flag to disable assertions in release build for VC++
This disables assertions in release builds in Windows only. Other
platforms may have different outcomes.

Fixes: #12619
2024-11-27 15:34:34 +07:00
rc-swag
e41a8cbbb6
Merge pull request #12259 from keymanapp/feat/windows/11471/right-modifier-hk
feat(windows): add right modifier included in hotkey optional functionality
2024-09-06 13:40:14 +10:00
rc-swag
10c343fc43 feat(windows): change verb use to allow for clarity 2024-09-02 13:31:21 +10:00
rc-swag
f0827b4d1e
Merge pull request #12252 from keymanapp/feat/windows/11471/remove-old-flags-modifier
feat(windows): Remove hotkey related feature flags
2024-09-02 12:59:12 +10:00
rc-swag
d70ad35691 chore(windows): Merge branch 'feat/windows/11471/remove-old-flags-modifier' into feat/windows/11471/right-modifier-hk 2024-09-02 11:46:00 +10:00
rc-swag
20a9ecdb78 feat(windows): address review comments 2024-09-02 11:33:55 +10:00
rc-swag
500c800bb4 feat(windows): remove developer debug logging 2024-08-27 11:01:50 +10:00
Marc Durdin
e1bf42ed31
Merge pull request #12274 from keymanapp/chore/windows/12247-remove-remaining-makefiles
chore(windows): remove remaining unused Makefiles
2024-08-24 04:34:14 +02:00
Marc Durdin
9a8b6d1279 chore(windows): remove remaining unused Makefiles
Fixes: #12247
2024-08-23 18:12:06 +02:00
rc-swag
2927f57c04 feat(windows): missed checked in file 2024-08-23 15:41:31 +10:00
Marc Durdin
f082ddc070 chore(common): adjust build settings for windows clean builds 2024-08-22 13:20:52 +02:00
rc-swag
05d52463f9 feat(windows): remove registerhotkey and cache modifier
Remove the feature flags that allows the use of cached modifier for
hotkeys. Remove the feature flag that uses the Win 32 API
RegisterHotkeys.
2024-08-22 15:45:23 +10:00
rc-swag
98787afbdc feat(windows): restore removal of klogging 2024-08-20 11:15:50 +10:00
rc-swag
b7b17686ec feat(windows): add rmodifier hk to keyman config UI 2024-08-19 14:01:43 +10:00
rc-swag
be55dabdc4 feat(windows): add right modifier key option pt1 2024-08-16 22:15:42 +10:00
Marc Durdin
98560dd644
Merge pull request #12030 from keymanapp/refactor/developer/kmcmplib-compiler-errors
refactor(developer): move functions and variables into CompilerErrors.cpp 🌋
2024-08-03 12:07:49 +10:00
Marc Durdin
833efeb53f refactor(developer): move functions and variables into CompilerErrors.cpp
Groundwork for rework of compiler errors. No functional changes.
2024-07-26 10:03:12 +07:00
Marc Durdin
6fe81cb256
Merge branch 'master' into refactor/windows/cleanup-engine-logging 2024-07-04 10:23:00 +10:00
Marc Durdin
1be73a9c2e refactor(windows): clean up logging
* Remove unused parameters from SendDebugMessage functions
* Add SendDebugEntry and SendDebugExit functions for tracking
  function entry/exit
* Add indenting and function names to log entries
* Remove unused debug functions
* Eliminate now-unused hwnd parameter in initialization functions
* Replace Log,LogEntry,LogExit functions with SendDebug equivalents in
  kmtip

Many functions now have SendDebugEntry/SendDebugExit (or
return_SendDebugExit) pairs. It is important to SendDebugExit on all
returns from a function to keep the log indent depth consistent. In some
cases I chose not to add these logging calls, e.g. on frequently called
functions such as the message hooks.
2024-07-03 21:28:37 +10:00
Marc Durdin
643ebca530 refactor(windows): merge keyman64 build into keyman32
Merges the build settings for keyman64.dll vc++ project into the
keyman32.dll project, so they are both built from the same project, in
preparation for ARM support, to minimize repetition in the source tree.

There should be no material differences to the built libraries.

Also cleans up some noise in keyman32.vcxproj which made it easier to
verify the changes.

Fixes: #11904
2024-07-02 17:00:38 +10:00
Marc Durdin
4cc6c3699f
Merge pull request #11611 from keymanapp/chore/windows/support-port-in-httpuploader
chore(windows): support port in THTTPUploader
2024-05-31 13:07:46 +07:00
Marc Durdin
a68124b5e6 chore(windows): support port in THTTPUploader
This can be useful for debugging scenarios, where we want to use a local
test HTTP server on a different port, e.g. setting
`development.urls.api_keyman_com_host` to `localhost:8058`.
2024-05-30 08:20:43 +07:00
Marc Durdin
1826c13f35 fix(developer): make top row of Character Map 1 pixel to avoid DIV/0 in gestures
An apparent issue in the Grid control in Delphi is that if the top row
is zero pixels high (hiding it), a pan gesture on touchscreen causes an
EDivByZero. This patch works around the issue by making the top row 1
pixel high.

Fixes: #11589
Fixes: KEYMAN-DEVELOPER-1C3
Fixes: KEYMAN-WINDOWS-43C
2024-05-28 14:25:48 +07:00
Marc Durdin
8b2070c339 chore(developer): minor cleanup on scripts
Additional shared script resources for Developer and Windows,
refactor of a code signing function, refactor of clean step in build.sh.
2024-05-20 06:35:11 +07:00
Marc Durdin
8b6d6b0618 chore(developer): cleanup on build scripts
A round of cleanup and consistency for Developer build scripts.
2024-05-20 06:35:05 +07:00
Marc Durdin
b399637799 chore(common): adjust dependency order 2024-05-20 06:35:00 +07:00
Marc Durdin
c1366763eb chore(common): add dependency 2024-05-20 06:34:59 +07:00
Marc Durdin
fa57d5c674 chore(developer): final work on build.sh for developer
Now builds from a clean repo:

  developer/src/build.sh configure build test publish

* Splits kmbrowserhost into kmdbrowserhost for Developer; this means
  that Developer Browser Host now inherits the Developer settings rather
  than the Keyman for Windows settings, and simplifies distribution and
  management. The only difference between the two is in the startup code
  so this seems like a good split.

* Cleanup of various build scripts and dependencies.
2024-05-20 06:34:53 +07:00
Marc Durdin
c8a1c6aa39 chore(developer): use builder.inc.sh instead of build-utils.sh in build scripts
also, remove old Makefiles
2024-05-20 06:34:46 +07:00
Marc Durdin
2499ebf4bb chore(developer): move windows common Makefiles to build scripts
Relates to #11317.
2024-05-20 06:34:38 +07:00
Marc Durdin
b003e7b4bf chore(common): builder_describe and builder_parse should come first
builder_describe and builder_parse should come before other tests, so
that (a) scripts can return --help details, and (b) so that
builder.inc.sh can tell that the script is a valid builder script, even
if environment means that the script will not otherwise run.
2024-05-02 15:54:32 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
d019707a65
Merge pull request #11244 from keymanapp/fix/developer/11199-export-osk-without-keyman-installed
fix(developer): support export of visual keyboard when Keyman for Windows not installed
2024-04-26 17:08:58 +10:00
Marc Durdin
571fbb6c50 fix(developer): don't include DTD in visual keyboard export
The DTD reference at tavultesoft.com is no longer valid. In order for
the .xml file to be parseable, we need to remove the DTD reference. This
resolves the issue where the emitted .html file is blank, and adds an
additional step of verifying that the .xml file loads successfully in
the XML to HTML transform.
2024-04-26 10:07:01 +07:00
Marc Durdin
89773e13de fix(developer): support export of visual keyboard when Keyman for Windows not installed
Fixes #11199.
2024-04-18 10:26:06 +07:00
Marc Durdin
2d6ab45f9a fix(developer): emit JSON strings as characters, not surrogate pairs
Fixes #11193.

The JSON pretty-printed format in Delphi would emit strings with
surrogate pairs as e.g. "\uD801\uDDB0" instead of the character. This
change uses TStringBuilder which emits the characters cleanly.
2024-04-18 09:20:40 +07:00
rc-swag
d711856f72
Merge pull request #11152 from keymanapp/fix/windows/11005/decode-uri-packageid
fix(windows): decode uri for Package ID and filename
2024-04-05 12:57:54 +10:00
rc-swag
653cb3b4b3 fix(windows): ditch the Indy library use own URLDecode 2024-04-04 14:26:23 +10:00
rc-swag
636d21fe4a fix(windows): decode packge id at assignment encode uri creation
decode the package_id when assinged. encode it again when
the uri is formated.
2024-04-04 09:14:44 +10:00
Steven R. Loomis
5b1c853557 fix(common,core): support other lookup for modifiers
- the 'other' keyword was incorrectly called 'default'

Fixes: #11072
2024-04-01 23:21:33 -05:00
Steven R. Loomis
5615a5eb4c chore(common): add more references to 0x10000
- at least add comments pointing back to keyman_core_ldml.ts

Fixes: #11072
2024-04-01 12:26:00 -05:00
Marc Durdin
374955d838 fix(developer): suppress emission of new empty fields in package editor
Fixes #11002.

The fields `<RelatedPackages/>` and `<Examples/>` should not be emitted
if they have no content, to improve file backward-compatibility.
2024-03-15 18:41:56 -05:00
rc-swag
89f6770a78 chore(windows): add const to argument definition
Updated the call stack to keep a const string for the value parameter
being written to registry.

SaveKeyboardOptionCoretoRegistry calls
IntSaveKeyboardOptionCoretoRegistry which calls
RegistryFullAccess::WriteString which calls
RegSetValueExW, which takes a const data parameter.
2024-02-09 11:11:27 +10: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
69a11c9ceb chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-13 05:05:53 +07:00
Marc Durdin
3d5506ef3e chore(windows): move reportExceptions check in exception handler to caller 2023-12-11 20:44:53 +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
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
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