From: Erik V. <eri...@hc...> - 2006-04-28 09:17:04
|
> I have no problem running it from a jar with the below command: > > java -classpath > \projects\Rails\18xx\rails.jar;\projects\Rails\18xx test.GameTest > > where the second part of the classpath is needed to make > LocalisedText.properties visible. > I just threw the whole current structure into the jar. > > I cannot pursue this further now, as I am about to leave for > a week vacation, > but I'll send some stuff to Brett separately now. Sorry, I was too quick: at least the method to find the per-game subdirectories does not work this way if I run outside my usual project directory. I guess we need to specify the game names in a separate file, or sort out how these can be found in the jar in another way. Brett, if you manage to get it done by whatever trick, that is fine with me. Otherwise I can start helping you out when I'm back in a week from now. Eriuk. |
From: brett l. <wak...@gm...> - 2006-04-28 17:19:34
|
> Brett, if you manage to get it done by whatever trick, > that is fine with me. Otherwise I can start helping you out > when I'm back in a week from now. > No worries. I'll figure it out. If possible, I'd like you to finish up the end-game stuff so that by the time I get things to successfully work as a JAR, we've got a finished game to put in the JAR. ;-) |
From: Erik V. <eri...@hc...> - 2006-05-07 21:44:34
|
> > Brett, if you manage to get it done by whatever trick, > > that is fine with me. Otherwise I can start helping you out > > when I'm back in a week from now. > > > > > No worries. I'll figure it out. I have changed the code around opening XML files to allow reading such a file directly from the JAR file, but it will look there only if the file does not exist in the file system. So anyone can override any default XML file in the JAR by a custom version on the file system. The paths must be the same, i.e. like data/1830/Game.xml or tiles/images/tile0.gif. I had to remove the leading "./" in a number of places. With this change, I can run Rails from a stand-alone JAR file, with only LocalisedText.properties as a separate file. > If possible, I'd like you to finish up the end-game stuff so that by > the time I get things to successfully work as a JAR, we've got a > finished game to put in the JAR. ;-) That and emergency train buying. I'll work on these items when I can manage a free weekend, hopefully sometime in May or June. Erik. |
From: brett l. <wak...@gm...> - 2006-05-08 18:03:40
|
On 5/7/06, Erik Vos <eri...@hc...> wrote: > With this change, I can run Rails from a stand-alone JAR file, > with only LocalisedText.properties as a separate file. > Excellent. How do you create the JAR? Are there any special parameters us= ed? > > If possible, I'd like you to finish up the end-game stuff so that by > > the time I get things to successfully work as a JAR, we've got a > > finished game to put in the JAR. ;-) > > That and emergency train buying. > > I'll work on these items when I can manage a free weekend, > hopefully sometime in May or June. > Sounds good. I've been having a hard time finding free time to dedicate to coding as well. ---Brett. |
From: Erik V. <eri...@hc...> - 2006-05-08 21:41:14
|
> > With this change, I can run Rails from a stand-alone JAR file, > > with only LocalisedText.properties as a separate file. > > > > Excellent. How do you create the JAR? Are there any special > parameters used? In Eclipse, right-click the project in the navigation view and select Export... and JAR file. After Next, specify the Jar file name (I use rails.jar) and select the files to include. Another Next, check "Save the description of this JAR..." and specify a jardesc file name (rails.jardesc). Then Finish. Next time, you only have to right-click the jardesc file and select "Create JAR" to repeat the process. To test stand-alone, you obviously have to copy the JAR file to a different directory. Erik. |
From: brett l. <wak...@gm...> - 2006-05-12 20:14:35
|
On 5/8/06, Erik Vos <eri...@hc...> wrote: > > > With this change, I can run Rails from a stand-alone JAR file, > > > with only LocalisedText.properties as a separate file. > > > > > > > Excellent. How do you create the JAR? Are there any special > > parameters used? > > In Eclipse, right-click the project in the navigation view > and select Export... and JAR file. > After Next, specify the Jar file name (I use rails.jar) and select > the files to include. > Another Next, check "Save the description of this JAR..." and > specify a jardesc file name (rails.jardesc). > Then Finish. > > Next time, you only have to right-click the jardesc file > and select "Create JAR" to repeat the process. > > To test stand-alone, you obviously have to copy the JAR file > to a different directory. > Just tried out your changes. They definitely do work as advertised. Now, as soon as we finish off the end-game code, it looks like we'll have something that can be released as v1.0. I don't think there's any other major items blocking playing a complete game of 1830... ---Brett. |