Page 1 of 2

Run Oolite from USB stick?

Posted: Mon Mar 01, 2010 10:58 pm
by wades
Is there anything special one needs to do to make Oolite run from removable media?

Posted: Mon Mar 01, 2010 11:01 pm
by another_commander
Nothing more than just copy the entire Oolite folder structure to the stick. The game is designed to be portable between media (at least the Windows version).

Posted: Tue Mar 02, 2010 1:15 am
by Commander Trigg
I run the game on an external HDD so I can switch between computers and I've had no problems - apart from the inevitable delay while waiting for it to load up

Posted: Tue Mar 02, 2010 12:10 pm
by varsator
I run it from an USB stick and have no problems whatsoever. I do back up the game to the HDD once in a while, though. I had some bad experiences with removable media that crashed.

Posted: Thu Mar 04, 2010 8:47 pm
by varsator
varsator wrote:
I run it from an USB stick and have no problems whatsoever. I do back up the game to the HDD once in a while, though. I had some bad experiences with removable media that crashed.
Just after I wrote this I had the idea of making a script to backup my saves from the USB memory stick to the system HDD. It ended up in an autorun.inf configuration that let's you play the game, save the save files or save the entire Oolite configuration. I share it with you guys, maybe somebody finds it useful.

So, on the USB stick I have the folowing:
- Oolite folder, as installed
- autorun.inf file that sets up the auto run options, icon and context menus
- backup.bat file that executes the two backup options
- oolite.exe.lnk windows shortcut file that links to the oolite.exe, inside the USB stick installation

autorun.inf

Code: Select all

[autorun]
icon=Oolite\Oolite.ico
label=Oolite
action=Press SPACE commander
shell\backup_all=Backup Oolite
shell\backup_all\command=backup.bat all
shell\backup_saves=Backup Oolite Saves
shell\backup_saves\command=backup.bat saves
shellexecute=oolite.exe.lnk
backup.bat

Code: Select all

if %1==all goto :backup_all

:backup_saves
rem ---- Establish current rate -----
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET mm=%%B
FOR /F "TOKENS=1,2 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET dd=%%A
FOR /F "TOKENS=1,2,3 eol=/ DELIMS=/ " %%A IN ('DATE/T') DO SET yyyy=%%C
SET date=%yyyy%.%mm%.%dd%

xcopy \Oolite\oolite.app\Oolite-saves\* Y:\games\_saves\Oolite_saves\%date%\ /E /H /Y
goto :end

:backup_all
xcopy \Oolite\* Y:\games\_saves\Oolite\ /E /H /Y

:end
The date extraction may not work on different systems, since, I think, depends on the date format settings.

oolite.exe.lnk is made with Right Click>New>Shortcut. The .lnk extension is not shown, only the icon that indicates it is a shortcut.

Hope it's useful.

----

Sidenote: I tried to start the game using the shell\verb options like for the backups but I ran into some strange problems. First, I ran it directly, but because the current folder was not the oolite.app folder, it created the log files in the root and exited. I fixed that by creating a bat file that first changed the folder to the correct one and then started the game. This is where things got weird. The first sign was that the window name was not "Oolite v1.73.4", but "Oolite v(nil)". After I killed a lot of pirates and finally got to the station, I discovered the other problems: I could not save and could not exit the station anymore. When I pressed 1, it showed me the outside of the station, but no exit sequence. When I pressed 2-8 it got me back in the station.

Posted: Thu May 20, 2010 6:06 am
by Sydney2K
If people are satisfied with the portability of Oolite, would someone (or I'm happy to do it) like to submit it to Portable Freeware?

I figure that some technical notes need to be included, such as 'does it write to the Registry or the hard drive?', what are the graphics requirements, etc.

Posted: Thu May 20, 2010 1:37 pm
by JazHaz
Sydney2K wrote:
If people are satisfied with the portability of Oolite, would someone (or I'm happy to do it) like to submit it to Portable Freeware?

I figure that some technical notes need to be included, such as 'does it write to the Registry or the hard drive?', what are the graphics requirements, etc.
Reckon that's a good idea!

Posted: Thu May 20, 2010 4:44 pm
by another_commander
Sydney2K wrote:
I figure that some technical notes need to be included, such as 'does it write to the Registry or the hard drive?', what are the graphics requirements, etc.
The Windows version of Oolite creates the following Registry keys when installed:
  • HKLM Software\Oolite Install_Dir <Path where Oolite resides> This is for the system to know where Oolite is. This is where the game location is picked up from when the uninstaller runs and displayed in the relevant text box.
    HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\Oolite DisplayName <Oolite MajorVersion,MinorVersion,Revision,SubversionBuildNumber> ,e.g. Oolite 1.73.4.2579. This is what is displayed in the Add/Remove Programs window installed programs list.
    HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\Oolite UninstallString <Path where Oolite resides>\UninstOolite.exe. This is telling the system what to run whenever uninstallation of Oolite is requested via Add/Remove Programs.
All the above are there mainly to facilitate smooth uninstall, are removed during uninstall and Oolite can be run perfectly fine without any and all of those keys in the Registry.

In addition to that, a series of Start Menu shortcuts is created under $SMPROGRAMS\Oolite. These are all removed during uninstall and Oolite does not need them to run (of course, in this case you must navigate to the game's folder and start the exe manually).


As for graphics requirements, OpenGL 1.1 is required as minimum. For Windows, OpenGL 1.1 is usually what is provided by Microsoft's generic software renderer. Obviously, hardware accelerated cards supporting higher OpenGL versions are the preferred spec.

Posted: Tue May 25, 2010 2:17 am
by Sydney2K
Cool, well if people are happy for me to proceed with this, I'll take the baton on this.

Posted: Wed May 26, 2010 7:16 pm
by Thargoid
As a thought, could the Windows installer be given a check-box or something to make it optionally (off by default) do a truly portable installation (no writing to the registry for undelete and no shortcuts made in the start menu)? Maybe also suppress UninstOolite.exe, as then uninstalling Oolite would just be deleting the directory tree from the stick...

Would that be something that could be built into the Windows installer?

As an aside is such operation possible under a Mac or Linux system?

Posted: Wed May 26, 2010 7:20 pm
by another_commander
Thargoid wrote:
As a thought, could the Windows installer be given a check-box or something to make it optionally (off by default) do a truly portable installation (no writing to the registry for undelete and no shortcuts made in the start menu)? Maybe also suppress UninstOolite.exe, as then uninstalling Oolite would just be deleting the directory tree from the stick...

Would that be something that could be built into the Windows installer?

As an aside is such operation possible under a Mac or Linux system?
Well, if we are to do something like that, maybe it would be easier to put up a zipped installation image on Berlios that you just unzip to a folder of your choice. Much easier and cleaner.

Posted: Wed May 26, 2010 7:25 pm
by Thargoid
Either works for me.

Currently I just set up trunks by install the nightly versions to a folder on my desktop HD ("trunk-<revnumber>" usually) and then copy that onto the stick. Then zip up the previous rev folder and perhaps delete the zip file before that (in case of dodgy trunk versions).

For test releases it's obviously less of a problem, but a zipped image would work just as well. Just perhaps seems less "polished" for a distribution method for what is a quality game.

Posted: Wed May 26, 2010 7:30 pm
by another_commander
I was not thinking of swapping the installer for a zip file, we can have both and people can choose whatever they prefer, as long as it is clear that using the installer still retains full portability of the game.

Posted: Wed May 26, 2010 7:36 pm
by Thargoid
I understood - I was meaning it kinda makes the portable variant look like the poor relation though ;)

Posted: Thu May 27, 2010 6:55 am
by JensAyton
Thargoid wrote:
As an aside is such operation possible under a Mac or Linux system?
On the Mac, you just download the application and put it wherever you want. Installers are a thing of the nineties and a few companies stuck in them.