22 lines
919 B
Bash
Executable File
22 lines
919 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-command download + cross-build. Run as ordinary user where possible.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
download_failed=0; legacy=0; if [[ ${1:-} == --with-legacy-ddk ]]; then legacy=1; shift; fi
|
|
if [[ ${1:-} == --no-install ]]; then shift; else
|
|
# A failed optional Watcom download must not prevent independent MinGW/Clang attempts.
|
|
./cross/install-tools.sh --apt-only
|
|
if ! ./cross/fetch-watcom.sh; then echo 'Watcom download failed; other builds will still be attempted.' >&2; fi
|
|
fi
|
|
if (( legacy )); then
|
|
if ! ./cross/fetch-legacy.sh --accept-archive; then echo "Legacy download incomplete; other builds still attempted." >&2; download_failed=1; fi
|
|
fi
|
|
case ${1:-all} in
|
|
all|WIN95|WIN98|WINME|WINNT40)
|
|
./cross/fetch-winpcap.sh || download_failed=1;;
|
|
esac
|
|
export MARS_OFFLINE=1
|
|
rc=0; ./cross/build-windows.sh "${1:-all}" || rc=$?
|
|
if (( download_failed )); then exit 1; fi
|
|
exit "$rc"
|