Getting Involved

Now, final question. I just need to know how to compile the source in Windows now (i.e. I actually want to do something a little more useful than adding a couple of things to the Spooky Forest drop-down).

I've got the JDK installed, but for the life of me can't work out how to actually compile the thing.
 
I still use ant and a batch file to actually create the jar.

ant daily

does the trick once you have ant installed and pathed.
 
So, KolMafia is sitting on my Desktop/kolmafia folder, and TortoiseSVN is keeping that nicely updated. I've installed WinAnt, which seemed to go well. Then I copied %PROGRAMFILES%/WinAnt/bin/ant.bat into my Desktop/kolmafia folder and executed it via command line.

Then a lot of text appeared which I had no idea what it said then some warnings appeared (and I had no idea what they meant either) it told me it was OK, and ant had created two folders, "build" and "dist".

The build folder contains some stuff, and the dist folder contains the Kolmafia.jar file. I open it up, it appears to run (I logged on successfully, and it created the data, images, scripts, etc. folders), but the title insists this is Kolmafia r0.

Is that, you know, good? Because if that's what's supposed to happen, then I have a load of stuff I feel like working on :D
 
Last edited:
You used "ant daily" and still got the r0, eh? Well you might want to copy some of those errors out and see if we can address them.
 
Ah you got r0? You need to install subversion, tortoisesvn won't work. Because ant can't get the svn revision.
 
Yea, I figured that out the hard way when setting up the compiler on my home server to test my automatic building script.
 
Does it matter if it calls itself r0? It appears to work fine. I can run the .jar file and login and stuff.

C:\Users\Andreas\Desktop\kolmafia>ant daily
Buildfile: build.xml

clean:

init:
[mkdir] Created dir: C:\Users\Andreas\Desktop\kolmafia\build
[mkdir] Created dir: C:\Users\Andreas\Desktop\kolmafia\dist

update:
[exec] Execute failed: java.io.IOException: Cannot run program "svn": Creat
eProcess error=2, The system cannot find the file specified

version:
[exec] Execute failed: java.io.IOException: Cannot run program "svnversion"
: CreateProcess error=2, The system cannot find the file specified
[echo] Current revision: 0

daily:

init:

jikeshome:

javahome:
[exec] java version "1.6.0_14"
[exec] Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
[exec] Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)

compile:
[javac] Compiling 427 source files to C:\Users\Andreas\Desktop\kolmafia\buil
d
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutClient.java:10: warning: sun.net.www.http.HttpClient is Sun proprietary
API and may be removed in a future release
[javac] import sun.net.www.http.HttpClient;
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutClient.java:19: warning: sun.net.www.http.HttpClient is Sun proprietary
API and may be removed in a future release
[javac] public class HttpTimeoutClient extends HttpClient
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutHandler.java:8: warning: sun.net.www.protocol.http.Handler is Sun propri
etary API and may be removed in a future release
[javac] import sun.net.www.protocol.http.Handler;
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutHandler.java:17: warning: sun.net.www.protocol.http.Handler is Sun propr
ietary API and may be removed in a future release
[javac] public class HttpTimeoutHandler extends Handler
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutHandler.java:25: warning: sun.net.www.protocol.http.Handler is Sun propr
ietary API and may be removed in a future release
[javac] public static final Handler getInstance()
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutURLConnection.java:9: warning: sun.net.www.http.HttpClient is Sun propri
etary API and may be removed in a future release
[javac] import sun.net.www.http.HttpClient;
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutURLConnection.java:11: warning: sun.net.www.protocol.http.Handler is Sun
proprietary API and may be removed in a future release
[javac] import sun.net.www.protocol.http.Handler;
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutURLConnection.java:12: warning: sun.net.www.protocol.http.HttpURLConnect
ion is Sun proprietary API and may be removed in a future release
[javac] import sun.net.www.protocol.http.HttpURLConnection;
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutURLConnection.java:21: warning: sun.net.www.protocol.http.HttpURLConnect
ion is Sun proprietary API and may be removed in a future release
[javac] public class HttpTimeoutURLConnection extends HttpURLConnection
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutURLConnection.java:54: warning: sun.net.www.http.HttpClient is Sun propr
ietary API and may be removed in a future release
[javac] protected HttpClient getNewClient( URL url ) throws IOException
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\com\velocityreviews\forums\Htt
pTimeoutURLConnection.java:58: warning: sun.net.www.http.HttpClient is Sun propr
ietary API and may be removed in a future release
[javac] protected HttpClient getProxiedClient( URL url, String s, int i
) throws IOException
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\net\sourceforge\foxtrot\pumps\
ConditionalEventPump.java:22: warning: sun.awt.SunToolkit is Sun proprietary API
and may be removed in a future release
[javac] import sun.awt.SunToolkit;
[javac] ^
[javac] C:\Users\Andreas\Desktop\kolmafia\src\net\sourceforge\foxtrot\pumps\
ConditionalEventPump.java:234: warning: sun.awt.SunToolkit is Sun proprietary AP
I and may be removed in a future release
[javac] SunToolkit.flushPendingEvents();
[javac] ^
[javac] 13 warnings
[copy] Copying 132 files to C:\Users\Andreas\Desktop\kolmafia\build
[copy] Copying 2 files to C:\Users\Andreas\Desktop\kolmafia\build
[jar] Building jar: C:\Users\Andreas\Desktop\kolmafia\dist\KoLmafia-0.jar

BUILD SUCCESSFUL
Total time: 16 seconds
C:\Users\Andreas\Desktop\kolmafia>

That's the entire output.
 
I just set this up myself, and made a change to something that was annoying me personally. Can someone take a look at the diff file I attached and see if it makes sense?

The change was adding a "save" function to the outfit command on the CLI - it seemed weird to me that it wasn't possible to save current gear to an outfit from there.

edit: Hey, pro lurking skills
 

Attachments

The change was adding a "save" function to the outfit command on the CLI - it seemed weird to me that it wasn't possible to save current gear to an outfit from there.

It is a weird thing to be missing. I'd be glad to have it, but until now I've been alright just using this:

Code:
visit_url("inv_equip.php?which=2&action=customoutfit&outfitname=Backup&pwd");
 
The attached .patch file will bold the element name that you aren't resisting via elementform when you're basement diving, in order so you can see at a glance what outfit to equip. It'll also total up the amount of damage you're going to receive and display that.

Out of interest, how many people contibute to kolmafia? And who's the leader of the project?

Oh, and you should add .diff and .patch files to the list of allowed ones :D
 

Attachments

Back
Top