Run Oolite from USB stick?

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

wades
Above Average
Above Average
Posts: 29
Joined: Wed Feb 03, 2010 11:04 pm

Run Oolite from USB stick?

Post by wades »

Is there anything special one needs to do to make Oolite run from removable media?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Post 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).
Commander Trigg
Competent
Competent
Posts: 60
Joined: Thu Feb 18, 2010 5:49 pm

Post 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
Now over 1000 confirmed kills. Bring on the bad guys!
varsator
Average
Average
Posts: 12
Joined: Fri Feb 12, 2010 8:42 pm
Location: Bucharest, Romania

Post 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.
WinXP SP3 - Oolite 1.73.4 - Sep 22 2009 - no OXPs yet
varsator
Average
Average
Posts: 12
Joined: Fri Feb 12, 2010 8:42 pm
Location: Bucharest, Romania

Post 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.
WinXP SP3 - Oolite 1.73.4 - Sep 22 2009 - no OXPs yet
Sydney2K
Competent
Competent
Posts: 35
Joined: Thu Apr 22, 2010 5:20 am

Post 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.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Post 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!
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
Sydney2K
Competent
Competent
Posts: 35
Joined: Thu Apr 22, 2010 5:20 am

Post by Sydney2K »

Cool, well if people are happy for me to proceed with this, I'll take the baton on this.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post 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?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I understood - I was meaning it kinda makes the portable variant look like the poor relation though ;)
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 »

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.
Post Reply