From Amarok Wiki
Contents |
Development Environment
Amarok 2.0 will require KDE4. Tarballs of KDE4 are periodically released, but the plan is to work off of KDE trunk. It is not known whether alpha1 works with Amarok 2.0 or not.
CMake
An easy way to set up your KDE4 development environment is to use kdesvn-build. Ian's is avalible at [1].
- The important change is to not use the KDE libs snapshots - now everyone uses trunk instead.
- Qt-copy is required. There's a commented out kdesvn-build option to install the patches - otherwise make sure to run ./apply_patches before building.
- If you want to build kdebase, you need the kdepimlibs. In .kdesvn-buildrc, move the kdepimlibs module above kdebase, and uncomment it.
Manual
Another easy way to set up the environment is to do it manually. It might sound more difficult, if you know what you are doing it can be easier than debugging obscure errors and trawling through the kdesvn-build logs. Take a look at the kde directions [2]. The kdesvn-build advantage is that every Monday or Tuesday night you can run it and update KDE unattended.
User Setup
Set up a new KDE4 user and put the following in its ~/.bashrc, changing the path to where you set the root path of KDE:
export YACC='byacc -d' export QTDIR=/path/to/qt-copy export KDEDIR=/path/to/kde4 export KDEDIRS=$KDEDIR export DBUSDIR=/usr export PKG_CONFIG_PATH=$DBUSDIR/lib/pkgconfig:$PKG_CONFIG_PATH export PATH=$QTDIR/bin:$KDEDIR/bin:$PATH export LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib:$LD_LIBRARY_PATH eval `PATH=$DBUSDIR/bin $DBUSDIR/bin/dbus-launch --auto-syntax`
NOTE: If you get errors when opening applications that say that the application cannot find the mimetype application/octet-stream, do the following:
unset XDG_DATA_DIRS kbuildsycoca4
and remove any XDG_DATA_DIRS line in your .bashrc.
As a normal user run
xhost local:
Then su to the 'kde4' user and run `export DISPLAY=:0` if you need to.
If you have problems with the xine-engine (xine was unable to initialize any audio drivers) make sure your kde-devel-user is in the audio group.
Resources:
http://techbase.kde.org/Getting_Started/Build/Unstable_Version
Building Amarok
NOTE: Amarok will only build correctly if your Strigi library was built with "clucene" support. Install clucene and clucene-dev, then rebuild Strigi (in kdesupport), then build Amarok.
NOTE: Do not build taglib from kdesupport with debug support enabled, because that will break the collectionscanner.
Amarok can now be built without the multimedia directory.
- sudo apt-get install libtag1-dev ruby1.8-dev libxine-dev cmake subversion
- svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/multimedia/amarok
- cd amarok
- mkdir amarok-build
- cd amarok-build
- cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR -DCMAKE_BUILD_TYPE=debugfull ../../amarok && make VERBOSE=1 && make install
Note that your cmake preferences are saved in CMakeCache.txt, so you don't have to have the -D options every time you run cmake.
ccmake ../amarok will give you a nice ncurses interface
Porting Resources
- Amarok has been ported to KDE4 before. Perhaps KDE and certainly Amarok have both changed too much since then for it to be directly useful. It should provide good reference though:
svn.kde.org/home/kde/branches/work/kde4/extragear/multimedia
- Guide to porting applications to KDE 4
- Porting to Qt 4 - the doc from Trolltech
- EBN KDE4 apidocs
- ask questions on the #kde4-devel IRC channel