Table of Contents
maemo-launcher is a tool to decrease the start-up time of GTK+ and thus gtkmm and maemomm applications. It runs as a daemon and initialises as much as possible before your application begins to start. When a new application is started it is forked from the daemon process, so it starts faster because the initialisation is already complete.
maemo-launcher supports multiple booster modules which are responsible for the initialisation of various libraries. By default,
maemo-launcher only supplies a GTK+ booster but a gtkmm and maemomm booster are available from the
maemo extras repository (see the section called “Prebuilt packages”)
# fakeroot apt-get install maemomm-booster
To use the boosters you must specify them when starting
maemo-launcher via the command line like
maemo-launcher --send-app-died --daemon --booster gtk,gtkmm,maemomm
Please arrange the list so that underlying libraries are positioned first and derived libraries afterwards. For instance, the normal order would be gtk, gtkmm, maemomm.
If you are using the Maemo SDK you can change the option in
/etc/init.d/maemo-launcher to look like
DAEMON_BASE_OPTS="--daemon --send-app-died --booster gtk,gtkmm,maemomm"
so that extra boosters are started automatically when the Maemo desktop is started via:
maemo-launcher tries to load the application using dlopen, it must be linked with the
-rdynamic flags. If you are using
automake then you can add the following to your
Makefile.am (replacing program with the actual name)
program_CFLAGS = -shared program_LDFLAGS = -shared -rdynamic
However, when you build your application with these options you will no longer be able to run it standalone.
To run the
maemo-launcher enabled application, use
Your Debian package should install your application executable as
progname.launch and install a shell script progname which calls
maemo-invoker. This script could look like
#!/bin/sh exec maemo-invoker /usr/bin/progname.launch "$@"
These three code snippets could be interesting if you want to build Debian packages. Add them to the appropriate section in the
debian/rules file. The first snippet belongs in the global section
ifeq "$(strip $(LAUNCHER))" "yes" LAUNCHER_DEPENDS = -Vlauncher:Depends="maemo-launcher" LAUNCHER_CFLAGS = -shared LAUNCHER_LDFLAGS = -pie -shared -export-dynamic endif
(...) # commands to compile the package. $(MAKE) \ MAEMO_LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \ MAEMO_LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)" touch build-stamp
(...) ifeq "$(strip $(LAUNCHER))" "yes" mv $(CURDIR)/debian/tmp/usr/bin/progname \ $(CURDIR)/debian/progname/usr/bin/progname.launch ln -s /usr/bin/maemo-invoker \ $(CURDIR)/debian/progname/usr/bin/progname endif
To build with launcher support, supply
LAUNCHER=yes to the
dpkg-buildpackage command line.