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