upd: more README infos and build guides

upd: matlab mex build script
parent 878eb4d3
......@@ -10,8 +10,27 @@ Any usage and distribution is prohibited, unless explicitly granted by the autho
### Quick build guide
#### Matlab executable
Open Matlab and run the script `VAMatlabExecutable_build.m`.
It will create the *VAMatlab* Matlab executable, for win23-x64 the binding will have the name `VAMatlab.mexw64`.
There is a switch that can link the VACore into the Matlab executable, hence no external VA server application is required.
To activate this, the preprocessor flag `VAMATLAB_WITH_LOCAL_CORE` has to be defined and set to 1. Use the switch in the build script configuration section.
To also include a lightweight Optitrack tracker connection using the NatNetSDK, define the preprocessor flag `VAMATLAB_WITH_OPTITRACK` and set it to 1. Use the switch in the build script configuration section.
#### itaVA class
To ease usage, a facade class called `itaVA` can be generated that will also add volatile help on the available functionality of VA.
To create this Matlab class, run `itaVA_build.m`, which will create a class file `itaVA.m` based on stubs that are filled by calls to the VAMatlab executable, which has to be build prior.
> Make sure that Matlab will use the correct VA Matlab executable and not an older version of it which might have been added to the PATH of Matlab.
#### Deploy
Deploying the Matlab executable will require to copy all necessary DLLs into a deploy directory (next to the VAMatlab executable file).
On Windows platform, provide the following files
- VistaAspects.dll
- VistaBase.dll
- VistaInterProcComm.dll
- VABase.dll
- VANet.dll
\ No newline at end of file
%% Settings
% Paths
deploy_dir = './';
src_dir = '../src';
% Flags
vamatlab_with_local_core = false;
vamatlab_with_optitrack_tracker = false;
% Includes
vabase_include = '../../VABase/include';
vanet_include = '../../VANet/include';
vista_include = '../../Vista/VistaCoreLibs';
natnet_include = '../../ExternalLibs/NatNetSDK/NatNetSDK-2.7/include';
% Lib dirs
dist_dir_name = 'build_win32-x64.vc12';
vabase_lib_dir = fullfile( '../../VABase', dist_dir_name, 'lib' );
vanet_lib_dir = fullfile( '../../VANet', dist_dir_name, 'lib' );
vista_lib_dir = fullfile( '../../Vista/VistaCoreLibs', dist_dir_name, 'lib' );
natnet_lib_dir = fullfile( '../../ExternalLibs/NatNetSDK/NatNetSDK-2.7', 'lib', 'x64' );
% addpath( vabase_include, vanet_lib_dir, vista_lib_dir, natnet_lib_dir )
% Libs
vabase_lib = 'VABase.lib';
vanet_lib = 'VANet.lib';
vista_lib = 'VistaAspects.lib -lVistaBase.lib -lVistaInterProcComm.lib';
natnet_lib = 'NatNetLib.lib';
%% Compiler & project
......@@ -33,11 +53,25 @@ if ~exist( deploy_dir, 'dir' )
mkdir( deploy_dir );
end
preprocessor_flags = '';
if vamatlab_with_local_core
preprocessor_flags = [ preprocessor_flags ' -DVAMATLAB_WITH_LOCAL_CORE=1' ];
end
if vamatlab_with_optitrack_tracker
preprocessor_flags = [ preprocessor_flags ' -DVAMATLAB_WITH_OPTITRACK_TRACKER=1' ];
end
% Note: We need to call mex via 'system' here, because we used the symbol
% 'mex' with '.' above and Matlab would complain when doing 'mex ...'
cmd = sprintf( 'mex -O -I%s -I%s -I%s -I%s %s -output %s', vabase_include, vanet_include, vista_include, natnet_include, ...
srcs, outfile );
% Debug: disp(cmd);
cmd = sprintf( 'mex -O %s -I%s -I%s -I%s -I%s -L%s -L%s -L%s -L%s -l%s -l%s -l%s -l%s %s -output %s', ...
preprocessor_flags, ...
vabase_include, vanet_include, vista_include, natnet_include, ...
vabase_lib_dir, vanet_lib_dir, vista_lib_dir, natnet_lib_dir, ...
vabase_lib, vanet_lib, vista_lib, natnet_lib, ...
srcs, ...
outfile );
disp( cmd );
[ errorcode, result ] = system( cmd, '-echo' );
if errorcode ~= 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment