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.