init
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script is meant to be launched from inside an OpenViBE application (such as a scenario in Designer)
|
||||
#
|
||||
|
||||
CALLCMD=$1
|
||||
shift
|
||||
|
||||
ov_run_bg=0
|
||||
if [ "$1" == "--run-bg" ]; then
|
||||
ov_run_bg=1
|
||||
shift
|
||||
fi
|
||||
|
||||
# OV_PATH_BIN overrides the CMake specified folder, if given
|
||||
LOCAL_BIN_PATH="@CMAKE_INSTALL_FULL_BINDIR@"
|
||||
if [ "$OV_PATH_BIN" != "" ]; then
|
||||
LOCAL_BIN_PATH="$OV_PATH_BIN"
|
||||
fi
|
||||
|
||||
ret_code=0
|
||||
|
||||
if [ $ov_run_bg == 0 ]; then
|
||||
eval "$LOCAL_BIN_PATH/$CALLCMD" @OV_CMD_ARGS@ $*
|
||||
ret_code=$?
|
||||
else
|
||||
"$LOCAL_BIN_PATH/$CALLCMD" @OV_CMD_ARGS@ $* &
|
||||
fi
|
||||
|
||||
exit $ret_code
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM This script is meant to be launched from an environment with the OV_PATH_BIN env variable set externally
|
||||
REM
|
||||
|
||||
SET "OV_RUN_APP=%1"
|
||||
SHIFT
|
||||
|
||||
SET OV_RUN_IN_BG=
|
||||
IF /i "%1"=="--run-bg" (
|
||||
REM Run in background. The first arg to START is the app title.
|
||||
SET OV_RUN_IN_BG=START "%OV_RUN_APP%"
|
||||
SHIFT
|
||||
)
|
||||
|
||||
%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\%OV_RUN_APP%" %1 %2 %3 %4 %5
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
@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"
|
||||
|
||||
REM Default behavior
|
||||
SET OV_PAUSE=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!" == "--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...
|
||||
SET "OV_ENVIRONMENT_FILE=%OV_PATH_ROOT%\bin\OpenViBE-set-env.cmd"
|
||||
IF NOT EXIST "%OV_ENVIRONMENT_FILE%" (
|
||||
ECHO Error: "%OV_ENVIRONMENT_FILE%" was not found
|
||||
GOTO EndOfScript
|
||||
)
|
||||
CALL "%OV_ENVIRONMENT_FILE%"
|
||||
|
||||
REM cmake variable OV_CMD_ARGS below may specify additional arguments outside this script
|
||||
|
||||
%OV_RUN_IN_BG% "%OV_PATH_ROOT%\bin\@OV_CMD_EXECUTABLE@" @OV_CMD_ARGS@ %ARGS%
|
||||
|
||||
:EndOfScript
|
||||
|
||||
%OV_PAUSE%
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
## By default, paths specified by CMake install will be used to locate OpenViBE components. If defined, these ENV variables can override the CMake defines.
|
||||
export OV_PATH_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
export OV_PATH_BIN="$OV_PATH_ROOT/bin"
|
||||
export OV_PATH_LIB="$OV_PATH_ROOT/lib"
|
||||
export OV_PATH_DATA="$OV_PATH_ROOT/share/openvibe"
|
||||
|
||||
# Dump core...
|
||||
# ulimit -c unlimited
|
||||
|
||||
# Tries to locate matlab executable from $PATH, and set the library path to the corresponding matlab libs.
|
||||
if [ "`which matlab`" != "" ] ; then
|
||||
MATLAB_ROOT=`matlab -e | grep "^MATLAB=" | sed -e "s/^MATLAB=//"`
|
||||
MATLAB_ARCH=`matlab -e | grep "^ARCH=" | sed -e "s/^ARCH=//"`
|
||||
MATLAB_LIBPATH="$MATLAB_ROOT/bin/$MATLAB_ARCH"
|
||||
# echo Matlab libs expected at $MATLAB_LIBPATH
|
||||
export LD_LIBRARY_PATH="$MATLAB_LIBPATH:$LD_LIBRARY_PATH"
|
||||
fi
|
||||
|
||||
LOCAL_BIN_PATH="@CMAKE_INSTALL_FULL_BINDIR@"
|
||||
if [ "$OV_PATH_BIN" != "" ]; then
|
||||
LOCAL_BIN_PATH="$OV_PATH_BIN"
|
||||
fi
|
||||
LOCAL_LIB_PATH="@CMAKE_INSTALL_FULL_LIBDIR@"
|
||||
if [ "$OV_PATH_LIB" != "" ]; then
|
||||
LOCAL_LIB_PATH="$OV_PATH_LIB"
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$LOCAL_LIB_PATH:@OV_PATH_DEPENDENCY_LIBS@:$LD_LIBRARY_PATH"
|
||||
export LC_ALL=C
|
||||
|
||||
|
||||
# The following line is there to help in cases where OpenViBE can consume excessive
|
||||
# amounts of CPU or grind the swap. You can remove it if you know what you're doing.
|
||||
renice 19 $$
|
||||
|
||||
ov_debugger=
|
||||
if [ "$1" == "--debug" ]; then
|
||||
ov_debugger="gdb --args"
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ "$1" == "--memcheck" ]; then
|
||||
ov_debugger="valkyrie "
|
||||
#ov_debugger="valgrind --tool=memcheck --log-file='valgrind_@OV_CMD_EXECUTABLE@_%p.log'"
|
||||
shift
|
||||
fi
|
||||
ov_run_bg=0
|
||||
if [ "$1" == "--run-bg" ]; then
|
||||
ov_run_bg=1
|
||||
shift
|
||||
fi
|
||||
|
||||
ret_code=0
|
||||
|
||||
if [ $ov_run_bg == 0 ]; then
|
||||
eval $ov_debugger "$LOCAL_BIN_PATH/@OV_CMD_EXECUTABLE@" @OV_CMD_ARGS@ "$@"
|
||||
ret_code=$?
|
||||
else
|
||||
$ov_debugger "$LOCAL_BIN_PATH/@OV_CMD_EXECUTABLE@" @OV_CMD_ARGS@ "$@" &
|
||||
fi
|
||||
|
||||
exit $ret_code
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
PluginFolder=@OGRE3D_PLUGIN_PATH@
|
||||
Plugin=RenderSystem_GL
|
||||
Plugin=Plugin_ParticleFX
|
||||
Plugin=Plugin_BSPSceneManager
|
||||
Plugin=Plugin_OctreeSceneManager
|
||||
Reference in New Issue
Block a user