3 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 # + This file is part of enGrid. +
7 # + Copyright 2008-2013 enGits GmbH +
9 # + enGrid is free software: you can redistribute it and/or modify +
10 # + it under the terms of the GNU General Public License as published by +
11 # + the Free Software Foundation, either version 3 of the License, or +
12 # + (at your option) any later version. +
14 # + enGrid is distributed in the hope that it will be useful, +
15 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
16 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
17 # + GNU General Public License for more details. +
19 # + You should have received a copy of the GNU General Public License +
20 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
22 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
28 source "${0%/*}/engrid_installer_updater.cfg"
30 VTKINCDIR
=$VTKPREFIX/include
/vtk-
$VTKVERSION
31 VTKLIBDIR
=$VTKPREFIX/lib
/vtk-
$VTKVERSION
33 CGNSINCDIR
=$CGNSPREFIX/include
34 CGNSLIBDIR
=$CGNSPREFIX/lib
38 echo "Create bash_engrid"
41 echo "#!/usr/bin/env bash" > $BINPREFIX/$ENV_SETUP
42 echo "export VTKINCDIR=$VTKINCDIR" >> $BINPREFIX/$ENV_SETUP
43 echo "export VTKLIBDIR=$VTKLIBDIR" >> $BINPREFIX/$ENV_SETUP
44 echo "export LD_LIBRARY_PATH=$VTKLIBDIR:\$LD_LIBRARY_PATH" >> $BINPREFIX/$ENV_SETUP
46 echo "export CGNSINCDIR=$CGNSINCDIR" >> $BINPREFIX/$ENV_SETUP
47 echo "export CGNSLIBDIR=$CGNSLIBDIR" >> $BINPREFIX/$ENV_SETUP
48 echo "export LD_LIBRARY_PATH=$CGNSLIBDIR:\$LD_LIBRARY_PATH" >> $BINPREFIX/$ENV_SETUP
50 echo "export PATH=$QTPREFIX/bin:\$PATH" >> $BINPREFIX/$ENV_SETUP
51 echo "export QTDIR=$QTPREFIX" >> $BINPREFIX/$ENV_SETUP
52 echo "export LD_LIBRARY_PATH=$QTPREFIX/lib:\$LD_LIBRARY_PATH" >> $BINPREFIX/$ENV_SETUP
54 chmod 755 $BINPREFIX/$ENV_SETUP
59 echo "Create start_engrid"
62 echo "#!/usr/bin/env bash" > $BINPREFIX/$START_ENGRID
63 echo "source $BINPREFIX/$ENV_SETUP" >> $BINPREFIX/$START_ENGRID
64 echo "$SRCPREFIX/engrid/src/engrid" >> $BINPREFIX/$START_ENGRID
66 chmod 755 $BINPREFIX/$START_ENGRID
72 if [ $DOWNLOAD_QT = 1 ]; then wget
$URL_QT; fi
73 tar -xzvf .
/$ARCHIVE_QT
74 cd $
(basename $ARCHIVE_QT .
tar.gz
)
76 # echo yes | ./configure --prefix=$QTPREFIX -opensource
77 echo yes | .
/configure
--prefix=$QTPREFIX -opensource -nomake examples
-nomake demos
-nomake docs
-no-webkit -no-phonon -no-phonon-backend -no-qt3support -no-accessibility -silent
79 make $MAKEOPTIONS_ALL && make install
86 if [ $DOWNLOAD_VTK = 1 ]; then wget
$URL_VTK; fi
87 tar -xzvf .
/$ARCHIVE_VTK
90 cmake
-DCMAKE_INSTALL_PREFIX:PATH
=$VTKPREFIX -DBUILD_SHARED_LIBS:BOOL
=ON
-DVTK_USE_GUISUPPORT:BOOL
=ON
-DVTK_USE_QVTK:BOOL
=ON
-DVTK_USE_QT:BOOL
=ON
-DDESIRED_QT_VERSION:STRING
=4 .
91 chmod 644 Utilities
/vtktiff
/tif_fax3sm.c
92 make $MAKEOPTIONS_ALL && make install
99 if [ $DOWNLOAD_CGNS = 1 ]; then wget
$URL_CGNS; fi
100 tar -xzvf .
/$ARCHIVE_CGNS
103 mkdir
-p $CGNSPREFIX/include
104 mkdir
-p $CGNSPREFIX/lib
105 .
/configure
--prefix=$CGNSPREFIX && make $MAKEOPTIONS_ALL && make install
116 if [ $DOWNLOAD_ENGRID = 1 ];
119 tar -xzvf .
/$ARCHIVE_ENGRID
121 git clone
$GIT_URL_ENGRID
122 cd $SRCPREFIX/engrid
/src
123 if [ $BRANCH != "master" ]; then git checkout
-b $BRANCH origin
/$BRANCH; fi;
126 cd $SRCPREFIX/engrid
/src
130 if [ $DOWNLOAD_NETGEN = 1 ];
132 cd $SRCPREFIX/engrid
/src
/netgen_svn
134 tar -xzvf .
/$ARCHIVE_NETGEN
135 qmake
&& make $MAKEOPTIONS_ALL
136 cd $SRCPREFIX/engrid
/src
138 .
/scripts
/build-nglib.sh
142 qmake
$PROJECT_FILE && make $MAKEOPTIONS_ALL $MAKEOPTIONS_ENGRID
151 cd $SRCPREFIX/engrid
/src
154 if [ $DOWNLOAD_NETGEN = 1 ];
156 cd $SRCPREFIX/engrid
/src
/netgen_svn
158 tar -xzvf .
/$ARCHIVE_NETGEN
159 qmake
&& make $MAKEOPTIONS_ALL
160 cd $SRCPREFIX/engrid
/src
162 .
/scripts
/build-nglib.sh
172 cd $SRCPREFIX/engrid
/src
175 if [ $DOWNLOAD_ENGRID = 1 ];
179 tar -xzvf .
/$ARCHIVE_ENGRID
180 cd $SRCPREFIX/engrid
/src
185 qmake
$PROJECT_FILE && make $MAKEOPTIONS_ALL $MAKEOPTIONS_ENGRID
192 cd $SRCPREFIX/engrid
/src
193 qmake
&& make distclean
&& qmake
$PROJECT_FILE && make $MAKEOPTIONS_ALL $MAKEOPTIONS_ENGRID
197 ans
=$
(zenity
--height=350 --list --text "Which actions should be executed?" --checklist --column "Run" --column "Actions" \
198 FALSE
"create_bash_engrid" \
200 FALSE
"install_VTK" \
201 FALSE
"install_CGNS" \
202 FALSE
"build_engrid" \
203 FALSE
"update_netgen" \
204 FALSE
"update_engrid" \
205 FALSE
"rebuild_engrid" \
206 FALSE
"create_start_engrid" \
210 if ( echo $ans |
grep -w "create_bash_engrid" ) then create_bash_engrid
; fi
213 source $BINPREFIX/$ENV_SETUP
216 if ( echo $ans |
grep -w "install_QT" ) then install_QT
; fi;
217 if ( echo $ans |
grep -w "install_VTK" ) then install_VTK
; fi;
218 if ( echo $ans |
grep -w "install_CGNS" ) then install_CGNS
; fi;
219 if ( echo $ans |
grep -w "build_engrid" ) then build_engrid
; fi;
220 if ( echo $ans |
grep -w "update_netgen" ) then update_netgen
; fi;
221 if ( echo $ans |
grep -w "update_engrid" ) then update_engrid
; fi;
222 if ( echo $ans |
grep -w "rebuild_engrid" ) then rebuild_engrid
; fi;
223 if ( echo $ans |
grep -w "create_start_engrid" ) then create_start_engrid
; fi;