-
Notifications
You must be signed in to change notification settings - Fork 2
/
cross-compile
executable file
·46 lines (36 loc) · 1.21 KB
/
cross-compile
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
#!/bin/sh
#From http://richelbilderbeek.nl/CppMxe.htm
#Don't put the full path here. It has to be found in the
# In /home/yourusername/.bashrc add the following line add the end instead:
# export PATH=$PATH:/home/richel/GitHubs/ProjectRichelBilderbeek/Libraries/mxe/usr/bin/
#myqmake="i686-pc-mingw32.static-qmake-qt4"
myqmake="i686-w64-mingw32.static-qmake-qt5"
echo "Displaying cross compiler version (if it is not found, set the path to YourFolder/mxe/usr/bin"
$myqmake -v
for myprofile in djog_unos_2018.pro
do
echo "========================================="
echo "Working on .pro file: "$myprofile
echo "========================================="
mybasename=`echo $myprofile | sed "s/\.pro//"`
echo "Creating makefile"
# Don't add '-qt=qt5', as myqmake already IS Qt5
$myqmake $myprofile
if [ ! -e Makefile ]
then
echo "FAIL:"$myqmake", "$myprofile": FAIL (Makefile not found)"
continue
fi
echo "Start make"
make -s
if [ -e ./release/$mybasename".exe" ]
then
echo $myprofile", : SUCCESS"
if [ -e ./release/$mybasename".exe" ]
then
cp ./release/$mybasename".exe" .
fi
else
echo $myprofile", "$mytypestr": FAIL (executable not found)"
fi
done #next myprofile