0023821: Improve qmake project files for Qt samples
[occt.git] / samples / qt / Tutorial / run.sh
CommitLineData
7fd59977 1#!/bin/sh
2
7a53e886 3export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9220e785 4if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
7a53e886 5cd $aSamplePath
7fd59977 6
5f9575b3 7aSystem=`uname -s`
dc3fe572 8if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
5f9575b3 9 if [ "${CASDEB}" == "d" ]; then
10 BIN_DIR="${aSamplePath}/build/Debug/Tutorial.app/Contents/MacOS"
11 else
12 BIN_DIR="${aSamplePath}/build/Release/Tutorial.app/Contents/MacOS"
13 fi
14else
15 BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
16fi
7fd59977 17
18CSF_ResourcesDefaults="${RES_DIR}"
7a53e886 19CSF_TutorialResourcesDefaults="${RES_DIR}"
7fd59977 20
21PATH="${BIN_DIR}:${PATH}"
22
7a53e886 23export CSF_TutorialResourcesDefaults CSF_ResourcesDefaults
24export PATH
7fd59977 25
26if test ! -r "${BIN_DIR}/Tutorial"; then
5f9575b3 27 echo "Executable \"${BIN_DIR}/Tutorial\" not found."
dc3fe572 28 if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
5f9575b3 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
7fd59977 34fi
35
36${BIN_DIR}/Tutorial