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
+if [ "$ver" != "5.2" ] ; then
+ return 1
fi
# above check if only for major and minor version numbers
# we need also the check for the release version number
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
check_version()
{
-check_lib_version dot ${PATH}
-if [ "$?" -eq "0" ]; then
- #echo "The product ${PRODUCT} has been already installed on yours system"
- return 0
+isdot=`which dot 2>/dev/null`
+if [ -n isdot ]; then
+ ver=`dot -V 2>&1 | awk '{print $3}'`
+ if [ "$ver" == "1.9" ]; then
+ return 0
+ fi
fi
return 1
}