RspakTool
The RobotStudio SDK includes a command-line executable tool that simplifies automated creation of Distribution Packages.
It takes as input an XML file that defines both the metadata (manifest.
The executable is located in the SDK installation, e.g.
C:\Program Files (x86)\ABB\SDK\RobotStudio SDK 2021\RspakTool.exe
Usage
RspakTool -i input.rspakspec [-o output] [-p param=value] [-s srcdir] [-nd]
Creates an rspak from an rspakspec file.
If output
is empty or a directory, the file name is generated automatically.
-p
Replace $(param)
in the rspakspec with value
.
-s
Root directory for source files (otherwise the directory that contains the rspakspec is used).
-nd
Do not set todays date in manifest.
RspakTool -d path -o output
Zips a directory to an rspak file.
If output is a directory, the file name is generated automatically.
RspakTool -t output.rspakspec
Creates a template rspakspec with support for RobotStudio and RobotWare add-ins.
RspakTool -v LibraryComponents
Validates the XML files of a package containing RobotStudio models. The full path to the LibraryComponents
directory must be passed on the command line.
This will check the validity of the XML files and that the referenced library files exist. Any errors will be printed to the console output.
rspakspec file
RspakTool takes as input an .rspakspec file, which is an XML file that defines both the manifest and the file contents of the resulting .rspak file.
The XML must adhere to the schema defined in DistributionPackageSpec.xsd
.
Elements | Description |
---|---|
DistributionPackageSpec | <mandatory> Root element of the XML document. All other elements are children of this one. |
RootDir | <mandatory> Defines the root directory in the package, which also is its identity. Must be in the form name-version . |
DistributionPackage | <mandatory> Defines the package manifest. The contents of the element are identical to manifest. |
Files | <mandatory> Defines the files to be included in the package. |
File | Adds one or more files to the package. The src attribute can contain wildcards * and double wildcards ** which implies a recursive folder search.The target attribute defines the target directory relative to the root directory.If replaceParameters="true" is defined, the -p option will also perform replacements in this file. |
Tip
Date
in the manifest is set automatically unless -nd
is passed on the command line.
Tip
By passing -p param=value
on the command line, $(param)
in the XML is replaced with value
.
Tip
RspakTool will also perform schema validation on XML files in Library
Example
With the following file:
<?xml version="1.0" encoding="utf-8">
<DistributionPackageSpec xmlns="urn:abb-robotics-robotstudio-distributionpackagespec">
<RootDir>ABB.ExternalAxisWizard-$(version)</RootDir>
<DistributionPackage>
<Title>External Axis Wizard</Title>
<DisplayVersion>1.0</DisplayVersion>
<Creator>ABB AB</Creator>
<Description>RobotStudio Add-In for configuration of external axes</Description>
<DetailedDescription></DetailedDescription>
<Information>https://new.abb.com/products/robotics</Information>
<Date />
<Tags>
<Tag>RobotStudio-AddIn</Tag>
<Tag>ABB</Tag>
</Tags>
<Resources>
<Resource title="Release Notes" type="ReleaseNotes" path="Documentation\ReleaseNotes\index.html" />
</Resources>
</DistributionPackage>
<Files>
<File src="Thumbnail.png" target="" />
<File src="..\..\bin\Release\ExternalAxisWizard\ExternalAxisWizard.dll" target="RobotStudio\Add-In" />
<File src="..\..\bin\Release\ExternalAxisWizard\ExternalAxisWizard.rsaddin" target="RobotStudio\Add-In" replaceParameters="true" />
<File src="ExternalAxisWizard.ReleaseNotes.DocFX\_site\**" target="Documentation\ReleaseNotes" />
</Files>
</DistributionPackageSpec>
The command line
RspakTool.exe -i ABB.ExternalAxisWizard.rspakspec -p version=1.0
will create ABB.ExternalAxisWizard-1.0.rspak