Last active
December 20, 2015 12:09
-
-
Save richelbilderbeek/6128956 to your computer and use it in GitHub Desktop.
My favorite crosscompile script: it crosscompiles a Qt Creator .pro file using MXE and copies the result to ~/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
myqmake="../../Libraries/mxe/usr/i686-pc-mingw32/qt5/bin/qmake" | |
#Cleaning up | |
rm *.pro.user | |
rm Makefile | |
rm Makefile.* | |
rm -r release | |
rm -r debug | |
rm ui_*.h | |
rm qrc_*.cpp | |
rm moc_*.cpp | |
rm object_script*.* | |
for myprofile in `ls | egrep ".pro\>"` | |
do | |
mytarget=`echo $myprofile | sed "s/\.pro//"` | |
$myqmake $myprofile | |
if [ ! -e Makefile ] | |
then | |
echo "FAIL: $myqmake $myprofile" | |
fi | |
make | |
if [ -e ./release/$mytarget".exe" ] | |
then | |
echo $mytarget": SUCCESS" | |
cp ./release/$mytarget".exe" ~/bin/ | |
else | |
echo $mytarget": FAIL" | |
fi | |
#Cleaning up | |
rm Makefile | |
rm Makefile.* | |
rm -r release | |
rm -r debug | |
rm ui_*.h | |
rm qrc_*.cpp | |
rm moc_*.cpp | |
rm object_script*.* | |
done #next .pro file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment