Welcome

Overview (Screenshots)

Download

Developers Corner

Forum

FAQ


    Join the revolution! Get your own Alliance t-shirt.


Support the development of Alliance:


SourceForge.net Logo
 

Getting started programming Alliance

Introduction

This short guide will help you set up a development environment for Alliance. Once you are done with this guide you will be able to make changes in the Alliance code, compile them and test them using the Alliance testsuite.

Get the source code using SVN

The steps below are for Windows XP users. If you run another OS look here.
  1. If you haven't got TortoiseSVN installed download it here: http://tortoisesvn.net/downloads. It's the best SVN client for Windows.
  2. Create a project directory for alliance. I call mine... alliance
  3. In this directory, using windows explorer, right-click och the background and select "SVN Checkout"
  4. As "URL of repository" enter: https://alliancep2p.svn.sourceforge.net/svnroot/alliancep2p
  5. Click OK. All files will be downloaded from SVN repository now.
  6. Create a directory called classes. All Java classes will go here.

Compile Alliance

  1. Alliance uses JUnit. Download JUnit here: http://sourceforge.net/project/showfiles.php?group_id=15278
  2. The make.xml in the root is NOT used to compile Alliance. It's used to generate a new release of alliance. You need to manually compile all files in the src/ directory. The following must be in your classpath while compiling:
    • All files in the lib/ directory of alliance (this was downloaded from SVN)
    • The JUnit jar you downloaded in step one. In my case this file was called junit-4.1.jar.
    Put all freshly compliled classes in the classes/ directory.

Generate TestSuite

  1. Create a directory called c:\share (this path is defined in
    org.alliance.misc.GenerateTestSuite.SHARE_DIRECTORY
    )
  2. Throw in a bunch of files there. Every test user in your testsuite will share a subset of the files in this directory. Make sure you have at least five directories in c:\share and that these five directories contain a bunch of files each.
  3. With the Alliance project directory as your current directory run:
    java -cp <path to all jar files needed> org.alliance.misc.GenerateTestSuite
<path to all jar files needed> are the same jar-files as in 'Compile Alliance' - that's all files in the lib/ directory and the JUnit jar.

The testsuite will now be generated - what actually happens is that a number of alliance setting files are generated in the testsuite/settings directory.

Run TestSuite

  1. With the Alliance project directory as your current directory run:
    java -cp <path to all jar files needed> -Dtestsuite=true org.alliance.launchers.testsuite.Main

    <path to all jar files needed> are the same jar-files as in 'Compile Alliance' - that's all files in the lib/ directory and the JUnit jar.

  2. Wait. The first time you start the testsuite all test users hash all their shared files at the same time.
  3. Once all the hashing is done you can try starting the UI for a user by double-clicking on the username in the testsuite UI.

You are now ready to start hacking with Alliance!

If you need more information have a look at the technical documentation or the developer forum.

You may also take a look at the guide describing how to set up Netbeans to compile Alliance