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