Update for QT definition
[occt.git] / samples / qt / Tutorial / run.sh
CommitLineData
7fd59977 1#!/bin/sh
2
3host=`uname -s`
4
5PROG_DIR=`dirname $0`
6ROOT_DIR=`(cd $PROG_DIR; pwd)`
7
8if test ! -d "$host/obj"; then
9 QTDIR="$CASROOT/../3rdparty/$host/qt"
10 QT_LD_PATH="$CASROOT/../3rdparty/$host/qt"
11 CASCADE_LD_PATH="$CASROOT/$host/lib"
12 LD_LIBRARY_PATH="${CASCADE_LD_PATH}:${QT_LD_PATH}:${LD_LIBRARY_PATH}"
13fi
14STATION=$host
15
16if test "${CASROOT+set}" != "set"; then
17 echo "Environment variable \"CASROOT\" not defined."
18 CASROOT="$CASCADE_ROOT"
19 if test -n "$CASROOT"; then
20 echo "Try to use CASROOT=$CASROOT"
21 else
22 exit 1
23 fi
24fi
25
26if test ! -d "$CASROOT"; then
27 echo "CasCade root directory \"$CASROOT\" not found."
28 exit 1
29fi
30
31if test "${QTDIR+set}" != "set"; then
32 echo "Environment variable \"QTDIR\" not defined."
33 exit 1
34fi
35
36occ_opengl_lib=libTKOpenGl.so
37
38RES_DIR="${ROOT_DIR}/res"
39BIN_DIR="${ROOT_DIR}/${STATION}/bin"
40
41CSF_GraphicShr="${CASROOT}/${STATION}/lib/${occ_opengl_lib}"
42CSF_UnitsLexicon="${CASROOT}/src/UnitsAPI/Lexi_Expr.dat"
43CSF_UnitsDefinition="${CASROOT}/src/UnitsAPI/Units.dat"
44CSF_MDTVFontDirectory="${CASROOT}/src/FontMFT"
45CSF_MDTVTexturesDirectory="${CASROOT}/src/Textures"
46
47CSF_ResourcesDefaults="${RES_DIR}"
48CSF_TuturialResourcesDefaults="${RES_DIR}"
49
50PATH="${BIN_DIR}:${PATH}"
51
52export CSF_GraphicShr CSF_UnitsLexicon CSF_UnitsDefinition
53export CSF_MDTVFontDirectory CSF_MDTVTexturesDirectory
54export CSF_TuturialResourcesDefaults CSF_ResourcesDefaults
55export PATH LD_LIBRARY_PATH
56
57if test ! -r "${BIN_DIR}/Tutorial"; then
58 echo "Executable \"${BIN_DIR}/Tutorial\" not found."
59 echo "Probably you don't compile the application. Execute \"make\"."
60 exit 1
61fi
62
63${BIN_DIR}/Tutorial
64