NOTE: This is an Ubuntu-only tutorial. Some parts of it may not work on other Linux distributions. For the general building documentation visit: http://qtjambi.sourceforge.net/development/building/.
Finally I’ve managed to compile the latest version of Qt-Jambi framework, here I’ll share with you my build-experiences and highlight the points where you can break something.
There is also a Building document on the official website of Qt-Jambi, what gives an overview about building on several platforms, here I’ll focus to Ubuntu 10.04.
Grab the latest version from git, because the development happens here. Type in Terminal:
git clone git://gitorious.org/qt-jambi/qtjambi-4_7.git
Important: always check it twice before cloning, there are more qt-jambi repositories hosted at http://qt.gitorious.org/, but with the given build dependencies just this one compiles – eventually the trolltech one if you compile it against system Qt.
The URL after gitorious.org/qt-jambi/ will be change from time-to-time, you can make sure that you have typed the right URL by navigating to the community git repository of Qt-Jambi, and copying the URL from Clone & push urls.
Assuming that you are using Ubuntu 10.04 so you don’t need the kde-phonon backend. The list of dependencies is:
openjdk-6-jdk (or alternatively the sun-java-jdk)
You can install these from synaptic or copy/paste to the Terminal:
sudo apt-get install openjdk-6-jdk ant-optional ant libxext-dev libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev build-essential chrpath libgtk2.0-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libpng12-dev libcups2-dev libgtk2.0-dev libssl-dev libasound2-dev libdbus-qt-1-dev phonon-backend-gstreamer libqt4-dev libphonon-dev
After cloning the repository and downloading the build dependencies go to the root directory of the cloned repository.
In the Terminal session where you have checked out the git clone type:
If you have installed the libqt4-dev through the package management system then you don’t need to change anything.
If you have your own compiled version of Qt then modify the variables qt.libdir, qt.includedir, qt.pluginsdir in buildpath.properties according to your Qt installation.
Modify the version.properties file according to your Qt version (take a look to aptitude show libqt4-dev).
Add the following environment variables to your ~/.bashrc file:
#set for Qt home
#set for Qt Libraries, usually QTDIR/bin
#set for Java home (the exact path depends on your Java version)
Restart the Terminal to apply the new environment variables, and in the directory qtjambi-4_7 type:
When the build finished you can try running the Qt-Jambi demo program, by typing:
java -cp "qtjambi-4.6.2.jar:qtjambi-linux32-gcc-4.6.2.jar:qtjambi-util-4.6.2.jar:qtjambi-examples-4.6.2.jar:qtjambi-designer-4.6.2.jar" com.trolltech.launcher.Launcher
If you have any questions or errors during the building, please drop a comment or take a look to #qtjambi IRC channel on irc.freenode.org.