D-Scanner/release-windows.sh
Sebastian Wilzbach e8180d64a6 Use LDC for cross-compilation Win{32,64} binaries (#743)
* Build win64 binaries

* Allow adding DFLAGS

* bump ldc to 1.13

* Download & install the same LDC version

* Build win64 binaries in a separate job

* Fix release-windows for ARCH=64

* Re-enable ldc-beta

* Add more comments

* Use the LDC release build

* Remove note about requiring wine

* Split-up LDC setup in a separate file
2019-04-18 02:36:21 +02:00

21 lines
471 B
Bash
Executable file

#!/usr/bin/env bash
# Build the Windows binaries under Linux
set -eux -o pipefail
BIN_NAME=dscanner
# Allow the script to be run from anywhere
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
source setup-ldc-windows.sh
# Run LDC with cross-compilation
archiveName="$BIN_NAME-$VERSION-$OS-$ARCH_SUFFIX.zip"
echo "Building $archiveName"
mkdir -p bin
DC=ldmd2 make ldcbuild
cd bin
mv "${BIN_NAME}" "${BIN_NAME}.exe"
zip "$archiveName" "${BIN_NAME}.exe"