]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
get back installation script for Cascade 5.2
authorvsr <vsr@opencascade.com>
Fri, 24 Sep 2004 14:22:49 +0000 (14:22 +0000)
committervsr <vsr@opencascade.com>
Fri, 24 Sep 2004 14:22:49 +0000 (14:22 +0000)
add installation script for Cascade patch

config_files/CAS-5.2-patch.sh [new file with mode: 0755]
config_files/CAS-5.2.sh [new file with mode: 0755]

diff --git a/config_files/CAS-5.2-patch.sh b/config_files/CAS-5.2-patch.sh
new file mode 100755 (executable)
index 0000000..891213c
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+check_version()
+{
+#check existence of pathc for Open CASCADE 5.2
+#unfortunately we can't say nothing exactly about patch for Open CASCADE 5.2
+return 0
+}
+
+print_env()
+{
+#nothing to do
+return 0
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+check_version
+if [ $? -eq 0 ] ; then
+#    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/CAS-5.2-patch.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+install_binary()
+{
+echo "You can only install sources of patch for OPEN CASCADE 5.2"
+return 1
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="cas-patch" ; fi
+export PRODUCT="CAS-5.2-patch"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE 
diff --git a/config_files/CAS-5.2.sh b/config_files/CAS-5.2.sh
new file mode 100755 (executable)
index 0000000..5e3a633
--- /dev/null
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+check_version()
+{
+#check existence of Open CASCADE 5.2
+#unfortunately we can't say nothing exactly about Open CASCADE 5.2
+#and we only check CASROOT env.variable
+if [ -n "$CASROOT" ]; then
+    #echo "You have installed version of Open CASCADE in a $CASROOT"
+    #echo "Please check version number (You need 5.2)"
+    return 0
+fi
+return 1
+}
+
+print_env()
+{
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CASROOT=\${INSTALL_ROOT}/${PRODUCT}
+export LD_LIBRARY_PATH=\${CASROOT}/Linux/lib:\${CASROOT}/lin/lib:\${CASROOT}/`uname`/lib:\${LD_LIBRARY_PATH}
+# Variable for Foundation Classes : 
+export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
+export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat 
+# Variable for DataExchange : 
+export CSF_SHMessageStd=\${CASROOT}/src/SHMessageStd 
+export CSF_XSMessage=\${CASROOT}/src/XSMessage 
+# Variable for Font : 
+export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT 
+export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures 
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+}
+
+# looks for the native product and collects it's environment (used by make_env())
+try_native(){
+check_version
+if [ $? -eq 0 ] ; then
+    cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export CASROOT=${CASROOT}
+export LD_LIBRARY_PATH=\${CASROOT}/Linux/lib:\${CASROOT}/lin/lib:\${CASROOT}/`uname`/lib:\${LD_LIBRARY_PATH}
+# Variable for Foundation Classes : 
+export CSF_UnitsLexicon=\${CASROOT}/src/UnitsAPI/Lexi_Expr.dat 
+export CSF_UnitsDefinition=\${CASROOT}/src/UnitsAPI/Units.dat 
+# Variable for DataExchange : 
+export CSF_SHMessageStd=\${CASROOT}/src/SHMessageStd 
+export CSF_XSMessage=\${CASROOT}/src/XSMessage 
+# Variable for Font : 
+export CSF_MDTVFontDirectory=\${CASROOT}/src/FontMFT 
+export CSF_MDTVTexturesDirectory=\${CASROOT}/src/Textures 
+##
+EOF
+    make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+    return 0
+fi
+return 1;
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+return $?
+}
+
+install_source()
+{
+echo "You can only install precompiled CAS-5.2"
+return 1
+}
+
+install_binary()
+{
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/CAS-5.2.tar.gz -C ${INSTALL_ROOT}
+
+print_env
+}
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INSTALL_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="cas" ; fi
+export PRODUCT="CAS-5.2"
+export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
+export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}
+source ./common.sh
+$PROCEDURE