[qet] [3234] Fix for Mac os X, update MacQetDeploy.sh script, thank Yoann

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3234
Author:   scorpio810
Date:     2014-07-27 13:56:31 +0200 (Sun, 27 Jul 2014)
Log Message:
-----------
Fix for Mac os X, update MacQetDeploy.sh script, thank Yoann

Modified Paths:
--------------
    trunk/misc/MacQetDeploy.sh
    trunk/sources/qetgraphicsitem/conductor.cpp

Modified: trunk/misc/MacQetDeploy.sh
===================================================================
--- trunk/misc/MacQetDeploy.sh	2014-07-27 07:46:41 UTC (rev 3233)
+++ trunk/misc/MacQetDeploy.sh	2014-07-27 11:56:31 UTC (rev 3234)
@@ -89,6 +89,42 @@
 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 @@
 
 # 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,8 +177,8 @@
     echo "ERROR: cannot find application bundle \"$BUNDLE\" in current directory"
     exit
 fi
+/usr/bin/macdeployqt-4.8 $BUNDLE
 
-
 ### add file missing #######################################
 
 echo
@@ -200,7 +244,7 @@
     
 # 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

Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp	2014-07-27 07:46:41 UTC (rev 3233)
+++ trunk/sources/qetgraphicsitem/conductor.cpp	2014-07-27 11:56:31 UTC (rev 3234)
@@ -1340,7 +1340,9 @@
 	}
 
 	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) {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/