-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdk_startup.m
32 lines (26 loc) · 862 Bytes
/
dk_startup.m
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
function dk_startup()
here = fileparts(mfilename('fullpath'));
dk.print('[Deck] Starting up from folder "%s".',here);
dk.env.path_flag( 'DECK_ROOT', here );
% add GUI library
layoutSrc = fullfile( here, 'gui', 'layout' );
layoutDoc = fullfile( here, 'gui', 'layoutdoc' );
try
safe_addpath(layoutSrc);
safe_addpath(layoutDoc);
catch
warning( 'GUI layout folder is missing, please run script "extract.sh" in folder "%s".', fullfile(here,'gui') );
end
% add JMX library
addpath(fullfile( here, 'jmx' ));
% set console encoding
try
slCharacterEncoding('UTF-8');
catch
warning('Could not set character encoding; is Simulink installed?');
end
end
function safe_addpath(d)
assert( dk.fs.isdir(d), 'Folder not found: "%s"', d );
addpath( d );
end