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
2 changes: 1 addition & 1 deletion android/KMEA/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if builder_start_action build:engine; then
cp "$KEYMAN_WEB_ROOT/build/app/resources/osk/ajax-loader.gif" "$ENGINE_ASSETS/ajax-loader.gif"
cp "$KEYMAN_WEB_ROOT/build/app/resources/osk/kmwosk.css" "$ENGINE_ASSETS/kmwosk.css"
cp "$KEYMAN_WEB_ROOT/build/app/resources/osk/globe-hint.css" "$ENGINE_ASSETS/globe-hint.css"
cp "$KEYMAN_WEB_ROOT/build/app/resources/osk/keymanweb-osk.ttf" "$ENGINE_ASSETS/keymanweb-osk.ttf"
cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$ENGINE_ASSETS/keymanweb-osk.ttf"
darcywong00 marked this conversation as resolved.
Show resolved Hide resolved

cp "$KEYMAN_ROOT/node_modules/@sentry/browser/build/bundle.min.js" "$ENGINE_ASSETS/sentry.min.js"
cp "$KEYMAN_ROOT/common/web/sentry-manager/build/lib/index.js" "$ENGINE_ASSETS/keyman-sentry.js"
Expand Down
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
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
8 changes: 7 additions & 1 deletion web/src/engine/osk/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ builder_describe "Builds the Keyman Engine for Web's On-Screen Keyboard package

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.

darcywong00 marked this conversation as resolved.
Show resolved Hide resolved
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.