Tutorial - Deploy a package
Step 1 : Install your first package
We suppose you need to use a package, for instance because a colleague informs you about an interesting one. The example consider the pid-rpath package but any one can be deployed the same way.
cd <pid-worskspace>
pid deploy package=pid-rpath
The process can take a long time because the deploy
command installs the target package and all its dependencies, and if needed build everything as required. In the case of pid-rpath, it should be really short because the package has only two dependencies.
You can have a look at the result in <pid-worskspace>/install/<platform>/pid-rpath
. As you may see there is a folder with a version number. By default this is the last available version of the package that is installed. From now, we denote this version number with the tag <version>
.
Now do:
cd <pid-worskspace>/install/<platform>/pid-rpath/<version>
You can see the binaries available in bin
and lib
folders. If bin
folder does not appear this is because pid-rpath package does not generate examples programs.
1.1 Build an existing package by hand
If pid-rpath has been installed from a source PID package, you can generate these examples:
- Look if the source package exist in your workspace:
ls <pid-worskspace>/packages/pid-rpath
- If the content of the package appears, it means that you have the source package installed. Then you can do:
cd <pid-worskspace>/packages/pid-rpath
pid configure -DBUILD_EXAMPLES=ON
Your package is configured to build the example programs.
- Now build the examples by simply entering:
pid build
The build process takes place and installs the resulting binairies in <pid-worskspace>/install/<platform>/pid-rpath/<version>/bin
. You can now launch the binairies the usual way.
You can repeat the operation as many time as required.
Now let’s see how to create a new package.