Spring on a memory stick?

Spring on a memory stick?

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
User avatar
PTSnoop
Posts: 97
Joined: 09 Sep 2009, 19:05

Spring on a memory stick?

Post by PTSnoop »

Is there a way of installing the most recent Linux version of Spring onto a memory stick, so I can keep my mod development files on one stick and test things while swapping between computers? I've got the Windows build on there, but I'd like to be able to test things in Linux as well without having to install it on every computer.

Related: Is there something I can put in the /mods folder to point it to other folders? Just so I can have one folder for the mod and two OS-specific testing versions of Spring.
User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: Spring on a memory stick?

Post by momfreeek »

you can easily share mod & map folders (and luaui if u like). just turn the linux mod&map folders into simlinks that reference the folders on the windows drive (not sure if this would work over the network.. I don't see why not).

I'm not sure how to do the opposite (use linux maps/mods on windows). I suspect it involves hacking the registry.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Spring on a memory stick?

Post by Auswaschbar »

In your config file (".springrc" in your home) there is an entry called "SpringData=". Add every directory you want to have searched for maps and mods there, colon seperated, e.g. "SpringData=/media/MyUSBDrive:/mnt/windows/users/your username/my games/spring". As a side effect, this will make your USB Disk the primary data dir, as in all stuff spring makes (paths, screenshots) will be added there, if you don't want this, add your /home/.../.spring as the first entry.

In windows, this works the same way, except the config file is called springsettings.cfg and is located in $LOCAL_APPDATA.

PS.: don'T use what momfree said. It might make spring not start anymore.
User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: Spring on a memory stick?

Post by momfreeek »

Auswaschbar wrote:PS.: don'T use what momfree said. It might make spring not start anymore.
ouch, really? I did this before and it seemed to work fine. Still, the proper way is obviously better
Auswaschbar wrote:SpringData=/media/MyUSBDrive:/mnt/windows/users/your username/my games/spring
Need to use semicolon separators on windows as colons are used in filepaths. colons are correct for linux?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Spring on a memory stick?

Post by Auswaschbar »

momfreeek wrote:
Auswaschbar wrote:SpringData=/media/MyUSBDrive:/mnt/windows/users/your username/my games/spring
Need to use semicolon separators on windows as colons are used in filepaths. colons are correct for linux?
Yeh, almost forgot: on windows, semicolons are used for path separation (colons are still correct in linux).

PS for momfree: when you symlink your .spring directory to your windows installation, which happens to be on NTFS and read-only in linux, sprign will error out because it cannot find writable datadirs.
User avatar
momfreeek
Posts: 625
Joined: 29 Apr 2008, 16:50

Re: Spring on a memory stick?

Post by momfreeek »

Auswaschbar wrote:PS for momfree: when you symlink your .spring directory to your windows installation, which happens to be on NTFS and read-only in linux, sprign will error out because it cannot find writable datadirs.
ok. I simlinked maps and mods seperately.. not the .spring dir. I guess I just lost path cacheing

I figure with linux you can't use an ntfs partition as your only data dir for the same reason (no write access).. it will write to the second one found so long as you include a linux dir? will this cause issues, if another spring install is writing data that will be found first but can't be overwritten?
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Spring on a memory stick?

Post by BrainDamage »

momfreeek wrote:
Auswaschbar wrote:PS for momfree: when you symlink your .spring directory to your windows installation, which happens to be on NTFS and read-only in linux, sprign will error out because it cannot find writable datadirs.
ok. I simlinked maps and mods seperately.. not the .spring dir. I guess I just lost path cacheing

I figure with linux you can't use an ntfs partition as your only data dir for the same reason (no write access).. it will write to the second one found so long as you include a linux dir? will this cause issues, if another spring install is writing data that will be found first but can't be overwritten?
if you install ntfs-3g and mount the partitions with that, ntfs filesystems will be read-write
User avatar
PTSnoop
Posts: 97
Joined: 09 Sep 2009, 19:05

Re: Spring on a memory stick?

Post by PTSnoop »

Thanks for the help, everyone; it's working fine. (My laptop has no problems reading or writing to NTFS; it's probably already got ntfs-3g on it.)

Next question: would it be possible to install the whole Spring game engine on the same memory stick? Basically the Linux equivalent of installing the Windows installer to E:/Programs/Spring/ instead of C:/Program Files/Spring/ .

I tried downloading the version on DJL (http://en.djl-linux.org) and extracting the archive onto the memory stick, which worked fine but they've only got version 0.79 which isn't much use for testing Lua animation. Would there be a way to do this with the Github version?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Spring on a memory stick?

Post by hoijui »

as for the installign all of spring to a memory stick (for use on linux), the way to go is to compile spring yourself, and set the CMake variables accordingly.
don't think there is an easier way. if you want to play online, make sure to get the sources from release tarball or the branch of the current release.
User avatar
PTSnoop
Posts: 97
Joined: 09 Sep 2009, 19:05

Re: Spring on a memory stick?

Post by PTSnoop »

Okay, fair enough. So would that be

Code: Select all

cmake -DCMAKE_INSTALL_PREFIX=/media/MStick/Programs .
or would it need other variables for where it puts the ~/.spring folder?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Spring on a memory stick?

Post by hoijui »

that could work, but i would recomend to set at least the 4 vars to "." as i do it in hte example below.

Code: Select all

INSTALL_DIR=/media/myUsbStick/spring
cmake \
	-DSPRING_DATADIR="${INSTALL_DIR}" \
	-DCMAKE_INSTALL_PREFIX="" \
	-DBINDIR=. -DLIBDIR=. -DDATADIR=. -DAIDIR=.
make install DESTDIR=${INSTALL_DIR}
This is how i compile my test version (no guarante though, i use many more options, and tried to extract the ones relevant for you). The -DSPRING_DATADIR line does not really make sence if you install on a mem-stick though, except it is mounted wiht the same path on each system. it is only used at runtime, and can be substituted with setting an ENV variable containing the full mounted path to memory-stick-spring.
Post Reply

Return to “Linux”