setToolboxStartEnd

setToolboxStartEnd sets release compatibility in ToolboxPackagingConfiguration.prj file

Syntax

  • setToolboxStartEnd(toolboxFile)example
  • setToolboxStartEnd(toolboxFile,Name,Value)example

Description

example

setToolboxStartEnd(toolboxFile) Call of setToolboxStartEnd with all the default options.

example

setToolboxStartEnd(toolboxFile, Name, Value) Call of setToolboxStartEnd with name/pairs.

Examples

expand all

  • Call of setToolboxStartEnd with all the default options.
  • FullPath=which('addFSDA2path');
    FSDAroot=fileparts(FullPath);
    fsep=filesep;
    fname='ToolboxPackagingConfiguration.prj';
    copyfile([FSDAroot fsep 'utilities_help' fsep 'private' fsep fname],pwd)
    disp('Show release start and release end before calling setToolboxStartEnd')
    fileID = fopen(fname, 'r+');
    % Insert the file into fstring
    fstring=fscanf(fileID,'%c');
    disp(regexp(fstring,'<param.release.start>.*</param.release.start>','match'));
    disp(regexp(fstring,'<param.release.end>.*</param.release.end>','match'));
    fclose(fileID);
    % Set oldest and newest version inside ToolboxPackagingConfiguration.prj
    % In the case the oldest version is 5 years before the currect version and
    % end version is the current version on which MATLAB is running.
    setToolboxStartEnd(fname)
    disp('Show release start and release end after calling setToolboxStartEnd')
    fileID = fopen(fname, 'r+');
    % Insert the file into fstring
    fstring=fscanf(fileID,'%c');
    disp(regexp(fstring,'<param.release.start>.*</param.release.start>','match'));
    disp(regexp(fstring,'<param.release.end>.*</param.release.end>','match'));
    fclose(fileID);
    Show release start and release end before calling setToolboxStartEnd
        {'<param.release.start>R2015b</param.release.start>'}
    
        {'<param.release.end>latest</param.release.end>'}
    
    Show release start and release end after calling setToolboxStartEnd
        {'<param.release.start>R2019a</param.release.start>'}
    
        {'<param.release.end>R2024a</param.release.end>'}
    
    

  • Call of setToolboxStartEnd with name/pairs.
  • FullPath=which('addFSDA2path');
    FSDAroot=fileparts(FullPath);
    fsep=filesep;
    fname='ToolboxPackagingConfiguration.prj';
    copyfile([FSDAroot fsep 'utilities_help' fsep 'private' fsep fname],pwd)
    % Set oldest and newest version inside ToolboxPackagingConfiguration.prj
    startVersion='R2012b';
    endVersion='R2020a';
    disp('Show release start and release end before calling setToolboxStartEnd')
    fileID = fopen(fname, 'r+');
    % Insert the file into fstring
    fstring=fscanf(fileID,'%c');
    disp(regexp(fstring,'<param.release.start>.*</param.release.start>','match'));
    disp(regexp(fstring,'<param.release.end>.*</param.release.end>','match'));
    fclose(fileID);
    % Set oldest and newest version inside ToolboxPackagingConfiguration.prj
    setToolboxStartEnd(fname, 'startVersion',startVersion,'endVersion',endVersion)
    disp('Show release start and release end after calling setToolboxStartEnd')
    fileID = fopen(fname, 'r+');
    % Insert the file into fstring
    fstring=fscanf(fileID,'%c');
    disp(regexp(fstring,'<param.release.start>.*</param.release.start>','match'));
    disp(regexp(fstring,'<param.release.end>.*</param.release.end>','match'));
    fclose(fileID);
    Show release start and release end before calling setToolboxStartEnd
        {'<param.release.start>R2015b</param.release.start>'}
    
        {'<param.release.end>latest</param.release.end>'}
    
    Show release start and release end after calling setToolboxStartEnd
        {'<param.release.start>R2012b</param.release.start>'}
    
        {'<param.release.end>R2020a</param.release.end>'}
    
    

    Input Arguments

    expand all

    toolboxFile — Toolbox packaging configuration file. Character or String.

    Absolute or relative path of the MATLAB file which contains the Toolbox Packaging Project. Note that this file must have a .prj extension.

    Example - ['tmp' filesep 'ToolboxPackagingConfiguration.prj']

    Data Types: Character or string scalar.

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'startVersion','R2018a' , 'endVersion','R2021b'

    startVersion —Oldest release.character | String | empty value (default).

    Oldest release for which compatibility is ensured in the format R[4digitsyear][a|b].

    For example if startVersion is 'R2017b' it means that compatibility is ensured from MATLAB 2017b. If this option is empty older release is automatically set to that of five years older than the currect release. For example if current release is R2021b startVersion is automatically set to 'R2016b'.

    Example: 'startVersion','R2018a'

    Data Types: Character or string scalar.

    endVersion —Newest releases.character | String | empty value (default).

    Newest release for which compatibility is ensured in the format R[4digitsyear][a|b].

    For example if Newest is 'R2021b' it means that compatibility is ensured up to MATLAB 2021b. If this option is empty newest release is automatically set to currect release. For example if current release is R2021b endVersion is automatically set to 'R2021b'.

    Example: 'endVersion','R2021b'

    Data Types: Character or string scalar.

    Output Arguments

    References

    Acknowledgements

    We would like to thank Jos Martin and the packaging team of Mathworks.

    Note that this routine is java based.

    This page has been automatically generated by our routine publishFS