Main Content

compiler.build.Results

Compiler build results object

Since R2020b

Description

A compiler.build.Results object contains information about the build type, generated files, support packages, and build options of a compiler.build function.

All Results properties are read-only. You can use dot notation to query these properties.

For information on results from compiling C/C++ shared libraries, .NET assemblies, COM components, Java® packages, Python® packages, MATLAB® Production Server™ deployable archives, or Excel® add-ins for MATLAB Production Server, see compiler.build.Results (MATLAB Compiler SDK) for MATLAB Compiler SDK™.

Creation

There are several ways to create a compiler.build.Results object.

Properties

expand all

This property is read-only.

The build type of the compiler.build function used to generate the results, specified as a character vector:

compiler.build FunctionBuild Type
compiler.build.standaloneApplication'standaloneApplication'
compiler.build.standaloneWindowsApplication'standaloneWindowsApplication'
compiler.build.webAppArchive'webAppArchive'
compiler.build.excelAddIn'excelAddIn'

Data Types: char

This property is read-only.

Paths to the compiled files of the compiler.build function used to generate the results, specified as a cell array of character vectors.

Build TypeFiles
'standaloneApplication'

2×1 cell array

    {'path\to\ExecutableName.exe'}    
    {'path\to\readme.txt'}
'standaloneWindowsApplication'

3×1 cell array

    {'path\to\ExecutableName.exe'}
    {'path\to\splash.png'}
    {'path\to\readme.txt'}
'webAppArchive'

1×1 cell array

    {'path\to\ArchiveName.ctf'}
'excelAddIn'

2×1 or 4×1 cell array

    {'path\to\AddInName_AddInVersion.dll'}
    {'path\to\AddInName.bas'}
    {'path\to\AddInName.xla'}
    {'path\to\GettingStarted.html'}

Note

The files AddInName.bas and AddInName.xla are included only if you enable the 'GenerateVisualBasicFile' option.

Example: {'D:\Documents\MATLAB\work\MagicSquarewebAppArchive\MagicSquare.ctf'}

Data Types: cell

This property is read-only.

Support packages included in the generated component, specified as a cell array of character vectors.

This property is read-only.

Build options of the compiler.build function used to generate the results, specified as an options object of the corresponding build type.

Build TypeOptions
'standaloneApplication'StandaloneApplicationOptions
'standaloneWindowsApplication'StandaloneApplicationOptions
'webAppArchive'WebAppArchiveOptions
'excelAddIn'ExcelAddInOptions

Examples

collapse all

Create a standalone application and save information about the build type, generated files, included support packages, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m.

results = compiler.build.standaloneApplication('magicsquare.m')
results = 

              BuildType: 'standaloneApplication'
                  Files: {2×1 cell}
IncludedSupportPackages: {}
                Options: [1×1 compiler.build.StandaloneApplicationOptions]

The Files property contains the paths to the magicsquare standalone executable and readme.txt files.

Create a standalone Windows application on a Windows system and save information about the build type, generated files, included support packages, and build options to a compiler.build.Results object.

Compile using the file Mortgage.mlapp.

results = compiler.build.standaloneWindowsApplication('Mortgage.mlapp')
results = 

  Results with properties:

              BuildType: 'standaloneWindowsApplication'
                  Files: {3×1 cell}
IncludedSupportPackages: {}
                Options: [1×1 compiler.build.StandaloneApplicationOptions]

The Files property contains the paths to the following files:

  • Mortgage.exe

  • splash.png

  • readme.txt

Create a web app archive and save information about the build type, archive file, included support packages, and build options to a compiler.build.Results object.

Compile using the file Mortgage.mlapp.

results = compiler.build.webAppArchive('Mortgage.mlapp')
results = 

  Results with properties:

              BuildType: 'webAppArchive'
                  Files: {'D:\Documents\MATLAB\work\MortgagewebAppArchive\Mortgage.ctf'}
IncludedSupportPackages: {}
                Options: [1×1 compiler.build.WebAppArchiveOptions]

The Files property contains the path to the deployable archive file Mortgage.ctf.

Create an Excel add-in and save information about the build type, generated files, included support packages, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m.

results = compiler.build.excelAddIn('magicsquare.m')
results = 

  Results with properties:

              BuildType: 'excelAddIn'
                  Files: {2×1 cell}
IncludedSupportPackages: {}
                Options: [1×1 compiler.build.ExcelAddInOptions]

The Files property contains the paths to the following compiled files:

  • magicsquare_1_0.dll

  • GettingStarted.html

Note

The files magicsquare.bas and magicsquare.xla are included in Files only if you enable the 'GenerateVisualBasicFile' option in the build command.

Version History

Introduced in R2020b