-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmake.m
53 lines (44 loc) · 1.51 KB
/
make.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
49
50
51
52
53
function make(pdir)
% Actually a script in a function shell. "build" and run the app.
%% Look at the dependencies
if nargin == 0
projectDir = pwd();
else
projectDir = pdir;
end
% git clone has it
% loaded bundle has it centrally on the MATLABpath and doesn't
% need to have the `building` in each project
try
file_path = fullfile(projectDir, 'functions', 'building');
if exist(file_path, 'dir') == 7
addpath(fullfile('functions', 'building'));
end
catch
sprintf('%s', 'warning: function/building doesn''t exist yet')
end
addPath_creator()
%% add the project files to MATLAB's <session> search path
% this function was auto created by "path_adder_creator"
addpath(fullfile('functions', 'auto_generated'));
builder_addPath();
%% prepare m-code extraction
conversion_func_generator();
% creates the "conversion_launcher()" function.
%% extract m-code
% essentially a script turned into a funtion
% runs the appdesigner to m file function
conversion_launcher();
%
% :todo: compatibility to mlapp2classdef() ?
%
%% re-run the path search
% in order to capture the location of the new m-files
addPath_creator();
builder_addPath();
rmPath_creator(); % could be run as a deletefnc() from host
%% launch the app
% started from the obtained m-files not the .mlapp file
app_launch();
sprintf('%s', 'Aplication was built successfully!');
end