2 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 # + This file is part of enGrid. +
6 # + Copyright 2008-2014 enGits GmbH +
8 # + enGrid is free software: you can redistribute it and/or modify +
9 # + it under the terms of the GNU General Public License as published by +
10 # + the Free Software Foundation, either version 3 of the License, or +
11 # + (at your option) any later version. +
13 # + enGrid is distributed in the hope that it will be useful, +
14 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 # + GNU General Public License for more details. +
18 # + You should have received a copy of the GNU General Public License +
19 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
21 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26 source "${0%/*}/engrid_installer_updater.cfg"
28 VTKINCDIR
=$VTKPREFIX/include
/vtk-
$VTKVERSION
29 VTKLIBDIR
=$VTKPREFIX/lib
/vtk-
$VTKVERSION
31 CGNSINCDIR
=$CGNSPREFIX/include
32 CGNSLIBDIR
=$CGNSPREFIX/lib
36 echo "Create bash_engrid"
39 echo "#!/usr/bin/env bash" > $BINPREFIX/$ENV_SETUP
40 echo "export VTKINCDIR=$VTKINCDIR" >> $BINPREFIX/$ENV_SETUP
41 echo "export VTKLIBDIR=$VTKLIBDIR" >> $BINPREFIX/$ENV_SETUP
42 echo "export LD_LIBRARY_PATH=$VTKLIBDIR:\$LD_LIBRARY_PATH" >> $BINPREFIX/$ENV_SETUP
44 echo "export CGNSINCDIR=$CGNSINCDIR" >> $BINPREFIX/$ENV_SETUP
45 echo "export CGNSLIBDIR=$CGNSLIBDIR" >> $BINPREFIX/$ENV_SETUP
46 echo "export LD_LIBRARY_PATH=$CGNSLIBDIR:\$LD_LIBRARY_PATH" >> $BINPREFIX/$ENV_SETUP
48 echo "export PATH=$QTPREFIX/bin:\$PATH" >> $BINPREFIX/$ENV_SETUP
49 echo "export QTDIR=$QTPREFIX" >> $BINPREFIX/$ENV_SETUP
50 echo "export LD_LIBRARY_PATH=$QTPREFIX/lib:\$LD_LIBRARY_PATH" >> $BINPREFIX/$ENV_SETUP
52 chmod 755 $BINPREFIX/$ENV_SETUP
57 echo "Create start_engrid"
60 echo "#!/usr/bin/env bash" > $BINPREFIX/$START_ENGRID
61 echo "source $BINPREFIX/$ENV_SETUP" >> $BINPREFIX/$START_ENGRID
62 echo "$SRCPREFIX/engrid/src/engrid" >> $BINPREFIX/$START_ENGRID
64 chmod 755 $BINPREFIX/$START_ENGRID
70 if [ $DOWNLOAD_QT = 1 ]; then wget
$URL_QT; fi
71 tar -xzvf .
/$ARCHIVE_QT
72 cd $
(basename $ARCHIVE_QT .
tar.gz
)
74 # echo yes | ./configure --prefix=$QTPREFIX -opensource
75 echo yes | .
/configure
--prefix=$QTPREFIX -opensource -nomake examples
-nomake demos
-nomake docs
-no-webkit -no-phonon -no-phonon-backend -no-qt3support -no-accessibility -silent
77 make $MAKEOPTIONS_ALL && make install
84 if [ $DOWNLOAD_VTK = 1 ]; then wget
$URL_VTK; fi
85 tar -xzvf .
/$ARCHIVE_VTK
88 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 .
89 chmod 644 Utilities
/vtktiff
/tif_fax3sm.c
90 make $MAKEOPTIONS_ALL && make install
97 if [ $DOWNLOAD_CGNS = 1 ]; then wget
$URL_CGNS; fi
98 tar -xzvf .
/$ARCHIVE_CGNS
101 mkdir
-p $CGNSPREFIX/include
102 mkdir
-p $CGNSPREFIX/lib
103 .
/configure
--prefix=$CGNSPREFIX && make $MAKEOPTIONS_ALL && make install
114 if [ $DOWNLOAD_ENGRID = 1 ];
117 tar -xzvf .
/$ARCHIVE_ENGRID
119 git clone
$GIT_URL_ENGRID
120 cd $SRCPREFIX/engrid
/src
121 if [ $BRANCH != "master" ]; then git checkout
-b $BRANCH origin
/$BRANCH; fi;
124 cd $SRCPREFIX/engrid
/src
128 if [ $DOWNLOAD_NETGEN = 1 ];
130 cd $SRCPREFIX/engrid
/src
/netgen_svn
132 tar -xzvf .
/$ARCHIVE_NETGEN
133 qmake
&& make $MAKEOPTIONS_ALL
134 cd $SRCPREFIX/engrid
/src
136 .
/scripts
/build-nglib.sh
140 qmake
$PROJECT_FILE && make $MAKEOPTIONS_ALL $MAKEOPTIONS_ENGRID
149 cd $SRCPREFIX/engrid
/src
152 if [ $DOWNLOAD_NETGEN = 1 ];
154 cd $SRCPREFIX/engrid
/src
/netgen_svn
156 tar -xzvf .
/$ARCHIVE_NETGEN
157 qmake
&& make $MAKEOPTIONS_ALL
158 cd $SRCPREFIX/engrid
/src
160 .
/scripts
/build-nglib.sh
170 cd $SRCPREFIX/engrid
/src
173 if [ $DOWNLOAD_ENGRID = 1 ];
177 tar -xzvf .
/$ARCHIVE_ENGRID
178 cd $SRCPREFIX/engrid
/src
183 qmake
$PROJECT_FILE && make $MAKEOPTIONS_ALL $MAKEOPTIONS_ENGRID
190 cd $SRCPREFIX/engrid
/src
191 qmake
&& make distclean
&& qmake
$PROJECT_FILE && make $MAKEOPTIONS_ALL $MAKEOPTIONS_ENGRID
195 ans
=$
(zenity
--height=350 --list --text "Which actions should be executed?" --checklist --column "Run" --column "Actions" \
196 FALSE
"create_bash_engrid" \
198 FALSE
"install_VTK" \
199 FALSE
"install_CGNS" \
200 FALSE
"build_engrid" \
201 FALSE
"update_netgen" \
202 FALSE
"update_engrid" \
203 FALSE
"rebuild_engrid" \
204 FALSE
"create_start_engrid" \
208 if ( echo $ans |
grep -w "create_bash_engrid" ) then create_bash_engrid
; fi
211 source $BINPREFIX/$ENV_SETUP
214 if ( echo $ans |
grep -w "install_QT" ) then install_QT
; fi;
215 if ( echo $ans |
grep -w "install_VTK" ) then install_VTK
; fi;
216 if ( echo $ans |
grep -w "install_CGNS" ) then install_CGNS
; fi;
217 if ( echo $ans |
grep -w "build_engrid" ) then build_engrid
; fi;
218 if ( echo $ans |
grep -w "update_netgen" ) then update_netgen
; fi;
219 if ( echo $ans |
grep -w "update_engrid" ) then update_engrid
; fi;
220 if ( echo $ans |
grep -w "rebuild_engrid" ) then rebuild_engrid
; fi;
221 if ( echo $ans |
grep -w "create_start_engrid" ) then create_start_engrid
; fi;