Changeset 746 for trunk/src


Ignore:
Timestamp:
Apr 20, 2014, 6:19:08 PM (10 years ago)
Author:
sommeria
Message:
 
Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/compile.m

    r606 r746  
    88function compile (FctName,SubfctPath)
    99if isempty(which('mcc'))
    10     msgbox_uvmat('no Matlab compiler toolbox mcc installed')
     10    msgbox_uvmat('ERROR','no Matlab compiler toolbox mcc installed')
    1111    return
     12else
     13    hh=msgbox_uvmat('INFO',['compilation of ' FctName ' in progress...']);
    1214end
    1315disp(['compiling ' FctName ' ...'])
     
    2325end
    2426disp(['mcc -m -R -nojvm -R -nodisplay ' SubfctPath ' ' FctName '.m'])
    25 eval(['mcc -m -R -nojvm -R -nodisplay ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh]
    26 %eval(['mcc -m -R -nojvm -R -nodisplay ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName
    27 system(['mv -f ' FctName ' bin/']);%move the binary file FctName to the subdir /bin
    28 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctName '.sh']);%modify the cmd file and copy it to [FctName '.sh']
    29 system(['rm run_' FctName '.sh']);% remove the initial cmd file [run_' FctName '.sh]
    30 system(['chmod +x ' FctName '.sh']); % set the cmd file to 'executable'
     27try
     28    eval(['mcc -m -R -nojvm -R -nodisplay ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh]
     29    system(['mv -f ' FctName ' bin/']);%move the binary file FctName to the subdir /bin
     30    system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctName '.sh']);%modify the cmd file and copy it to [FctName '.sh']
     31    system(['rm run_' FctName '.sh']);% remove the initial cmd file [run_' FctName '.sh]
     32    system(['chmod +x ' FctName '.sh']); % set the cmd file to 'executable'
     33catch ME
     34    msgbox_uvmat('ERROR',ME.message);
     35end
    3136display('** END **')
    32 end
     37delete(hh)
    3338
    3439
  • trunk/src/msgbox_uvmat.m

    r733 r746  
    6969testNo=0;
    7070testCancel=0;
     71testOK=1;
    7172testinputstring=0;
    7273icontype='quest';%default question icon (text input asked)
     
    9697            testinputstring=2;
    9798            testCancel=1; %no cancel button
     99        case 'INFO'
     100            icontype='';
     101            testOK=0;
    98102        otherwise
    99103          %  testinputstring=1;
     
    172176set(handles.figure1,'Units','normalized')
    173177set(handles.edit_box,'Units','normalized')
    174 
     178if testOK
    175179set(handles.figure1,'WindowStyle','modal')% Make% Make the GUI modal
     180set(handles.OK,'Visible','on')
    176181% UIWAIT makes msgbox_uvmat wait for user response (see UIRESUME)
    177182uiwait(handles.figure1);
     183else
     184   set(handles.OK,'Visible','off')
     185end
     186
    178187
    179188%------------------------------------------------------------------------
     
    202211    end
    203212    % The figure can be deleted now
     213    if strcmp(get(handles.OK,'Visible'),'on')
    204214    delete(handles.figure1);
     215    else %case of INFO display (non modal)
     216        varargout{1}=hObject;
     217    end
    205218end
    206219
  • trunk/src/series/merge_proj.m

    r739 r746  
    227227        [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},Param.InputFields,frame_index{iview}(index));
    228228        if ~isempty(errormsg)
    229             disp_uvmat(['ERROR in merge_proj/read_field/' errormsg],checkrun)
     229            disp_uvmat('ERROR',['ERROR in merge_proj/read_field/' errormsg],checkrun)
    230230            return
    231231        end
     
    255255            [Data{iview},errormsg]=proj_field(Data{iview},Param.ProjObject);
    256256            if ~isempty(errormsg)
    257                 disp_uvmat(['ERROR in merge_proge/proj_field: ' errormsg],checkrun)
     257                disp_uvmat('ERROR',['ERROR in merge_proge/proj_field: ' errormsg],checkrun)
    258258                return
    259259            end
Note: See TracChangeset for help on using the changeset viewer.