2020-09-28 17:33:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# this is run inside the docker container
|
|
|
|
cd /__w
|
|
|
|
|
2023-06-01 13:41:39 +00:00
|
|
|
[ -d mxe ] || ln -s /win/mxe .
|
2020-09-28 17:33:25 +00:00
|
|
|
|
2020-10-30 21:14:28 +00:00
|
|
|
# grab the version number
|
|
|
|
cd subsurface
|
2024-01-05 04:44:31 +00:00
|
|
|
VERSION=$(./scripts/get-version)
|
2020-10-30 21:14:28 +00:00
|
|
|
cd ..
|
|
|
|
|
2020-09-28 17:33:25 +00:00
|
|
|
# prep the container
|
|
|
|
bash subsurface/.github/workflows/scripts/windows-container-prep.sh
|
|
|
|
|
|
|
|
# remove artifact from prior builds
|
2020-10-28 17:55:02 +00:00
|
|
|
rm -f mdbtools/include/mdbver.h
|
2020-09-28 17:33:25 +00:00
|
|
|
|
2020-10-30 21:14:28 +00:00
|
|
|
# build the 64bit installer
|
2020-10-28 17:55:02 +00:00
|
|
|
rm -rf win64
|
|
|
|
mkdir win64
|
|
|
|
cd win64
|
2020-09-28 17:33:25 +00:00
|
|
|
|
|
|
|
# build Subsurface and then smtk2ssrf
|
2020-10-28 17:55:02 +00:00
|
|
|
export MXEBUILDTYPE=x86_64-w64-mingw32.shared
|
|
|
|
export PATH=/win/mxe/usr/bin:$PATH
|
2020-09-28 17:33:25 +00:00
|
|
|
bash -ex ../subsurface/packaging/windows/mxe-based-build.sh installer
|
2020-10-30 21:14:28 +00:00
|
|
|
mv subsurface/subsurface-$VERSION.exe /__w
|
2020-09-28 17:33:25 +00:00
|
|
|
|
|
|
|
bash -ex ../subsurface/packaging/windows/smtk2ssrf-mxe-build.sh -a -i
|
|
|
|
|
2020-10-30 21:14:28 +00:00
|
|
|
mv smtk-import/smtk2ssrf-$VERSION.exe /__w
|
|
|
|
|
2020-11-12 14:41:28 +00:00
|
|
|
if [ "$1" != "-64only" ] ; then
|
|
|
|
# build the 32bit installer
|
|
|
|
cd /__w
|
|
|
|
rm -rf win32
|
|
|
|
mkdir win32
|
|
|
|
cd win32
|
|
|
|
|
|
|
|
# build Subsurface and then smtk2ssrf
|
|
|
|
export MXEBUILDTYPE=i686-w64-mingw32.shared
|
|
|
|
bash -ex ../subsurface/packaging/windows/mxe-based-build.sh installer
|
|
|
|
mv subsurface/subsurface-$VERSION.exe /__w/subsurface-32bit-$VERSION.exe
|
|
|
|
fi
|