1#!/usr/bin/bash 2 3set -x 4set -e 5 6name=torrent-file-editor 7 8exclude="debug debug-qt4 debug-qt5 release release-qt4 release-qt5 linux linux-qt4 linux-qt5 CMakeLists.txt.user" 9exclude=$(echo $exclude | sed -r 's/[^ ]+/-e &/g') 10 11git clean -dfx . $exclude 12mkdir win32 13pushd win32 14mingw32-cmake .. -DCMAKE_EXE_LINKER_FLAGS=-static -DCMAKE_BUILD_TYPE=Release -DQT_INCLUDE_DIRS_NO_SYSTEM=ON 15make -j5 16version=$(cat version) 17i686-w64-mingw32-strip -s ${name}.exe 18mv ${name}.exe ../${name}-${version}-x32.exe 19popd 20 21mkdir win64 22pushd win64 23mingw64-cmake .. -DCMAKE_EXE_LINKER_FLAGS=-static -DCMAKE_BUILD_TYPE=Release -DQT_INCLUDE_DIRS_NO_SYSTEM=ON 24make -j5 25version=$(cat version) 26x86_64-w64-mingw32-strip -s ${name}.exe 27mv ${name}.exe ../${name}-${version}-x64.exe 28popd 29