Pack a Custom Component for other installations
As of Profinity 2.3, a Custom Component that works in one profile can be packed and installed on other Profinity systems. The pack is a bundle of the component's own files (CAN database (DBC), dashboard, scripts, and maps), not a compiled DLL plugin.
You need:
- A working Custom Component, with its files in one folder.
- The Profinity SDK, which includes
profinity-component-pack. The SDK is available from Prohelion. - A
component_metadata.yamlfile in the folder, which sets the name that the component has in the catalogue. Refer to Component metadata. - An administrator on the other installation who can upload packages, as described in Install and manage plugins.
- The Custom Plugins licensed feature on the other installation.
Run profinity-component-pack on Windows, macOS or Linux. The commands are the same on each system, except that on Windows the tool starts as dotnet profinity-component-pack.dll, and the path separators in examples differ.
- On the machine that has the SDK, run
profinity-component-pack validate --component-dir <path>, where<path>is the component folder. The tool reports the first problem it finds, on standard error. Fix each problem and validate again until it reports none. - Run
profinity-component-pack pack --component-dir <path> --output <path.zip|path.nupkg>, where the output ends in.zipor.nupkg. Refer to Component Pack CLI for the commands and flags. - On the other installation, an administrator selects ADMIN, then Components & Plugins, and uses the UPLOAD PLUGIN panel to upload the
.zipor.nupkgpackage. The package then appears in the list on that page. - Open the profile and select ADD COMPONENT.
The component is listed under the name that
component_metadata.yamlgives it.
When the component is added, it behaves as described in Using a Custom Component.
Troubleshooting
| What you see | Cause | What to do |
|---|---|---|
| "Plugin archive must use a .zip or .nupkg extension." when you upload the package | The package file was saved with a different extension | Run pack again with an --output path that ends in .zip or .nupkg, then upload the new file. |
profinity-component-pack validate reports a problem |
The component folder has a problem, and the tool reports the first one it finds | Fix the problem that it names, then run validate again until it reports none. |
Component directory does not exist: followed by a path |
The --component-dir path does not point to a folder |
Give the path to the component folder, then run validate again. |
Missing required file: component_metadata.yaml, or the same message for settings_map.yaml, firmware_map.yaml, or actions.yaml |
The component folder is missing a file that the pack needs | Add the file named in the message, then run validate again. |
Component directory is required., component_metadata.yaml is empty or invalid., or Component name is not a valid folder name. |
The component folder or its metadata does not pass the check | Correct the item the message names, then run validate again. |