Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
f81a288e
Commit
f81a288e
authored
Oct 24, 2016
by
Dipl.-Ing. Jonas Stienen
Browse files
Improving itaVA setup
parent
8fbb2dc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/VirtualAcoustics/VA/itaVA.m
View file @
f81a288e
...
...
@@ -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
...
...
applications/VirtualAcoustics/VA/itaVA_setup.m
View file @
f81a288e
...
...
@@ -58,15 +58,27 @@ handles.output = hObject;
% Update handles structure
guidata
(
hObject
,
handles
);
% VAMatlab
current_va_mex_dir
=
which
(
'VAMatlab'
);
if
~
isempty
(
current_va_mex_dir
)
[
va_mex_path
,
~
,
~
]
=
fileparts
(
current_va_mex_dir
);
set
(
handles
.
va_search_dir
,
'String'
,
fullfile
(
va_mex_path
,
'..'
)
);
[
va_path
,
~
,
~
]
=
fileparts
(
va_mex_path
);
set
(
handles
.
va_search_dir
,
'String'
,
fullfile
(
va_path
)
);
set
(
handles
.
edit_vamatlab_full_path
,
'String'
,
current_va_mex_dir
)
v
=
VAMatlab
(
'getVersion'
);
set
(
handles
.
edit_vamatlab_version
,
'String'
,
v
)
end
% VAServer
current_va_server_dir
=
which
(
'VAServer.exe'
);
if
~
isempty
(
current_va_server_dir
)
set
(
handles
.
edit_vaserver_full_path
,
'String'
,
current_va_server_dir
)
[
~
,
v
]
=
system
(
[
current_va_server_dir
' --version'
]
);
set
(
handles
.
edit_vaserver_version
,
'String'
,
strcat
(
v
)
)
end
% UIWAIT makes itaVA_setup wait for user response (see UIRESUME)
% uiwait(handles.figure1);
uiwait
(
handles
.
figure1
);
% --- Outputs from this function are returned to the command line.
...
...
@@ -77,7 +89,9 @@ function varargout = itaVA_setup_OutputFcn(hObject, eventdata, handles)
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout
{
1
}
=
handles
.
output
;
if
~
isempty
(
handles
)
varargout
{
1
}
=
handles
.
output
;
end
% --- Executes on button press in pushbutton_close.
...
...
@@ -197,8 +211,8 @@ if vaserver_found
end
vaserver_path
=
fullfile
(
vaserver_dir
,
'VAServer.exe'
);
set
(
handles
.
edit_vaserver_full_path
,
'String'
,
vaserver_path
)
v
=
system
(
[
vaserver_path
' --version'
]
);
set
(
handles
.
edit_va
matlab
_version
,
'String'
,
v
)
[
~
,
v
]
=
system
(
[
vaserver_path
' --version'
]
);
set
(
handles
.
edit_va
server
_version
,
'String'
,
strcat
(
v
)
)
else
set
(
handles
.
edit_vaserver_full_path
,
'String'
,
'not found'
)
end
...
...
@@ -212,6 +226,10 @@ if exist( fullfile( va_search_dir, component ), 'file' )
va_component_dir
=
fullfile
(
va_search_dir
);
% Base path is one folder up
end
if
isempty
(
va_search_dir
)
return
% something went wrong
end
if
~
found
&&
recursive
listing
=
dir
(
va_search_dir
);
for
idx
=
1
:
length
(
listing
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment