Changeset 992 for trunk/src/compile.m
- Timestamp:
- Feb 2, 2017, 10:37:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compile.m
r977 r992 25 25 26 26 function compile (FctName,SubfctPath) 27 hh=[]; % handles of message display window27 hh=[]; % handles of message display window 28 28 if isempty(which('mcc')) 29 29 msgbox_uvmat('ERROR','no Matlab compiler toolbox mcc installed') … … 41 41 end 42 42 if ~isempty(SubfctPath) 43 SubfctPath=['-I ' SubfctPath]; %string indicating the option of including the path SubfctPath43 SubfctPath=['-I ' SubfctPath]; % string indicating the option of including the path SubfctPath 44 44 end 45 45 [mcrmajor, mcrminor] = mcrversion; … … 47 47 FctNameVersion=[FctName,'_',MCRROOT]; 48 48 %hver=ver('MATLAB'); 49 %FctNameVersion=[FctName '_MCRROOT' regexprep(hver.Version,'\.','')]; %suppress the dot in version number49 %FctNameVersion=[FctName '_MCRROOT' regexprep(hver.Version,'\.','')]; % suppress the dot in version number 50 50 try 51 51 disp(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m']) 52 52 eval(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh] 53 system(['mv -f ' FctName ' bin/']); %move the binary file FctName to the subdir /bin54 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctNameVersion '.sh']); %modify the cmd file and copy it to [FctName '.sh']55 system(['rm run_' FctName '.sh']); % remove the initial cmd file [run_' FctName '.sh]53 system(['mv -f ' FctName ' bin/']); % move the binary file FctName to the subdir /bin 54 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctNameVersion '.sh']); % modify the cmd file and copy it to [FctName '.sh'] 55 system(['rm run_' FctName '.sh']); % remove the initial cmd file [run_' FctName '.sh] 56 56 system(['chmod +x ' FctNameVersion '.sh']); % set the cmd file to 'executable' 57 57 catch ME
Note: See TracChangeset
for help on using the changeset viewer.