Adding TripleA v0.5.1 Stable to portage Reproducible: Always Steps to Reproduce: 1. 2. 3.
providing a working ebuild would speed this along...
Created attachment 45022 [details] triplea-0.5.1.ebuild Here's a start at an ebuild for 0.5.1 but it doesn't work for me. Patches welcome.
Created attachment 45026 [details] modifications to the e-build previous I made some modifications, based on an external e-build I saw at Denix's home page http://denics.free.fr/english.html Though we don't use the -Xmx96m flag anymore. It just tells java to restrict memory usage to 96megs, we abandoned it since v0.4.9. I did not test the e-build.
yeah, no real change from the failure I see with my ebuild. Here it is: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:55) at games.strategy.util.PointFileReaderWriter.readOneToMany(PointFileReaderWriter.java:177) at games.strategy.triplea.ui.TerritoryData.<init>(TerritoryData.java:89) at games.strategy.triplea.ui.TerritoryData.setMapDir(TerritoryData.java:63) at games.strategy.triplea.TripleA.startGame(TripleA.java:87) at games.strategy.engine.framework.ui.LauncherFrame$5.run(LauncherFrame.java:301) at java.lang.Thread.run(Thread.java:536) Could one of the java folks take a look at this please?
I looked at the error, it seems that it cannot read a file. This error should not happen, unless you don't have the proper data files in the "classes/games/strategy/triplea/image/images/maps/" directory. I have this feeling that when it is compiling TripleA it is not copying the data files. One more thing that concerns me, this header is still in the 0.5.1 ebuild "# $Header: /var/cvsroot/gentoo-x86/games-strategy/triplea/triplea-0.4.8.ebuild,v 1.2 2004/07/24 10:34:08 "
I re-created the exact error you got. This error happens when your missing the "place.txt" file in the "classes/games/strategy/triplea/image/images/maps/<GameName>" directory These data files are located in "data/games/strategy/triplea/image/images/maps/<GameName>" and when compiling TripleA they get copied over into the classes dir as shown above. For some reason you don't have them. Downloading TripleA, and compiling it off the bat with ant, and running it works perfectly. This seems to be an ebuild related problem.
If you tell me the exact commands you used to be able to run it from the downloaded file that might be helpful to me. I agree that it is an ebuild problem but I'm not very familiar with java.
Simply put, all that needs to be done are these 3 steps: 1: Unzip the package anywhere. 2: edit .ant.properties so it points to the proper path for Junit.jar file 3: in the same directory as the "build.xml" run "ant compile" (refer to http://triplea.sourceforge.net/TripleA_User_Documentation.html#sec_b for a full detailed description and step-by-step instructions for compiling from source, should it help you further) Thats all. There is as well pre-compiled version of TripleA where all that needs to be done is unzip and run, without needing ant, junit.
Created attachment 45468 [details] ebuild tarball I was sent this tarball from Denis denics(AT)free.fr Does this work for portage? Any comments on the ebuild please contact Denis.
the tarball doesn't include an ebuild?
OK, I don't know why no one figured this out sooner as it was pretty simple. I managed to make a working ebuild by modifying the 0.4.8 ebuild and editing a little extra files. I'll List you the steps below 1. (See attachment triplea-0.5.1.ebuild) place in /usr/portage/games-strategy/triplea 2. Download triplea_source_0_5_1.zip and put it in /usr/portage/distfiles 3. create a file called "digest-triplea-0.5.1" and put the MD5 sum, name, and file size of the downloaded zip file. 4. edit the "Manifest" file and add the MD5 sums, name, and file size of the 0.5.1 ebuild and digest files. 5. Run env-update && source /etc/profile 6. Run emerge triplea.0.5.1.ebuild 7. Exit root, run "triplea" 8. It all works I think for the CVS repo of gentoo you need to have some other md5 sum or something.. but the steps above is exactly how I got it to work. Please look at hte ebuild! it is the most important, NOTHING HAS CHANGED from the 0.4.8 except that I made the dependency ant-core and removed the -mx96M flag. I did not add anything for the ai scripts as they are not needed and it is experimental anyways.
Created attachment 45712 [details] The new ebuild that I got to work on my gentoo system, see my comments Read my comments below about the steps I took to get this e-build to work. Thanks.
You wrote.... yeah, no real change from the failure I see with my ebuild. Here it is: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:55) at games.strategy.util.PointFileReaderWriter.readOneToMany(PointFileReaderWriter.java:177) at games.strategy.triplea.ui.TerritoryData.<init>(TerritoryData.java:89) at games.strategy.triplea.ui.TerritoryData.setMapDir(TerritoryData.java:63) at games.strategy.triplea.TripleA.startGame(TripleA.java:87) at games.strategy.engine.framework.ui.LauncherFrame$5.run(LauncherFrame.java:301) at java.lang.Thread.run(Thread.java:536) Could one of the java folks take a look at this please? --- I actually found out what causes this problem. Actually has nothing to do with the files. Try rm -R ~/.java I got that error happen to me when I was running triplea from 2 different directories several times.. it seems to mess things up.
Created attachment 46199 [details] triplea-0.5.1.ebuild "The new ebuild that I got to work on my gentoo system" You're kidding, right? That's basically the same ebuild as what's in portage right now as 0.4.8. There's no reason to attach the same file to a bug. Removing the .java directory and using that ebuild shows the traceback everytime on my system. This ebuild at least starts up for me. It works fine until the autosave kicks in. Then it does a traceback, I assume because it can't write to the directory it's trying to write to.
You got me on that one, there already is a /usr/share/games/triplea/data/triplea.properties file that tells triplea to save in the users home dir I set up triplea again on gentoo, compiled, ran, but I get this damn stack trace when trying to run a game. I don't know what happens to triplea when you guys port it to an ebuild thingy, that causes this error. I normally only get it when I run my cvs and non-cvs copies and they read the same system preferences in .java But dunno. All these problems seem related to how triplea gets installed by protage it seems.
with the ebuild I just posted, and doing rm -rf ~/.java/ the game works but the autosave doesn't because I think the save path is hard-coded or is getting set wrong in the game. I'm pretty sure that the reason it works for you without the ebuild if you run it out of your home directory or something is that it tries to write the autosave file to a place in the same directory tree as the libs and data, etc. Once it's installed the game can't write the autosave because it doesn't have permissions to write there. So far I think it's a bug in the autosave code in triplea.
The autosave works with 0.4.8, and I am scanning most of the CVS tree in triplea and I made some comparisons between the several java files (triplea/src/games/strategy/engine/framework/ui/SaveGameFileChooser.java) as it holds the directories... but nothing has changed between it and 0.4.8 and 0.5.1. Can you paste the stack trace your getting ? maybe that will clear things up.
Created attachment 46215 [details] fixed ebuild
Created attachment 46216 [details, diff] patch
New ebuild! 0.5.1.1 http://denics.free.fr/various/triplea/ ciao ciao
triplea-0.5.1.1.ebuild added to portage. Thanks for the bug report.