LabKit MATLAB Workbench

guide

App Deployment Packages

packageLabKitApp creates one ZIP containing one or more selected LabKit apps, their assets, the shared +labkit runtime, standalone entry files, and a machine-readable package manifest. Source and P-code packages serve different deployment needs.

Syntax

result = packageLabKitApp(appSelector)
result = packageLabKitApp(appSelector, zipFile)
result = packageLabKitApp(appSelector, zipFile, Name, Value)

Typical calls:

repoRoot = "/path/to/LabKit-MATLAB-Workbench";
addpath(fullfile(repoRoot, "tools", "deployment"))

one = packageLabKitApp("labkit_CIC_app");
several = packageLabKitApp( ...
    ["labkit_CIC_app", "labkit_EIS_app"], [], ...
    "OutputRoot", fullfile(repoRoot, "artifacts", "deployment"));
runtimeOnly = packageLabKitApp( ...
    "labkit_CIC_app", [], "CodeFormat", "pcode");

App Selector

appSelector accepts:

Commands are resolved through the same public and configured private-app roots used by the launcher. Ambiguous commands, missing entry points, duplicate folder entries, or unavailable source files raise an error before packaging.

Options

NameDefaultMeaning
RootRepository rootSource/runtime root containing +labkit, apps, launcher, and tools.
OutputRootartifacts/deployment/Folder used when zipFile is empty.
ProgressFcnEmptyFunction handle called as fcn(message, value) from 0 to 1.
CodeFormat"source""source"/"m" for M-files, or "pcode"/"p" for runtime-only P-code.

Source And P-code Packages

PropertySourceP-code
App implementation.m files.p files
Standalone entryrun_<command>.mrun_<command>.p
labkit_launcher.mIncludedOmitted
Deployment/profiling toolsIncludedOmitted
+labkit and selected app assetsIncludedIncluded in encoded runtime form

Both formats include README.txt and packaged_app_manifest.json. Neither format includes unrelated sibling apps. P-code is a deployment format, not a source backup; retain the corresponding private or public source repository.

Result Structure

The result identifies zipFile, packageRootName, entryFiles, appCommands, app-relative folders, visibility values, codeFormat, and fileCount. Legacy scalar fields entryFile, appCommand, appRelativeFolder, and visibility describe the first selected app.

Packaging stages files in a temporary directory, replaces an existing target ZIP only after validation reaches archive creation, and removes the staging directory afterward.