주요 콘텐츠

COM Component Compiler

Package MATLAB programs for deployment as COM components

Since R2025a

Description

The COM Component Compiler packages MATLAB® programs into COM components that you can integrate into COM applications. The interactive menus and dialog boxes used in the compiler apps build compiler.build commands that are customized to your specification.

Compiler app advantages include:

  • You can perform deployment tasks with a single intuitive interface.

  • You can organize your files in a MATLAB project.

  • Your project state persists between sessions.

  • You can load previously stored compiler tasks from a prepopulated menu.

  • You can package applications with an installer for distribution.

For more information, see Target-Specific Compiler Apps for MATLAB Code Deployment.

Open the COM Component Compiler App

  • MATLAB toolstrip: On the Apps tab, under Application Deployment, click the app icon.

  • MATLAB command prompt: Enter comComponentCompiler.

Parameters

expand all

Exported Functions

Files implementing MATLAB functions. Files must have one of the following extensions: .m, .p, .mlx, or .mexa64.

All files must be located in the project root folder to be added to the project. To add MATLAB functions to the deployable archive., click Add Exported Function and select your MATLAB file. In the Project panel, the file you selected gains the labels Design and Exported Function File.

If you enable this option, then folder structures and file names in the deployable archive are obfuscated from the end user, and user code and data contained in .m, .mlapp, .p, .mat, MLX, SFX, and MEX files are placed into a user package within the archive. Additionally, all .m files are converted to P-files before packaging.

During runtime, MATLAB code and data is decrypted and loaded directly from the user package rather than extracted to the file system. MEX files are temporarily extracted from the user package before being loaded.

To manually include additional file types in the user package, add each file type in a separate extension tag to the file matlabroot/toolbox/compiler/advanced_package_supported_files.xml.

The following are not supported:

  • ver function

  • Calling external libraries such as DLLs

  • Out-of-process MATLAB Runtime (C++ shared library for MATLAB Data Array)

  • Out-of-process MEX file execution (mexhost, feval, matlab.mex.MexHost)

  • Before R2023b: .mat files other than v7.3

Enabling this option is equivalent to using mcc with -j and -s specified.

If you set this parameter to 'off', then the deployable archive is not obfuscated. This is the default behavior.

Installer Details

MATLAB Runtime delivery option, specified as one of the following.

  • Fetch MATLAB Runtime from mathworks.com during application installation — Option for the installer to download MATLAB Runtime from the MathWorks® website during application installation. This option is the default behavior.

  • Include MATLAB Runtime in application installer for offline installation — Option to include MATLAB Runtime within the installer so that it can be installed during application installation without connecting to the MathWorks website. Use this option if you think your end user might not have access to the internet.

  • Do not include MATLAB Runtime in application installer — Option to not install MATLAB Runtime during application installation. Use this option if you think your end user will install MATLAB Runtime using another method. (since R2024a)

Note

If you use either the Fetch or Include option, the full MATLAB Runtime will be installed. To create a minimal MATLAB Runtime installer that can run one or more specific MATLAB Runtime applications, see compiler.runtime.customInstaller. (since R2024b)

Name of the generated installer.

Path to folder where the application will be installed. The folder is located in the %ProgramFiles% folder of the target machine.

Notes about additional requirements for using the application.

Image file used as the installer splash screen, specified as a character vector or a string scalar. The splash screen icon will be resized to 400 pixels by 400 pixels.

Image file used as the icon for the installer.

Image file used as the installer logo, specified as a character vector or a string scalar. The logo will be resized to 112 pixels by 290 pixels.

Version History

Introduced in R2025a

expand all