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)"
+if [ -z "$CASROOT" ]; then
+ return 1
+fi
+check_lib_version ${CASROOT}/inc/Standard_Version.hxx
+if [ "$?" -ne "0" ] ; then
+ return 1
+fi
+ver_major=`grep "!define OCC_VERSION_MAJOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver_minor=`grep "!define OCC_VERSION_MINOR" ${CASROOT}/inc/Standard_Version.hxx | awk '{print $3}'`
+ver="$ver_major.$ver_minor"
+if [ "$ver" == "5.2" ] ; then
return 0
fi
return 1
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}
+export LD_LIBRARY_PATH=\${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
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}
+export LD_LIBRARY_PATH=\${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