From: Leonardo Flórez-Valencia Date: Fri, 6 Oct 2017 18:09:49 +0000 (-0500) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ffe8bba56456407dbcfbe5d625f4766a2f936db9;p=cpPlugins.git ... --- diff --git a/config/install_ivq.sh b/config/install_ivq.sh new file mode 100755 index 0000000..81b9e00 --- /dev/null +++ b/config/install_ivq.sh @@ -0,0 +1,136 @@ +#!/bin/bash + +## -- Command line options +while [[ "$#" -gt 1 ]]; do + key="$1" + case $key in + -qt) + qt="$2" + shift + ;; + -cmake) + cmake="$2" + shift + ;; + -vtk) + vtk="$2" + shift + ;; + -itk) + itk="$2" + shift + ;; + -prefix) + prefix="$2" + shift + ;; + -build_dir) + build_dir="$2" + shift + ;; + -cores) + cores="$2" + shift + ;; + *) + # Do nothing + ;; + esac + shift +done + +## -- Check command line options +if \ + [ -z "$prefix" ] || \ + [ -z "$qt" ] || \ + [ -z "$cmake" ] || \ + [ -z "$vtk" ] || \ + [ -z "$itk" ] ; then + (>&2 echo "Usage: $0 -prefix [dir] -qt [dir] -cmake [dir] -vtk [dir] -itk [dir] [-build_dir [dir]] [-cores [n]]") + exit 1 +fi + +## -- Complete optional parameters +if [ -z "$cores" ] ; then + cores="1" +fi +if [ -z "$build_dir" ] ; then + build_dir="$HOME/.tmp" +fi +curr_dir=`pwd` + +## -- Configure, build and install Qt5 +mkdir -p $build_dir/qt +cd $build_dir/qt +$qt/configure \ + -prefix $prefix -shared -confirm-license -opensource -release \ + -c++std c++11 -opengl desktop \ + -nomake examples -nomake tests -no-harfbuzz \ + -qt-xcb -qt-xkbcommon -qt-pcre \ + -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity \ + -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad \ + -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation \ + -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing \ + -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript \ + -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport \ + -skip qtspeech -skip qtsvg -skip qttranslations -skip qtvirtualkeyboard \ + -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets \ + -skip qtwebview -skip qtxmlpatterns \ + -qtlibinfix _cpPlugins +make -j$cores -k +make -j -k install + +## -- Configure, build and install CMake +mkdir -p $build_dir/cmake +cd $build_dir/cmake +$cmake/bootstrap --parallel=$cores --prefix=$prefix --no-qt-gui +make -j$cores -k +make -j -k install + +## -- Configure, build and install VTK +mkdir -p $build_dir/vtk +cd $build_dir/vtk +$prefix/bin/cmake \ + -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ + -DBUILD_DOCUMENTATION:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DVTK_Group_Qt:BOOL=ON \ + -DVTK_QT_VERSION:STRING=5 \ + -DQt5_DIR:PATH=$prefix/lib/cmake/Qt5 \ + -DQT_QMAKE_EXECUTABLE:PATH=$prefix/bin/qmake \ + -DModule_vtkGUISupportQtOpenGL:BOOL=ON \ + -DCMAKE_DEBUG_POSTFIX:STRING="_cpPlugins" \ + -DCMAKE_RELEASE_POSTFIX:STRING="_cpPlugins" \ + -DCMAKE_MACOSX_RPATH:BOOL=ON \ + $vtk +make -j$cores -k +make -j -k install + +## -- Configure, build and install VTK +mkdir -p $build_dir/itk +cd $build_dir/itk +$prefix/bin/cmake \ + -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:PATH=$prefix \ + -DBUILD_DOCUMENTATION:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DModule_ITKReview:BOOL=ON \ + -DModule_ITKVtkGlue:BOOL=ON \ + -DCMAKE_DEBUG_POSTFIX:STRING="_cpPlugins" \ + -DCMAKE_RELEASE_POSTFIX:STRING="_cpPlugins" \ + -DCMAKE_MACOSX_RPATH:BOOL=ON \ + $itk +make -j$cores -k +make -j -k install + +## -- End +cd $curr_dir + +## eof - $RCSfile$ diff --git a/install/prerrequisites.sh b/install/prerrequisites.sh deleted file mode 100644 index 59c83ac..0000000 --- a/install/prerrequisites.sh +++ /dev/null @@ -1,78 +0,0 @@ - -../qt-5.9.1/configure \ - -prefix ~/local \ - -shared \ - -confirm-license \ - -opensource \ - -release \ - -c++std c++11 \ - -opengl desktop \ - -nomake examples \ - -nomake tests \ - -no-harfbuzz \ - -qt-xcb \ - -qt-xkbcommon \ - -qt-pcre \ - -skip qt3d \ - -skip qtactiveqt \ - -skip qtcanvas3d \ - -skip qtconnectivity \ - -skip qtdatavis3d \ - -skip qtdeclarative \ - -skip qtdoc \ - -skip qtgamepad \ - -skip qtgraphicaleffects \ - -skip qtimageformats \ - -skip qtlocation \ - -skip qtmultimedia \ - -skip qtnetworkauth \ - -skip qtpurchasing \ - -skip qtquickcontrols \ - -skip qtquickcontrols2 \ - -skip qtscript \ - -skip qtscxml \ - -skip qtsensors \ - -skip qtserialbus \ - -skip qtserialport \ - -skip qtspeech \ - -skip qtsvg \ - -skip qttranslations \ - -skip qtvirtualkeyboard \ - -skip qtwayland \ - -skip qtwebchannel \ - -skip qtwebengine \ - -skip qtwebsockets \ - -skip qtwebview \ - -skip qtxmlpatterns - -../cmake-3.8.2/bootstrap \ - --parallel=12 --prefix=~/local \ - --no-qt-gui - -~/local/bin/cmake \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_INSTALL_PREFIX:PATH=~/local \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_TESTING:BOOL=OFF \ - -DVTK_Group_Qt:BOOL=ON \ - -DVTK_QT_VERSION:STRING=5 \ - -DQt5_DIR:PATH=~/local/lib/cmake/Qt5 \ - -DQT_QMAKE_EXECUTABLE:PATH=~/local/bin/qmake \ - -DModule_vtkGUISupportQtOpenGL:BOOL=ON \ - ../VTK-8.0.0 - -~/local/bin/cmake \ - -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_INSTALL_PREFIX:PATH=~/local \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -DBUILD_EXAMPLES:BOOL=OFF \ - -DBUILD_TESTING:BOOL=OFF \ - -DModule_ITKReview:BOOL=ON \ - -DModule_ITKVtkGlue:BOOL=ON \ - -DVTK_DIR:PATH=~/local/lib/cmake/vtk-8.0 \ - ../InsightToolkit-4.12.0