7fd59977 |
1 | #!/bin/sh |
2 | |
7a53e886 |
3 | export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
9220e785 |
4 | if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi |
7a53e886 |
5 | cd $aSamplePath |
7fd59977 |
6 | |
5f9575b3 |
7 | aSystem=`uname -s` |
dc3fe572 |
8 | if [ "$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 |
14 | else |
15 | BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}" |
16 | fi |
7fd59977 |
17 | |
18 | CSF_ResourcesDefaults="${RES_DIR}" |
7a53e886 |
19 | CSF_TutorialResourcesDefaults="${RES_DIR}" |
7fd59977 |
20 | |
21 | PATH="${BIN_DIR}:${PATH}" |
22 | |
7a53e886 |
23 | export CSF_TutorialResourcesDefaults CSF_ResourcesDefaults |
24 | export PATH |
7fd59977 |
25 | |
26 | if 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 |
34 | fi |
35 | |
36 | ${BIN_DIR}/Tutorial |