The following shows how to create a deb package.
By default, document build is not generated because it is OFF.
$ cd project directory $ mkdir build $ cd build $ cmake .. $ make $ cpack
$ cd project directory $ mkdir build $ cd build $ cmake .. $ cpack
Change the following line of CMakeLists.txt immediately under the project directory from OFF to ON.
In case of C ++ RTC, it is around 86th row, and in Python RTC it is around 77th line.
option(BUILD_DOCUMENTATION "Build the documentation" ON) (*) Rewrite this line OFF to ON. (Default is OFF)
$ cd project directory $ mkdir build $ cd build $ cmake .. $ make $ make doc $ cpack
$ cd project directory $ mkdir build $ cd build $ cmake .. $ make doc $ cpack
【Notes】
If you turn on document build and execute "cpack" without "make doc", the following error occurs.
CMake Error at /home/project directory/build/doc/cmake_install.cmake: 36 (file):
If it succeeds, it is saved in [build] of the project directory.
The file name is "RTC project name_RTC version number_architecture".
(Example) Flip_1.2.0_amd64.deb
(*)The architecture is [i386] or [amd64].
$ cd project directory/build $ less Flip_1.2.0_amd64.deb Flip_1.2.0_amd64.deb New format debian package, version 2.0. Size 258304 bytes: Control archive = 2797 bytes. 162 bytes, 9 rows control 10062 bytes, 92 rows md5sums Package: affine Version: 1.2.0 Section: devel Priority: optional Architecture: amd64 Installed-Size: 884 Maintainer: unknown (*)If package maintainer information is not defined, it will be "unknown" Description: Flip image component
To exit less, press "q".
$ sudo apt-get install tree
$ cd project directory/build $ dpkg -x Flip_1.2.0_amd64.deb . $ tree usr usr └─ share └─ openrtm-1.2 └─ components └─ python └─ Category (*)Specified installation directory └─ FlipGUI ├─ RTC.xml ├─ FlipGUIComp.py ├─ idl │ ├─ BasicDataType.idl │ ├─ CMakeLists.txt │ ├─ CalibrationService.idl │ ├─ ExtendedDataTypes.idl │ └─ InterfaceDataTypes.idl ├─ idlcompile.sh ├─ rtutil.py ├─ setup.py └─ flipgui.py
Installation executes the following command.
$ cd project directory/build $ sudo dpkg -i Flip_1.2.0_amd64.deb
To uninstall, execute the following command.
$ sudo dpkg -r Flip
Python RTC with service port performs IDL compilation at package installation. Before IDL compilation is executed, postinst.in and prerm.in in the project directory realize this behavior, so be careful as deleting these files will not work. & br; & br; Below is a list of files installed from the deb package. ★ A file is generated by IDL compilation.
$ tree /usr/share/openrtm-1.2/components/python/Category/FlipGUI/ /usr/share/openrtm-1.2/components/python/Category/FlipGUI/ ├─ BasicDataType_idl.py ★ ├─ CalibrationService_idl.py ★ ├─ ExtendedDataTypes_idl.py ★ ├─ ImageCalibService ★ │ └─ __init__.py ★ ├─ ImageCalibService__POA ★ │ └─ __init__.py ★ ├─ InterfaceDataTypes_idl.py ★ ├─ RTC ★ │ └─ __init__.py ★ ├─ RTC.xml ├─ RTC__POA ★ │ └─ __init__.py ★ ├─ FlipGUIComp.py ├─ idl │ ├─ BasicDataType.idl │ ├─ CMakeLists.txt │ ├─ CalibrationService.idl │ ├─ ExtendedDataTypes.idl │ └─ InterfaceDataTypes.idl ├─ idlcompile.sh ├─ rtutil.py ├─ setup.py └─ flipgui.py