Package Deployable Archives with Production Server Compiler App
Supported platform: Windows®, Linux®, Mac
This example shows how to create a deployable archive from a MATLAB® function. You can then hand the generated archive to a system administrator who will deploy it into MATLAB Production Server™.
Create Function In MATLAB
In MATLAB, examine the MATLAB program that you want packaged.
For this example, write a function addmatrix.m
as
follows.
function a = addmatrix(a1, a2)
a = a1 + a2;
At the MATLAB command prompt, enter addmatrix([1 4 7; 2 5
8; 3 6 9], [1 4 7; 2 5 8; 3 6 9])
.
The output is:
ans = 2 8 14 4 10 16 6 12 18
Create Deployable Archive with Production Server Compiler App
On the MATLAB Apps tab, on the far right of the Apps section, click the arrow. In Application Deployment, click Production Server Compiler. In the Production Server Compiler project window, click Deployable Archive (.ctf).
Alternately, you can open the Production Server Compiler app by entering
productionServerCompiler
at the MATLAB prompt.In the MATLAB Compiler SDK project window, specify the main file of the MATLAB application that you want to deploy.
In the Exported Functions section of the toolstrip, click .
In the Add Files window, browse to the example folder, and select the function you want to package. Click Open.
The function
addmatrix.m
is added to the list of main files.
Customize the Application and Its Appearance
You can customize your deployable archive, and add more information about the application as follows:
Archive information — Editable information about the deployed archive.
Additional files required for your archive to run — Additional files required by the generated archive to run. These files are included in the generated archive installer. See Manage Required Files in Compiler Project (MATLAB Compiler SDK).
Files packaged for redistribution — Files that are installed with your application. These files include:
Generated deployable archive
Generated
readme.txt
See Specify Files to Install with Application (MATLAB Compiler SDK)
Include MATLAB function signature file — Add or create a function signature file to help clients use your MATLAB functions.
Package the Application
To generate the packaged application, click Package.
In the Save Project dialog box, specify the location to save the project.
In the Package dialog box, verify that the option Open output folder when process completes is selected.
When the deployment process is complete, examine the generated output.
for_redistribution
— A folder containing the installer to distribute the archive.for_testing
— A folder containing the raw generated files to create the installerPackagingLog.txt
— Log file generated by the packaging tool.
See Also
Functions
mcc
(MATLAB Compiler) |deploytool
(MATLAB Compiler)
Apps
- Production Server Compiler (MATLAB Compiler SDK)