# Kdenlive/Developer HOWTO

(this page is merely a skeleton with lots of notes in parentheses which are indications for further rewriting later today; do not complain on its content until 2008-04-25 :) )
This page is intended for people who want to contribute code to Kdenlive, either occasionally or as a Kdenlive developer.

# Intended audience

This HOWTO is intended for occasional contributors who are only interested in doing a limited number of specific fixes as well as regular developers willing to tackle bug tracker entries on a (more or less) regular basis.
The needed setup is the same for both contributors and developers, who must
* have svn installed;
* use the latest kdenlive source code via svn;
* have development versions (headers at least, possibly source code as well) of all needed libs;
* be subscribed to the kdenlive devel mailing list.
Developers also need:
* a working sourceforge.net account (needed for being registered as a kdenlive developer)
* a kdenlive developer account (granted by the project admin)

# Getting Kdenlive source code

Kdenlive source code can be retrieved using svn Webinterface for the kdenlive svn: http://kdenlive.svn.sourceforge.net/ checkout kde3-version of kdenlive kde4-version (most work is now done here)
Warning : kdenlive for kde3 will not maintained so you need to install a minimal KDE4 environment.
Also see Getting and installing Kdenlive.
First time:
Next times:
when your modifications conflict with the svn version resolve it (Example how to use svn resolve) or google for "svn resolve"
(add a note on developer's current modifications wrt svn update: when to manually merge, how to do it)

# Creating Kdenlive patches

For a single file, run 'svn diff' with the full path of the file. Exemple:
You can diff several files at once:
You can diff a whole directory in one go:
to create a patch file:
Of course you can mix and match, e.g. create a single patch for a bunch of files and directories; but the bigger a patch is, the harder it is for people to review it. As a guideline, a patch should only contain modifications related to a single issue. If your local source tree contains modifications for several issues, make a pach for each issue.

# Submitting Kdenlive patches

Occasional contributors must submit patches to devel mailing list (http://sourceforge.net/mail/?group_id=46786) for review and inclusion.
Developers can commit svn changes directly.

# IRC-Talk

for questions or hints you could try to aks on #kdenlive-dev if a developer is present

# Platform-specific developer notes

Contributors and developers: feel free to update/add platform-specific notes.

## Mandriva 2008.1 (Spring) x86_64

As of 2008-04-24, Mandriva 2008.1/x86_64 provides MLT(++) version 0.2.5 but development libraries are still version 0.2.2, which is too old for kdenlive! This means that kdenlive developers on Mandriva 2008.1/x86_64 must also get MLT through SVN and compile it locally (add details on how to use user-generated MLT(++) libs for kdenlive debugging while leaving the production libs and kdenlive untouched).
Mdv2008.1's ffmpeg also lacks swscale support (amon other things) so it can also benefit from being recompiled.
* Getting and Configuring ffmpeg on Mdv2008.1/x86_64
I took my ./configure settings from a merge of the Mdv2008.1/x86_64 ffmpeg settings and the [[Kdenlive/Getting_and_installing|Getting and installing Kdenlive] page, with the following notable points:
* forced --shlibdir to /usr/lib64 otherwise dynamic would end up in /usr/lib instead.
* forced --incdir to /usr/include otherwise pkg-config files (*.pc) would include an illegal '$PREFIX'.
* disabled static libs as they were no use.
* removed libogg and some others which were not recognized any more by ffmpeg
* changed --enable-pp into --enable-postproc and --enable-swscaler into --enable-swscale.
The make and make install steps went fine as far as I can tell. The newly installed ffmpeg and libs seem to work anyway. :)
* Getting and Configuring mlt on Mdv2008.1/x86_64
From the suggested configure settings, I enabled mmx (no reason not to support it), used --avformat-shared (to use the ffmpeg libs I'd just installed) and disabled frei0r (not available on my system), gtk2 (I don't use Gtk), jackrack (I don't use jack) and qimage (for some reason, it cannot find some qt-mt lib if I keep it enabled; maybe that's a KDE3 vs KDE4 issue; I am still using KDE3).
Again, make and make install went fine.
* Getting and Configuring mlt++ on Mdv2008.1/x86_64
I just needed to make sure the lib directory would be /usr/lib64 (by default it would have been /usr/lib)
There too, make and make install went fine.
* Getting and Configuring Kdenlive on Mdv2008.1/x86_64

## Fedora 10 (Cambridge) x86_64

This is quite similar to Mandriva installs so I just did some cut-and-paste from the above, here. I was not able to compile/use kdenlive as of Fedora 7 onward. Today I did it with Fedora 10 Preview and these are steps I followed (Italian Transl.):
* OS and repositories
As Fedora 10 is still preview, no surprise it was difficult to find up-to-date repositories: then I came into fresh new RpmFusion repository that contained almost all needed dependencies.
* Installed Devel Packages
Maybe I'm missing many other...
* Getting and Configuring ffmpeg
Note that, as far as i can understand, --prefix must be declared same as for mlt
Building ends seamlessly.
* Getting and Configuring frei0r
* Getting and Configuring Mlt
Then I found I have to fix pkg-config path in order to let mlt configure to find avformat libs (maybe I messed up with the above --prefix: but I'm not sure )
qimage libraries path need tuning in order to use Qt4 (consider P.S. at end):
Note that, in my experience, without disabling mmx and sox, compile will exit with errors.
Again, make and make install went fine.
* Getting and Configuring mlt++
There too, make and make install went fine.
* Getting and Configuring Kdenlive
Done!!
P.S.(Latest news): However same procedure works on my home desktop while doesn't on the laptop at office; seems like mlt does not detect Qt4 includes correctly and build against qt3 on that laptop, thus crashing at launch. :-(