| Contents | Index |
packNGo(buildinfo, propVals...)
propVals is optional.
Build information returned by RTW.BuildInfo.
A cell array of property-value pairs that specify packaging details.
| To... | Specify Property... | With Value... |
|---|---|---|
| Package all model code files in a zip file as a single, flat folder | 'packType' | 'flat' (default) |
Package model code files hierarchically in a primary zip file
that contains three secondary zip files:
| 'packType' | 'hierarchical' Paths for files in the secondary zip files are relative to the root folder of the primary zip file. |
| Specify a file name for the primary zip file | 'fileName' | 'string' Default:'model.zip' |
| Include only the minimal header files required to build the code in the zip file | 'minimalHeaders' | true (default) |
| Include all header files found on the include path in the zip file | 'minimalHeaders' | false |
The packNGo function packages the following code files in a compressed zip file so you can relocate, unpack, and rebuild them in another development environment:
Source files (for example, .c and .cpp files)
Header files (for example, .h and .hpp files)
Nonbuild-related files (for example, .dll files required for a final executable and .txt informational files)
MAT-file that contains the model build information object (.mat file)
You might use this function to relocate files so they can be recompiled for a specific target environment or rebuilt in a development environment in which MATLAB is not installed.
By default, the function packages the files as a flat folder structure in a zip file named model.zip. You can tailor the output by specifying property name and value pairs as explained above.
After relocating the zip file, use a standard zip utility to unpack the compressed file.
Note The packNGo function potentially can modify the build information passed in the first packNGo argument. As part of packaging model code, packNGo might find additional files from source and include paths recorded in the model's build information and add them to the build information. |
Package the code files for model zingbit in the file zingbit.zip as a flat folder structure.
set_param('zingbit','PostCodeGenCommand','packNGo(buildInfo);');
Then, rebuild the model.
Package the code files for model zingbit in the file portzingbit.zip and maintain the relative file hierarchy.
cd zingbat_grt_rtw;
load buildInfo.mat
packNGo(buildInfo, {'packType', 'hierarchical', ...
'fileName', 'portzingbit'});
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |