#------ Setting products installation directory ------
-export INST_ROOT=/misc/dn21/hdfeditor/sbh/NewGeom/products
+
+# Find absolute path to ROOT_DIR
+export ROOT_DIR=$(pwd)/..
+export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+export PDIR=${ROOT_DIR}/products
#------ Python ------
-export PYTHON_ROOT_DIR=${INST_ROOT}/Python-2.7.3
+export PYTHON_ROOT_DIR=${PDIR}/Python-2.7.3
export PYTHONHOME=${PYTHON_ROOT_DIR}
export PYTHON_INCLUDE=${PYTHON_ROOT_DIR}/include/python2.7
export PYTHON_VERSION=2.7
export PYTHON_INC_DIR=${PYTHON_INCLUDE}
##
#------ Qt ------
-export QT4_ROOT_DIR=${INST_ROOT}/qt-4.8.4
+export QT4_ROOT_DIR=${PDIR}/qt-4.8.4
export QT_PLUGIN_PATH=${QT4_ROOT_DIR}/plugins
export PATH=${QT4_ROOT_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${QT4_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
#------ boost ------
-#export BOOST_ROOT_DIR=${INST_ROOT}/boost-1.52.0
+#export BOOST_ROOT_DIR=${PDIR}/boost-1.52.0
#export LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib
##
#------ swig ------
-export SWIG_ROOT_DIR=${INST_ROOT}/swig-2.0.8
+export SWIG_ROOT_DIR=${PDIR}/swig-2.0.8
export SWIG_LIB=${SWIG_ROOT_DIR}/share/swig/2.0.8
export PATH=${SWIG_ROOT_DIR}/bin:${PATH}
##
#------ cmake ------
-export CMAKE_ROOT_DIR=${INST_ROOT}/cmake-2.8.10.2
+export CMAKE_ROOT_DIR=${PDIR}/cmake-2.8.10.2
export PATH=${CMAKE_ROOT_DIR}/bin:${PATH}
##
#------ freetype ------
-export FREETYPE_ROOT_DIR=${INST_ROOT}/freetype-2.4.11
+export FREETYPE_ROOT_DIR=${PDIR}/freetype-2.4.11
export LD_LIBRARY_PATH=${FREETYPE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
#------ freeimage ------
-export FREEIMAGE_ROOT_DIR=${INST_ROOT}/freeimage-3.15.4
+export FREEIMAGE_ROOT_DIR=${PDIR}/freeimage-3.15.4
export PATH=${FREEIMAGE_ROOT_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${FREEIMAGE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
#------ gl2ps ------
-export GL2PS_ROOT_DIR=${INST_ROOT}/gl2ps-1.3.8
+export GL2PS_ROOT_DIR=${PDIR}/gl2ps-1.3.8
export PATH=${GL2PS_ROOT_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${GL2PS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
#------ tbb ------
-export TBB_ROOT_DIR=${INST_ROOT}/tbb-30_018oss
+export TBB_ROOT_DIR=${PDIR}/tbb-30_018oss
export PATH=${TBB_ROOT_DIR}/bin/intel64/cc4.1.0_libc2.4_kernel2.6.16.21:${PATH}
export LD_LIBRARY_PATH=${TBB_ROOT_DIR}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21:${LD_LIBRARY_PATH}
##
#------ libxml2 ------
-export LIBXML2_ROOT_DIR=${INST_ROOT}/libxml2-2.9.0
+export LIBXML2_ROOT_DIR=${PDIR}/libxml2-2.9.0
export PATH=${LIBXML2_ROOT_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${LIBXML2_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
# DO NOT rename following 3 variables,
export LIBXML2_BIN_DIR=${LIBXML2_ROOT_DIR}/bin
##
#------ OCCT ------
-export CAS_ROOT_DIR=${INST_ROOT}/OCCT-6.7.0
+export CAS_ROOT_DIR=${PDIR}/OCCT-6.7.0
export PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/bin:${PATH}
export LD_LIBRARY_PATH=${CAS_ROOT_DIR}:${CAS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
export LIB=${LD_LIBRARY_PATH}
-export PATH=${INST_ROOT}/../install/bin:${PATH}
-export LD_LIBRARY_PATH=${INST_ROOT}/../install/bin:${INST_ROOT}/../install/swig:${LD_LIBRARY_PATH}
+export INST_DIR=${ROOT_DIR}/install
+export PATH=${INST_DIR}/bin:${INST_DIR}/plugins:${PATH}
+export LD_LIBRARY_PATH=${INST_DIR}/bin:${INST_DIR}/swig:${LD_LIBRARY_PATH}
+export NEW_GEOM_CONFIG_FILE=${INST_DIR}/plugins