Main Content

Customize an Application

You can customize an application in several ways: customize the installer, manage files in the project, or add a custom installer path using the Application Compiler app or the Library Compiler app.

Customize the Installer

Change Application Icon

To change the default icon, click the graphic to the left of the Library name or Application name field to preview the icon.

Click Select icon, and locate the graphic file to use as the application icon. Select the Use mask option to fill any blank spaces around the icon with white or the Use border option to add a border around the icon.

To return to the main window, click Save and Use.

Add Library or Application Information

You can provide further information about your application as follows:

  • Library/Application Name: The name of the installed MATLAB® artifacts. For example, if the name is foo, the installed executable is foo.exe, and the Windows® start menu entry is foo. The folder created for the application is InstallRoot/foo.

    The default value is the name of the first function listed in the Main File(s) field of the app.

  • Version: The default value is 1.0.

  • Author name: Name of the developer.

  • Support email address: Email address to use for contact information.

  • Company name: The full installation path for the installed MATLAB artifacts. For example, if the company name is bar, the full installation path would be InstallRoot/bar/ApplicationName.

  • Summary: Brief summary describing the application.

  • Description: Detailed explanation about the application.

All information is optional and, unless otherwise stated, is only displayed on the first page of the installer. On Windows systems, this information is also displayed in the Windows Add/Remove Programs control panel.

Change the Splash Screen

The installer splash screen displays after the installer has started. It is displayed along with a status bar while the installer initializes.

You can change the default image by clicking the Select custom splash screen. When the file explorer opens, locate and select a new image.

You can drag and drop a custom image onto the default splash screen.

Note

Custom splash screens for standalone applications are not supported on Mac systems.

Change the Installation Path

This table lists the default path the installer uses when installing the packaged binaries onto a target system.

Windows C:\Program Files\companyName\appName
Mac OS X /Applications/companyName/appName
Linux® /usr/companyName/appName

You can change the default installation path by editing the Default installation folder field under Additional installer options.

A text field specifying the path appended to the root folder is your installation folder. You can pick the root folder for the application installation folder. This table lists the optional custom root folders for each platform:

Windows C:\Users\userName\AppData
Linux /usr/local

Change the Logo

The logo displays after the installer has started. It is displayed on the right side of the installer.

You change the default image in Additional Installer Options by clicking Select custom logo. When the file explorer opens, locate and select a new image. You can drag and drop a custom image onto the default logo.

Edit the Installation Notes

Installation notes are displayed once the installer has successfully installed the packaged files on the target system. You can provide useful information concerning any additional setup that is required to use the installed binaries and instructions for how to run the application.

Manage Required Files in Compiler Project

The compiler uses a dependency analysis function to automatically determine what additional MATLAB files are required for the application to package and run. These files are automatically packaged into the generated binary. The compiler does not generate any wrapper code that allows direct access to the functions defined by the required files.

If you are using one of the compiler apps, the required files discovered by the dependency analysis function are listed in the Files required for your application to run or Files required for your library to run field.

To add files, click the plus button in the field, and select the file from the file explorer. To remove files, select the files, and press the Delete key.

Caution

Removing files from the list of required files may cause your application to not package or not to run properly when deployed.

Using mcc

If you are using mcc to package your MATLAB code, the compiler does not display a list of required files before running. Instead, it packages all the required files that are discovered by the dependency analysis function and adds them to the generated binary file.

You can add files to the list by passing one or more -a arguments to mcc. The -a arguments add the specified files to the list of files to be added into the generated binary. For example, -a hello.m adds the file hello.m to the list of required files and -a ./foo adds all the files in foo and its subfolders to the list of required files.

Sample Driver File Creation

If you include one or more MATLAB sample files during packaging, MATLAB Compiler SDK™ generates sample C++, .NET, Java®, or Python® code that calls your MATLAB exported function.

For more information, see Create Sample Code to Call Exported Function.

Specify Files to Install with Application

The compiler packages files to install along with the ones it generates. By default, the installer includes a readme file with instructions on installing the MATLAB Runtime and configuring it.

These files are listed in the Files installed for your end user section of the app.

To add files to the list, click , and select the file from the file explorer.

JAR files are added to the application class path as if you had called javaaddpath.

Caution

Removing the binary targets from the list results in an installer that does not install the intended functionality.

When installed on a target computer, the files listed in the Files installed for your end user are saved in the application folder.

Additional Runtime Settings

Type of Packaged ApplicationAdditional Runtime Settings Options
Generic COM Components
  • Register the component for the current user (Recommended for non-admin users) —This option enables registering the component for the current user account. It is provided for users without admin rights.

.NET Assembly
  • Create Shared Assembly — Enables sharing MATLAB Runtime installer instances for multiple .NET assemblies.

  • Enable .NET Remoting — Enables you to remotely access MATLAB functionality, as a part of a distributed system. For more information, see Create Remotable .NET Assembly.

  • Enable Type Safe API — Enables the type safe API for the packaged .NET assembly.

API Selection for C++ Shared Library

  • Create all interfaces — Create interfaces for shared libraries using both the mwArray API and the MATLAB Data API.

  • Create interface that uses the mwArray API — Create an interface for a shared library using the mwArray API. The interface uses C-style functions to initialize the MATLAB Runtime, load the compiled MATLAB functions into the MATLAB Runtime, and manage data that is passed between the C++ code and the MATLAB Runtime. The interface supports only C++03 functionality. For an example, see Generate a C++ mwArray API Shared Library and Build a C++ Application.

  • Create interface that uses the MATLAB Data API — Create an interface for a shared library using MATLAB Data API. It uses a generic interface that has modern C++ semantics. The interface supports C++11 functionality. For more information, see Generate a C++ MATLAB Data API Shared Library and Build a C++ Application.

See Also

|

Related Topics