1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0023701: Add Cocoa support to Qt samples

Adapted Qt samples for using Cocoa on Mac OS X
This commit is contained in:
dbv
2013-01-25 14:41:33 +04:00
parent 6aac585ac8
commit 5f9575b332
7 changed files with 83 additions and 35 deletions

View File

@@ -8,7 +8,17 @@ host=`uname -s`
STATION=$host
RES_DIR="${aSamplePath}/res"
BIN_DIR="${aSamplePath}/${STATION}/bin"
aSystem=`uname -s`
if [ "$aSystem" == "Darwin" ]; then
if [ "${CASDEB}" == "d" ]; then
BIN_DIR="${aSamplePath}/build/Debug/Tutorial.app/Contents/MacOS"
else
BIN_DIR="${aSamplePath}/build/Release/Tutorial.app/Contents/MacOS"
fi
else
BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
fi
CSF_ResourcesDefaults="${RES_DIR}"
CSF_TutorialResourcesDefaults="${RES_DIR}"
@@ -19,9 +29,13 @@ export CSF_TutorialResourcesDefaults CSF_ResourcesDefaults
export PATH
if test ! -r "${BIN_DIR}/Tutorial"; then
echo "Executable \"${BIN_DIR}/Tutorial\" not found."
echo "Probably you don't compile the application. Execute \"make\"."
exit 1
echo "Executable \"${BIN_DIR}/Tutorial\" not found."
if [ "$aSystem" == "Darwin" ]; then
echo "Probably you don't compile the application. Build it with Xcode."
else
echo "Probably you don't compile the application. Execute \"make\"."
fi
exit 1
fi
${BIN_DIR}/Tutorial