fi
fi
creadll=$generationdir/creatools_bin/creaBin
- LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
+ if [ $OperatingSystem = "MacOS" ]
+ then
+ DYLD_LIBRARY_PATH=$creadll:DYLD_LIBRARY_$PATH
+ else
+ LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
+ fi
export crea_DIR=$generationdir/creatools_bin/creaBin
# -------------------------
bash $scriptDir/ctestmod.sh $bbtksource $generationdir
fi
fi
- bbtkdll=$generationdir/creatools_bin/bbtkBin
- LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
- export BBTK_DIR=$generationdir/creatools_bin/bbtkBin
+
+bbtkdll=$generationdir/creatools_bin/bbtkBin
+if [ $OperatingSystem = "MacOS" ]
+then
+ DYLD_LIBRARY_PATH=$bbtkdll:$DYLD_LIBRARY_PATH
+else
+ LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
+fi
+export BBTK_DIR=$generationdir/creatools_bin/bbtkBin
# -------------------------
# start_point = 4 : creaMaracasVisu
fi
fi
creamaracasdll=$generationdir/creatools_bin/creaMaracasVisuBin
- LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
+
+if [ $OperatingSystem = "MacOS" ]
+then
+ DYLD_LIBRARY_PATH=$creamaracasdll:DYLD_LIBRARY_$PATH
+else
+ LD_LIBRARY_PATH=$creamaracasdll:LD_LIBRARY_$PATH
+fi
+
export creaMaracasVisu_DIR=$generationdir/creatools_bin/creaMaracasVisuBin
# -------------------------
fi
fi
creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
- LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
+
+if [ $OperatingSystem = "MacOS" ]
+then
+ DYLD_LIBRARY_PATH=$creaenvironmentdll:DYLD_LIBRARY_$PATH
+else
+ LD_LIBRARY_PATH=$creaenvironmentdll:LD_LIBRARY_$PATH
+fi
+
export creaEnvironment_DIR=$generationdir/creatools_bin/creaEnvironmentBin
# -------------------------
fi
fi
creabrukerdll=$generationdir/creatools_bin/creabrukerBin
- LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
+
+if [ $OperatingSystem = "MacOS" ]
+then
+ DYLD_LIBRARY_PATH=$creabrukerdll:DYLD_LIBRARY_$PATH
+else
+ LD_LIBRARY_PATH=$creabrukerdll:LD_LIBRARY_$PATH
+fi
+
export creaBruker_DIR=$generationdir/creatools_bin/creaBrukerBin
# -------------------------
fi
fi
creaimagedll=$generationdir/creatools_bin/creaimageBin
- LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
+
+if [ $OperatingSystem = "MacOS" ]
+then
+ DYLD_LIBRARY_PATH=$creaimagedll:DYLD_LIBRARY_$PATH
+else
+ LD_LIBRARY_PATH=$creaimagedll:LD_LIBRARY_$PATH
+fi
+
export creaImageIO_DIR=$generationdir/creatools_bin/creaImageIOBin
# -------------------------
fi
fi
creacontourdll=$generationdir/creatools_bin/creacontoursBin
- LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
+
+if [ $OperatingSystem = "MacOS" ]
+then
+ DYLD_LIBRARY_PATH=$creacontoursdll:DYLD_LIBRARY_$PATH
+else
+ LD_LIBRARY_PATH=$creacontoursdll:LD_LIBRARY_$PATH
+fi
+
export creaContours_DIR=$generationdir/creatools_bin/creaContoursBin
# -------------------------
chmod 755 $installPrefix/share/creatools_base_library_config.sh
echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
+if [ $OperatingSystem = "MacOS" ]
+then
+ echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
+else
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
+fi
# Install creatools as user (no longer as root) // JPR 2/5/2011
#!/bin/bash
#
-# This one is here just in order not tp duppliacte the following code
+# This one is here just in order not tp dupplicate the following code
#
#allow debugger to choose the startpoint
# libidosource=libidoNewProj
+echo "++++++++++++++++++++++++++++++++++++++++++++++++OperatingSystem " $OperatingSystem
+
+if [ $OperatingSystem = "MacOS" ]
+then
+ creadll=$generationdir/creatools_bin/creaBin
+DYLD_LIBRARY_PATH=$creadll:DYLD_LIBRARY_PATH
+ bbtkdll=$generationdir/creatools_bin/bbtkBin
+DYLD_LIBRARY_PATH=$bbtkdll:$DYLD_LIBRARY_PATH
+ creamaracasdll=$generationdir/creatools_bin/creamaracasBin
+DYLD_LIBRARY_PATH=$creamaracasdll:$DYLD_LIBRARY_PATH
+ creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
+DYLD_LIBRARY_PATH=$creaenvironmentdll:$DYLD_LIBRARY_PATH
+ creabrukerdll=$generationdir/creatools_bin/creabrukerBin
+DYLD_LIBRARY_PATH=$creabrukerdll:$DYLD_LIBRARY_PATH
+ creaimagedll=$generationdir/creatools_bin/creaimageBin
+DYLD_LIBRARY_PATH=$creaimagedll:$DYLD_LIBRARY_PATH
+ creacontourdll=$generationdir/creatools_bin/creacontoursBin
+DYLD_LIBRARY_PATH=$creacontoursdll:$DYLD_LIBRARY_PATH
+ crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
+DYLD_LIBRARY_PATH=$crearigidregistrationdll:$DYLD_LIBRARY_PATH
+ bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
+DYLD_LIBRARY_PATH=$bbtkgeditordll:$DYLD_LIBRARY_PATH
+ creatoolsdll=$generationdir/creatools_bin/creatoolsBin
+DYLD_LIBRARY_PATH=$creatoolssdll:$DYLD_LIBRARY_PATH
+ creaminitoolsdll=$generationdir/creatools_bin/creaMiniToolsBin
+DYLD_LIBRARY_PATH=$creaminitoolssdll:$DYLD_LIBRARY_PATH
+# crealibidodll=$generationdir/creatools_bin/libidoBin
+#DYLD_LIBRARY_PATH=$libidodll:$DYLD_LIBRARY_PATH
+else
creadll=$generationdir/creatools_bin/creaBin
-LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
+LD_LIBRARY_PATH=$creadll:LD_LIBRARY_PATH
bbtkdll=$generationdir/creatools_bin/bbtkBin
LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
creamaracasdll=$generationdir/creatools_bin/creamaracasBin
LD_LIBRARY_PATH=$creaminitoolssdll:$LD_LIBRARY_PATH
# crealibidodll=$generationdir/creatools_bin/libidoBin
#LD_LIBRARY_PATH=$libidodll:$LD_LIBRARY_PATH
+fi
echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
+
+if [ $OperatingSystem = "MacOS" ]
+then
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+else
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+fi
export ETC_BASHRC=$HOME/.bashrc
echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
+if [ $OperatingSystem = "MacOS" ]
+then
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+else
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+fi
# modify .bashrc
# - remove line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' if any (with accurate value for ???)
# export ETC_BASHRC="/etc/bashrc"
#fi
-export ETC_BASHRC=$HOME/.bashrc
+ case "$OperatingSystem" in
+ Fedora)
+ export ETC_BASHRC=$HOME/.bashrc
+ ;;
+ Ubuntu)
+ export ETC_BASHRC=$HOME/.bashrc
+ ;;
+ MacOS)
+ export ETC_BASHRC=$HOME/.profile
+ ;;
+ esac
+
sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC
echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
+if [ $OperatingSystem = "MacOS" ]
+then
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+else
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+fi
+if [ $OperatingSystem = "MacOS" ]
+then
+export ETC_BASHRC=$HOME/.profile
+else
export ETC_BASHRC=$HOME/.bashrc
+fi
+
sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC