1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- @ECHO OFF
- SETLOCAL EnableExtensions
- SETLOCAL EnableDelayedExpansion
-
- REM If not set to PASSIVE, OpenMP (Eigen) boxes may load the cores fully even if there's little to do.
- SET "OMP_WAIT_POLICY=@OV_OMP_WAIT_POLICY@"
-
- REM Get the directory location of this script, assume it contains the OpenViBE dist tree. These variables will be used by OpenViBE executables.
- SET "OV_PATH_ROOT=%~dp0"
- SET "OV_PATH_BIN=%OV_PATH_ROOT%\bin"
- SET "OV_PATH_LIB=%OV_PATH_ROOT%\bin"
- SET "OV_PATH_DATA=%OV_PATH_ROOT%\share\openvibe"
-
- REM Default behavior
- SET OV_PAUSE=@OV_PAUSE@
- SET OV_RUN_IN_BG=
-
- REM Parse out Windows specific args ...
- SET "ARGS="
- SET EMPTY=
- :loop
- SET "STRIPPEDARG=%~1"
- if NOT !STRIPPEDARG! == !EMPTY! (
- IF /i "!STRIPPEDARG!" == "--no-pause" (
- SET OV_PAUSE=
- goto found:
- )
- IF /i "!STRIPPEDARG!" == "--pause" (
- SET OV_PAUSE=PAUSE
- goto found:
- )
- IF /i "!STRIPPEDARG!" == "--run-bg" (
- REM Run in background, disable pause. The second parameter below is because CMD requires a 'title'
- SET OV_RUN_IN_BG=START "@OV_CMD_EXECUTABLE@"
- SET OV_PAUSE=
- goto found:
- )
-
- REM Pass the non-stripped arg to the launched application...
- SET ARGS=%ARGS% %1
-
- :found
- SHIFT
- goto loop:
- )
-
- REM Set dependency paths etc...
- REM SET "OV_ENVIRONMENT_FILE=%OV_PATH_ROOT%\bin\OpenViBE-set-env.cmd"
-
- REM IF NOT EXIST "%OV_ENVIRONMENT_FILE%" (
- REM ECHO Error: "%OV_ENVIRONMENT_FILE%" was not found
- REM GOTO EndOfScript
- REM )
- REM CALL "%OV_ENVIRONMENT_FILE%"
-
- SET PATH=%OV_PATH_LIB%;%PATH%
-
-
- REM cmake variable OV_CMD_ARGS below may specify additional arguments outside this script
-
- %OV_RUN_IN_BG% "@OV_CMD_EXECUTABLE@" @OV_CMD_ARGS@ %ARGS%
-
- :EndOfScript
-
- %OV_PAUSE%
|