Trouble running on gentoo

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

Post Reply
taliesin2
Poor
Poor
Posts: 6
Joined: Fri Mar 30, 2007 3:21 pm
Location: San Francisco

Trouble running on gentoo

Post by taliesin2 »

Hi everyone. I have been playing this game, becoming addicted, on my macbook for a few weeks now (I have now become "Competent," whee!), and I decided I would like to try getting it running on my desktop/fileserver, which is running gentoo. (Why yes, I am a masochist, how did you guess?)

It seemed that I needed to build from source, since I am running amd64, so I found an ebuild that I modified a bit, recompiled gcc to get the objective c support, built all the gnustep and sdl libraries, and lo and behold oolite built successfully, and apparently was successfuly installed under /usr/GNUStep/Tools or some such (but not as oolite.app, just oolite, which I thought was a bit strange). So it seemed to work, but when I try to run it, it lasts about a hundredth of a second, dying thusly:

2007-03-30 07:05:47.723 oolite[8303] Unknown time zone name `PST'.
2007-03-30 07:05:47.723 oolite[8303] Using time zone with absolute offset 0.
2007-03-30 07:05:47.721 oolite[8303] initialising SDL
2007-03-30 07:05: 47.766 oolite[8303] init: numSticks=0
2007-03-30 07:05:47.766 oolite[8303] CREATING MODE LIST
2007-03-30 07:05:47.766 oolite[8303] Added res 1600 x 1024
2007-03-30 07:05:47.766 oolite[8303] Added res 1400 x 1050
2007-03-30 07:05:47.766 oolite[8303] Added res 1280 x 1024
2007-03-30 07:05:47.766 oolite[8303] Added res 1024 x 768
2007-03-30 07:05:47.766 oolite[8303] Added res 800 x 600
2007-03-30 07:05:47.766 oolite[8303] Added res 640 x 512
2007-03-30 07:05:47.766 oolite[8303] Added res 512 x 384
2007-03-30 07:05:47.766 oolite[8303] Added res 400 x 300
2007-03-30 07:05:47.766 oolite[8303] Added res 320 x 240
2007-03-30 07:05:47.850 oolite[8303] drawRect calling initialiseGLWithSize
2007-03-30 07:05:47.850 oolite[8303] Creating a new surface of 800 x 600
2007-03-30 07:05:47.853 oolite[8303] no universe, clearning surface
2007-03-30 07:05:47.854 oolite[8303] ---> searching paths:
("/usr/GNUstep/Local/Tools/Resources/oolite/Contents/Resources", "/usr/GNUstep/Local/Tools/Resources/AddOns", "/home/dbeach/Library/Application Support/Oolite/AddOns", "/home/dbeach/.Oolite/AddOns")
2007-03-30 07:05:47.855 oolite[8303] DEBUG ** no cache exists - yet **
oolite: Uncaught exception NSInvalidArgumentException, reason: Tried to add nil value for key 'CFBundleVersion' to dictionary

Anyone know how to solve this one?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

This suggests Info.plist is not in the right place in the application bundle (the oolite.app directory). I’m not sure where it’s supposed to be under Linux.

In an up-to-date build of Oolite you wouldn’t get that specific error – it would simply fail to write the cache – but you wouldn’t be able to run any expansion packs which have a specific version number requirement.
taliesin2
Poor
Poor
Posts: 6
Joined: Fri Mar 30, 2007 3:21 pm
Location: San Francisco

Hmm... OK

Post by taliesin2 »

I see. So evidently this thing is not in fact installed properly, because as I said above I don't have a oolite.app, only the oolite executable.

Going back through, I see that the thing did in fact build correctly. In the work directory I can find the directory/bundle oolite.app, which contains Contents, Resources, and oolite. So far so good. But the install command is clearly wrong. Here's what it does:

cp -r Resources oolite.app/Contents/Resources
cp src/Cocoa/Info-Oolite.plist oolite.app/Resources/Info-gnustep.plist
cp shared_obj/oolite oolite.app
Making install for objc_program oolite...
/bin/install -c -m 0755 \
./shared_obj/oolite \
/var/tmp/portage/games-action/oolite-1.65/image///usr/GNUstep/Local/Tools/.

Obviously we didn't want to /bin/install shared_obj/oolite, but rather the bundle oolite.app. I'm not sure if this is something /bin/install is equipped to do. This is where my utter lack of knowledge of GNUstep becomes a problem. At this point, where everything has been built, and the bundle is sitting in the work directory, what is the proper install command?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Ahh, me not paying attention. And, well, good question. We’re short on the Linux maintainer front, but hopefully someone who’s built the thing, or at least groks the dark side of running it, will wander past.
magamo
Competent
Competent
Posts: 45
Joined: Sat Feb 25, 2006 7:07 pm

Post by magamo »

In general, an easy enough install command would be

Code: Select all

cp -a oolite.app $GNUSTEP_SYSTEM_ROOT/Applications
; for a system-wide installation (root privileges likely required) provided your GNUstep environment is set up properly. Then, you can simply 'openapp oolite' to run the program.

If you want to install it in a per-user manner (Say, you might not have root permissions) Simply replace $GNUSTEP_SYSTEM_ROOT with $GNUSTEP_USER_ROOT

Keep in mind though, not everyone will have a $GNUSTEP_USER_ROOT/Applications directory by default. It might be prudent to issue

Code: Select all

mkdir -p $GNUSTEP_USER_ROOT/Applications
beforehand, just to make certain.

When I created my Slackware Packages, I wrote a small script that when installed, gets placed as /usr/bin/oolite (But would live quite easily in /usr/local/bin/, or anywhere else in $PATH)

Code: Select all

#!/bin/bash
if [ ! -e $HOME/.Oolite/AddOns ]; then
  echo "Creating \$HOME/.Oolite/AddOns/"
  mkdir $HOME/.Oolite/Addons/
fi

if [ -z $GNUSTEP_SYSTEM_ROOT ]; then
  . /etc/profile.d/GNUstep.sh
fi

$GNUSTEP_SYSTEM_ROOT/Tools/openapp oolite
That handles creating the placeholder directory where OXPs should be installed in a per-user setup, and attempts to set up the GNUstep environment if it's not currently set up (provided GNUstep.sh is installed in /etc/profile.d/)

At that point, provided that little script is in your $PATH, all you would need to do is run 'oolite'.
Post Reply