You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openvibe-launcher.cmd-base 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @ECHO OFF
  2. SETLOCAL EnableDelayedExpansion
  3. SETLOCAL EnableExtensions
  4. REM Get the directory location of this script, assume it contains the OpenViBE dist tree. These variables will be used by OpenViBE executables.
  5. SET "OV_PATH_ROOT=%~dp0"
  6. SET "OV_PATH_BIN=%OV_PATH_ROOT%\bin"
  7. SET "OV_PATH_LIB=%OV_PATH_ROOT%\bin"
  8. SET "OV_PATH_DATA=%OV_PATH_ROOT%\share\openvibe"
  9. SET "MENSIA_PATH_DATA=%OV_PATH_ROOT%\share\mensia"
  10. SET OV_PAUSE=@OV_PAUSE@
  11. SET OV_RUN_IN_BG=
  12. IF /i "%1"=="--no-pause" (
  13. SET OV_PAUSE=
  14. SHIFT
  15. )
  16. IF /i "%1"=="--pause" (
  17. SET OV_PAUSE=PAUSE
  18. SHIFT
  19. )
  20. IF /i "%1"=="--run-bg" (
  21. REM Run in background, disable pause. The first start arg is the app title.
  22. SET OV_RUN_IN_BG=START "@OV_CMD_EXECUTABLE@"
  23. SET OV_PAUSE=
  24. SHIFT
  25. )
  26. SET LUA_EXE_PATH=
  27. FOR %%F IN (lua.exe) DO (
  28. SET LUA_EXE_PATH_FULL=%%~$PATH:F
  29. SET LUA_EXE_PATH=!LUA_EXE_PATH_FULL:lua.exe=!
  30. )
  31. SET PATH=%OV_PATH_LIB%;%PATH%
  32. SET LUA_CPATH=%LUA_CPATH%;%LUA_EXE_PATH%\clibs\?.dll;%OV_PATH_ROOT%\bin\?.dll
  33. SET LUA_PATH=%LUA_PATH%;%LUA_EXE_PATH%\lua\?.lua;%OV_PATH_ROOT%\bin\?.lua
  34. REM get the arguments
  35. REM this allows to build the full argument list (even when # > 9)
  36. REM %* is not modifed by SHIFT
  37. SET "args="
  38. :getArgs
  39. IF "%~1" NEQ "" (
  40. SET args=%args% %1
  41. SHIFT
  42. goto :getArgs
  43. )
  44. %OV_RUN_IN_BG% "@OV_CMD_EXECUTABLE@" @OV_CMD_ARGS@ %args%
  45. %OV_PAUSE%