0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 mc;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 rootdir = 'C:\LTPDA';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 toolboxDir = fullfile(rootdir, sprintf('ltpda_toolbox'), 'ltpda');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 toolboxRoot = fullfile(rootdir, 'ltpda_toolbox');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 ltpda_ver = '1.0.1'; % this is the version for the Contents.m and for packaging
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 mver = ver('MATLAB');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 ltpda_version = sprintf('%s %s %s', ltpda_ver, mver.Release, datestr(now, 'dd-mm-yy'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 makeDoc = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 cdir = pwd;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 cd(toolboxDir);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 MakeContents('LTPDA', ltpda_version);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 cd(cdir);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 if makeDoc
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 % Build doc list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 docs = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 for j=1:length(classes)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 docs = [docs cellstr(['classes/@' classes{j}])];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 for j=1:length(srcs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 if ~strcmp(srcs{j}, 'mex')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 docs = [docs cellstr(srcs{j})];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 % build documentation
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 m2html('mfiles', docs,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 'htmldir', 'html_help/help/ug',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 'recursive', 'on',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 'template', 'docstyle',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 'indexFile', 'mindex');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 % Make on-line html TOC
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 cd html_help/help
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 convertTOC
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 % try to generate html codes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 [temp pythonVer] = system('python --version');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 pythonVer = strtok(pythonVer,'Python ');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 if numel(pythonVer)>3, pythonVer(4:end)=[]; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 pythonVer = str2double(pythonVer);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 if isnan(pythonVer)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 error('*** Failed check of Python version');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 elseif pythonVer > 2.6
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 !python ./mkhelpfiles_v3.py -i helptoc.xml
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 !python ./mkhelpfiles.py -i helptoc.xml
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 catch
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 warning('!!! Couldn''t run mkhelpfiles.py. Do you have python installed?');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 cd(cdir)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 % Now copy the help files
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 copyfile('html_help/help', fullfile(toolboxDir,'help'), 'f');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 copyfile('html_help/info.xml', toolboxDir, 'f');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66
|