forked from fwbuilder/fwbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_mxe-w32.sh
executable file
·80 lines (73 loc) · 1.31 KB
/
build_mxe-w32.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
export PATH=/usr/lib/mxe/usr/bin:$PATH
main()
{
if [ $# -eq 0 ]; then
usage
exit
fi
while [ "$1" != "" ]; do
case $1 in
-h | --help | help | usage )
usage
exit
;;
all )
configure
compile
package
exit
;;
configure )
configure
;;
compile )
compile
;;
package )
package
;;
* )
usage
exit 1
;;
esac
shift
done
}
usage()
{
echo "Usage: $0 [ all | configure | compile | package ]"
}
configure()
{
echo "==> Configuring"
qbs setup-toolchains /usr/lib/mxe/usr/bin/i686-w64-mingw32.shared-g++ mingw32
qbs setup-qt /usr/lib/mxe/usr/i686-w64-mingw32.shared/qt5/bin/qmake qt
if [ $? -eq 0 ]; then
echo "==> Done configuring"
else
exit 1
fi
}
compile()
{
echo "==> Compiling"
qbs release profile:qt
if [ $? -eq 0 ]; then
echo "==> Done compiling"
else
exit 1
fi
}
package()
{
echo "==> Packaging"
makensis release/install-root/fwbuilder.nsi
if [ $? -eq 0 ]; then
echo "==> Done packaging"
else
exit 1
fi
}
main "$@"