Setting-up packages

Package basics

A package is a collection of libraries, modules, executables and/or configuration files.

Within the source tree, a package named PackageName, has to be located in the $RKTROOT/src/packages/PackageName folder.
After installation (see below), the software it contains will be accessed automatically through the build system, and the resulting binaries will be located in the normal bin and module directories. Moreover, data and configuration files will then be accessible through symbolic links in the $RKTROOT/data/packages/PackageName and $RKTROOT/config/packages/PackageName folders. For the simulator to be able to access automaticaly and in priority the files contained in $RKTROOT/data/packages/PackageName, simply add an xml tag:

   <Packages> PackageName </Packages>

in your simulation configuration files (located within the $RKTROOT/config folder).

Setting-up a package

Given a package with name PackageName, be sure that its files are located in the folder $RKTROOT/src/packages/PackageName. Then:

Then, to set-it up (to create symlinks of data and config files + setup the build)

> cd $RKTROOT
> ./PMCMake/PMSetupPackage.sh PackageName
> ./PMCMake/PMSGenerate.sh

Build everything

> cd $RKTROOT
> ccmake .
> make

Note: In the ccmake gui, building of packages can be enabled or disabled.

Setting up your own package

Let's say you're creating a package with name PackageName.

First create a folder in the package folder

> cd $RKTROOT/src/packages
> mkdir PackageName

Then copy the two example package config files in there

> cd $RKTROOT/src/packages
> cp ExamplePackage/PackageFiles.txt ExamplePackage/PackageOptions.cmake PackageName/

If you have modules, libraries or executable to be put in the package, copy their source in the package folder. For example, for a module named MyModule:

> cd $RKTROOT/src/packages/PackageName
> cp -r $PATH_TO_MY_MODULE/MyModule .

Then edit the PackageOptions.cmake file and add MyModule to the PACKAGE_PROJECT_LIST.

If you have specific files that should be put in the $RKTROOT/data or $RKTROOT/config folders

> cd $RKTROOT/src/packages/PackageName
> mkdir data
> mkdir config

Put then your files in there following the normal tree organization of these folders. Then edit the PackageFiles.txt file and add the name (with path) of these files.

Finally, proceed with the normal package setup process.

Setting up a new package in the repository

Given a package with name PackageName, first clean your project

> cd $RKTROOT
> ./PMCMake/PMClean.sh

Then go to your package folder: let's say

> cd $RKTROOT/src/packages

Create the svn folders

> svn mkdir --parents svn+ssh://username@servername/home/svn/RKT/packages/PackageName/trunk/PackageName
> svn mkdir --parents svn+ssh://username@servername/home/svn/RKT/packages/PackageName/branches

And finally perform the first import:

> svn import PackageName svn+ssh://username@servername/home/svn/RKT/packages/PackageName/trunk/PackageName -m "initial import"

Optionally, check that it's in there

> svn ls svn+ssh://username@servername/home/svn/RKT/packages/PackageName/trunk/PackageName