Development

Retrieve sources

The tools page will give you the necessary / recommanded tools to work on peers.

To retrieve the source code, you can use a subversion client with the following URL:

http://peers.svn.sourceforge.net/svnroot/peers/

You can use either TortoiseSVN or the svn command line:

svn co http://peers.svn.sourceforge.net/svnroot/peers/trunk peers

IDE

To work on peers, you can use eclipse. Create a new project using File > New > Java Project. Let's call this eclipse project peers.
Choose "Create project from existing source" option, select the directory where peers sources have been downloaded and click Finish.
Sources are now magically available!

To run or debug the softphone, you can right-click on basicGUI in package net.sourceforge.peers.gui, then Run (or Debug) As > Java Application.

Code

While working on peers, please respect the code convention. It's not complicated ant it eases the job of all developers. Here, the code convention is mostly Sun's code convention, but not as strict as Sun's one. It means that tabs are prohibited, indentation is made of 4 spaces, and opening brace is on the same line as method declaration, if statements always use braces, etc. Here is an example:

    private void getHumour(boolean isHappy) {
        if (isHappy) {
            return "Happy";
        } else {
            return "Sad";
        }
    }

Build

Then, in the root directory, just run:

ant

(Of course, ant needs to be added to your PATH environment variable)

And that's it! The build directory contains a zip file which can be unzipped, and the script in the directory unzipped can be launched to start peers. For development, you can also use Eclipse with a simple Run configuration. To work on Peers from eclipse, simply create a new Java project and then import sources from file system and the default parameters for sources import should be appropriated. Then, right click on net.sourceforge.peers.gui.BasicGUI and Run As > Java application.

Submit patches

If you want to submit patches, please respect code convention, submit to peers-devel mailing-list, run:

svn diff > patch.txt

And send this patch to the development mailing-list, with a simple explanation in mail body (and don't forget a representative subject...). If you have any question do not be afraid, ask! For patches, don't send huge patches, just patches for small features, splitted in several patches if those features requires many modifications in the source code.