another Bug....

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Zorath
Average
Average
Posts: 11
Joined: Mon Jan 31, 2005 6:59 am
Location: Aussie Land

another Bug....

Post by Zorath »

I decided to take some screen shots of some ships as I flew past... and I encountered something very odd with the save games/ screen shots...

C:\Program Files\Oolite\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app

I ended up with a path like that.. in each oolite-saves direcotry there is a screen shot.. and so in the end it would not let me save my game at all.

(got a few good screen shots of some ships :)


This is from the read me file...
Oolite (Windows svn r344 Build - 20/03/06)
so I guess thats the version I'm useing
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

Yes, that has happened to me too.

I just moved everything from the lower levels into the top one and deleted them. Loading and quicksaving seemed to work fine after that.
Regards,
David Taylor.
User avatar
Rxke
Retired Assassin
Retired Assassin
Posts: 1760
Joined: Thu Aug 12, 2004 4:54 pm
Location: Belgium

Re: another Bug....

Post by Rxke »

Zorath wrote:
(got a few good screen shots of some ships :)
:idea: if you have shots you think are interesting, consider cropping and uploading them somewhere to the Wiki, some ships still need some good shots.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

That's really bizarre. The screen shot code uses exactly the same method call to open the oolite-saves directory as the code that loads and saves commanders - and so if load/save commander works, then so should screenshots. Needless to say it works without a hitch on Linux!
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

Yes, yes, we know life is better for the *NIX elites...

I like to consider the windows port like a fish on a bicycle. It isn't how well it rides so much as that it rides at all (or something like that).

Much more of this damned Windows bashing and I'm going to start including download stats in my posts.
Regards,
David Taylor.
User avatar
TedJ
Deadly
Deadly
Posts: 131
Joined: Tue Jan 17, 2006 3:18 am
Location: Melbourne, Australia

Post by TedJ »

dajt wrote:
Much more of this damned Windows bashing and I'm going to start including download stats in my posts.
Heh, if you want some really big numbers, try quoting the download stats from Microsoft's security update servers. :P
User avatar
Galileo
Dangerous
Dangerous
Posts: 103
Joined: Tue Nov 15, 2005 1:55 am
Location: Tasmania, Australia

Post by Galileo »

Speaking of screenshots, why are they bmp's instead of png's or something.<500kb file as opposed to a 2.3Mb file.
Eat talking tree, food blenders!
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

dajt wrote:
Much more of this damned Windows bashing and I'm going to start including download stats in my posts.
Windows bashing? No, my comment is of genuine surprise - as far as I know the load/save code is working fine on Windows, and the screen shot function uses the same method call to change directory to oolite-saves as the load/save code - so if the load/save code works, then so should the screen shots. There is obviously a bug there _somewhere_ that one of us needs to go and fix.

I don't currently have a functional Windows system to play with otherwise I would investigate it myself.
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Re: another Bug....

Post by dajt »

Zorath wrote:
I decided to take some screen shots of some ships as I flew past... and I encountered something very odd with the save games/ screen shots...

C:\Program Files\Oolite\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app\oolite-saves\oolite.app

I ended up with a path like that.. in each oolite-saves direcotry there is a screen shot.. and so in the end it would not let me save my game at all.
I've found the cause of the problem. The return value from NSHomeDirectory() is ".\oolite.app", which seems to come from an env var setting in the batch file used to run Oolite.

I think the best fix is to change the installer to set the env vars to absolute paths. I'll try that, and if I can do it and it solves the problem, the next Windows installer will have this fixed.

UPDATE:
I manually changed my RunOolite.bat file to the following and it fixed the problem:

Code: Select all

@echo off
set GNUSTEP_PATH_HANDLING=windows
set GNUSTEP_LOCAL_ROOT=C:\Program Files\Oolite\oolite.app
set GNUSTEP_NETWORK_ROOT=C:\Program Files\Oolite\oolite.app
set GNUSTEP_SYSTEM_ROOT=C:\Program Files\Oolite\oolite.app
set HOMEPATH=C:\Program Files\Oolite\oolite.app

oolite.app\oolite.exe
So I will work on the installer to get it to create a batch file that looks like that, using your selected installation path.

AND FURTHERMORE:

I changed the installer so it creates the batch file okay, but find two other problems now:

1. After you take a screenshot the textures can't be found, because the current directory is now oolite-saves, and the textures seem to be being searched for with relative paths.

2. Saving a commander worked, including getting the name right, but loading the save file immediately afterwards didn't work. I just restarted and loaded the file a couple of times okay though.

I'll look into these perhaps tomorrow (have to mind both babies on my own tonight - not ideal working conditions!) and post a new installer when they're fixed.
Last edited by dajt on Wed Mar 29, 2006 3:00 am, edited 1 time in total.
Regards,
David Taylor.
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

Galileo wrote:
Speaking of screenshots, why are they bmp's instead of png's or something.<500kb file as opposed to a 2.3Mb file.
When I wrote the code to do SDL screenshots I could not get any other format working. I imagine we can get pngs going without too much hassle now all the showstopping problems have gone away.
Regards,
David Taylor.
Post Reply