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