d9d8d2aceff8207532b51be60787dd912ef49a63
[occt.git] / samples / qt / IESample / run.sh
1 #!/bin/sh
2
3 export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
5 cd $aSamplePath
6
7 aSystem=`uname -s`
8 if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
9   if [ "${CASDEB}" == "d" ]; then
10     BIN_DIR="${aSamplePath}/build/Debug/IESample.app/Contents/MacOS"
11   else
12     BIN_DIR="${aSamplePath}/build/Release/IESample.app/Contents/MacOS"
13   fi
14 else
15   BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
16 fi
17
18 CSF_ResourcesDefaults="${RES_DIR}"
19 CSF_IEResourcesDefaults="${RES_DIR}"
20
21 PATH="${BIN_DIR}:${PATH}"
22
23 export CSF_IEResourcesDefaults CSF_ResourcesDefaults
24 export PATH
25
26 if test ! -r "${BIN_DIR}/IESample"; then
27   echo "Executable \"${BIN_DIR}/IESample\" not found."
28   if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
29     echo "Probably you don't compile the application. Build it with Xcode."
30   else
31     echo "Probably you don't compile the application. Execute \"make\"."
32   fi
33   exit 1
34 fi
35
36 ${BIN_DIR}/IESample