mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 02:15:32 +00:00
This opens up the Delphi IDE with the correct KEYMAN_ROOT environment, which allows for debugging. This is very helpful when working with multiple worktrees, and also helps to avoid editing a project in the wrong tree.
58 lines
2.2 KiB
Bash
Executable file
58 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.inc.sh"
|
|
## END STANDARD BUILD SCRIPT INCLUDE
|
|
|
|
builder_describe \
|
|
"Keyman Developer Setup bootstrap executable" \
|
|
@/common/include \
|
|
@/common/windows/delphi \
|
|
clean configure build test publish edit
|
|
|
|
builder_parse "$@"
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------
|
|
|
|
source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh"
|
|
WIN32_TARGET="$WIN32_TARGET_PATH/setup.exe"
|
|
|
|
builder_describe_outputs \
|
|
configure:project /resources/build/win/delphi_environment_generated.inc.sh \
|
|
build:project /developer/src/setup/$WIN32_TARGET
|
|
|
|
#-------------------------------------------------------------------------------------------------------------------
|
|
|
|
function do_build() {
|
|
create-developer-output-folders
|
|
run_in_vs_env rc icons.rc
|
|
build_version.res
|
|
build_manifest.res
|
|
delphi_msbuild setup.dproj "//p:Platform=Win32"
|
|
sentrytool_delphiprep "$WIN32_TARGET" setup.dpr
|
|
tds2dbg "$WIN32_TARGET"
|
|
cp "$WIN32_TARGET" "$DEVELOPER_PROGRAM"
|
|
if [[ -f "$WIN32_TARGET_PATH/setup.dbg" ]]; then
|
|
cp "$WIN32_TARGET_PATH/setup.dbg" "$DEVELOPER_DEBUGPATH/devsetup.dbg"
|
|
fi
|
|
rm -f "$WIN32_TARGET_PATH/devsetup.dbg"
|
|
if [[ -f "$WIN32_TARGET_PATH/setup.dbg" ]]; then
|
|
mv "$WIN32_TARGET_PATH/setup.dbg" "$WIN32_TARGET_PATH/devsetup.dbg"
|
|
fi
|
|
}
|
|
|
|
function do_publish() {
|
|
wrap-mt -nologo -inputresource:"$DEVELOPER_PROGRAM"/setup.exe -validate_manifest
|
|
# Not signing here because we need to sign the bundled installer instead
|
|
# wrap-signcode /d "Keyman Developer Setup" $(DEVELOPER_PROGRAM)\setup.exe
|
|
wrap-symstore "$DEVELOPER_PROGRAM/setup.exe" //t keyman-developer
|
|
wrap-symstore "$DEVELOPER_DEBUGPATH/setup.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 publish:project do_publish
|
|
# builder_run_action test:project do_test
|
|
builder_run_action edit:project start setup.dproj
|