The bleeding edge!

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

The bleeding edge!

Post by Kaks »

Hello everybody :)

I've followed the "building Oolite from source" howto on the wiki, but I got semi-stuck on quite a few points.

Here's what I did. Hopefully some other newbies can find this useful. All in all, it was a pretty good learning experience, shame it doesn't count towards getting elite status. :D

The first svn package for windows I could find required me to install python,so I got python 2.5.1 - svn seemed to install ok.

then I got & installed the GNUstep development environment. No luck with typing svn - ok, time to muck around with this thing...

To avoid re-typing export PATH=$PATH:...etc.. every time I restart gnustep I modified the last line of
C:\GNUstep\Development\msys\1.0\etc\profile from

Code: Select all

....

alias clear=clsb

cd "$HOME"
to

Code: Select all

....

alias clear=clsb

#cd "$HOME"
export PATH=$PATH:$GNUSTEP_LOCAL_ROOT/bin
cd "$GNUSTEP_LOCAL_ROOT"
hmm, for some reason python is not added to the PATH variable... Ok, forget about python: I can use tortoise svn instead...

Tortoise svn is now installed. Using windows I get to C:\GNUstep\Local\oolite\, make a new folder called trunk & doube click it. Inside 'trunk' right click>svn checkout then enter
svn://svn.berlios.de/oolite-linux/trunk where it asks for the repository's U R L.

Yay, now I've got all that svn goodness in the right place!

I fire up MSYS for GNUstep again, then from the command line:

cd oolite\trunk
make

it all seems to be ok for a while then - disaster! These are the last few lines before make dies:

Code: Select all


 Compiling file src/Core/OOPriorityQueue.m ...
 Compiling file src/Core/Scripting/OOScriptTimer.m ...
 Compiling file src/Core/Scripting/OOJSTimer.m ...
 Compiling file src/Core/Scripting/OOJSClock.m ...
 Compiling file src/Core/Debug/OODebugSupport.m ...
In file included from src/Core/Debug/OODebugSupport.m:56:
src/Core/Debug/OODebugTCPConsoleClient.h:50: error: syntax error before "NSOutputStream"
make[1]: *** [shared_obj/OODebugSupport.o] Error 1
make: *** [oolite.all.objc-program.variables] Error 2

wait, if I'm not mistaken, this is the integrated debug console that only works in a mac... ok - this is activated by OO_EXCLUDE_DEBUG_SUPPORT

aha, so all I need to do is define OO_EXCLUDE_DEBUG_SUPPORT inside the make file...

hmmm, doesn't seem to work....

what about this....

make clean

OO_EXCLUDE_DEBUG_SUPPORT=yes

export OO_EXCLUDE_DEBUG_SUPPORT

make

nope, that doesn't work either....

I know, use brute force! I replace all the '#ifndef OO_EXCLUDE_DEBUG_SUPPORT' with '#if 0'

There's got to be a better way to do this! Never mind, I just wanted it to compile, at least once! :P

Success! It does compile, and I've got a shiny new directory called oolite.app

Not out of the woods yet! It dies telling me it can't find js32.dll. It was not included in the local.zip file, so when I copied all the dlls from $GNUSTEP_LOCAL_ROOT/bin/ I still can't launch the compiled program...

let's look at the 1.70-test directory:

hmmm, most of the dlls are different... ok, let's copy all the dlls across... still no joy...

hmm, there's a stderr file: yep, it says there's a bunch of textures & sounds missing.... ok, copy the whole of /resources from 1.70-test.

inside the gnustep console I finally type

openapp oolite.app



&.....




Wow, I did it!!!! I've got a brand new Oolite 1.70 with the latest patches!!!!!!!!!!!!!!

Wow! Who'd have thunk it! It works! :D

I'm well aware that I probably did a lot of stuff that wasn't either necessary or useful, but somehow I actually made it work, which feels pretty amazing. Once I'm fairly sure everythig is ok, I'll just swap the new exe for the old one, and that will be that.

It'd be really great if the howto was updated for the latest build - anything but my ramblings... I know it would have made things a lot easier for me, and probably for others!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Congratulations on building Oolite successfully. Well done!

The local.zip file is quite old. Since it was created, a few things have changed. One of the most important ones was the inclusion of JavaScript. This introduced a dependency on js32.dll, which on its own has to be built in a special way. In addition to this, the gnustep-base.dll (the "heart" of the program, if you want), had to also be updated to version 1.13.0 (for Windows). The reason for the upgrade was that the old version -i.e. the one included in the local.zip file - does not support NSStreams, as you already have noticed. By the way, the NSStreams is used for the debug console, which works (mostly, but not fully) on Windows, too.

I have made a new local.zip file with the current dependencies, which I need to check that it works. Then I will probably upload it to the wiki to save others the pains you had to go through to get it to play.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Good to know, especially about the updated gnustep-base.dll!

If you need a guinea pig to test the new local.zip, just let me know! :)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Sure. The download for the newer local.zip is here:
http://terrastorage.ath.cx/Marmagka/YYM ... 071214.zip
Two things: 1) The js32.dll is not there, because its source is included with the Oolite source. If you have any problem building it, let me know and I will add the import library and headers to the zip.
2) The gnustep-base.dll is not included. You will need to have a working GNUstep environment anyway to build Oolite, so it does not make much sense putting it here. Just download gnustep-base 1.13.0 and use this as your environment. DLL and import library should be already present as a result of installing GNUstep. Again, if you run into problems, let me know.

Thanks for offering to test.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

almost perfect! :)

just one header file was missing from the includes: SDL_mixer.h

I copied the one from inside the wiki's version of local.zip & compile worked perfectly - no need to touch the #ifndefs.

Linking failed, was looking for the exe in the wrong place, no doubt because I used a later version of the compiler (1.15). Still I found the exe & everything went very well from there! :)

The executable comes to a bit more than 8 meg, compared wth 3 meg for my previous attempt - and 1.9 meg for 1.70-test.

In any case here's an howto for compiling the 1.71 svn trunk in windows, for anyone who wants to do the same:

if you have an older version of GNUstep(GNUstep-base-1.11.1-gui-0.10.1-3 - from the wiki howto), uninstall it, then delete its root directory if it's still there(c:\GNUstep)

google & download the following 2 packages, and - this is important - install them in this sequence:

gnustep-system-0.9.1-setup.exe
gnustep-core-0.9.2-setup.exe

google & download tortoiseSVN, install.

you also need to have installed the latest oolite test download (1.70-test atm) and the two Local.zip files, the original one from the wiki and the one another_commander just posted.


start>programs>GNUstep>shell

at the prompt

mkdir /Local
mkdir /Local/oolite
mkdir /Local/oolite/trunk

the first slash & the upper case L are very important!


from windows, extract the directories inside Local_20071214.zip to C:\GNUstep\Local
download Local.zip from the wiki's howto & find SDL_mixer.h inside it.

that file needs to go inside C:\GNUstep\Local\include\SDL

still from windows go to C:\GNUstep\Local\oolite\trunk

it's empty. Right click>SVN checkout
the repository is

svn://svn.berlios.de/oolite-linux/trunk

wait for it to finish.


from inside the GNUstep shell

export PATH=$PATH:/Local/bin
cd /Local/oolite/trunk
make clean
make

towards the end you'll get the following error:

cp: cannot stat `shared_debug_obj/oolite.exe': No such file or directory
make: *** [after-all] Error 1

Don't panic! Now we need to move a few files around...
still inside the GNUstep shell, type

mv oolite.debug oolite.app

from windows, copy oolite.exe from C:\GNUstep\Local\oolite\trunk\obj to C:\GNUstep\Local\oolite\trunk\oolite.app

now copy all the dlls your installed copy of oolite 1.70-test. Assuming that you installed it to the default directory, copy all dlls from
C:\Program Files\Oolite\oolite.app\ into
C:\GNUstep\Local\oolite\trunk\oolite.app

now you also need to copy all the dlls from C:\GNUstep\Local\bin to C:\GNUstep\Local\oolite\trunk\oolite.app. Overwrite all the duplicates.

Finally go into C:\GNUstep\Local\oolite\trunk\oolite.app\Resources\Config, and replace logcontrol.plist with logcontrol.plist.xml.

If it's a bit tricky to do in windows, from inside the GNUstep shell you can do

cd /Local/oolite/trunk/oolite.app/Resources/Config
rm logcontrol.plist
mv logcontrol.plist.xml logcontrol.plist

and now we can launch the compiled oolite! From inside the GNUstep shell:

cd /Local/oolite/trunk
openapp oolite.app

tahdah!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Excellent stuff. Wikified. I have also uploaded a correct Local dependencies file on berlios and waiting for an admin to place it in a public folder, so that I can provide a link at the wiki page. So, it won't be necessary to have two local zips anymore.

Thanks for taking the time to play with this, Kaks.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

No problem! Actually, thank you for helping me getting it to work properly with all the latest goodness!
With the latest build it seems to warn about a lot more typos than it did before (and very subtle ones, at that), and it kept me very busy for 'a few' hours. On second thoughts, it was a mixed blessing! ;)

The end result, however, was well worth it: 35 OXPs & 40 scripts loaded, and I get a delay of .5-1 seconds when leaving the stations, as opposed to to 5-6 seconds before the bug hunt. Plus, after my little entomological expedition, flying seems smoother as well. It still slows down when crowded, but there seems to be more ships all over the place.(!)
Maybe the engine has to work extra hard when spawning a ship with unexpected keys in it, and whatnot.

Got to go now, I've got a few PMs to send! :)

Cheers!
Post Reply