Skip to content
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

chore(web,developer): Move keymanweb-osk.ttf to common/resources #9993

Merged
merged 11 commits into from
Nov 15, 2023
5 changes: 5 additions & 0 deletions developer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,9 @@ builder_describe \

builder_parse "$@"

builder_describe_outputs \
configure /developer/src/tike/xml/layoutbuilder/keymanweb-osk.ttf

builder_run_action configure cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$KEYMAN_ROOT/developer/src/tike/xml/layoutbuilder/"
darcywong00 marked this conversation as resolved.
Show resolved Hide resolved

builder_run_child_actions clean configure build test
1 change: 1 addition & 0 deletions developer/src/tike/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

build: version.res manifest.res icons dirs xml xsd pull-core
cd $(DEVELOPER_ROOT)\src\tike
$(COPY) $(KEYMAN_ROOT)\common\resources\fonts\keymanweb-osk.ttf $(DEVELOPER_ROOT)\src\tike\xml\layoutbuilder\keymanweb-osk.ttf
$(DELPHI_MSBUILD) tike.dproj "/p:Platform=Win32"
$(SENTRYTOOL_DELPHIPREP) $(WIN32_TARGET_PATH)\tike.exe -dpr tike.dpr
$(TDS2DBG) $(WIN32_TARGET_PATH)\tike.exe
Expand Down
2 changes: 2 additions & 0 deletions developer/src/tike/xml/layoutbuilder/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copied from configure
keymanweb-osk.ttf
9 changes: 7 additions & 2 deletions web/src/engine/osk/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ builder_describe "Builds the Keyman Engine for Web's On-Screen Keyboard package
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \

builder_describe_outputs \
configure /node_modules \
configure /web/src/resources/osk/keymanweb-osk.ttf \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait... can the builder-script setup actually support two separate lines for the same action:target without losing one of them? If so... wish I'd known that; there's a lot of Web scripts that could use multiple output-checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping that syntax works. builder.inc failed when I originally had

  configure  /node_modules \
             /web/src/resources/osk/keymanweb-osk.ttf \
  build ...

Copy link
Member

@mcdurdin mcdurdin Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, currently it's only one output per target. Anything more is a future builder feature.

build /web/build/$SUBPROJECT_NAME/lib/index.mjs

builder_parse "$@"

#### Build action definitions ####

builder_run_action configure verify_npm_setup
if builder_start_action configure; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

builder_describe_outputs (line 32) needs configure to point to the font, because /node_modules is already present, so this step is skipped.

verify_npm_setup
cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$KEYMAN_ROOT/web/src/resources/osk/"
builder_finish_action success configure
fi

builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME"
builder_run_action build compile $SUBPROJECT_NAME
builder_run_action test test-headless osk
2 changes: 2 additions & 0 deletions web/src/resources/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copied from configure
keymanweb-osk.ttf
Binary file removed web/src/resources/osk/keymanweb-osk.ttf
Binary file not shown.