Introduction

We are looking for new developers, who could help implementing more features in KMess. This position is much needed, since our team is small! If you have experience with C++ or writing object oriented code in another language, this is the right place to look. Don't hesitate to contact one of the KMess developers or post a message at the forums.

KMess is written in C++ and uses the Qt and KDE 4 libraries. These are not hard to learn, in fact, Qt makes C++ programming much easier. Please take a look at our open tickets to find something you like to work on. You can suggest a new idea too off course!

This page provides some pointers to get started as new developer. Any questions, suggestions and ideas can be posted at the forums.


Downloading SVN

To develop code for KMess, you need the latest version from SVN. The SVN repository contains all development code, it records all changes, and allows multiple developers to work on the same project. The repository can be viewed online and can be downloaded using the following command:

svn checkout http://kmess.svn.sourceforge.net/svnroot/kmess/trunk/kmess

From the downloaded SVN version, the development can start. Take a look in the tickets here for known issues and future feature ideas.

Each time you're starting with with development, it's important to update the local SVN snapshot. This can be done by running svn update or using kdesvn. All changes made by other developers will be merged with your local copy.

A tool like kdesvn makes it easier to use subversion. However, the svn command line tool is also easy to use. It can be operated with the commands:

svn status
svn update
svn diff | colordiff
svn diff filenames
svn commit filenames

Writing the code

We use KDevelop to write the code (use at least version 3.2, because kdevelop 3.1 crashes a lot). In the local SVN copy you'll find a KDevelop project file. The project file already defines two "Build configurations": debug and default. The debug configuration compiles KMess without code optimization, enables debug messages and the ability to trace a crash if it occurs.

Please follow the same coding style we used! Don't hesitate to post a question if you have any problems, or need some help to get started with C++.

Resources:

External resources:


Creating patches

Once you've written and tested your code modifications, it's time to submit them. As long as you don't have SVN access, you can e-mail patch files, or post them in the forums. A patch file contains a record of all modifications made to the code. As a result, a patch file is quite small compared to the entire source tree. Patch files can be created using:

svn diff > filename.patch

The result can be compressed with gzip when needed, and sent to us. You can post the patch at our forums. If you prefer e-mail, send the file as attachment to "patches" (at) "kmess.org".

After sending the patch, you'll get feedback as soon as possible. It's possible you'll have to change a few things before the patch is accepted. Preferably, when the patch fulfills all requirements and follows the coding standards, it can be committed to SVN as it is.

It's also possible your patch will be merged with a few minor modifications.

Even if we didn't accept your patch as-is, it will still save us lots of research time. So your patch is more then welcome!

The diff command

It's also possible to create patch files with the diff command. This requires two copies of the same source, the original (created with a SVN checkout for example), and the modified version. Before creating a patch file this way, both folders needs to be in a "clean" state. Having temporary files (or compiler output) clutters the patch file.

diff -Naur --exclude=.svn/ original-folder/ modified-folder/ > filename.patch

Becoming a project member

After submitting some cool patches, you'll likely be asked to become a project member. Create a SourceForge.net account so you can commit your stuff by yourself.

As a project member you can commit the modifications directly to SVN. To commit a modification, use the following steps:

  • Make sure you know what you're committing. Use kdesvn or svn diff for that.
  • Make sure what you commit is tested, compiles and does not crash KMess instantly.
  • Adhere the coding standards, this makes maintainance much easier later.
  • Write down the changes in the ChangeLog file.
  • Update the NEWS and FEATURES files when applicable.
  • Commit the changed files one by one using kdesvn or svn commit filename.
  • Write down a summary of the modifications in the commit dialog.

Oh, and add us to MSN too! Coding is more fun that way! :-)

See the KDE commit policy for rationale behind these rules.

Each SVN update is submitted to the kmess-commits mailing list too. You can subscribe to this list if you like to be informed with SVN changes.


Reverse Engineering

A lot of research is made by people to improve and maintain compatibility with the MSN Protocol. Most details of the protocol are reverse-engineered by other projects. Here are some sites with valuable information:

We also use a tool called Wireshark (formerly named Ethereal) to analyse network traffic. Wireshark captures network packets and is able to follow TCP connections, and display who sent what kind of data. To display MSN traffic only, set the "Capture filter" to tcp port 1863.


Attachments