spiegel-keyman/developer/src/kmdbrowserhost/build.sh
Marc Durdin f394245636 maint(common): consolidate builder scripts
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
2025-08-02 08:11:24 +10:00

54 lines
2.2 KiB
Bash
Executable file

#!/usr/bin/env bash
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh"
## END STANDARD BUILD SCRIPT INCLUDE
builder_describe "Chromium browser host process for Keyman Developer" \
@/common/include \
@/common/windows/delphi \
clean configure build test publish install edit
builder_parse "$@"
#-------------------------------------------------------------------------------------------------------------------
source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh"
WIN32_TARGET="$WIN32_TARGET_PATH/kmdbrowserhost.exe"
builder_describe_outputs \
configure:project /resources/build/win/delphi_environment_generated.inc.sh \
build:project /developer/src/kmdbrowserhost/$WIN32_TARGET
#-------------------------------------------------------------------------------------------------------------------
function do_build() {
create-developer-output-folders
build_version.res
build_manifest.res
delphi_msbuild kmdbrowserhost.dproj "//p:Platform=Win32"
sentrytool_delphiprep "$WIN32_TARGET" kmdbrowserhost.dpr
tds2dbg "$WIN32_TARGET"
cp "$WIN32_TARGET" "$DEVELOPER_PROGRAM"
builder_if_release_build_level cp "$WIN32_TARGET_PATH/kmdbrowserhost.dbg" "$DEVELOPER_DEBUGPATH"
}
function do_publish() {
# test that (a) linked manifest exists and correct
wrap-mt -nologo -inputresource:"$DEVELOPER_PROGRAM/kmdbrowserhost.exe" -validate_manifest
wrap-signcode //d "Keyman Developer" "$DEVELOPER_PROGRAM/kmdbrowserhost.exe"
wrap-symstore "$DEVELOPER_PROGRAM/kmdbrowserhost.exe" //t keyman-developer
wrap-symstore "$DEVELOPER_DEBUGPATH/kmdbrowserhost.dbg" //t keyman-developer
}
builder_run_action clean:project clean_windows_project_files
builder_run_action configure:project configure_windows_build_environment
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 cp "$DEVELOPER_PROGRAM/kmdbrowserhost.exe" "$INSTALLPATH_KEYMANDEVELOPER/kmdbrowserhost.exe"
builder_run_action edit:project start kmdbrowserhost.dproj