-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackageBeamNGToolbox.m
48 lines (37 loc) · 1.51 KB
/
packageBeamNGToolbox.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Use this file to package the BeamNG toolbox
% this is needed to correclty add all the subfolders to the MATLAB path in
% order to have the Simulink blocks in the Library Browser
close all
clear
clc
addpath(genpath(pwd))
%% Publish examples
examples_folder = 'src/examples/matlab/';
examples_files = {'annotation_bounding_boxes'
'lidar_tour'
'multishot_camera'
'object_placement'
'vehicle_state_plotting'};
for i = 1:length(examples_files)
[~] = export(strcat(examples_folder, examples_files{i}, '.mlx'), ...
strcat(examples_folder, 'html/', examples_files{i},'.html'));
end
examples_folder = 'src/examples/simulink/S-function/';
examples_files = {'simulink_demos'};
%% Publish documentation
doc_folder = 'doc/';
src_doc_folder = 'src/doc/html/';
%[~] = export(strcat(doc_folder, 'GettingStarted.mlx'), strcat(src_doc_folder, 'GettingStarted.html'));
documentation_files = {'documentation_home'
's_function'
'setting_up_simulink'
'simulink_interface'};
for i = 1:length(documentation_files)
[~] = publish(strcat(doc_folder, documentation_files{i}), 'outputDir', src_doc_folder);
end
%% Package toolbox
projectFile = 'BeamNG.tech Support for MATLAB and Simulink.prj';
outputFile = 'BeamNG.tech Support for MATLAB and Simulink.mltbx';
matlab.addons.toolbox.packageToolbox(projectFile, outputFile)
disp(strcat("Toolbox correctly packaged and saved as: ", outputFile))
rmpath(genpath(pwd))