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