mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
unrelative changes: #!/bin/bash line was added to env.sh.in CMake: debug environment was removed for the time being; env.sh and env.bat templates were refactored possibility of using of redundant command line parameters were removed from env.sh & env.bat scripts tcl installation corrected; Removed "echo off" from shell script
101 lines
3.0 KiB
Bash
101 lines
3.0 KiB
Bash
#!/bin/bash
|
|
|
|
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
|
|
|
if [ "${CASROOT}" == "" ]; then
|
|
export CASROOT="${aScriptPath}"
|
|
fi
|
|
|
|
aLibPath="${CASROOT}/lib"
|
|
|
|
TCL_DIR="@3RDPARTY_TCL_DLL_DIR@"
|
|
if [ "$TCL_DIR" != "" ]; then
|
|
aLibPath="${TCL_DIR}:${aLibPath}"
|
|
fi
|
|
|
|
FREETYPE_DIR="@3RDPARTY_FREETYPE_DLL_DIR@"
|
|
if [ "$FREETYPE_DIR" != "" ]; then
|
|
aLibPath="${FREETYPE_DIR}:${aLibPath}"
|
|
fi
|
|
|
|
FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_DLL_DIR@"
|
|
if [ "$FREEIMAGE_DIR" != "" ]; then
|
|
aLibPath="${FREEIMAGE_DIR}:${aLibPath}"
|
|
fi
|
|
|
|
GL2PS_DIR="@3RDPARTY_GL2PS_DLL_DIR@"
|
|
if [ "$GL2PS_DIR" != "" ]; then
|
|
aLibPath="${GL2PS_DIR}:${aLibPath}"
|
|
fi
|
|
|
|
TBB_DIR="@3RDPARTY_TBB_DLL_DIR@"
|
|
if [ "$TBB_DIR" != "" ]; then
|
|
aLibPath="${TBB_DIR}:${aLibPath}"
|
|
fi
|
|
|
|
# ----- Set path to 3rd party and OCCT libraries -----
|
|
aSystem=`uname -s`
|
|
if [ "$aSystem" == "Darwin" ]; then
|
|
export WOKSTATION="mac";
|
|
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
|
|
export DYLD_LIBRARY_PATH="${aLibPath}:${DYLD_LIBRARY_PATH}"
|
|
else
|
|
export DYLD_LIBRARY_PATH="${aLibPath}"
|
|
fi
|
|
else
|
|
export WOKSTATION="lin";
|
|
if [ "$LD_LIBRARY_PATH" != "" ]; then
|
|
export LD_LIBRARY_PATH="${aLibPath}:${LD_LIBRARY_PATH}"
|
|
else
|
|
export LD_LIBRARY_PATH="${aLibPath}"
|
|
fi
|
|
fi
|
|
|
|
# ----- Set path to OCCT executables -----
|
|
PATH="${PATH}:${CASROOT}/bin"
|
|
|
|
# ----- Setup Environment Variables -----
|
|
anArch=`uname -m`
|
|
if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
|
|
export ARCH="32";
|
|
else
|
|
export ARCH="64";
|
|
fi
|
|
if [ "$aSystem" == "Darwin" ]; then
|
|
export ARCH="64";
|
|
fi
|
|
|
|
# ----- Set envoronment variables used by OCCT -----
|
|
export CSF_LANGUAGE=us
|
|
export MMGT_CLEAR=1
|
|
export CSF_EXCEPTION_PROMPT=1
|
|
export CSF_SHMessage="${CASROOT}/src/SHMessage"
|
|
export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
|
|
export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
|
|
export CSF_XSMessage="${CASROOT}/src/XSMessage"
|
|
export CSF_TObjMessage="${CASROOT}/src/TObj"
|
|
export CSF_StandardDefaults="${CASROOT}/src/StdResource"
|
|
export CSF_PluginDefaults="${CASROOT}/src/StdResource"
|
|
export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
|
|
export CSF_TObjDefaults="${CASROOT}/src/StdResource"
|
|
export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
|
|
export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
|
|
export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
|
|
export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
|
|
export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
|
|
export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
|
|
export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
|
|
|
|
# Draw Harness special stuff
|
|
if [ -e "${CASROOT}/src/DrawResources" ]; then
|
|
export DRAWHOME="${CASROOT}/src/DrawResources"
|
|
export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
|
|
|
|
if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
|
|
export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
|
|
fi
|
|
fi
|
|
|
|
if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
|
|
export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
|
|
fi |