Commit graph

3486 commits

Author SHA1 Message Date
Marc Durdin
64b4a25cc5 chore(developer): rename WebHost to Server 2021-12-22 09:15:53 +11:00
Marc Durdin
cfbcc36e27 chore: more cleanup and polish 2021-12-22 08:39:15 +11:00
Marc Durdin
2a38c69faa chore(developer): minor web server refactors and cleanup 2021-12-22 07:01:57 +11:00
Marc Durdin
2c01b19f69 chore: cleanup
1. Renamed form UfrmNGrokOptions to UfrmServerOptions
2. Renamed kmdev-server to just plain server
3. Tidied up npm versioning to use VERSION_WITH_TAG

This last point should help avoid confusion as now only CI release
builds will ever generate a package.json with a.b.c, a.b.c-alpha or
a.b.c-beta. Local and test builds will always have the corresponding
-test or -local environment appended. This also helps avoid issues if
we accidentally publish an incorrect version.
2021-12-22 06:25:22 +11:00
Marc Durdin
87f0d80f7b chore: fix bundle.sh call 2021-12-22 05:44:17 +11:00
Marc Durdin
5fccc1161d chore(developer): refactor model compiler bundling into bash script
This made the string processing needed much simpler than
when it was embedded within the Makefile, where horrible
escaping proved necessary.
2021-12-22 04:47:05 +11:00
Marc Durdin
23a29e25b3 fix(developer): tweak script for npm fix 2021-12-21 19:00:21 +11:00
Marc Durdin
a5575e0d8e fix(developer): work around devDependencies bug in npm
Relates to https://github.com/npm/cli/issues/2921

This issue arises after moving from npm 6.x to 7.x or later. As the
build agents are still on 6.x, we have not yet seen this issue there.

As part of the release build for Keyman Developer, we bundle up some
files and do some work in a temp folder to prepare folders for release.
Even though we are only working with `dependencies` (e.g. using `npm
install --production`), packages under `devDependencies` are still
wrongly being checked by NPM. As we have two modules present in
`devDependencies` that are only available when in the repo path, we need
to remove them before attempting to continue. Yuck!

ref: https://github.com/npm/cli/issues/3975#issuecomment-985305678
ref: https://github.com/npm/cli/issues/2921
2021-12-21 17:10:16 +11:00
Marc Durdin
f67a5ed9c6 chore(developer): fixup release build 2021-12-21 17:09:04 +11:00
Marc Durdin
51dc6e45c7 chore(developer): cleanup build and remove old ngrok code 2021-12-21 12:08:42 +11:00
Marc Durdin
44b0335fed feat(developer): Keyman Developer Server
Initial commit for Keyman Developer Server, running on Node.

Supports web debugger only at this point.

Extensive rewrite of web debugger, much of it more modern standards,
significantly improved UX:

1. Drop keyboards, packages, fonts, models onto debug page to load them
2. Websocket for instant reload of recompiled keyboards, packages,
   models.
3. API for interacting with debug server.
4. Cache of recently used items.
5. Integration with ngrok for public access as desired.
6. Tray icon (currently default icon) for control of server.
7. Server can live after TIKE closes, supports multiple TIKE instances.
8. UI of debug host page rewritten with Bootstrap.
9. Packages downloads integrated into main page, and download link for
   Keyman supports all platforms (Linux is just a link to
   instructions...)
10. Avoids file locking and contention by managing all files internally.
11. Not yet tested, but should run cross-platform.
2021-12-21 09:06:16 +11:00
rc-swag
48f179d14c
fix(windows): apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-12-20 10:03:45 +10:00
Marc Durdin
e569f0aba4 chore(developer): Merge branch 'master' into feat/developer/node-based-debugger-server 2021-12-20 10:41:17 +11:00
Ross
1ba0fc2eba fix(windows): fix scaling to protect divide by zero 2021-12-17 15:18:57 +10:00
Marc Durdin
4e50cfa54c chore(windows): nmake makefile cleanup
Only comments formatted per earlier required from @ermshiperete.
2021-12-17 15:48:24 +11:00
Marc Durdin
c5f66f400b
Merge pull request #6059 from keymanapp/docs/windows/split-accounts
docs(windows): Add note on split user/admin accounts
2021-12-17 15:19:43 +11:00
Marc Durdin
b87cb93634
Merge pull request #6062 from keymanapp/chore/developer/add-browse4folder-to-components
chore(developer): add browse4folder to components
2021-12-17 15:19:19 +11:00
Marc Durdin
d24d1798c2
Merge pull request #6061 from keymanapp/fix/developer/project-mru-path
fix(developer): project_mru.xml path
2021-12-17 15:18:42 +11:00
Marc Durdin
a08bc04ec2
Merge pull request #6036 from keymanapp/feat/developer/cache-web-debug-objects
feat(developer): cache web debug objects across sessions 🛒
2021-12-17 15:16:52 +11:00
Marc Durdin
1513398666
Merge pull request #6035 from keymanapp/feat/developer/live-reload-kmw
feat(developer): live reload of web debugger 🛒
2021-12-17 15:16:39 +11:00
Marc Durdin
b5e7e87719
Merge pull request #6034 from keymanapp/feat/developer/tidy-up-package-list-in-kmw-test
feat(developer): tidy up package list in web test view 🛒
2021-12-17 15:14:40 +11:00
Marc Durdin
7d9fc8c308
Merge pull request #6033 from keymanapp/feat/developer/remember-kmw-prefs-on-reload
feat(developer): remember test page preferences on reload 🛒
2021-12-17 15:14:32 +11:00
Marc Durdin
bf7b6d22f9 chore(developer): add browse4folder to components 2021-12-17 13:06:11 +11:00
Marc Durdin
f6624f1cd0 fix(developer): project_mru.xml path 2021-12-17 12:43:32 +11:00
Marc Durdin
0a29123f31 feat(developer): ngrok configuration
Adds ngrok configuration dialog and processes for downloading, updating
and setting up ngrok.

It is likely this will change with a refactor of the web debugger into a
standalone node module in the future. This will add support for multi-
instance Keyman Developer and be another step towards a cross-platform
IDE.
2021-12-17 12:17:46 +11:00
Marc Durdin
e3e1035d74
docs(windows): Add note on split user/admin accounts
If the computer has split user/admin accounts, then language association may not be completed automatically, and the user may need to add a language association themselves.

Ref https://community.software.sil.org/t/what-security-permissions-are-needed-to-install-a-keyboard-configuration-in-keyman/5695/10

Note: the topic `configure-computer` has a terrible url but I won't fix that here. Suggested future fix -- turn `configure-computer` into a redirect to `link-keyboard-to-language` or `associate-keyboard-with-language`?

@keymanapp-test-bot skip
2021-12-17 07:07:58 +11:00
Ross
c167d8bdda fix(windows): add x64 build fix invalid memory access
This commit adds x64 build for the imsample.dll.
It also fixes the a invalid memory access error that
occured when UnloadRules was called when a Keyboard
had been created but the rules not yet loadeded.

KeymanIMReloadConfig function returned a invalid
code excution point this was fixed by addeding it
to the imsample.def
2021-12-16 10:52:20 +10:00
Darcy Wong
c5238f026e chore(common): Check in crowdin strings for Waha 2021-12-15 15:57:26 +07:00
Marc Durdin
06c5464b1a feat(developer): web debugger ngrok integration
Initial integration of ngrok into Keyman Developer web debugger
experience, so that the user can access their web debug session from
another device without significant configuration. By default, ngrok is
switched off, but when it is enabled and configured (user must register
an email address online I think), then Keyman Developer will start an
ngrok tunnel in the background and make it the default link in the list
of available addresses.

This also adds an option to hide the list of local addresses, which is
probably clearer for users when ngrok is active. However, as local
addresses will be faster if configured, it may be less sensible to do
this.

If the user has ngrok installed and in use already, then it is
recommended that they simply open a tunnel via the ngrok interface for
the debugger web host, rather than relying on Keyman Developer's
internal integration, as Keyman Deveoper does not do handle multiple
ngrok sessions.

The user may choose to make the ngrok tunnel window visible, which will
be helpful in error scenarios.

If Keyman Developer crashes, the ngrok tunnel may be left running, and
will need to be manually killed.
2021-12-15 19:06:03 +11:00
Darcy Wong
c98ce761b2 chore(common): Check in crowdin strings for Marghi
This checks in the crowdin strings for the locale `mrt` for Marghi.
Does not include macOS.

TODO: Check on adding mrt locale in XCode
2021-12-15 12:48:09 +07:00
Darcy Wong
06835125e6 chore(common): Check in crowdin strings for Kibaku
This checks in the crowdin strings for the locale `kr` for Kanuri.
Does not include macOS.

TODO: Check on adding ckl locale in XCode
2021-12-15 10:42:18 +07:00
Darcy Wong
57d8929eca chore(common): Check in crowdin strings for Kanuri
This checks in the crowdin strings for the locale `kr` for Kanuri.
Does not include macOS.

TODO: Check on adding kr-NG locale in XCode
2021-12-15 09:57:54 +07:00
Ross
6ad28fb359 fix(windows): remove unused varialbe
Build was failing due to unused variable error.
2021-12-13 14:49:38 +10:00
Marc Durdin
dcff86c2eb fix(developer): use correct cache key 2021-12-13 05:43:33 +01:00
Marc Durdin
32337e0087
Merge pull request #6030 from keymanapp/chore/windows/build-without-delphi
chore(windows): build without delphi ✈
2021-12-11 14:39:47 +11:00
Marc Durdin
1f678de3c4 chore: address review comment 2021-12-11 04:39:36 +01:00
Marc Durdin
ba8c6a165a
Merge pull request #6022 from keymanapp/chore/windows/no-more-mkver
chore(windows): replace mkver with mkver.sh ✈
2021-12-11 14:38:02 +11:00
Marc Durdin
36a5ae6f2a
Merge pull request #6021 from keymanapp/chore/windows/grep-to-findstr
chore(windows): use findstr instead of Borland grep ✈
2021-12-11 14:37:52 +11:00
Marc Durdin
2f19660db1
Merge pull request #6020 from keymanapp/chore/windows/make-to-nmake
chore(windows): move from Borland make to nmake ✈
2021-12-11 14:37:44 +11:00
Marc Durdin
92619336d0
Merge pull request #6019 from keymanapp/chore/windows/version-rc-macros
chore(windows): version.rc use macros instead of mkver ✈
2021-12-11 14:37:35 +11:00
Marc Durdin
2ac905c2ea feat(developer): cache web debug objects across sessions
Keyman Developer now remembers the 10 most recently debugged keyboards,
models and packages in the web debugger, across sessions. It determines
the recency of use by the last access time of the object, and caches at
most 10 of each type of object when the IDE session ends.

The cache data is stored in %appdata%\Keyman\Keyman Developer\WebDebugCache.json.

The web debugger is now always available when Keyman Developer is
running, even if the user has not yet clicked 'Start Web Debugging', as
otherwise cached web debug objects would not be immediately available.

Keyman Developer will verify that files listed in the cache are still
available, and will remove them on startup if the file disappears.
2021-12-10 17:17:14 +01:00
Marc Durdin
4f4427dd0d feat(developer): live reload of web debugger
Adds polling for changes to keyboards or models under test in the
web debugger. When changes are detected, the keyboards and/or models
are instantly reloaded automatically.
2021-12-10 13:36:52 +01:00
Marc Durdin
01a253d5f7 fix(developer): fix storage for null model 2021-12-10 11:22:24 +01:00
Marc Durdin
0ece9b09f8 feat: use package name instead of id 2021-12-10 11:12:24 +01:00
Marc Durdin
540585cf36 feat(developer): tidy up package list in web test view
Merges into #6033.

Tidies up the package download page in the web test view, making it
clearer and less verbose, while offering more detail.
2021-12-10 11:07:51 +01:00
Marc Durdin
0b74c5c232 feat(developer): remember test page preferences on reload
Emerges from ELTW demos.

Remembers the user's selected model and device when they refresh the
page.
2021-12-10 10:49:59 +01:00
Marc Durdin
38a10286eb chore(windows): tweak build and config docs 2021-12-10 05:31:18 +01:00
Marc Durdin
365b867a86 chore(windows): tweak PathDefines.mak building 2021-12-09 16:10:43 +01:00
Marc Durdin
988fec305c chore(windows): enable build without Delphi installed
This makes it possible to run `set NODELPHI=1`, `nmake build` and then
only non-Delphi projects will be built.
2021-12-10 00:10:54 +11:00
Marc Durdin
b4e6ceea25 chore: fixup additional version.rc 2021-12-09 06:16:25 +01:00