MATLAB Runtime Server | ![]() ![]() |
Automatically Packaging Files for Shipping
The Runtime Server software includes a packaging utility that can automatically archive your application files and create all the executable files that your users need in order to install your application on their machines.
Note The packaging utility is intended to be used only with the MATLAB portion of your application, however, you can integrate the packaging utility into your overall installation suite. |
The packaging utility is called package
and is located in the toolbox\runtime\oem
directory. When you execute package
, it prompts you for all necessary information. It reports all relevant information to you, including the files it creates and the instructions that you should follow in order to test the installation. These are the same instructions that end users need to follow in order to install your application. Installing and Running the Application contains more information about the installer software.
The rest of this section contains more detail for PC and UNIX versions of package
.
Packaging Utility on PC
After you have used buildp
to create your P-files, follow these steps to run the automatic packaging utility on PC platforms:
makeconfig
to create a configuration file, which is a text file that lists the names of all files that your application uses. This file includes runtime P-files and any MEX-files on which your application depends. It should not include MATLAB and files that MATLAB uses to run.
toolbox\runtime\oem\user.config_pc
. Notice from the sample user.config_pc
file that the path of each listed file starts from toolbox
(for example, toolbox\local\matlabrt.p
).
The configuration file can contain *
as a wildcard, #
to preface comments, and blank lines to improve readability.
package
(if your application does not use Java classes)
package -java
(if your application uses Java classes)
The packaging utility prompts you for:
demo_app.bat
.
Alternatively, the syntaxes below eliminate the need for prompts.
The packaging utility produces a file called setup.exe
in the directory from which it was launched. This is the file you should ship to end users.
Packaging Utility on UNIX
After you have used buildp
to create your P-files, follow these steps to run the automatic packaging utility on UNIX platforms:
makeconfig
to create a configuration file, which is a text file that lists the names of all files that your application uses. This file includes runtime P-files and any MEX-files on which your application depends. It should not include MATLAB and files that MATLAB uses to run.
toolbox/runtime/oem/user.files
. The format for lines in this configuration file is
name_of_source_file location_of_source_file target_location
where target_location
refers to the destination directory in the end user's installation, relative to the directory from which the user runs the installer program.
In your configuration file, you can use $SCRIPTDIR
to indicate the directory location of the package
script and $MATLAB
to indicate the MATLAB root directory. You can also use Bourne shell wildcards in filenames.
toolbox/runtime/oem/package
using the -java
switch if your application uses Java classes. The script prompts you for the MATLAB root directory, the architecture, and the name of your configuration file.
For information on command line arguments you can use to prevent prompting while running the package utility, see
The package
script produces two files:
app.tar.files
, which lists the files in the application
app.tar
, which is a tar file made from the application
You should ship app.tar
to end users. For more details about the UNIX packaging utility, see the README
file in toolbox/runtime/oem
.
![]() | Organizing Files for Shipping | Manually Packaging Files for Shipping (PC) | ![]() |