mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by giving the scripts more appropriate names. Most build scripts should use builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh. Documented in resources/build/README.md. Renames: * resources/build/builder.inc.sh to resources/build/builder-full.inc.sh * resources/build/build-utils.sh to resources/build/builder-basic.inc.sh Other changes: * Moves Android-specific functions out of builder-basic.inc.sh and into android/build.sh. * Renames functions in builder-basic.inc.sh More functions may be moved from builder-basic.inc.sh into utils.inc.sh or other scripts in the future. Fixes: #14065 Build-bot: build all Test-bot: skip
53 lines
No EOL
1.5 KiB
Bash
Executable file
53 lines
No EOL
1.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# This script is included by each sample build.sh. Accordingly, it inherits builder-basic.inc.sh, etc
|
|
# from the including script.
|
|
|
|
function do_build() {
|
|
# Copy resources.
|
|
cp -Rf "$KEYMAN_ENGINE_FRAMEWORK_SRC" "$KEYMAN_ENGINE_FRAMEWORK_DST"
|
|
|
|
CODE_SIGN=
|
|
if builder_is_debug_build; then
|
|
CODE_SIGN=CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED="NO" CODE_SIGNING_ENTITLEMENTS=""
|
|
fi
|
|
|
|
run_xcodebuild -quiet \
|
|
$CODE_SIGN \
|
|
-target "$TARGET" \
|
|
-config "$CONFIG"
|
|
}
|
|
|
|
function execute_sample_build() {
|
|
if [ -z "$TARGET" ]; then
|
|
builder_die "Usage of `execute_sample_build` must specify a target iOS sample project"
|
|
fi
|
|
|
|
builder_describe "Builds sample app $TARGET that demos the Keyman Engine for iPhone and iPad" \
|
|
"@/ios/engine build" \
|
|
"clean" \
|
|
"configure" \
|
|
"build" \
|
|
"--sim-artifact+ Unused by this build at present"
|
|
|
|
builder_parse "$@"
|
|
|
|
local CONFIG=Release
|
|
if builder_is_debug_build; then
|
|
CONFIG="Debug"
|
|
fi
|
|
|
|
local BUILD_FOLDER="ios/samples/$TARGET/build"
|
|
|
|
builder_describe_outputs \
|
|
build "/$BUILD_FOLDER"
|
|
|
|
### START OF THE BUILD ###
|
|
|
|
# NOT local b/c they're needed by do_build.
|
|
KEYMAN_ENGINE_FRAMEWORK_SRC="$KEYMAN_ROOT/ios/build/Build/Products/$CONFIG/KeymanEngine.xcframework"
|
|
KEYMAN_ENGINE_FRAMEWORK_DST=./
|
|
|
|
builder_run_action clean rm -rf "$KEYMAN_ROOT/$BUILD_FOLDER"
|
|
builder_run_action build do_build
|
|
} |