From 1f83847dddb113ba3a1c0bebff44626332611c65 Mon Sep 17 00:00:00 2001 From: Simon Wendsche Date: Tue, 16 Aug 2016 03:01:11 +0200 Subject: [PATCH] made xcompile script more automated, added 64bit build --- .gitignore | 2 ++ xcompile.sh | 38 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da68a1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +release/* + diff --git a/xcompile.sh b/xcompile.sh index 9b50954..1e3016f 100755 --- a/xcompile.sh +++ b/xcompile.sh @@ -3,9 +3,43 @@ # See https://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target/13211922#13211922 MXE_ROOT="/home/simon/Projekte/qt/mxe" -$MXE_ROOT/usr/bin/i686-w64-mingw32.static-qmake-qt5 export PATH=$MXE_ROOT/usr/bin:$PATH -make -j 8 +case "$1" in + release) + echo "Creating RELEASE build" + make clean + + # Create 64 bit build and package it + $MXE_ROOT/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 + make -j 8 + + cd release + rm NormalmapGenerator_win64.zip + zip NormalmapGenerator_win64 NormalmapGenerator.exe + cd .. + + # Cleanup + make clean + + # Create 32 bit build and package it + $MXE_ROOT/usr/bin/i686-w64-mingw32.static-qmake-qt5 + make -j 8 + + cd release + rm NormalmapGenerator_win32.zip + zip NormalmapGenerator_win32 NormalmapGenerator.exe + cd .. + + make clean + echo "RELEASE build done." + ;; + *) + echo "Creating DEBUG build" + $MXE_ROOT/usr/bin/x86_64-w64-mingw32.static-qmake-qt5 + make -j 8 + echo "DEBUG build done." +esac +