0002793: BinOcaf: low performance saving documents with large attributes
[occt.git] / adm / templates / env.sh.in
CommitLineData
a0726e55 1#!/bin/bash
ad211ad3 2
3aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
4
a0726e55 5if [ "${CASROOT}" == "" ]; then
6 export CASROOT="${aScriptPath}"
7fi
ad211ad3 8
a0726e55 9aLibPath="${CASROOT}/lib"
ad211ad3 10
11TCL_DIR="@3RDPARTY_TCL_DLL_DIR@"
ad211ad3 12if [ "$TCL_DIR" != "" ]; then
13 aLibPath="${TCL_DIR}:${aLibPath}"
14fi
a0726e55 15
16FREETYPE_DIR="@3RDPARTY_FREETYPE_DLL_DIR@"
17if [ "$FREETYPE_DIR" != "" ]; then
18 aLibPath="${FREETYPE_DIR}:${aLibPath}"
ad211ad3 19fi
a0726e55 20
21FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_DLL_DIR@"
ad211ad3 22if [ "$FREEIMAGE_DIR" != "" ]; then
23 aLibPath="${FREEIMAGE_DIR}:${aLibPath}"
24fi
a0726e55 25
26GL2PS_DIR="@3RDPARTY_GL2PS_DLL_DIR@"
ad211ad3 27if [ "$GL2PS_DIR" != "" ]; then
28 aLibPath="${GL2PS_DIR}:${aLibPath}"
29fi
a0726e55 30
31TBB_DIR="@3RDPARTY_TBB_DLL_DIR@"
32if [ "$TBB_DIR" != "" ]; then
33 aLibPath="${TBB_DIR}:${aLibPath}"
ad211ad3 34fi
35
36# ----- Set path to 3rd party and OCCT libraries -----
37aSystem=`uname -s`
38if [ "$aSystem" == "Darwin" ]; then
39 export WOKSTATION="mac";
40 if [ "$DYLD_LIBRARY_PATH" != "" ]; then
41 export DYLD_LIBRARY_PATH="${aLibPath}:${DYLD_LIBRARY_PATH}"
42 else
43 export DYLD_LIBRARY_PATH="${aLibPath}"
44 fi
45else
46 export WOKSTATION="lin";
47 if [ "$LD_LIBRARY_PATH" != "" ]; then
48 export LD_LIBRARY_PATH="${aLibPath}:${LD_LIBRARY_PATH}"
49 else
50 export LD_LIBRARY_PATH="${aLibPath}"
51 fi
52fi
53
54# ----- Set path to OCCT executables -----
a0726e55 55PATH="${PATH}:${CASROOT}/bin"
ad211ad3 56
57# ----- Setup Environment Variables -----
58anArch=`uname -m`
59if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
60 export ARCH="32";
61else
62 export ARCH="64";
63fi
64if [ "$aSystem" == "Darwin" ]; then
65 export ARCH="64";
66fi
67
68# ----- Set envoronment variables used by OCCT -----
69export CSF_LANGUAGE=us
70export MMGT_CLEAR=1
71export CSF_EXCEPTION_PROMPT=1
a0726e55 72export CSF_SHMessage="${CASROOT}/src/SHMessage"
73export CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
74export CSF_ShadersDirectory="${CASROOT}/src/Shaders"
75export CSF_XSMessage="${CASROOT}/src/XSMessage"
76export CSF_TObjMessage="${CASROOT}/src/TObj"
77export CSF_StandardDefaults="${CASROOT}/src/StdResource"
78export CSF_PluginDefaults="${CASROOT}/src/StdResource"
79export CSF_XCAFDefaults="${CASROOT}/src/StdResource"
80export CSF_TObjDefaults="${CASROOT}/src/StdResource"
81export CSF_StandardLiteDefaults="${CASROOT}/src/StdResource"
82export CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
83export CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
84export CSF_IGESDefaults="${CASROOT}/src/XSTEPResource"
85export CSF_STEPDefaults="${CASROOT}/src/XSTEPResource"
86export CSF_XmlOcafResource="${CASROOT}/src/XmlOcafResource"
87export CSF_MIGRATION_TYPES="${CASROOT}/src/StdResource/MigrationSheet.txt"
ad211ad3 88
89# Draw Harness special stuff
a0726e55 90if [ -e "${CASROOT}/src/DrawResources" ]; then
91 export DRAWHOME="${CASROOT}/src/DrawResources"
92 export CSF_DrawPluginDefaults="${CASROOT}/src/DrawResources"
93
94 if [ -e "${CASROOT}/src/DrawResources/DrawDefault" ]; then
95 export DRAWDEFAULT="${CASROOT}/src/DrawResources/DrawDefault"
ad211ad3 96 fi
97fi
98
a0726e55 99if [ -e "${CASROOT}/src/DrawResourcesProducts" ]; then
100 export CSF_DrawPluginProductsDefaults="${CASROOT}/src/DrawResourcesProducts"
ad211ad3 101fi