Building from the SVN?

Ok, I am completely confused:

1: I don't know how to download Apache Ant, there install page is extremely unhelpful and uninformational, the main things, is what do I use to execute these commands?! Is it simply Command Prompt?

2: I do not know where to download this JDK 1.5, if 1.5 is the LATEST version... I found this: https://sdlc1e.sun.com/ECom/EComActionServlet;jsessionid=EB6D16AB289D53937E4AAC028C7C3BDF But that says "JDK version 6"...

3: "SVN client" is not on that page... I assume you mean SVN 1.4.4 setup?
 
Here's my output from revision 4675, also, typing "svnversion -n" correctly displays "4675". However, I also get the Kolmaifa-${revision} output for the file name.
Code:
C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN>ant daily
Buildfile: build.xml

clean:
   [delete] Deleting directory C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\build

update:
     [exec] Error validating server certificate for 'https://kolmafia.svn.sourceforge.net:443':
     [exec]  - The certificate is not issued by a trusted authority. Use the
     [exec]    fingerprint to validate the certificate manually!
     [exec] Certificate information:
     [exec]  - Hostname: *.svn.sourceforge.net
     [exec]  - Valid: from Fri, 27 Oct 2006 18:05:58 GMT until Sun, 28 Oct 2007 19:05:58 GMT
     [exec]  - Issuer: Equifax Secure Certificate Authority, Equifax, US
     [exec]  - Fingerprint: f2:6c:fe:bb:82:92:30:09:72:dd:1c:b3:e7:56:69:c7:7a:df:67:3e
     [exec] (R)eject, accept (t)emporarily or accept (p)ermanently? svn: PROPFIND request failed on '/svnroot/kolmafia'
     [exec] svn: PROPFIND of '/svnroot/kolmafia': Server certificate verification failed: issuer is not trusted ([url]https://kolmafia.svn.sourceforge.net[/url])
     [exec] Result: 1

version:
     [echo] Current revision: 4675

init:
    [mkdir] Created dir: C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\build

daily:

init:

build:
    [javac] Compiling 239 source files to C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\build
     [copy] Copying 85 files to C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\build
     [copy] Copying 5 files to C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\build
      [jar] Building jar: C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\dist\KoLmafia-${revision}.jar

BUILD SUCCESSFUL
Total time: 18 seconds
C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN>
 
Code:
      [jar] Building jar: C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\dist\KoLmafia-4677.jar
Success! Thanks. And, it is correct that the only difference between the alpha and daily target, is that the daily puts the revision number in the file name, ya?
 
[quote author=macman104 link=topic=374.msg5447#msg5447 date=1186640764]
And, it is correct that the only difference between the alpha and daily target, is that the daily puts the revision number in the file name, ya?
[/quote]

The daily target also does an update from the repository before being generated.
 
[quote author=holatuwol link=topic=374.msg5448#msg5448 date=1186641869]


The daily target also does an update from the repository before being generated.
[/quote]

Awesome thanks hola :) it works fine now.
 
I always update my local repository by hand using tortoisesvn.
But from what I read if I use the command "ant daily" it will automatically download the latest updates and build the version with the correct version number already in the name.

Now can someone explain me how to install the cli svn client or where to put the svn files?
I can't figure it out at all.
 
Ok, I updated to the latest version of TortoiseSVN and reinstalled Subversion using svn-1.4.4 and that fixed my problem completely. Now when I do ant daily I get the proper output.
 
Help compiling mafia sourcecode in OS X

I'm using OS X 10.4.10 (Intel)
I have Xcode v 2.2.1 and i believe I also installed all the developer tools
Java J2SE 5.0 Release 4 for Mac OS X Tiger (At least this is what the java webpage by apple says is included, but i don't know how to check)
KoLmafia 11.6

I've done some (single source file) java on a PC a few years ago, and recently a intro semester to C (on a mac, again single file programs, gcc to compile)

I managed to figure out how to use ant to make a jar file (i think). It gave an error the following error:
version:
[exec] Execute failed: java.io.IOException: svnversion: not found
[echo] Current revision: 0
but still said build successful at the end. Before it would run i did have to create the folder dist, or it wouldn't work

I then used jar bundler w/ the default options to make a .app file. This for the most part has worked. But it does give some strange behavior. When first run it created all it's support folders directly in my applications folder, instead of in ~/Library/Application Support like the .dmg file did. For some reason it also doesn't allow me to scroll through the drop downs in my equipment manager, and it will only accept the first letter when I try to type the name of the equipment (ie if i type lucky the first piece of equipment that starts with y is selected).
My question is how do I compile this to behave more like a "normal" .app file instead of like a windows program? Are there some special arguments to tell it to make a mac specific .jar?

Thank You and sorry for the long post
 
Re: Help compiling mafia sourcecode in OS X

[quote author=smanoli link=topic=374.msg5738#msg5738 date=1189653745]
My question is how do I compile this to behave more like a "normal" .app file instead of like a windows program?  Are there some special arguments to tell it to make a mac specific .jar?
[/quote]

Unfortunately, the Java implementation on OS X behaves more like a Linux program than a "normal" .app, so there's nothing you can do about the typing in a dropdown behavior. It's just the way things were implemented.

If you want all your files in ~/Library/Application Support (which is only useful if you don't use any scripts, which is true for most KoLmafia users outside of this forum), then when you're packaging the .app in JAR Bundler, add a key/value pair i with the key being "app.name" and anything you want being the value. KoLmafia will check for that key, and if it's present, it will drop everything in ~/Library/Application Support.
 
[quote author=holatuwol link=topic=374.msg5739#msg5739 date=1189666199]

If you want all your files in ~/Library/Application Support (which is only useful if you don't use any scripts, which is true for most KoLmafia users outside of this forum), then when you're packaging the .app in JAR Bundler, add a key/value pair i with the key being "app.name" and anything you want being the value. KoLmafia will check for that key, and if it's present, it will drop everything in ~/Library/Application Support.
[/quote]

Thank you, is there a reason someone who uses scripts would find it less useful to have their files in ~/Library/Application Support (other than a potentially longer path name)? I just find this easier as it's the "expected" behavior for OS X programs so it's where I think to look.

[quote author=holatuwol link=topic=374.msg5739#msg5739 date=1189666199]

Unfortunately, the Java implementation on OS X behaves more like a Linux program than a "normal" .app, so there's nothing you can do about the typing in a dropdown behavior. It's just the way things were implemented.
[/quote]

I actually figured this one out on accident, (the reason I asked was the .dmg I downloaded before did have this behavior by default) it seems when I was making my .app before I was telling it to use Java VM 1.4* instead of 1.4+, switching to 1.4+ solved this problem. Just thought I put this out here in case anyone else was having the same problem.
 
[quote author=smanoli link=topic=374.msg5746#msg5746 date=1189728540]
Thank you, is there a reason someone who uses scripts would find it less useful to have their files in ~/Library/Application Support (other than a potentially longer path name)?
[/quote]

I believe the intent of ~/Library/Application Support/ is to be a system files folder, not a user files folder.  Scripts are (for all intents and purposes) user files, and they don't belong there.  As a side note, if you want JAR file to behave like the DMG without having to create an application bundle, this is how you do it from the command-line:

java -Dapp.name=KoLmafia -jar KoLmafia.jar

What I've gone ahead and done is made it so that the "exec" target (basically, just type "ant exec") automatically adds this environment variable.  So, feel free to use "ant exec" if you want what you consider to be default OSX behavior.
 
Using Jikes to Compile KoLmafia

Message to people using Linux or Windows.

Since KoLmafia aims for Java 1.4.2 compliance, it turns out we can take advantage of a faster compiler than the Sun compiler for Java: namely, the now-abandoned Jikes project.

To setup Jikes, download the package appropriate for your operating system, set your JIKES_HOME environment variable, open up the new build.properties in the root KoLmafia folder, put a # in front of the line that says to use the modern compiler, and remove the # in front of the line that says to use the jikes compiler. Poof, now ant will use jikes to compile KoLmafia.

As a side note, even if you opt not to use Jikes, you might have benefitted from the code being made easier to compile.

Before making KoLmafia compatible with Jikes, compilation on my system took 20-40 seconds with the Sun compiler, pending on what else was running at the time. Right now, by simplifying the code to adhere to what Jikes needs it to look like, it only takes 10 seconds on my system to compile using the Sun compiler.

However, to maybe convince you to switch, it only took 7 seconds on my system to compile using Jikes. >.> Win!
 
Code:
Revision: 5397
Author: shwei
Date: 8:56:01 AM, Monday, December 17, 2007
Message:
Default to Jikes
----
Modified : /build.properties

Looks like it is time to learn this new fangled thingamajig. (/me shakes cane at all the whippersnappers)
 
[quote author=dangerpin link=topic=374.msg6348#msg6348 date=1197925131]
Code:
Revision: 5397
Author: shwei
Date: 8:56:01 AM, Monday, December 17, 2007
Message:
Default to Jikes
----
Modified : /build.properties

Looks like it is time to learn this new fangled thingamajig. (/me shakes cane at all the whippersnappers)
[/quote]

Jikes compiles way faster for me so yay!
 
I'm stuck.. I downloaded the jikes .zip file for windows, extracted the files, make a jikes_home variable with the path to my extracted files, and now when I try to build I get a compile error. Did I miss a step?
 
Back
Top