Documentation Center

  • Trial Software
  • Product Updates

Package Apps

Package GUIs you create into an app package for sharing with others. When you create an app package MATLAB® creates a single app installation file (.mlappinstall) that enables you and others to install your app and access it from the apps gallery without concern for installation details or the MATLAB path.

    Note:   As you enter information in the Package Apps dialog box, MATLAB creates and saves a .prj file continuously. A .prj file contains information about your app, such as included files and a description. Therefore, if you exit the dialog box before clicking the Package button, the .prj file remains, even though a .mlappinstall file is not created. This enables you to quit and resume the app creation process where you left off.

To create an app installation file:

  1. On the desktop Toolstrip, click the Apps tab.

  2. In the File section, click Package App .

  3. Click Add main file and specify the file that you use to run your GUI.

    The main file must be callable with no input, and must be a function or method, not a script. MATLAB analyzes the main file to determine other MATLAB files on which the main file depends. For more information, see Dependency Analysis.

      Tip   The main file must return your main GUI's figure handle if you want MATLAB to remove your app files from the search path when end users exit the GUI. For more information, see What Is the MATLAB Search Path?

      (Functions created by GUIDE return the figure handle.)

  4. Add additional files needed to run your GUI, by clicking Add files/folders.

    Such files might be data, image, and other files that were not included via dependency analysis.

    You can include external interfaces, such as MEX-files, ActiveX®, or Java® in the .mlappinstall file, although doing so might restrict the systems on which your app can run.

  5. Describe your app.

    Minimally, you must specify an app name. MATLAB uses the name for the .mlappinstall file and to label your app in the apps gallery if you install the app.

    Click the icon to the left of the App Name field to select an icon for your app or to specify a custom icon. MATLAB automatically scales the icon for use in the Install dialog, App gallery, and quick access toolbar.

    After you create the package, when you select a .mlappinstall file in the Current Folder browser, MATLAB displays the app description in the Details panel. The description also displays in MATLAB Central File Exchange, if you decide to share your app there. The screen shot you select represents your app in File Exchange.

  6. Click Package.

    As part of the app packaging process, MATLAB creates a .prj file that contains information about your app, such as included files and a description. The .prj file enables you to update the files in your app without requiring you to respecify descriptive information about the app.

  7. In the Build dialog box, note the location of the installation file (.mlappinstall), and then click Close.

For information on installing the app, see Install or Reinstall App.

Was this topic helpful?