-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.startup_wbitoolbox.m.in
42 lines (33 loc) · 1.19 KB
/
.startup_wbitoolbox.m.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
fprintf('\nWhole Body Interface Toolbox\n');
installDir = '@CMAKE_INSTALL_PREFIX@';
mexDir = [installDir, filesep, 'mex'];
shareDir = '@WBI-TOOLBOX_SHARE_DIR@';
imgDir = [shareDir, filesep, 'images'];
toolsDir = [shareDir, filesep, 'tools'];
% robotsDir = genpath([installDir, '/../../libraries/yarpWholeBodyInterface/app/robots'])
if exist(mexDir, 'dir')
addpath(mexDir);
end
if exist(shareDir, 'dir')
addpath(shareDir);
end
if exist(imgDir, 'dir')
addpath(imgDir);
end
if exist(toolsDir, 'dir')
addpath(toolsDir);
end
% addpath(robotsDir);
fileDir = userpath;
pathSeparatorLocation = strfind(fileDir, pathsep);
if (~isempty(pathSeparatorLocation))
fileDir(pathSeparatorLocation) = [];
end
fprintf('Saving paths to %s\n\n', [fileDir, filesep, 'pathdef.m']);
if (~savepath([fileDir, filesep, 'pathdef.m']))
fprintf(['A file called pathdef.m has been created in your %s folder.\n', ...
'This should be enough to permanentely add WBI-Toolbox to', ...
'your MATLAB installation.\n'], fileDir);
else
disp('There was an error generating pathdef.m To proceed please manually add the contents of variables mexDir, shareDir and imgDir to your matlabpath');
end