LibCXX Widget Toolkit should be converted into an installable package instead of building and installing LibCXX Widget Toolkit directly. The source tarball contains build scripts for Fedora and Ubuntu (most likely works on Debian too, but untested).
The installable packages get created the same way LibCXX's packages
get created.
Running
“rpmbuild -ta libcxxw-version
.tar.bz2”
on Fedora
creates the following packages:
The main binary rpm package, with runtime libraries.
The “cups” sub-package, with the library that creates the Chapter 30, Print Dialog.
The “devel” subpackage, containing header files and other supporting files used for developing applications that use the LibCXX Widget Toolkit.
The “devel-internals” subpackage, containing additional header files exposing internal library API's, for developing custom widgets.
To build a DEB package:
Create an empty directory and copy/move the tarball into it:
$ mkdir tmp $ mv libcxxw-VERSION.tar.bz2 tmp $ cd tmp
Unpack the tarball and cd into the unpacked subdirectory:
$ tar xvf libcxxw-VERSION.tar.bz2 $ cd libcxxw-VERSION
Run the debuild script in the current directory, which is a wrapper for the system debuild script, and forwards its parameters to it:
$ ./debuild -us -uc
The above steps must be followed strictly. The debuild script expects the distributed tarball in its parent directory.
This eventually produces a deb
subdirectory with
.deb packages that can be
installed with "dpkg -i".
The above steps must be followed strictly. The debuild script expects the distributed tarball in its parent directory.
Building the LibCXX Widget Toolkit results in an implicit dependency on the underlying version of the LibCXX, and the resulting rpm packages carry both the LibCXX Widget Toolkit and the LibCXX version numbers on them.
Use the following documentation as a guide for preparing an installable the LibCXX Widget Toolkit package on platforms other than Fedora or Ubuntu.
Install LibCXX first before installing the LibCXX Widget Toolkit. All LibCXX's own requirements apply here as well (gcc version, gmake, and others).
Version 2 of Freetype.
The Fontconfig library.
XCB library, including its util modules: xcb-xproto, xcb-keysym, xcb-ewmh, xcb-icccm, xcb-image.
libjpeg-turbo, libpng, and giflib.
Linux distributions typically have separate runtime and development packages for these libraries. In all cases, the development packages must be installed to build LibCXX Widget Toolkit, and only the runtime packages are required to run the applications.
As mentioned above, the LibCXX Widget Toolkit should be built into a standalone, installable package. Use the following documentation as a guide to create an installation script or a package.
Run the configure
script, followed by
make
(or gmake), and
make install.
configure
takes the usual options that specify
non-default installation directories for various files
(see configure --help).
Additional options are:
dir
Specifies where pkgconfig configuration file gets installed. The configure script goes through the list of some common directories, and checks if they exist.
This option may be needed to override the default even if configure finds it, and does not complain, if it ends up finding and installs its pkgconfig file into the wrong directory.
Run (g)make install DESTDIR=/tmp/libcxxw-install. This
creates an installation image in the
/tmp/libcxxw-install
directory, to use as a basis for
creating an installable package.
A plain (g)make install will do it
“for real”, of course.
However, using an installable package is strongly recommended.
In addition to (g)make install, the
cxxwtheme.desktop
should be included in the
installable package, and placed in the desktop application directory
(usually /usr/share/applications
).
See LIBCXX's autotools
instructions. The LibCXX Widget Toolkit uses the same build framework.
In configure.ac
:
LIBCXX_INIT LIBCXXW_INIT
LibCXX's LIBCXX_INIT gets supplemented by
LibCXX Widget Toolkit's LIBCXXW_INIT,
The Makefile.am
should also use
LibCXX's @LIBCXX_AM@, if needed,
and applications link with -lcxxw and -lcxx
The Makefile.am
should also use
@LIBCXXW_AM@ to include several macros, like
EXTRACT_THEME_TEXT_GEN
.
@LIBCXX_AM@ @LIBCXXW_AM@ bin_PROGRAMS=main main_SOURCES=main.C main_LDADD=-lcxxw -lcxx
See the examples directory for a working example.
It is possible to install multiple versions of the LibCXX Widget Toolkit to accomodate software that gets built with different versions of the LibCXX Widget Toolkit. See LibCXX's documentation for more information. The same process gets used for the LibCXX Widget Toolkit too.
LibCXX Widget Toolkit's compatibility package does not have:
The tools in $bindir
(the
cxxw and cxxwtheme
commands.
The cxxwtheme desktop file,
cxxwtheme.desktop
(usually in /usr/share/applications
, see
above).
Manual pages in $mandir
.
The compatibility packages contents are, only:
$libdir
/libcxxw-$version
This directory whose name includes the LibCXX Widget Toolkit and LibCXX's API/ABI
versions contains the runtime libraries.
Multiple concurrently-installed version of the LibCXX Widget Toolkit
get installed into different directories in
.
$libdir
$includedir
/libcxxw-$version
This directory whose name includes the LibCXX Widget Toolkit's and LibCXX's
API/ABI version contains the header files.
Multiple concurrently-installed version of the LibCXX Widget Toolkit
install their header files into different directories in
.
$includedir
$datadir
/libcxxw-$version
This directory whose name includes the LibCXX Widget Toolkit's and LibCXX's
API/ABI version contains LibCXX Widget Toolkit's visual themes.
Multiple concurrently-installed version of the LibCXX Widget Toolkit
install their header files into different directories in
.
$includedir
Only the primary LibCXX Widget Toolkit package provides the cxxwtheme to switch display themes. A compatibility LibCXX Widget Toolkit library tries to use its corresponding theme with the same name as the primary's package, falling back to the default theme if necessary.
The creator
subdirectory contains additional
UI theme files used by cxxwcreator. This
directory does not get installed by the
compatibility LibCXX Widget Toolkit library since it does not include the
cxxwcreator.
The LibCXX Widget Toolkit installs a package configuration files and an autoconf
macro files into the shared, global
pkgconfig
and
aclocal
directories. The names of these files
include the LibCXX Widget Toolkit version, making it possible to install
multiple versions of these files, corresponding to each installed
version of the LibCXX Widget Toolkit.
Re-targeting code that gets compiled with the LibCXX Widget Toolkit to use a
different version of the LibCXX Widget Toolkit, if that's possible, follows the
same general process
LibCXX's, and
sets the LIBCXXW_VERSION
environment variable which
gets checked by the LIBCXXW_INIT macro.
This is the LibCXX Widget Toolkit's API/ABI version number which is, generally, the
LibCXX Widget Toolkit version without the minor release level. One way to obtain
the API/ABI version number is that it gets
included in the name of the lib
subdirectory
where LibCXX Widget Toolkit's runtime libraries get installed.