Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
a2f0988b
Commit
a2f0988b
authored
Oct 24, 2016
by
Dipl.-Ing. Jonas Stienen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving itaVA setup
parent
5fb00573
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
applications/VirtualAcoustics/VA/itaVA.m
applications/VirtualAcoustics/VA/itaVA.m
+4
-2
applications/VirtualAcoustics/VA/itaVA_setup.m
applications/VirtualAcoustics/VA/itaVA_setup.m
+25
-7
No files found.
applications/VirtualAcoustics/VA/itaVA.m
View file @
a2f0988b
...
...
@@ -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 @
a2f0988b
...
...
@@ -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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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