@@ -11,7 +11,7 @@ usage() {
1111 cat >&2 << EOF
1212usage: $0 [build|installer|sign]
1313
14- build default action: cmake configure → build → install portable tree →
14+ build default action: cmake configure, build, install portable tree, and
1515 zip into dist/. Idempotent; reuses existing build/ if present.
1616 installer build the NSIS installer .exe on top of an already-staged
1717 portable tree (run \` $0 \` first). Idempotent.
@@ -48,9 +48,25 @@ case "${WINDOWS_MSYSTEM}" in
4848 * ) echo " fatal: unsupported WINDOWS_MSYSTEM=${WINDOWS_MSYSTEM} " >&2 ; exit 1 ;;
4949esac
5050
51- BUILD_DIR=" ${REPO_ROOT} /build-windows-${ARCH} "
52- PORTABLE_DIR=" ${REPO_ROOT} /amule-portable-${ARCH} "
53- DIST_DIR=" ${REPO_ROOT} /dist"
51+ to_msys_path () {
52+ local value=" $1 "
53+ if command -v cygpath > /dev/null && [[ " ${value} " =~ ^[A-Za-z]:[\\ /] ]]; then
54+ cygpath -u " ${value} "
55+ else
56+ printf ' %s\n' " ${value} "
57+ fi
58+ }
59+
60+ if [[ -n " ${EMULEBB_WORKSPACE_OUTPUT_ROOT:- } " ]]; then
61+ OUTPUT_ROOT=" $( to_msys_path " ${EMULEBB_WORKSPACE_OUTPUT_ROOT} " ) "
62+ BUILD_DIR=" ${OUTPUT_ROOT} /builds/amule/windows-${ARCH} "
63+ PORTABLE_DIR=" ${OUTPUT_ROOT} /builds/amule/amule-portable-${ARCH} "
64+ DIST_DIR=" ${OUTPUT_ROOT} /release/amule"
65+ else
66+ BUILD_DIR=" ${REPO_ROOT} /build-windows-${ARCH} "
67+ PORTABLE_DIR=" ${REPO_ROOT} /amule-portable-${ARCH} "
68+ DIST_DIR=" ${REPO_ROOT} /dist"
69+ fi
5470mkdir -p " ${DIST_DIR} "
5571
5672VERSION=$( cd " ${REPO_ROOT} " && git describe --tags --always 2> /dev/null || echo " snapshot" )
0 commit comments