Compile Deployable Archives with Production Server Compiler App

To compile MATLAB® code into a deployable archive:

  1. Open the Production Server Compiler app.

    1. On the toolstrip select the Apps tab on the toolstrip.

    2. Click the arrow at the far right of the tab to open the apps gallery.

    3. Click Production Server Compiler.

        Note:   To open an existing project, select it from the MATLAB Current Folder panel.

        Note:   You can also launch the Production Server Compiler app using the productionServerCompiler function.

  2. In the Application Type section of the toolstrip, select Deployable Archive.

      Note:   If the Application Type section of the toolstrip is collapsed, you can expand it by clicking the down arrow.

  3. Specify the MATLAB files you want deployed in the package.

    1. In the Exported Functions section of the toolstrip, click the plus button.

        Note:   If the Exported Functions section of the toolstrip is collapsed, you can expand it by clicking the down arrow.

    2. In the file explorer that opens, locate and select one or more the MATLAB files.

    3. Click Open to select the file and close the file explorer.

      The names of the selected files are added to the list and a minus button appears below the plus button. The name of the first file listed is used as the default application name.

  4. In the Archive Information section of the app, specify the name of the archive.

  5. In the Files required for your application to run section of the app, verify that all of the files required by the deployed MATLAB functions are listed.

      Note:   These files are compiled into the generated binaries along with the exported files.

    The built-in dependency checker will automatically populate this section with the appropriate files. However, if needed you can manually add any files it missed.

    For more information see Manage Required Files in Compiler Project.

  6. In the Files packaged with your archive section of the app, verify that any additional non-MATLAB files you want packaged with the archive are listed.

      Note:   These files are placed in the applications folder of the installation.

    This section automatically lists:

    • Generated deployable archive

    • Readme file

    You can manually add files to the list. Additional files can include documentation, sample data files, and examples to accompany the application.

    For more information see Specify Files to Install with Application.

  7. Click the Settings button to customize the flags passed to the compiler and the folders to which the generated files are written.

  8. Click the Package button to compile the MATLAB code and generate any installers.

  9. Verify that the generated output contains:

    • for_redistribution — A folder containing the installer to distribute the archive

    • for_testing — A folder containing the raw generated files to create the installer

    • PackagingLog.txt — A log file generated by the compiler

Was this topic helpful?