From: Leonardo Florez-Valencia Date: Sun, 1 May 2016 22:15:57 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~168 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7ac065dc6d76619f61adf9a0b8b66a858e417dee;p=cpPlugins.git ... --- diff --git a/third_party_installers/cpPlugins_Install_CMAKE.sh b/third_party_installers/cpPlugins_Install_CMAKE.sh index fafea8f..a69b7f4 100755 --- a/third_party_installers/cpPlugins_Install_CMAKE.sh +++ b/third_party_installers/cpPlugins_Install_CMAKE.sh @@ -21,6 +21,25 @@ function abspath() ## Some configuration variables number_of_processes="-j4" +# Locate qmake executable +qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") +qmake_exec="" +for loc in ${qmake_locations[@]}; do + qmake_file="$loc/qmake" + if [ -x $qmake_file ]; then + version=`$qmake_file --version | grep Using\ Qt\ version | cut -d ' ' -f 4` + if [ "${version:0:3}" == "4.8" ]; then + qmake_exec=$qmake_file + fi + fi +done + +if [ -x $qmake_exec ]; then + qt_options="--qt-gui --qt-qmake=$qmake_exec" +else + qt_options="--no-qt-gui" +fi + ## Check input parameters and process inputs (if needed) if [ "$#" -eq 1 ]; then valid_extensions=("zip" "tar" "tar.gz" "tar.bz2") @@ -71,7 +90,7 @@ echo "Given build dir : \"$build_dir\"" echo "Configuring sources... " cd $build_dir -$source_dir/bootstrap --prefix=${HOME}/local +$source_dir/bootstrap --prefix=${HOME}/local $qt_options echo "Configuring sources... done." echo "Compiling sources..." diff --git a/third_party_installers/cpPlugins_Install_QT4.sh b/third_party_installers/cpPlugins_Install_QT4.sh index b8da668..3db6ae5 100755 --- a/third_party_installers/cpPlugins_Install_QT4.sh +++ b/third_party_installers/cpPlugins_Install_QT4.sh @@ -31,7 +31,7 @@ if [ "$platform" == "Darwin" ]; then fi ## Check input parameters and process inputs (if needed) -if [ "$#" -eq 2 ]; then +if [ "$#" -eq 3 ]; then valid_extensions=("zip" "tar" "tar.gz" "tar.bz2") actual_ext="" for ext in ${valid_extensions[@]}; do @@ -69,12 +69,14 @@ if [ "$#" -eq 2 ]; then fi echo "done!" build_type=$2 -elif [ "$#" -eq 3 ]; then + full_compil=$3 +elif [ "$#" -eq 4 ]; then source_dir=`dirname $1` build_dir=`dirname $2` build_type=$3 + full_compil=$4 else - echo "Usage: [qt4_package] or [qt4_source_dir qt4_build_dir] [build_type]" + echo "Usage: [qt4_package] or [qt4_source_dir qt4_build_dir] [build_type] [min/full]" fi # Apply patch @@ -90,18 +92,29 @@ echo "Given build dir : \"$build_dir\"" echo "Configuring sources... " cd $build_dir -$source_dir/configure \ - -prefix ${HOME}/local \ - $build_type \ - -opensource -shared -fast \ - -no-phonon \ - -no-phonon-backend \ - -no-webkit \ - -no-openvg \ - -nomake demos -nomake examples \ - -optimized-qmake \ - $particular_options \ - -confirm-license +if [ "x$full_compil" == "xfull" ]; then + $source_dir/configure \ + -prefix ${HOME}/local \ + $build_type \ + -opensource -shared -fast \ + -no-webkit \ + -optimized-qmake \ + $particular_options \ + -confirm-license +else + $source_dir/configure \ + -prefix ${HOME}/local \ + $build_type \ + -opensource -shared -fast \ + -no-phonon \ + -no-phonon-backend \ + -no-webkit \ + -no-openvg \ + -nomake demos -nomake examples \ + -optimized-qmake \ + $particular_options \ + -confirm-license +fi echo "Configuring sources... done." echo "Compiling sources..."