Compiling from Source: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Lostcalpolydude
Update SVN URL
imported>Winterbay
Line 25: Line 25:
# Install the appropriate developer tools for your version of MacOSX from the Mac Dev Center (http://developer.apple.com/devcenter/mac/index.action) or from your original OS install disks.
# Install the appropriate developer tools for your version of MacOSX from the Mac Dev Center (http://developer.apple.com/devcenter/mac/index.action) or from your original OS install disks.
# Open a new terminal window and navigate to the directory to which you wish to create kolmafia (e.g. cd ~/Projects, or some similar directory)
# Open a new terminal window and navigate to the directory to which you wish to create kolmafia (e.g. cd ~/Projects, or some similar directory)
# Connect to the SVN server and download the source code for the Mafia Project. (svn checkout svn://svn.code.sf.net/p/kolmafia/code/ kolmafia )
# Connect to the SVN server and download the source code for the Mafia Project. (svn checkout <nowiki>svn://svn.code.sf.net/p/kolmafia/code/</nowiki> kolmafia )
# Compile kolmafia with Ant (cd kolmafia && ant jarbundler) (use ant daily jarbundler after the initial install to update kol and build in one step)
# Compile kolmafia with Ant (cd kolmafia && ant jarbundler) (use ant daily jarbundler after the initial install to update kol and build in one step)
# copy the application to your preferred location: (cp ./dist/KoLMafia.app /Applications)
# copy the application to your preferred location: (cp ./dist/KoLMafia.app /Applications)


[[Category:Tech Support]]
[[Category:Tech Support]]

Revision as of 12:45, 20 August 2014

To contribute to the Mafia project, you'll need to be able to install the Java Development Kit, connect to the SVN and be comfortable writing Java Code. Instructions for the first two are included below:

Windows

  1. Download and install the Java Development Kit, available here: http://java.sun.com/javase/downloads/index.jsp
  2. Download and install Subversion, available here: http://www.collab.net/downloads/subversion/
  3. Download and install Tortoise SVN (or of course, another SVN program), available here: http://tortoisesvn.tigris.org/
  4. Download and install WinAnt, available here: http://code.google.com/p/winant/
  5. Connect to the SVN server and download the source code for the Mafia Project. Using Tortoise SVN, you have to right-click on your desktop, select "SVN Checkout", and put the URL of the repository as "svn://svn.code.sf.net/p/kolmafia/code/". Leave all other settings as they are, and click OK.
  6. Copy C:/Program Files/WinAnt/bin/ant.bat to your Desktop/kolmafia/ folder. If you have set up WinAnt correctly (and it's hard not to - there aren't many options) then double clicking on this file should compile the program.
  7. Compiling creates a "build" and "dist" folder. The end program is in dist/Kolmafia.jar.

Linux

  1. Install Sun Java Development Kit ( debian: apt-get install sun-java6-jdk )
  2. Install Subversion ( debian: apt-get install svn )
  3. Install Ant ( debian: apt-get install ant )
  4. Connect to the SVN server and download the source code for the Mafia Project. ( svn checkout svn://svn.code.sf.net/p/kolmafia/code/ kolmafia )
  5. Verify tou are using sun-java with ( debian: update-alternatives --all )
  6. I had to change $JAVA_HOME to compile ( export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.12 )
  7. Compile kolmafia with Ant ( debian: cd kolmafia && ant debian )
  8. Install kolmafia ( debian: cd dist && dpkg -i kolmafia*.deb )

MacOSX

  1. Install the appropriate developer tools for your version of MacOSX from the Mac Dev Center (http://developer.apple.com/devcenter/mac/index.action) or from your original OS install disks.
  2. Open a new terminal window and navigate to the directory to which you wish to create kolmafia (e.g. cd ~/Projects, or some similar directory)
  3. Connect to the SVN server and download the source code for the Mafia Project. (svn checkout svn://svn.code.sf.net/p/kolmafia/code/ kolmafia )
  4. Compile kolmafia with Ant (cd kolmafia && ant jarbundler) (use ant daily jarbundler after the initial install to update kol and build in one step)
  5. copy the application to your preferred location: (cp ./dist/KoLMafia.app /Applications)