Building from the SVN?

bumcheekcity

Active member
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

Moderator
How come whenever I build using "ant daily" it adds an "M" at the end of the file name (KoLmafia-7443M.jar) ?
 

jasonharper

Developer
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

Moderator
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
 
Last edited:

fronobulax

Developer
Staff member
Fun with building 8098

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

New member
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
Code:
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.)
 
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.
 
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...

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

xKiv

Active member
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

Active member
Tortoise, no. Cygwin has svn.exe though... there's also other free options, but that's probably the easiest.
 

Winterbay

Active member
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
Code:
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

Active member
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...
 

Grotfang

Developer
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, 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:

Code:
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:

Code:
C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\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.
 
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:

Code:
> ash get_revision()

Returned: 0

> ash get_version()

Returned: KoLmafia v14.3
 

Winterbay

Active member
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:
Code:
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:
Code:
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?
 
Top