OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
if (BUILD_MODULE_MfcSamples OR BUILD_MODULE_QtSamples)
- OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR_SCRIPT}")
- OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
+ OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
+ OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
endif()
# env script for draw in building environment
OCCT_MODULES_AND_TOOLKITS (SAMPLES "SAMPLES_TOOLKITS" OCCT_SAMPLES)
-if (BUILD_MODULE_QtSamples)
- if (NOT Qt5_FOUND OR NOT WIN32)
- list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
- message (STATUS "Info: AndroidQt sample excluded due to Qt5 usage is disabled or OS is not Windows")
+if (BUILD_Inspector OR BUILD_MODULE_QtSamples)
+ if (BUILD_MODULE_QtSamples)
+ if (NOT Qt5_FOUND OR NOT WIN32)
+ list (REMOVE_ITEM qt_SAMPLES_TOOLKITS AndroidQt)
+ message (STATUS "Info: AndroidQt sample excluded due to Qt5 usage is disabled or OS is not Windows")
+ endif()
+ else()
+ list (REMOVE_ITEM OCCT_SAMPLES qt)
+ message (STATUS "Info: qt samples excluded due to BUILD_MODULE_QtSamples is disabled")
endif()
if (NOT BUILD_Inspector)
- list (REMOVE_ITEM tools_SAMPLES_TOOLKITS TInspectorEXE)
+ list (REMOVE_ITEM OCCT_SAMPLES tools)
message (STATUS "Info: TInspectorEXE sample excluded due to BUILD_Inspector is disabled")
endif()
--- /dev/null
+#!/bin/bash
+
+if [ "$1" == "" ]; then
+ echo Launch selected sample as follows:
+ echo sample.sh SampleName d
+ echo or to use last sample build configuration:
+ echo sample.sh SampleName
+ echo available samples:
+ echo FuncDemo
+ echo IESample
+ echo Tutorial
+fi
+
+
+aCurrentPath="$PWD"
+aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
+
+source "${aScriptPath}/env.sh" "$2"
+
+if test "${QTDIR}" == ""; then
+ if [ -d "$QTDIR%\qml" ];
+ then export QML2_IMPORT_PATH="$QTDIR\qml";
+ fi
+fi
+
+export "EXE_PATH=$CSF_OCCTBinPath/$1"
+
+if [ ! -f "$EXE_PATH" ]; then
+ echo "Executable \"$EXE_PATH\" not found."
+ echo "Probably you didn't compile the application."
+ exit 1
+fi
+
+cd ${aCurrentPath}
+"$EXE_PATH"
\ No newline at end of file