forked from torrent-file-editor/torrent-file-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-mxe-static.sh
executable file
·51 lines (43 loc) · 1.5 KB
/
build-mxe-static.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/bash
set -x
set -e
name=torrent-file-editor
exclude="debug debug-qt4 debug-qt5 release release-qt4 release-qt5 linux linux-qt4 linux-qt5 CMakeLists.txt.user build-mxe-shared.sh build-mxe-static.sh"
exclude=$(echo $exclude | sed -r 's/[^ ]+/-e &/g')
git clean -dfx . $exclude
if [ -x "$(command -v i686-w64-mingw32.shared-qmake-qt4)" ]; then
mkdir mxe32-qt4-static
pushd mxe32-qt4-static
i686-w64-mingw32.static-cmake -DCMAKE_BUILD_TYPE=Release ..
make -j5
version=$(cat version)
mv ${name}.exe ../${name}-${version}-mxe-qt4-static-x32.exe
popd
fi
if [ -x "$(command -v i686-w64-mingw32.shared-qmake-qt5)" ]; then
mkdir mxe32-qt5-static
pushd mxe32-qt5-static
i686-w64-mingw32.static-cmake -DCMAKE_BUILD_TYPE=Release -DQT5_BUILD=ON ..
make -j5
version=$(cat version)
mv ${name}.exe ../${name}-${version}-mxe-qt5-static-x32.exe
popd
fi
if [ -x "$(command -v x86_64-w64-mingw32.shared-qmake-qt4)" ]; then
mkdir mxe64-qt4-static
pushd mxe64-qt4-static
x86_64-w64-mingw32.static-cmake -DCMAKE_BUILD_TYPE=Release ..
make -j5
version=$(cat version)
mv ${name}.exe ../${name}-${version}-mxe-qt4-static-x64.exe
popd
fi
if [ -x "$(command -v x86_64-w64-mingw32.shared-qmake-qt5)" ]; then
mkdir mxe64-qt5-static
pushd mxe64-qt5-static
x86_64-w64-mingw32.static-cmake -DCMAKE_BUILD_TYPE=Release -DQT5_BUILD=ON ..
make -j5
version=$(cat version)
mv ${name}.exe ../${name}-${version}-mxe-qt5-static-x64.exe
popd
fi