0029520: Visualization - drop deprecated V3d_View::Export() functionality and depende...
[occt.git] / adm / templates / sample.sh
1 #!/bin/bash
2
3 if [ "$1" == "" ]; then
4   echo Launch selected sample as follows:
5   echo   sample.sh SampleName d
6   echo or to use last sample build configuration:
7   echo   sample.sh SampleName
8   echo available samples:
9   echo    FuncDemo
10   echo    IESample
11   echo    Tutorial
12 fi
13
14
15 aCurrentPath="$PWD"
16 aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
17
18 source "${aScriptPath}/env.sh" "$2"
19
20 if test "${QTDIR}" == ""; then
21   if [ -d "$QTDIR%\qml" ];
22     then export QML2_IMPORT_PATH="$QTDIR\qml";
23   fi
24 fi
25
26 export "EXE_PATH=$CSF_OCCTBinPath/$1"
27
28 if [ ! -f "$EXE_PATH" ]; then
29   echo "Executable \"$EXE_PATH\" not found."
30   echo "Probably you didn't compile the application."
31   exit 1
32 fi
33
34 cd ${aCurrentPath}
35 "$EXE_PATH"