-
-
Notifications
You must be signed in to change notification settings - Fork 144
change(developer): move touch layout editor to typescript #16520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
31999ce
173e2ec
c1abf5f
d86b2b5
98fee32
099d039
641fe66
d7e231a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ builder_describe "Build Keyman Developer IDE" \ | |
| @/common/include \ | ||
| @/core:x86 \ | ||
| @/common/windows/delphi \ | ||
| :project :touch-layout-editor \ | ||
| clean configure build test publish install edit | ||
|
|
||
| builder_parse "$@" | ||
|
|
@@ -30,7 +31,6 @@ function do_configure() { | |
|
|
||
| mkdir -p "$DEVELOPER_PROGRAM" | ||
| cp "$KEYMAN_ROOT/common/schemas/kps/kps.xsd" "$DEVELOPER_PROGRAM" | ||
| cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$DEVELOPER_ROOT/src/tike/xml/layoutbuilder/src/assets/fonts/keymanweb-osk.ttf" | ||
| run_in_vs_env rc icons.rc | ||
| } | ||
|
|
||
|
|
@@ -58,11 +58,27 @@ function do_monaco_copy() { | |
| KEYMANCORE_DLL=keymancore-2.dll | ||
| KEYMANCORE_PDB=keymancore-2.pdb | ||
|
|
||
| function do_build_touch_layout_editor() { | ||
| # TODO: this could be a configure step but leaving it here while changes are in flux | ||
| cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$DEVELOPER_ROOT/src/tike/xml/layoutbuilder/src/assets/fonts/keymanweb-osk.ttf" | ||
| # TODO: do_configure_touch_layout_editor | ||
| rm -rf xml/layoutbuilder/build/assets/ | ||
| rm -rf xml/layoutbuilder/build/ext/ | ||
| mkdir -p xml/layoutbuilder/build/assets/ | ||
| mkdir -p xml/layoutbuilder/build/ext/ | ||
| cp -R xml/layoutbuilder/src/assets/* xml/layoutbuilder/build/assets/ | ||
| cp -R xml/layoutbuilder/src/ext/* xml/layoutbuilder/build/ext/ | ||
| tsc --build xml/layoutbuilder | ||
| } | ||
|
|
||
| function do_build() { | ||
| create-developer-output-folders | ||
| build_version.res | ||
| build_manifest.res | ||
|
|
||
| # todo: make this an internal dependency | ||
| do_build_touch_layout_editor | ||
|
Comment on lines
+79
to
+80
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: |
||
|
|
||
| rm -rf "$DEVELOPER_PROGRAM/xml" | ||
| mkdir -p "$DEVELOPER_PROGRAM/xml" | ||
| cp -R "$DEVELOPER_ROOT/src/tike/xml/"* "$DEVELOPER_PROGRAM/xml/" | ||
|
|
@@ -104,13 +120,14 @@ function do_install() { | |
| cp "$DEVELOPER_PROGRAM/$KEYMANCORE_DLL" "$INSTALLPATH_KEYMANDEVELOPER/$KEYMANCORE_DLL" | ||
| } | ||
|
|
||
| builder_run_action clean:project clean_windows_project_files | ||
| builder_run_action configure:project do_configure | ||
| builder_run_action build:project do_build | ||
| # builder_run_action test:project do_test | ||
| builder_run_action publish:project do_publish | ||
| builder_run_action install:project do_install | ||
| builder_run_action edit:project start tike.dproj | ||
| builder_run_action clean:project clean_windows_project_files | ||
| builder_run_action configure:project do_configure | ||
| builder_run_action build:project do_build | ||
| builder_run_action build:touch-layout-editor do_build_touch_layout_editor | ||
| # builder_run_action test:project do_test | ||
| builder_run_action publish:project do_publish | ||
| builder_run_action install:project do_install | ||
| builder_run_action edit:project start tike.dproj | ||
|
|
||
| # Note: generating monaco installer: | ||
| # @echo ******************************************************************************************* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,7 +136,8 @@ procedure TAppSourceHttpResponder.ProcessRequest(AContext: TIdContext; | |
| Filename := CrackUTF8ZeroExtendedString(ARequestInfo.CommandType, ARequestInfo.Params.Values['Filename']); | ||
| RespondTouchEditorState(Filename, AContext, ARequestInfo, AResponseInfo); | ||
| end | ||
| else if ARequestInfo.Document.StartsWith('/app/source/toucheditor/lib/') then | ||
| else if ARequestInfo.Document.StartsWith('/app/source/toucheditor/lib/') or | ||
| ARequestInfo.Document.StartsWith('/app/source/toucheditor/src/') then | ||
| begin | ||
| RespondTouchEditorLib(AContext, ARequestInfo, AResponseInfo); | ||
| end | ||
|
|
@@ -208,11 +209,16 @@ procedure TAppSourceHttpResponder.RespondTouchEditorLib( | |
| doc: string; | ||
| begin | ||
| doc := ARequestInfo.Document; | ||
| if doc.StartsWith('/app/source/toucheditor/lib/') and (Pos('..', doc) = 0) then | ||
| if doc.StartsWith('/app/source/toucheditor/src/') and (Pos('..', doc) = 0) then | ||
| begin | ||
| Delete(doc, 1, Length('/app/source/toucheditor/lib/')); | ||
| Delete(doc, 1, Length('/app/source/toucheditor/src/')); | ||
| RespondFile(GetLayoutBuilderPath + 'src/' + doc, AContext, ARequestInfo, AResponseInfo); | ||
| end | ||
| else if doc.StartsWith('/app/source/toucheditor/lib/') and (Pos('..', doc) = 0) then | ||
| begin | ||
| Delete(doc, 1, Length('/app/source/toucheditor/lib/')); | ||
| RespondFile(GetLayoutBuilderPath + 'build/' + doc, AContext, ARequestInfo, AResponseInfo); | ||
| end | ||
|
Comment on lines
209
to
+221
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems a touch WET, but I do see the distinction between Furthermore, it appears that the The new
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's correct. Both WET because it's not worth DRYing out two blocks like this -- very little gain! |
||
| else | ||
| Respond404(AContext, ARequestInfo, AResponseInfo) | ||
| end; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| # Copied from configure | ||
| src/assets/fonts/keymanweb-osk.ttf | ||
| build/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "name": "@keymanapp/developer-touch-layout-editor", | ||
| "description": "Keyman Developer Touch Layout Editor", | ||
| "keywords": [ | ||
| "keyboard", | ||
| "keyman", | ||
| "kmn", | ||
| "keyman-touch-layout", | ||
| "unicode" | ||
| ], | ||
| "type": "module", | ||
| "files": [ | ||
| "/build/src/" | ||
| ], | ||
| "author": "Marc Durdin <marc@keyman.com> (https://github.com/mcdurdin)", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/keymanapp/keyman/issues" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "^5.4.5" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/keymanapp/keyman.git", | ||
| "directory": "developer/src/tike/xml/layoutbuilder" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there is a plan to handle these TODOs in a separate PR, given they're still in the incoming changeset?