furnace/scripts/release-win32.sh

32 lines
787 B
Bash
Raw Normal View History

2021-12-29 20:27:26 +00:00
#!/bin/bash
# make Windows release
2021-12-29 20:28:50 +00:00
# this script shall be run from Linux with MinGW installed!
2021-12-29 20:27:26 +00:00
if [ ! -e /tmp/furnace ]; then
ln -s "$PWD" /tmp/furnace || exit 1
fi
cd /tmp/furnace
2022-01-18 02:08:14 +00:00
if [ ! -e win32build ]; then
mkdir win32build || exit 1
2021-12-29 20:27:26 +00:00
fi
2022-01-18 02:08:14 +00:00
cd win32build
2021-12-29 20:27:26 +00:00
2022-01-18 02:08:14 +00:00
i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-O2" -DCMAKE_CXX_FLAGS="-O2 -Wall -Wextra -Wno-unused-parameter -Werror" -DBUILD_SHARED_LIBS=OFF .. || exit 1
2021-12-29 20:27:26 +00:00
make -j8 || exit 1
2022-01-18 02:08:14 +00:00
i686-w64-mingw32-strip -s furnace.exe || exit 1
2021-12-29 20:27:26 +00:00
cd ..
2022-01-18 02:08:14 +00:00
mkdir -p release/win32 || exit 1
cd release/win32
2021-12-29 20:27:26 +00:00
cp ../../LICENSE LICENSE.txt || exit 1
2022-01-18 02:08:14 +00:00
cp ../../win32build/furnace.exe . || exit 1
2021-12-29 20:27:26 +00:00
cp ../../README.md README.txt || exit 1
cp -r ../../papers papers || exit 1
zip -r furnace.zip LICENSE.txt furnace.exe README.txt papers