PDA

View Full Version : Building from the SVN?



bluestars
08-24-2006, 11:24 PM
Okay, I might be a total idiot here, but how would I go about downloading the latest KoLmafia code from the SVN and building it? I have the JDK and basic computer skills, although no java knowledge. Thanks![br]Posted on: August 24, 2006, 04:56:28 PM[hr]I figured it out! Ahh, that feels good. :) Anyway, for other aspiring devel noobs like myself, here's a quick intro on what to do running under WinXP/2k. If I made any mistakes, feel free to correct me.

First, grab a copy of the following software:
Apache Ant (http://ant.apache.org/bindownload.cgi)
SVN Client (Windows: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
JDK 1.4 or later (1.5.0 is the latest) (http://java.sun.com/ , you can find it)

Next, find a directory where you want the builds to go. SVN will create a subdirectory. Open command prompt ("cmd" for XP/2k users) and type:
svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia

Once it finishes, go to the subdirectory and type:
ant

Then look under the dist folder for the .jar file.

Note: Ant can be a bit tricky to install. There's a guide at the ant website though. If you're having problems with that step, post here and I'll explain more in detail.

EDIT: Edited address for Java and made it clicky -Daychilde
Edited to update to the correct url for svn, the previous one quit working. -efilnikufecin

efilnikufecin
12-07-2006, 08:40 AM
JDK 1.4 or later (1.5.0 is the latest) (sun.java.com, you can find it)



It appears to actually be java.sun.com

efilnikufecin
01-20-2007, 09:29 AM
double posting here, but look how old that previous post is.

I moved this topic here, and set it sticky so that it could easily be found for future reference. I'm sure everyone can see why.

( just so you know, it's not double-posting if it's been more than 24 hours... also, now that I have the merge-double-post mod in place, unless a glitch happens upon posting (happens upon rare occasion), nobody *can* double-post anymore :D -Daychilde )

Wylin
01-21-2007, 05:31 PM
Open command prompt ("cmd" for XP/2k users) and type:
svn co https://svn.sourceforge.net/svnroot/kolmafia kolmafia

Once it finishes, go to the subdirectory and type:
ant


I have a batch file made called update.bat.. it goes a little something like this:

svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia

cd kolmafia

ant

my snv co line is slightly different.. it seems to work for me, does it matter?

holatuwol
01-21-2007, 06:44 PM
Technically, no, but kolmafia.svn.sourceforge.net is the URL that Sourceforge tells us we should use.

Once you've checked out KoLmafia once, you can change your update.bat file to say something like "cd kolmafia" followed by "svn update". A clean checkout can help if you're having some weird problems, but update is recommended to save time/bandwidth.

Ethelred
03-09-2007, 07:38 AM
I don't know anything about ant, but was able to build a jar file using the instructions above. So first of all, thanks for that. Now, I'd like to go one step further and build a MacOS X application and .dmg file. Can someone please explain how to do that? As I say, I know nothing about ant, but I looked at the build.xml file and didn't see anything there that looked promising, but maybe I just missed it. I don't actually know that much about building MacOS X applications, either, so I don't know if all I need is the proper build.xml "descriptions" or if some other process would be needed.

Thanks, as they say, in advance, for any help anyone can provide with this.

holatuwol
03-09-2007, 01:10 PM
If all you need is the application bundle:

Load up JAR Bundler, located in "/Developer/Applications/Java Tools"
Select the KoLmafia.jar generated in a build
Drag and drop the "limeglass.icns" file in the "lib" folder into the icon section
Make sure the Java runtime compatibility is 1.4+
Add a key/value pair, with "app.name" being the key, and anything you want being the value.
Generate the application bundle

[br][br]If you actually need the DMG for one reason or another:

Create a "KoLmafia-x.x" folder
Inside the "KoLmafia-x.x" folder, create a "KoLmafia" folder
Also inside the "KoLmafia-x.x" folder, create a symbolic link to "/Applications"
Load up JAR Bundler, located in "/Developer/Applications/Java Tools"
Select the KoLmafia.jar generated in a build
Drag and drop the "limeglass.icns" file in the "lib" folder into the icon section
Make sure the Java runtime compatibility is 1.4+
Generate the application bundle inside of the "KoLmafia" folder created earlier
Drag and drop the *"KoLmafia-x.x" folder onto Disk Utility
Save the .dmg file where it'll be easy to access

th3y
07-19-2007, 04:16 PM
I use Windows XP and sometimes build from the SVN to get the latest fixes/updates.

I noticed that the build-with-ant process ends up creating a .jar file, whereas the "official" versioned releases are .exe .

Are the advantages to using a compiled .exe instead of a .jar (which I presume is intrepreted) significant? I'm sure the "performance" of the .exe is much better, but given that practically everything you want to do with KOLmafia requires an external-round-trip response from the KOL server, I suspect that the performance difference may not be noticeable in practical use.

But if the advantages are significant, could someone give some hints as to how to build the exe? I guess it's analogous to the Mac example above.

Thanks a bunch,
-TH3Y

holatuwol
07-20-2007, 01:46 AM
Are the advantages to using a compiled .exe instead of a .jar (which I presume is intrepreted) significant? * I'm sure the "performance" of the .exe is much better, but given that practically everything you want to do with KOLmafia requires an external-round-trip response from the KOL server, I suspect that the performance difference may not be noticeable in practical use.


The EXE simply asks Java to run the JAR wrapped (http://jsmooth.sourceforge.net/) inside it. *In other words ... if you're interested in speed, you're better off with the JAR.

Wylin
07-20-2007, 03:38 AM
I hadn't been paying 100% attention for awhile, I used to check the svn revisions at the following link before I updated: http://svn.sourceforge.net/viewvc/kolmafia?view=rev

Now the link doesn't work for me.. Where do I go to view the latest updates? I tried browsing to the SVN but it seemed fairly foreign to me.

holatuwol
07-20-2007, 05:21 AM
http://kolmafia.svn.sourceforge.net/viewvc/kolmafia?view=rev

fewyn
08-08-2007, 04:17 PM
I've been trying to make ant build it and list the rev number in the file name as late, It comes out as KoLmafia-${brevision}.jar I was using "ant daily" under Gentoo, any ideas?

holatuwol
08-08-2007, 05:57 PM
What does the following say?


svnversion -n .

fewyn
08-08-2007, 06:12 PM
What does the following say?


svnversion -n .


It goes



shiro ~ # svnversion -n
exportedshiro ~ #

holatuwol
08-08-2007, 06:40 PM
From the KoLmafia build directory. :P

fewyn
08-08-2007, 06:54 PM
From the KoLmafia build directory. :P


Oops =p



shiro kolmafia # svnversion -n
4671shiro kolmafia #

hippymon
08-08-2007, 08:10 PM
First, grab a copy of the following software:
Apache Ant (http://ant.apache.org/bindownload.cgi)
SVN Client (Windows: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
JDK 1.4 or later (1.5.0 is the latest) (http://java.sun.com/ , you can find it)

Next, find a directory where you want the builds to go. SVN will create a subdirectory. Open command prompt ("cmd" for XP/2k users) and type:
svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia

Once it finishes, go to the subdirectory and type:
ant

Then look under the dist folder for the .jar file.

Note: Ant can be a bit tricky to install. There's a guide at the ant website though. If you're having problems with that step, post here and I'll explain more in detail.


I have the software stated, but when I do "svn co http://kolmafia.svn.sourceforge.net/viewvc/kolmafia?view=rev kolmafia" it returns 'svn' is not recognized as a command...

I use Windows Vista, is that the problem? How do I do this??

fewyn
08-08-2007, 08:21 PM
I have the software stated, but when I do "svn co http://kolmafia.svn.sourceforge.net/viewvc/kolmafia?view=rev kolmafia" it returns 'svn' is not recognized as a command...

I use Windows Vista, is that the problem? How do I do this??


That's if you are doing it from the command line, if you are using tortisesvn you need to create a folder somewhere right click on it, select svn checkout and put https://kolmafia.svn.sourceforge.net/svnroot/kolmafia in the box and click ok at the bottom and it should grab it all.

hippymon
08-08-2007, 10:47 PM
Note: Ant can be a bit tricky to install. There's a guide at the ant website though. If you're having problems with that step, post here and I'll explain more in detail.

I have tried everything I can think of and I have NO clue what I am doing, how exactly do you install ant?

efilnikufecin
08-08-2007, 10:58 PM
read the directions?
http://ant.apache.org/manual/install.html#installing

Pay close attention to the sections: "Windows and OS/2" and "The CLASSPATH environment variable"

hippymon
08-08-2007, 11:49 PM
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=EB6D16AB289D53937E4AA C028C7C3BDF But that says "JDK version 6"...

3: "SVN client" is not on that page... I assume you mean SVN 1.4.4 setup?

efilnikufecin
08-09-2007, 12:05 AM
1: http://www.mirrorgeek.com/apache.org/ant/binaries/apache-ant-1.7.0-bin.zip
yes, Command prompt

2: http://java.sun.com/javaee/downloads/index.jsp click download with JDK, newer versions work.

3: yes

macman104
08-09-2007, 03:06 AM
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.
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 (https://kolmafia.svn.sourceforge.net)
[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>

holatuwol
08-09-2007, 06:20 AM
Interesting. I've committed a potential fix.

macman104
08-09-2007, 06:26 AM
[jar] Building jar: C:\Documents and Settings\Josh\Desktop\KoLMafia\My Edited SVN\dist\KoLmafia-4677.jarSuccess! 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?

holatuwol
08-09-2007, 06:44 AM
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?


The daily target also does an update from the repository before being generated.

fewyn
08-09-2007, 02:33 PM
The daily target also does an update from the repository before being generated.


Awesome thanks hola :) it works fine now.

asturia
08-15-2007, 08:29 PM
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.

dangerpin
08-16-2007, 12:42 AM
When I use ant daily it names it Kolmafia-0.jar so perhaps it is "ant daily x" where x is the build number? I will try tomorrow and see.

I never really get the hang of Subversion by itself on my machine so I'm probably not the best to answer this, but there is what looks like a pretty good walkthrough of the subversion cli, installation and where it will put he files here

https://www.projects.dev2dev.bea.com/Subversion%20Clients/CommandLineSVN.html

efilnikufecin
08-16-2007, 01:02 AM
When I use ant daily I get "KoLmafia-${revision}.jar" exactly. No version number.

dangerpin
08-16-2007, 01:28 AM
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.

smanoli
09-13-2007, 03:22 AM
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

holatuwol
09-13-2007, 06:49 AM
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?


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.

smanoli
09-14-2007, 12:09 AM
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.


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.




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.


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.

holatuwol
09-14-2007, 02:17 AM
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 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.

holatuwol
11-22-2007, 06:02 PM
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 (http://jikes.sourceforge.net/) 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!

dangerpin
12-17-2007, 07:58 PM
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)

fewyn
12-17-2007, 10:30 PM
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)


Jikes compiles way faster for me so yay!

Wylin
12-17-2007, 10:54 PM
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?

dangerpin
12-17-2007, 11:40 PM
Silly question, but did you restart after the environment setting change. It only gets those at boot.

Wylin
12-17-2007, 11:44 PM
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
12-18-2007, 06:08 AM
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
12-18-2007, 01:43 PM
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
12-18-2007, 03:01 PM
Yeah, I'm getting the same thing with 5408 and the latest daily build.

*EDIT-Veracity has fixed this as of 5409

tebee
01-20-2008, 07:56 PM
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
01-24-2008, 01:11 AM
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
01-27-2008, 02:57 PM
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:


[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 (https://kolmafia.svn.sourceforge.net)
[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
02-01-2008, 04:10 AM
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 (http://jikes.sourceforge.net/) 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!


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
02-01-2008, 01:19 PM
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
03-20-2008, 06:53 PM
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
03-20-2008, 07:55 PM
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...)



<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
03-20-2008, 08:18 PM
I put jarbundler-1.9.jar into both /Developer/Java/Ant/lib and /usr/local/ant/lib (I don&#039;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 &lt;/project&gt;). After changing to the correct directory, I&#039;m using "svn update" followed by "ant" from Terminal. I&#039;m not getting any .app file created, and the output in Terminal isn&#039;t any different than it was before I edited build.xml. Am I missing any steps?

holatuwol
03-20-2008, 08:38 PM
Type 'ant jarbundler'

lostcalpolydude
03-20-2008, 09:28 PM
Thank you so much, that works. *I changed it to have

<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
03-22-2008, 08:38 PM
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
04-01-2008, 03:42 PM
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.


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.

holatuwol
04-02-2008, 04:45 PM
svn list https://kolmafia.svn.sourceforge.net:443/svnroot/kolmafia/

Raven434
04-03-2008, 03:32 PM
Gracias Warrior of Light!

;-)

asturia
06-19-2008, 08:01 AM
Since I&#039;m using my new pc (Windows Vista).
I can&#039;t compile any daily build anymore.
I always receive this error message:

[javac] C:\Users\ruymenfi\Desktop\kolmafia\svn\kolmafia\sr c\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&#039;t matter which jdk I&#039;m using.
Any ideas on what&#039;s causing this?

efilnikufecin
06-19-2008, 10:01 AM
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.

tebee
12-14-2008, 10:24 PM
Before I try and work this out for myself has anybody tried building mafia from Eclipse using Subclipse for the subversion side?

Veracity
12-14-2008, 10:28 PM
Yes. It works fine.

tebee
12-22-2008, 03:26 PM
Yes. It works fine.


Yes, your right, with only one minor problem - Ant was using the wrong JAVA_HOME - It worked perfectly.

No my next question is does anybody know how to get Svnversion working with it?

tebee
12-27-2008, 08:41 PM
OK to answer my own question, in case anyone else has the same problem. I downloaded the CollabNet command line version of SVN. Unfortunately this inserts itself into the path and adds it&#039;s own version of SVN which seems to produce a working copy incompatible with subeclipse.

I end up deleting manually my working copy version of the mafia files and renaming the CollabNet svn.exe.

Next question - Subeclipse only seems to give you an option to checkout the entire kolmafia tree and overwrite all of my working copy - is there a way to just get the changes?

Tom

Bale
03-25-2009, 09:49 PM
Followed the instructions in the first post and I'm now compiling builds without any trouble at all. I've got a rather superficial question.

I've noticed that when daily builds are posted by dangerpin, asturia or teebee they always list a changelog in the same format. I rather doubt that this is copy/pasted from each individual entry here (http://kolmafia.svn.sourceforge.net/viewvc/kolmafia?view=rev), so could someone tell me where this found?

Yeah, it's a superficial question, but I'm curious. I thought I'd get a changelog like that when I built my own jar.

lostcalpolydude
03-25-2009, 09:56 PM
You can use the command "svn log" to get a changelog. You probably want "svn log --limit X" (where X gives you the last X revisions) so you don't get all 7000+ changes.

Bale
03-25-2009, 10:06 PM
You can use the command "svn log" to get a changelog. You probably want "svn log --limit X" (where X gives you the last X revisions) so you don't get all 7000+ changes.
Thank you. That was certainly useful. Still another increasingly superficial question. "svn log --limit 4 > logfile.txt" gave me this:


------------------------------------------------------------------------
r7108 | veracity0 | 2009-03-25 15:33:55 -0400 (Wed, 25 Mar 2009) | 6 lines

Optimization for switch: if the labels are all constants, use a map to quickly
and efficiently map the constant into the appropriate code offset to execute.

Regardless of whether all labels are constants, check those that are for
duplicates and give an error at script parse time if you give a duplicate.

------------------------------------------------------------------------
r7107 | veracity0 | 2009-03-25 13:54:54 -0400 (Wed, 25 Mar 2009) | 2 lines

Use ISO-8859-1 charset for chat requests, not UTF-8

------------------------------------------------------------------------
r7106 | veracity0 | 2009-03-25 11:10:50 -0400 (Wed, 25 Mar 2009) | 9 lines

Fix recipe for 17-alarm saucepan: we had it listed under 17-Alarm saucepan.
That's consistent with the 5-Alarm saucepan, but it's not correct name.

When your Wild Hare gives you an extra rollover adventure, tally it in the
"extraRolloverAdventures" setting, which is (obviously) cleared at rollover.
The little pop-up on the sidepane showing modifiers adds this to the Rollover
Advs number from equipment, to give you the total number of extra adventures
you get at rollover.

------------------------------------------------------------------------
r7105 | jasonharper | 2009-03-25 05:49:17 -0400 (Wed, 25 Mar 2009) | 2 lines

Add Typical Tavern swill and its byproducts, with preliminary consumption data.

------------------------------------------------------------------------

What they post looks like this:


Revision: 7104
Author: jasonharper
Date: 21:00:52, dinsdag 24 maart 2009
Message:
Adds an override for handling expiring counters during automated adventuring.
Set counterScript to the name of an ASH script containing a function:
boolean main( string name, int remain )
name - the label of the expired counter, "Fortune Cookie" for example.
remain - the number of turns remaining, typically 0 but can be higher if
adventuring in an area that takes multiple turns.
return value - false to allow the counter warning to appear as normal,
aborting the adventure request; true to continue the request with no warning.
----
Modified : /src/net/sourceforge/kolmafia/request/GenericRequest.java

Revision: 7103
Author: veracity0
Date: 20:36:01, dinsdag 24 maart 2009
Message:
The Clownlord Beelzebozo
----
Modified : /src/data/combats.txt
Modified : /src/data/monsters.txt

Revision: 7102
Author: jasonharper
Date: 8:01:35, dinsdag 24 maart 2009
Message:
Add support for items that require knowledge of a recipe to craft. Such
items are indicated by a preference of the form "unknownRecipe<itemId>" in
defaults.txt, with a value of true. The value will be changed to false,
allowing the item to be considered creatable, in the following cases:
* the recipe is read,
* the item was successfully crafted via the relay browser, or
* the item was seen on a crafting discoveries page.
----
Modified : /src/data/defaults.txt
Modified : /src/net/sourceforge/kolmafia/KoLmafiaCLI.java
Modified : /src/net/sourceforge/kolmafia/StaticEntity.java
Modified : /src/net/sourceforge/kolmafia/persistence/ConcoctionDatabase.java
Modified : /src/net/sourceforge/kolmafia/request/CreateItemRequest.java
Modified : /src/net/sourceforge/kolmafia/request/UseItemRequest.java



The former suits my needs well enough, but I'd still like to know why it is different.

dangerpin
03-26-2009, 02:10 AM
I use Tortoise SVN to get the format of the changelog, which is what Asturia also uses, last I checked. Tortoise has a lot of nice features that I appreciate and I think the log looks much cleaner.

Though if you, or anyone else, feels the desire to post an update I think the differences are, as you said, superficial.

Bale
03-26-2009, 04:11 AM
Thank you. :D

tebee
04-07-2009, 07:55 PM
My version comes online directly from Sourceforge's viewvc at this URL

http://kolmafia.svn.sourceforge.net/viewvc/kolmafia/?view=log

Bale
04-07-2009, 09:30 PM
I'm currently enjoying TortoiseSVN whose searchable changlogs have already proven useful, but thanks for the info. I didn't know that sourceforge could display it that way.

dangerpin
04-15-2009, 04:49 AM
I'm having problems building 7161. I did update TortoiseSVN, which has caused problems in the past, but I had several good builds since then.

Is it just me or is 7161 different in some way?

Bale
04-15-2009, 05:11 AM
I'm afraid I'm having no trouble with 7161. I could post it if you like, though it doesn't quite seem like 1 revision is enough for a new thread in the unofficial builds forum.

I used:

TortoiseSVN-1.6.0.15855 to perform the update.
apache-ant-1.7.1-bin built the jar
Slik-Subversion-1.6.0-win32 called by ant.


Perhaps the new version of Tortoise isn't compatible with the old version of Tortoise? You could always delete the svn and download it from scratch to see if that helps.

dangerpin
04-15-2009, 08:29 AM
Thanks for the info Bale, must be a setting on my side. Looks like time to update everything and clean it all up.

dangerpin
04-16-2009, 01:38 AM
Thanks for mentioning Slik Subversion, I was having some issues with my subversion being out of date and was tired of dealing with all the different options and the varying things they did or did not support.

Slik fixed this all up and was even nice enough to insert itself into my Environment Path Variable, which I sometimes forget.

Bale
04-16-2009, 05:03 AM
Glad to help. It was easy for me to account for everything since I only just figured out how to get everything working together compatibly.

By the way, is there some setting somewhere that causes the version number to be automatically appended to the filename or do you add it manually also?

dangerpin
04-16-2009, 03:16 PM
"Ant daily" as opposed to just "ant"

Bale
04-16-2009, 09:00 PM
Thanks. I probably won't use it since it would complicate the part of my batchfile that copies the file into my playing directory (which is more common than posting it here), but it is nice to know.

dangerpin
04-16-2009, 10:09 PM
It only creates one jar file, I just use....


move *.jar... to my mafia directory.

Or maybe you have something different going on.

/me zips mouth and stops trying to troubleshoot.

Bale
04-16-2009, 10:30 PM
It only creates one jar file, I just use....


move *.jar... to my mafia directory.

Or maybe you have something different going on.

/me zips mouth and stops trying to troubleshoot.

Oh. You're right. I was concerned about my shortcut not working and stuff, but all I need is

copy C:\SVN\kolmafia\dist\*.jar C:\kolmafia\kolmafia.jar
then it will even have the same name as usual. Silly me. Thank you so MUCH!

bumcheekcity
06-19-2009, 08:52 AM
What's the best way to connect to the SVN and cock about with the code under Ubuntu? Also, is there an easy way to connect using Tortoise CVS in Windows? We use Tortoise at work, you see, and I can't install other programs.

And if I actually manage to do anything useful, how are the changes added to the actual KolMafia? Is there some way of submitting changes, or anything?

matt.chugg
07-06-2009, 07:39 AM
How come whenever I build using "ant daily" it adds an "M" at the end of the file name (KoLmafia-7443M.jar) ?

jasonharper
07-06-2009, 07:54 AM
You've got a modified file somewhere - "svn status" will list the files you have that don't match the version from the repository, "svn diff" will show you the exact changes you've made.

matt.chugg
07-06-2009, 08:43 AM
You've got a modified file somewhere - "svn status" will list the files you have that don't match the version from the repository, "svn diff" will show you the exact changes you've made.

ahhh! thanks :)

its my build.bat, i've moved it out of the working copy folder (stupid place to put it!) and added a line to cd to right place first!

it should be ignored anyway, but I think its counting it as a modification anyway

fronobulax
02-08-2010, 05:12 PM
This is just a heads up and not a complaint. I use NetBeans to build and debug mafia. Those of you who don't can stop here. The 8098 update uses a new library, HtmlCleaner. The Subversion client as configured plugged in to NetBeans did not download the HtmlCleaner jar file, nor the updated build.xml. Consequently the code would not compile. The solution was to manually download the jar file and explicitly add it as a library to the project. Clearly an issue with my choice of IDE and tools, and not with mafia ;)

alphacow
03-03-2010, 05:05 PM
Might I suggest to the opening poster that he include a link to the "fink" library to make things easier (at least, for mac users)? Using fink, installing ant is as simple as

fink install ant-base

I haven't checked, but I assume that the JVC is also in the fink library.

One trouble-shooting thing to potentially avoid: after running the above fink command, close and re-open a new terminal window. This forces a re-load the ~/.profile file. (You can, of course, also reload it manually.)

bordemstirs
11-08-2010, 09:30 PM
As unnecessary as it has been declared, I'm trying to set up Jsmooth to get an exe from this, but it's failing. I've added the jar, I think I may just not be choosing the correct main class.
Currently I have it set to net.sourceforge.kolmafia.KoLmafia
And I'm using Windowed Wrapper. Are there any other options I should specify to make this work?

Or, instead, could someone perhaps explain why the jar runs just fine in Directory1 but refuses to open in Directory2, -unless- I delete the settings folder which seems weird because the exe still runs fine without erasing my stuff.

Veracity
11-08-2010, 10:23 PM
Just use "ant jsmooth".

bordemstirs
11-09-2010, 03:04 AM
Well. That was far simpler. Thank you!
*rocks out*

coaster3000
11-23-2010, 11:38 PM
I can't get it to update. how do i make the svn command work in dos / command line... for tortoise. It has to be some system variable for it.. but i don't know...


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

xKiv
11-23-2010, 11:55 PM
1) Are you sure you have the tortoise *SVN* client? As opposed to the tortoise *CVS* client. Those are two different things.
2) The svn executable must be on your PATH (i.e., in one of the directories listed in your PATH environment variable); I am no longer sure how to check/change that in windows/dos (or in the current directory, in case of dos - but that's not necessarily the directory to which you are dumped after the error)
3) Does the tortoise svn client even have an executable *named* svn.exe? (or svn.com or svn.bat or svn.cmd)

Theraze
11-24-2010, 01:02 AM
Tortoise, no. Cygwin has svn.exe though... there's also other free options, but that's probably the easiest.

Winterbay
11-24-2010, 05:25 AM
2) The svn executable must be on your PATH (i.e., in one of the directories listed in your PATH environment variable); I am no longer sure how to check/change that in windows/dos (or in the current directory, in case of dos - but that's not necessarily the directory to which you are dumped after the error)


That is easy. Just open up a command prompt and type "path" and it'll tell you what you have in your PATH-variable.

Adding a directory to the path is done by typing


path %PATH%;C:\your new directory


(by having %path% you make sure that the old path stays there and that you just add a new one)

Theraze
11-24-2010, 05:38 AM
Suggestion: When adding new paths, put the semicolon on the end as well. Else, you may end up screwing yourself the next time you try to follow those directions and both of your additions will fail.

For that matter, in most cases, the path ends in a semi-colon, so you don't want to do %PATH%;<newpath>, you just want %PATH%<newpath>; but that depends on having done it correctly before...

Winterbay
11-24-2010, 06:33 AM
True, the directions in the help might've had %PATH% on the end for a reason :)

Grotfang
11-24-2010, 11:37 AM
I can't get it to update. how do i make the svn command work in dos / command line... for tortoise.

SVN can be troublesome to install the first time if you aren't used to it. Personally, I blame the lack of good, clear online guides -- too much info is available for server installations without clearly differentiating.

The advice above is all correct and sound, but I don't know your level of knowledge, so will go back to the basics. If you have installed tortoiseSVN, then well done! It's a useful client, especially if you plan on modifying the code yourself. However, it does expect you to have SVN already on your machine. If all you have done is install tortoise, you won't have SVN.exe on your machine.

Theraze has already mentioned cygwin and I would strongly recommend that. Not only do you get access to svn.exe, but you also get a whole host of other goodies, such as diff and scp that can be useful, depending on what it is you do. The other option is to download and install one of many independent versions. I personally like SlikSVN (http://www.sliksvn.com/en/download), if you are using windows, but they are all much the same.

The second thing to check is that your PATH variables point to the relevant folder. Again, cygwin is useful, because if you whack a reference in to that then you don't have to worry about doing it again if you suddenly decide diff would be useful. However, it doesn't have a character limit that I've ever hit, so don't worry too much.

If you use windows 7 (and possible vista) open your environment variables window. Go to Control Panel, System and Security, System, then click on Advanced System Settings (on the left) to open the System Properties window. Go to the "Advanced" tab (you may be already on it) and click on "Environment Variables". Look at the lower box. It should say "System Variables". Select the variable that is called "Path" and click Edit.

Go to the end of the line, and now you need to add a pointer to the directory that contains svn.exe. All path references need to be seperated with a semi-colon. Using SlikSVN as the example then, I would add the following to my Path:


C:\Program Files\SlikSvn\bin\;

To give you an example, on my netbook (the machine I'm using right now) I do not have cygwin installed and my path looks like this:


C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoo t%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowe rShell\v1.0\;C:\Program Files\EgisTec MyWinLocker\x86;C:\Program Files\EgisTec MyWinLocker\x64;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin\; C:\Program Files\ant\bin\;C:\Program Files\Windows Live\Shared

Hopefully you can see tortoiseSVN, ant and SlikSVN all feature. Tortoise SVN and ant (I think) added themselves on installation. SlikSVN I had to do manually.

Hope that's been of some use.

coaster3000
11-24-2010, 06:02 PM
Thanks that helped a lot. :)

bordemstirs
01-23-2011, 07:34 AM
When I use "ant jsmooth" to convert the jar into an exe, the revision number gets tossed. At first I thought it was just that the r# wasn't appearing in the Window title, but finally tried tihs today:


> ash get_revision()

Returned: 0

> ash get_version()

Returned: KoLmafia v14.3

Winterbay
03-26-2011, 11:39 AM
I am sure this has probably been addressed before, but I am lazy and don't have much time at the moment.

I installed everything as it is listed on the wiki and have compiled some nice builds and even managed to apply some patches. However, recently I decided, for reasons that now seem to be very stupid since it has caused so much problems, to reinstall Java and now the compiling fails.

The ant.bat file gives the following error output:


BUILD FAILED
C:\Documents and Settings\Peter\My Documents\KolMafia source\build.xml:314: The following error occurred while executing this line:
C:\Documents and Settings\Peter\My Documents\KolMafia source\build.xml:196: The following error occurred while executing this line:
C:\Documents and Settings\Peter\My Documents\KolMafia source\build.xml:154: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre6"


And no build is done.

However checking on that path it shows:


C:\Documents and Settings\Peter\My Documents\KolMafia source>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_23


So, somehow I have two java_home-paths set and I have no idea how this can happen or what I can do to rectify it. The "Environment Variables" window in Windows only shows one java_home path and that does indeed hold the path to the JDK.

Another Java-based program that I have seems to also be failing despite reinstalling that one several times so it is interfering with normal usage in some way (even though Mafia itself isn't affected).

Anyone with an idea on what to do?

lostcalpolydude
03-26-2011, 01:12 PM
Just a complete shot in the dark, but is there any java stuff in PATH?

Winterbay
03-26-2011, 01:49 PM
Hmm... Yes, there is. It contains:

C:\Program Files\Java\jre6\bin
Should I remove that?

lostcalpolydude
03-26-2011, 02:08 PM
I have nothing java-related in that variable, so it's worth a try. If nothing else you can always put it back in.

Winterbay
03-26-2011, 02:25 PM
So, removed that but no change. It still doesn't compile, my other java-program, does still not start and Mafia runs just fine if I download a build.

holatuwol
03-26-2011, 04:08 PM
If you're on Vista or higher, you should be able to type the following into Command Prompt to find out what's getting executed:

where javac
If you're on XP or lower, you probably want to download the "which" utility port from GNU.

Winterbay
03-26-2011, 10:03 PM
Hmm... "which javac" (I'm on XP) says:


C:\Program Files\GnuWin32\bin>which javac
which: no javac in (.;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOW S\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Pinnacle\SharedFiles\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Subversion\bin;C:\Program Files\Java\jre6\bin;C:\Program Files\WinAnt\bin)


The result was the same when I didn't have the java-path in the PATH-variable. which java and javaw gives both results from \system32\

xKiv
03-26-2011, 10:11 PM
I would try uninstalling the jre completely, then reinstalling the jdk (maybe even newest version possible?).

Winterbay
03-26-2011, 10:16 PM
After my first failure to uninstall and reinstall both the jre and the jdk I've completely removed them (I even removed everything on the computer even remotely related to java that wasn't connected to another program) and reinstalled. Nothing different. The versions I have are 6.24 of both the jre and jdk.

Theraze
03-27-2011, 12:45 AM
Reboot a time or two. That's been what I've needed to do after a new Java version install...

holatuwol
03-27-2011, 02:55 AM
Try removing the JRE from the path and adding %JAVA_HOME%\bin to your path.

Winterbay
03-27-2011, 09:16 AM
I took a look at the java_home variable again and realised that it said ...23, while the version installed is ...24. So I changed that to 24, rebooted and now it works. Stupid uninstaller/installer that can't take care of its own system variables...

xKiv
03-27-2011, 02:11 PM
You made it work, but still ..


The versions I have are 6.24 of both the jre and jdk.

... this is not OK. You shouldn't have a separate jre if you already have jdk.
The jdk includes jre of its own, having a separate jre install is just running the risk that some program that wants the jre will instead end up using the jdk and fail.

Winterbay
03-27-2011, 05:23 PM
SO, uninstalling the jre is likely a good idea and won't lead to anything stop working? (I think I had the jre and the jdk earlier mainly because I installed the jre first and then the jdk without uninstalling the jre and so I continued to do that...)

Theraze
03-28-2011, 04:44 AM
You may need to uninstall both and just reinstall the JDK again.

Paragon
04-27-2011, 03:23 PM
I have the items listed installed and working. I was able to build kolmafia by running ant from the command line in the proper directory and all what have you. But does anyone know how to build and run or debug kolmafia from eclipse. I have the project imported correctly but whenever I attempt to run or debug it eclipse tells me that It can't find a main function. I tried setting the main type to kolmafia, kolmafiacli, and kolmafiagui....

xKiv
04-28-2011, 02:37 PM
I have the items listed installed and working. I was able to build kolmafia by running ant from the command line in the proper directory and all what have you. But does anyone know how to build and run or debug kolmafia from eclipse. I have the project imported correctly but whenever I attempt to run or debug it eclipse tells me that It can't find a main function. I tried setting the main type to kolmafia, kolmafiacli, and kolmafiagui....

In your project preferences, go to Builders, remove all of the default ones and add a New ant builder pointing to build.xml (which already exists).
Then debug the KoLmafia class.
(you *might* have to set up output directory to (project)/build, in Java build path - Source tab)
(also, I have the (project) (default classpath) entry in Classpath tab of the only run/debug configuration configured in Run/Debug settings; under User Entries)

fronobulax
07-30-2011, 03:53 PM
Anyone building with NetBeans 7.0? r9689 (http://kolmafia.us/showthread.php?7505-9689-Update-the-browser-launching-code-to-not-use-KoLmafia-code.) borked up my (non-standard) build procedures so I am trying to use the build.xml from SourceForge and the lib and src trees. I suspect there are classpath and project settings that I do not have correct. In particular, the IDE does not want to run KoLmafia in the debugger and the IDE editor does not seem to pick up anything in the lib tree so it flags half of src as having compiler errors. My reasons for running NetBeans instead of Eclipse are not as good as they once were so I am willing to switch but figured asking a question was easier. Thanks.

wrldwzrd89
08-03-2011, 11:08 PM
Oh dear, fronobulax. Did you try manually adding the required libraries to the project dependency list? It's been a while since I used NetBeans... mostly because I rely on FindBugs and UCDetector Eclipse plugins. :p

fronobulax
08-04-2011, 12:44 AM
This is not getting as much of my attention as it needs since I can build without the IDE behaving. AFAIK the build.xml file compiles everything in the subdirectories src and lib and merges the results in the build subdirectory. Everything is there so the "linking" process can easily resolve all references.

When I am using the IDE and viewing source I see one of two problems. Problem one is that a file in the src tree that references something in the lib tree cannot find the corresponding src in order to do all the doc display and code completion types of things. Problem two is that every reference to a class in the src is marked as an error because they are multiple definitions.

The is a setting for a classpath to be used when manipulating source and changing that seems to determine which problem I get although I have not done it in a repeatable way - in other words I have been lazy and not being super careful and taking notes.

I would certainly consider switching to Eclipse but the thing that stopped me was I could not find a SVN plugin. I'm sure it is there but I didn't find it.

I'm sure parts are buried in 117 pages but if someone has instructions for importing KoLmafia into Eclipse and a pointer to the SVN plug in, then I'd rather switch than fight. I have Java SE Development Kit 6 Update 20 (64 bit) and Tortoise SVN 1.6 so I can have Eclipse reference files I have already fetched or i can have it fetch things.

Thanks.

holatuwol
08-04-2011, 04:00 AM
Have you tried Subclipse?

fronobulax
08-04-2011, 11:48 AM
Have you tried Subclipse?

Didn't show up in my search before. Looks like today's project will be to try and switch to Eclipse. Thanks.

xKiv
08-04-2011, 04:52 PM
I think the official SVN plugin for Eclipse is subversive.
...
Aha, boils down to SVN-people-made vs. Eclipse-people-made. Old comparison link: http://stackoverflow.com/questions/61320/svn-plugins-for-eclipse-subclipse-vs-subversive
Newer comparison link: http://www.socialpoints.com/mangoblog/post.cfm/svn-eclipse-plugins-subclipse-and-subversive-conclusion

fronobulax
08-08-2011, 10:26 PM
OK. Netbeans is behaving. Netbeans 7.0 with Tortoise SVN on the system. Used Tortoise to Check Out into C:/KoLmafia (on Windows 7). New free form project in NetBeans with existing sources and the build file from SVN. Wizard didn't get everything right but with manual corrections the Project and Contents were C:\KoLmafia, build file was C:\KoLmafia\build.xml, sources were lib and src, separate source classpaths with lib being the classpath for src, output C:\KoLmafia.build, Build maps to daily; Clean maps to clean, and Run maps to exec. Running in the debugger got a prompt to create a Netbeans task which worked.