Updating itaVA handling when no VAMatlab executable available. Improving protos.

parent dde969e8
......@@ -47,12 +47,14 @@ classdef itaVA < handle
function [ ok ] = check_for_mex_file()
% Checks if VAMatlab executable can be found.
if ~exist( 'VAMatlab', 'var' )
if ~exist( 'VAMatlab', 'file' )
disp( 'Matlab binding for VA not complete (missing VAMatlab executable).' )
ok = false;
% file dialog
itaVA_setup()
% Re-check
ok = exist( 'VAMatlab', 'file' ) > 0;
else
ok = true;
end
......@@ -68,6 +70,11 @@ classdef itaVA < handle
% Return values:
%
% version [string] Version string
if ~itaVA.check_for_mex_file()
error( 'Matlab binding for VA requires VAMatlab executable.' );
end
version = VAMatlab('getVersion');
end
......@@ -87,6 +94,11 @@ classdef itaVA < handle
% - If you do not want any messages from the extension
% set the verbose mode to 'quiet'
%
if ~itaVA.check_for_mex_file()
error( 'Matlab binding for VA requires VAMatlab executable.' );
end
VAMatlab('setVerboseMode', mode);
end
end
......@@ -113,7 +125,7 @@ classdef itaVA < handle
% core = itaVA('localhost:12340');
%
if ~check_for_mex_file() )
if ~itaVA.check_for_mex_file()
error( 'Matlab binding for VA requires VAMatlab executable.' );
end
......
% THIS FILE WILL BE OVERWRITTEN BY CMAKE WITHOUT WARNING
%
% Code generator for the VA Matlab interface facade class
%
......@@ -8,23 +9,9 @@
% interface. These are derived using the reflexion
% mechanism ('enumerateFunctions')
%
% Author: Frank Wefers (fwefers@akustik.rwth-aachen.de)
% Version: $Id: $
%
% Clear everything first, so that no inconsistens
% class instances can exist
clear all
% Uncomment the path you are building your matlab executable against. It is
% sufficient to execute this once for a matlab session. It is always recommended
% to build against a release executable, use debug mode only if you actually
% want to debug the mex library. There is a 3rdParty/Matlab if you want to
% link the executable against a Matlab version/platform that is not installed
% on your machine.
script_dir = '@VAMATLAB_SCRIPT_DIR@';
deploy_dir = '@VAMATLAB_DEPLOY_DIR@';
script_dir = '@VAMATLAB_SCRIPT_DIR@'; % Matlab scripts target directory
deploy_dir = '@VAMATLAB_DEPLOY_DIR@'; % Deploy directory, i.e. 'C:/dev/VA/dist/win32-x64.vc12'
lib_dir = '@VAMATLAB_LIB_DIR@';
if exist( deploy_dir, 'dir' ) ~= 7
......@@ -34,9 +21,13 @@ end
if exist( 'VAMatlab', 'file' )
warning( 'VAMatlab already found at location "%s", are you sure to build itaVA against this executable? Will proceed now.', which( 'VAMatlab' ) )
else
% Add to PATH temporarily and move lib to bin dir
movefile( fullfile( lib_dir, 'VAMatlab*' ), deploy_dir );
addpath( script_dir, deploy_dir )
% Add to PATH temporarily and attempt to move lib to bin dir
addpath( script_dir, bin_dir )
[ s ] = movefile( fullfile( lib_dir, 'VAMatlab*' ), bin_dir );
if ~s && ~exist( 'VAMatlab', 'file' )
error( 'Could locate VAMatlab executable. Please make sure that it can be found.' )
end
end
% Parameters
......
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