]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Mon, 25 Apr 2016 17:25:43 +0000 (12:25 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Mon, 25 Apr 2016 17:25:43 +0000 (12:25 -0500)
third_party_installers/cpPlugins_Install_ITK.sh
third_party_installers/cpPlugins_Install_QT4.sh
third_party_installers/cpPlugins_Install_VTK.sh

index 8af7e094aaa2d52e2cf93cf0e0584d3a43ed63a8..baf70ebb3239aafeb0c28f02f3ba9df68f8acb86 100755 (executable)
@@ -5,13 +5,20 @@ number_of_processes="-j4"
 comp_type=Debug
 
 ## Locate cmake executable
-cmake_exec="/usr/bin/cmake"
-if [ ! -x $cmake_exec ]; then
-    cmake_exec="/usr/local/bin/cmake"
-fi
-if [ ! -x $cmake_exec ]; then
-    cmake_exec="${HOME}/local/bin/cmake"
-fi
+cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
+cmake_exec=""
+cmake_ver=""
+for loc in ${cmake_locations[@]}; do
+    cmake_file="$loc/cmake"
+    if [ -x $cmake_file ]; then
+        str=`$cmake_file --version | grep version`
+        version=${str:14}
+        if [ "$cmake_ver" \< "$version" ]; then
+            cmake_ver=$version
+            cmake_exec=$cmake_file
+        fi
+    fi
+done
 if [ ! -x $cmake_exec ]; then
     echo "$0: modify this script to put the correct location of cmake."
     exit 1
index 7f761cffb2cf2002ad077d2d4cbe3ac09f64367d..a80a12d3c0932ce6a083939cdbf0f41dacf6d7cd 100755 (executable)
@@ -2,8 +2,12 @@
 
 ## Some configuration variables
 number_of_processes="-j4"
-comp_type=-debug-and-release
-# particular_options=-no-framework
+comp_type=-debug
+platform=`uname`
+particular_options=""
+if [ "$platform" == "Darwin" ]; then
+    particular_options=-no-framework
+fi
 
 ## Check input parameters and process inputs (if needed)
 if [ "$#" -eq 1 ]; then
index a1ed2fc7203e39aebdc5c0d221c50c8103078f14..7cce532f1b4628949a71ce44fc748bd4b3842f1c 100755 (executable)
@@ -5,81 +5,42 @@ number_of_processes="-j4"
 comp_type=Debug
 
 ## Locate cmake executable
-cmake_exec="/usr/bin/cmake"
-if [ ! -x $cmake_exec ]; then
-    cmake_exec="/usr/local/bin/cmake"
-fi
-if [ ! -x $cmake_exec ]; then
-    cmake_exec="${HOME}/local/bin/cmake"
-fi
+cmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
+cmake_exec=""
+cmake_ver=""
+for loc in ${cmake_locations[@]}; do
+    cmake_file="$loc/cmake"
+    if [ -x $cmake_file ]; then
+        str=`$cmake_file --version | grep version`
+        version=${str:14}
+        if [ "$cmake_ver" \< "$version" ]; then
+            cmake_ver=$version
+            cmake_exec=$cmake_file
+        fi
+    fi
+done
 if [ ! -x $cmake_exec ]; then
     echo "$0: modify this script to put the correct location of cmake."
     exit 1
 fi
 
 ## Locate qmake executable
-qmake_dirs=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
+qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
 qmake_exec=""
-for dir in ${qmake_dirs[@]}; do
-    echo $dir
+for loc in ${qmake_locations[@]}; do
+    qmake_file="$loc/qmake"
+    if [ -x $qmake_file ]; then
+        str=`$qmake_file --version | grep Using\ Qt\ version`
+        version=`expr substr "$str" 18 3`
+        if [ "$version" == "4.8" ]; then
+            qmake_exec=$qmake_file
+        fi
+    fi
 done
-
-
-# qmake_exec="/usr/bin/qmake"
-# number="0"
-# if [ -x $qmake_exec ]; then
-#     version=`$qmake_exec --version | grep Using\ Qt\ version`
-#     number=`expr substr "$version" 18 1`
-# else
-#     qmake_exec=""
-# fi
-# if [ "$number" -ne "4" ]; then
-#     qmake_exec=""
-# fi
-# echo 1$qmake_exec
-
-# if [ "x$qmake_exec" != "x" ]; then
-#     qmake_exec="/usr/local/bin/qmake"
-#     if [ ! -x $qmake_exec ]; then
-#         number="0"
-#         if [ -x $qmake_exec ]; then
-#             version=`$qmake_exec --version | grep Using\ Qt\ version`
-#             number=`expr substr "$version" 18 1`
-#         fi
-#         if [ "$number" -ne "4" ]; then
-#             qmake_exec=""
-#         fi
-#     else
-#         qmake_exec=""
-#     fi
-# else
-#     qmake_exec=""
-# fi
-# if [ "x$qmake_exec" != "x" ]; then
-#     qmake_exec="${HOME}/local/bin/qmake"
-#     if [ ! -x $qmake_exec ]; then
-#         number="0"
-#         if [ -x $qmake_exec ]; then
-#             version=`$qmake_exec --version | grep Using\ Qt\ version`
-#             number=`expr substr "$version" 18 1`
-#         fi
-#         echo $number
-#         if [ "$number" -ne "4" ]; then
-#             qmake_exec=""
-#         fi
-#     else
-#         qmake_exec=""
-#     fi
-# else
-#     qmake_exec=""
-# fi
-# if [ ! -x $qmake_exec ]; then
-#     echo "$0: modify this script to put the correct location of qmake."
-#     exit 1
-# fi
-# echo $qmake_exec
-
-exit 1
+if [ ! -x $qmake_exec ]; then
+    echo "$0: modify this script to put the correct location of qmake."
+    exit 1
+fi
 
 ## Check input parameters and process inputs (if needed)
 if [ "$#" -eq 1 ]; then