Scratchbox development

From Navit's Wiki
Revision as of 23:15, 26 February 2009 by Gerritv (talk | contribs)
Jump to: navigation, search

Developers may need to compile the source within the scratchbox environment. You need to have Scratchbox and the Nokia SDK installed. These are freely available from Maemo Place the source inside the scratchbox environment using

svn co https://

, log in to scratchbox, cd to the source directory and execute the following commands:

./configure --prefix=/usr --disable-binding-python --disable-gui-sdl --enable-avoid-float \
--enable-avoid-unaligned --enable-svg2png-scaling="32,48" --enable-svg2png-scaling-flag="32,48" \
make install

If you don't want/need the sample map then add --disable-samplemap to the above command.

As of SVN 1843 you need to get libgpsbt-dev before compiling. Execute fakeroot apt-get install libgpsbt-dev in scratchbox.

The above will build Navit along with pre-scaled icons. Prescaling the icons is known to greatly improve rendering of the gui/internal displays.

navit/xpm/navit_svg2png uses ksvg2png to pre-build the icons. If you don't have kde installed (which you wouldn't have inside scratchbox) then you will need to install librsvg2. Execute fakeroot apt-get librsvg2 in scratchbox. The Makefile in navit/xpm will automatically use one of rsvg-convert, ksvg2png or Inkscape, depending on which is installed in your development environment.

A debian directory is available so that you can build your own packages. Download and unpack in your top Navit source directory. Build a .deb file by using fakeroot ./debian/rules binary after running the initial autogen and configure at least once. The .deb file will appear in the directory above where you are. This works best after you have done at least one build using the full set of commands above.

To install librsvg2 inside Scratchbox require you to get the source code and install from there. I obtained mine from the Ubuntu sources. Unpack the directory and then do the usual ./configure && fakeroot make install inside Scratchbox. You need to do this ./configure && fakeroot make install for each Scratchbox target that you want to build with. This same process applies to other tools that you want to add the Scratchbox, e.g. ddd (symbolic debugger), splint (code checker), etc.