0029520: Visualization - drop deprecated V3d_View::Export() functionality and depende...
[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
249dd6ed 5# ----- For compatability with external application using CASROOT -----
a0726e55 6if [ "${CASROOT}" == "" ]; then
249dd6ed 7 export CASROOT="@INSTALL_DIR@"
a0726e55 8fi
ad211ad3 9
249dd6ed 10# ----- Define path to 3rdparty products -----
11export THIRDPARTY_DIR="@3RDPARTY_DIR@"
12
13# ----- Read script arguments -----
32856b63 14shopt -s nocasematch
fa0cbe55 15export CASDEB="";
32856b63 16if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
17if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
316d77d9 18if [[ "$1" == "relwithdeb" ]]; then export CASDEB="i"; fi
19if [[ "$1" == "i" ]]; then export CASDEB="i"; fi
32856b63 20shopt -u nocasematch
ad211ad3 21
32856b63 22# ----- Set path to 3rd party and OCCT libraries -----
23anArch=`uname -m`
24if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
25 export ARCH="32";
26else
27 export ARCH="64";
28fi
29
30aSystem=`uname -s`
31if [ "$aSystem" == "Darwin" ]; then
32 export WOKSTATION="mac";
33 export ARCH="64";
34else
35 export WOKSTATION="lin";
36fi
37
38# ----- Set local settings -----
249dd6ed 39if [ -e "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" ]; then
40 source "${CASROOT}/@INSTALL_DIR_SCRIPT@/custom.sh" "${CASDEB}" "${ARCH}"
32856b63 41fi
42
43THRDPARTY_PATH=""
ad211ad3 44if [ "$TCL_DIR" != "" ]; then
32856b63 45 THRDPARTY_PATH="${TCL_DIR}:${THRDPARTY_PATH}"
ad211ad3 46fi
a0726e55 47
82f443b6 48if [ "$TK_DIR" != "" ]; then
49 THRDPARTY_PATH="${TK_DIR}:${THRDPARTY_PATH}"
50fi
51
a0726e55 52if [ "$FREETYPE_DIR" != "" ]; then
32856b63 53 THRDPARTY_PATH="${FREETYPE_DIR}:${THRDPARTY_PATH}"
ad211ad3 54fi
a0726e55 55
ad211ad3 56if [ "$FREEIMAGE_DIR" != "" ]; then
32856b63 57 THRDPARTY_PATH="${FREEIMAGE_DIR}:${THRDPARTY_PATH}"
ad211ad3 58fi
a0726e55 59
a0726e55 60if [ "$TBB_DIR" != "" ]; then
32856b63 61 THRDPARTY_PATH="${TBB_DIR}:${THRDPARTY_PATH}"
ad211ad3 62fi
63
09c597c9 64if [ "$VTK_DIR" != "" ]; then
65 THRDPARTY_PATH="${VTK_DIR}:${THRDPARTY_PATH}"
66fi
67
08f8a185 68if [ "$FFMPEG_DIR" != "" ]; then
69 THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}"
70fi
71
14bbbdcb 72if [ "$QTDIR" != "" ]; then
73 THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}"
74fi
75
82f443b6 76if [ "$TK_DIR" != "$TCL_DIR" ]; then
77 if [ "$TK_DIR" != "" ]; then
4b3541c6 78 export TK_LIBRARY="${TK_DIR}/../lib/tk${TK_VERSION_WITH_DOT}"
82f443b6 79 fi
80 if [ "$TCL_DIR" != "" ]; then
4b3541c6 81 export TCL_LIBRARY="${TCL_DIR}/../lib/tcl${TCL_VERSION_WITH_DOT}"
82f443b6 82 fi
83fi
84
32856b63 85if [ "$LD_LIBRARY_PATH" != "" ]; then
096ef695 86 export LD_LIBRARY_PATH="${THRDPARTY_PATH}:${LD_LIBRARY_PATH}"
85bcc072 87else
096ef695 88 export LD_LIBRARY_PATH="${THRDPARTY_PATH}"
ad211ad3 89fi
90
4b3541c6 91if [ "$CSF_OCCTBinPath" != "" ]; then
92 export PATH="${CSF_OCCTBinPath}:${PATH}"
93fi
94
95if [ "$CSF_OCCTLibPath" != "" ]; then
96 if [ "$LD_LIBRARY_PATH" != "" ]; then
97 export LD_LIBRARY_PATH="${CSF_OCCTLibPath}:${LD_LIBRARY_PATH}"
98 else
99 export LD_LIBRARY_PATH="${CSF_OCCTLibPath}"
100 fi
101fi
102
32856b63 103if [ "$WOKSTATION" == "mac" ]; then
104 if [ "$DYLD_LIBRARY_PATH" != "" ]; then
105 export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
106 else
107 export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
108 fi
ad211ad3 109fi
110
111# ----- Set envoronment variables used by OCCT -----
112export CSF_LANGUAGE=us
113export MMGT_CLEAR=1
4b3541c6 114export CSF_SHMessage="${CSF_OCCTResourcePath}/SHMessage"
115export CSF_MDTVTexturesDirectory="${CSF_OCCTResourcePath}/Textures"
116export CSF_ShadersDirectory="${CSF_OCCTResourcePath}/Shaders"
117export CSF_XSMessage="${CSF_OCCTResourcePath}/XSMessage"
118export CSF_TObjMessage="${CSF_OCCTResourcePath}/TObj"
119export CSF_StandardDefaults="${CSF_OCCTResourcePath}/StdResource"
120export CSF_PluginDefaults="${CSF_OCCTResourcePath}/StdResource"
121export CSF_XCAFDefaults="${CSF_OCCTResourcePath}/StdResource"
122export CSF_TObjDefaults="${CSF_OCCTResourcePath}/StdResource"
123export CSF_StandardLiteDefaults="${CSF_OCCTResourcePath}/StdResource"
4b3541c6 124export CSF_IGESDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
125export CSF_STEPDefaults="${CSF_OCCTResourcePath}/XSTEPResource"
126export CSF_XmlOcafResource="${CSF_OCCTResourcePath}/XmlOcafResource"
127export CSF_MIGRATION_TYPES="${CSF_OCCTResourcePath}/StdResource/MigrationSheet.txt"
ad211ad3 128
249dd6ed 129# ----- Draw Harness special stuff -----
4b3541c6 130if [ -e "${CSF_OCCTResourcePath}/DrawResources" ]; then
131 export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
132 export CSF_DrawPluginDefaults="${CSF_OCCTResourcePath}/DrawResources"
a0726e55 133
4b3541c6 134 if [ -e "${CSF_OCCTResourcePath}/DrawResources/DrawDefault" ]; then
135 export DRAWDEFAULT="${CSF_OCCTResourcePath}/DrawResources/DrawDefault"
ad211ad3 136 fi
137fi