Building from the SVN?

Wylin

New member
Hehe, no I didn't.. I hate restarting so I do it as little as possible.. I guess this is a time.. I'll see if it works!

EDIT: No, unfort that didn't seem to make any difference.. I also tried pointing the environmental variable at the /bin folder off of the jikes folder and that didn't work either. :(
 

dangerpin

Member
A few things to try, try putting it in a folder with a more simple file name than you might get by unarchiving.

For instance if you have a folder structure like \jikes-1.22-1.windows\bin\jikes.exe you want to make sure it is in a simply named folder structure without the dots and dashes.

I actually (windows here as you can problably see) threw jikes.exe into my system32 directory. Also when I set up my environment variable the variable is in all caps "JIKES_HOME" and the location "c:\windows\system32\" as you can see has a trailing backslash.

I know what you are saying the case of the the variable shouldn't make a difference, but experience has taught me differently.
 

Deathmax

New member
I'm stuck, when I go to my directory where I downloaded my SVN files and type ant, it says its not a recognizable command.

EDIT : I fixed that problem but 1 thing I noticed, when I compiled r5407, the title is r5401.
 

dangerpin

Member
Yeah, I'm getting the same thing with 5408 and the latest daily build.

*EDIT-Veracity has fixed this as of 5409
 

tebee

Member
Before I start playing and trying things myself does anyone know what changes I would need to make to the build.xml file to make the svnversion bit of the ant build work with Tortoise SVN under windows XP ? Svnversion does not exist on my system, I believe the equivalent programs is subwcrev.exe with Tortoise. Is it just a case of changing the program name in the file.

Tom
 

holatuwol

Developer
The build file actually copies the output of svnversion directly and appends it to the end of the name of the .jar file, and since subwcrev adds a bit more than that to the output, you can't use it with KoLmafia's build process.

As an alternative, you can either (a) download the Windows command line client from subversion.tigris.org, or (b) you can just change the default target to 'jar' instead of 'debug' so you never need any of the svn commands.
 

dangerpin

Member
I learned something new! Maybe someone else will have the same struggle.

I had always gotten some certificate errors when I did the ant daily to create my daily builds. They looked like this:

Code:
[exec] Error validating server certificate for 'https://kolmafia.svn.source
forge.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 Tue, 09 Oct 2007 22:15:07 GMT until Mon, 08 Dec 2008
23:15:07 GMT
     [exec]  - Issuer: Equifax Secure Certificate Authority, Equifax, US
     [exec]  - Fingerprint: fb:75:6c:40:58:ae:21:8c:63:dd:1b:7b:6a:7d:bb:8c:74:3
6:e7:8a
     [exec] (R)eject, accept (t)emporarily or accept (p)ermanently? svn: PROPFIN
D request failed on '/svnroot/kolmafia'
     [exec] svn: PROPFIND of '/svnroot/kolmafia': Server certificate verificatio
n failed: issuer is not trusted ([url]https://kolmafia.svn.sourceforge.net[/url])
     [exec] Result: 1

It never seemed to cause any real problems, so I had been ignoring it successfully for some time. You can see as part of that, it was trying to give me the choice of accepting the cert, but I was unsure how to respond to it.

From the directory where I build my dailies I did this at the command prompt:

svn list https://kolmafia.svn.sourceforge.net:443

It gave me the opportunity to accept the certificate and now my daily builds run MUCH faster.
 

InSinYou8

New member
Re: Using Jikes to Compile KoLmafia

[quote author=holatuwol link=topic=374.msg6155#msg6155 date=1195758146]
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!
[/quote]

I have been compiling mafia jar files for quite sometime now, actually proud I figured out how to get it to compile(on a windows 2000 laptop no doubt) . My problem is that even though I have jikes setup properly, it still uses javac. I do not see a build.properties file anywhere in the mafia structure that the svn program downloads. Any hints/tips/suggestions would be most appreciated
 

dangerpin

Member
Build properties was removed from the Mafia structure so that Hola and Veracity could have different ones as Jikes works well for H and not so much under Mac OSX Leopard for V. This was intended to allow you to add your own, I thought. This happened somewhere back in the midst of 11.9. Conceivably, you could go back to the original 11.9 release and pull that file out for your own use, it should be optimized for jikes.
 

lostcalpolydude

Developer
Staff member
So, I've been using svn and ant for several weeks now. I typically update right before I play each night. I also turn it into a .app (for OSX) before I use it, because I like how it ends up in the dock. I have all the steps for updating and creating the .jar done using a single script, and I was hoping to incorporate the steps for creating the .app into that also instead of having to open Jar Bundler. I found http://informagen.com/JarBundler/ (an older version is on sourceforge at http://sourceforge.net/project/showfiles.php?group_id=160743) that is supposed to do just that. Unfortunately, I have no idea what I'm doing with it, and my attempts at following the instructions there were useless. I was hoping that someone else here would be able to help me with that, maybe even someone that would find it useful for their own use.
 

holatuwol

Developer
If your jarbundler-1.9.jar is copied to the specified directory, the following 'jarbundler' target should generate an application bundle, delete the existing application bundle in /Applications and move the generated application bundle to /Applications.  That way, you won't have any problems accessing it with, say, Quicksilver, and the dock shortcut should remain valid without any extra work.  (I need to get to an Apple store soon-ish to get my Mac fixed...)

PHP:
<target name="jarbundler" depends="init,update,jar">

	<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler">
		<classpath>
			<fileset dir="${env.ANT_HOME}/lib"/>
		</classpath>
	</taskdef>

	<jarbundler dir="${dist}" name="KoLmafia" mainclass="net.sourceforge.kolmafia.KoLmafia" jar="${jarfile}" />
	
	<delete dir="/Applications/KoLmafia.app" />
	<move file="${dist}/KoLmafia.app" todir="/Applications" />

</target>
 

lostcalpolydude

Developer
Staff member
I put jarbundler-1.9.jar into both /Developer/Java/Ant/lib and /usr/local/ant/lib (I don't know why I put it in the second place, I did that a week ago or so when I was playing around with it, probably related to "which ant" returning /usr/local/ant/bin/ant). I copy-pasted the stuff from below and added it to the end of build.xml (right above the line with </project>). After changing to the correct directory, I'm using "svn update" followed by "ant" from Terminal. I'm not getting any .app file created, and the output in Terminal isn't any different than it was before I edited build.xml. Am I missing any steps?
 

lostcalpolydude

Developer
Staff member
Thank you so much, that works.  I changed it to have
PHP:
<jarbundler dir="${dist}" name="KoLmafia" mainclass="net.sourceforge.kolmafia.KoLmafia" jar="${jarfile}"
 icon="${lib}/limeglass.icns" />
so I could use the nice icon that comes with it.  The one thing that it still doesn't do right is show the updated version number when I open mafia (it still shows 6001 even though "svn info" tells me I have 6002).  This isn't important, since I can always use svn info if I really need the version number.  I just noticed that the Copyright Notice also says 6001.
 

pierate

New member
I'm stuck on version 5996, since ant won't build it. It complains

BUILD FAILED
Target "\" does not exist in the project "KoLmafia".
 

Raven434

Member
[quote author=dangerpin link=topic=374.msg6876#msg6876 date=1201449420]

It never seemed to cause any real problems, so I had been ignoring it successfully for some time. You can see as part of that, it was trying to give me the choice of accepting the cert, but I was unsure how to respond to it.

From the directory where I build my dailies I did this at the command prompt:

svn list https://kolmafia.svn.sourceforge.net:443

It gave me the opportunity to accept the certificate and now my daily builds run MUCH faster.
[/quote]

I was getting the same basic error messages, during my builds. I tried your suggestion, it prompted me for what I wanted to do and then got something completely different:

E:\Games\KoL\KoL Mafia Nightly Builds>svn list https://kolmafia.svn.sourceforge.net:443
Error validating server certificate for 'https://kolmafia.svn.sourceforge.net:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: *.svn.sourceforge.net
- Valid: from Tue, 09 Oct 2007 19:15:07 GMT until Mon, 08 Dec 2008 20:15:07 GMT
- Issuer: Equifax Secure Certificate Authority, Equifax, US
- Fingerprint: fb:75:6c:40:58:ae:21:8c:63:dd:1b:7b:6a:7d:bb:8c:74:36:e7:8a
(R)eject, accept (t)emporarily or accept (p)ermanently? p
svn: PROPFIND request failed on '/'
svn: PROPFIND of '/': 302 Found (https://kolmafia.svn.sourceforge.net)


I'll post the fix for this to help other folks that see similar messages.
 

asturia

Minion
Since I'm using my new pc (Windows Vista).
I can't compile any daily build anymore.
I always receive this error message:
Code:
  [javac] C:\Users\ruymenfi\Desktop\kolmafia\svn\kolmafia\src\net\sourceforge\
kolmafia\HyperlinkAdapter.java:85: cannot find symbol
  [javac] symbol : method alert(java.lang.String)
  [javac] location: class net.sourceforge.kolmafia.swingui.GenericFrame
  [javac]               GenericFrame.alert( "Ironically, Java do
es not support Javascript." );

It also doesn't matter which jdk I'm using.
Any ideas on what's causing this?
 
Just a off the wall thought, you might have another version of java with settings interfering with the version you manually installed.

If you think this might be the case:
1: uninstall all versions of java
2: restart, and check for lingering versions If there are any, return to step 1
3: start installing java from scratch.
4: set up your system as you have in the past for building Kolmafia

Sometimes OEM installs of software are upgrades of older software. You can easily uninstall the upgrade, and leave the original version. Sometimes the older version will not appear in the control panel after uninstall until you restart. This tends to happen when a newer version of the software is released and needed while they are testing the software package meant for your machine.

Anyway that is just my thoughts on the problem. Holatuwol or someone else might have experienced this before, and might be able to tell you a definite cause of the problem.
 
Top