Fix for Mac os X, update MacQetDeploy.sh script, thank Yoann

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3234 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810 2014-07-27 11:56:31 +00:00
parent 742fd731bd
commit ad37a11611
2 changed files with 50 additions and 4 deletions

View File

@ -89,6 +89,42 @@ if [ -e "packaging/mac-osx/${APPNAME}_$revAp.dmg" ] ; then
fi
### Version tag ####################################################
echo
echo "______________________________________________________________"
echo "Add version tag:"
echo "Adding the version tag..."
# On sauve l'orginale
mkdir temp
cp -Rf "sources/qet.h" "temp/qet.h"
#cd
# On modifie l'originale avec le numero de version
sed -i "" "s/const QString displayedVersion = \"0.4-dev\"/const QString displayedVersion = \"0.4-dev-r$revAp\"/" sources/qet.h
# Apres la compilation
cleanVerionTag () {
echo
echo "______________________________________________________________"
echo "Clean version tag:"
# On remet le code source comme il etait
echo "Cleaning version tag..."
# On supprime le fichier modifier
rm -rf "sources/qet.h"
# On remet l'ancien original
cp -Rf "temp/qet.h" "sources/qet.h"
# On suprime l'ancienne copie
rm -rf "temp"
}
### make install ####################################################
echo
@ -107,12 +143,20 @@ fi
# genere le Makefile
echo "Generating new makefile..."
qmake -spec macx-g++
qmake -spec macx-g++
# compilation
if [ -e Makefile.Release ] ; then
START_TIME=$SECONDS
make -f Makefile.Release
if [ $? -ne 0 ]; then
cleanVerionTag
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo
echo "make failed - $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) sec"
exit 1
fi
cleanVerionTag
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo
echo "The time of compilation is $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) sec"
@ -133,7 +177,7 @@ if [ ! -d $BUNDLE ] ; then
echo "ERROR: cannot find application bundle \"$BUNDLE\" in current directory"
exit
fi
/usr/bin/macdeployqt-4.8 $BUNDLE
### add file missing #######################################
@ -200,7 +244,7 @@ strip "$imagedir/$APPBIN"
# Creating a disk image from a folder
echo 'Creating disk image... '
hdiutil create -quiet -ov -srcfolder $imagedir -format UDBZ -volname "APPNAME" "${APPNAME}_${revAp}.dmg"
hdiutil create -quiet -ov -srcfolder $imagedir -format UDBZ -volname "${APPNAME}" "${APPNAME}_${revAp}.dmg"
hdiutil internet-enable -yes -quiet "${APPNAME}_${revAp}.dmg"
# Clean up disk folder

View File

@ -1340,7 +1340,9 @@ QSet<Conductor *> Conductor::relatedPotentialConductors(QList <Terminal *> *t_li
}
QSet <Conductor *> other_conductors;
QList <Terminal *> this_terminal{terminal1, terminal2};
// QList <Terminal *> this_terminal{terminal1, terminal2};
QList <Terminal *> this_terminal;
this_terminal << terminal1 << terminal2;
// Return all conductor of terminal 1 and 2
foreach (Terminal *terminal, this_terminal) {