To create a package the program mkpkg can be used. The set of files to put into the package should be in the desired location in the $(StudioDir) directory. The mkpkg command should be run with $(StudioDir) as the working directory and all files to go into the package must be refered to using relative paths. A package must have a package description file that is placed in the $(StudioDir)/packages directory. The package description file name must end with _package.xml. If a package is to create entries in the new project wizard then it must have a file name project_templates.xml.

For example a package MyNewTarget would supply the following files.

The package file MyNewTarget.hzq would be created using the following command line

mkpkg -c packages/MyNewTarget.hzq targets/MyNewTarget/project_templates.xm .. packages/MyNewTarget_package.xml

You can list the contents of the package using the -t option

mkpkg -t packages/MyNewTarget.hzq

You can remove an entry from a package using the -d option

mkpkg -d packages/MyNewTarget.hzq -d fileToRemove

You can add or replace a file into an existing package using the -r option

mkpkt -r packages/MyNewTarget.hzq -r fileToAddOrReplace

You can automate the package creation process using a Combining project type.

When a package is installed the files in the package are copied into the desired $(StudioDir) relative locations. When a file is copied into the $(StudioDir)/packages directory and it's filename ends with _package.xml the file $(StudioDir)/packages/installed_packages.xml is updated with an entry

<include filename="MyNewTarget_package.xml">
. During development of a package you can manually edit this file. The same applies to the file $(StudioDir)/targets/project_templates.xml which will contain a reference to your project_templates.xml file.

Usage:

mkpkg [options] package file1 file2 ..
Options
-c

Create a new package.

-d

Remove files from a package.

-r

Replace files in a package.

-t

List the contents of a package.

-v

verbose.

-V

show verbose.