View topic - portable/isolation mode


All times are UTC + 1 hour


Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: portable/isolation mode
PostPosted: 29 Jun 2011, 15:58 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
I installed test version spring_0.82.3-2365-g82c3187.exe, with [x]portable checked, into a new folder.
I start spring.exe and was actually expecting it not to find any mods/maps, yet it finds some files in "my documents\"
Those were probally put there by an older install of zeroK lobby.

Looking outside its install directory is not really what I am expecting from a portable/isolation mode program.
The reason why it matters is, that some day I would like to make a .zip or installer of my game and its map list should not be mixed by other installed Spring games. In the same way I dont want my game to "pollute" the maplist of other games either.

In springsettings.cfg it says
SpringData=

I've heard that checking [x]portable in the installer is actually not the real isolation mode, how do I enable this mode then?
And what are the differences?

What I would like to do is basically zip the whole Spring folder, with all map & mods .sdz included, and players just unzip it.
After deleting that folder all traces of the game should be gone.
Is that technically possible with 0.83 Spring and also which lobby would work this way?
Top
 Offline Profile  
 
PostPosted: 29 Jun 2011, 16:55 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
you have to define the env var SPRING_ISOLATED.

SL.bat (windows)
Code:
SET SPRING_ISOLATED=1
./springlobby.exe

SL.sh (linux & mac)
Code:
#!/bin/sh
export SPRING_ISOLATED=1
./springlobby

not a very nice/clean way i guess, but for testing it should be enough, and it would also meet your criteria.


Last edited by hoijui on 30 Jun 2011, 16:11, edited 3 times in total.
Top
 Offline Profile  
 
PostPosted: 29 Jun 2011, 17:11 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
so .bat files are the only way, there is no setting for this?
Hm, if that works it is ok I guess.
If springlobby is set to isolated mode this way, will it also have effect on the spring.exe that is launched by SL?
Or would I have to make a spring.bat and set SL to start this instead of spring.exe?
What about springsettings?
Top
 Offline Profile  
 
PostPosted: 29 Jun 2011, 18:09 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
this env var is read by unitsync and the engine, not by SL.
if springsettings uses unitsync, then it will also use the correct data-dirs of course.
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 09:49 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Not happy about it. Should have been done via an empty file in the install directory.

Changes made using the SET command are NOT permanent, they apply to the current CMD prompt only and remain only until the CMD window is closed.


Last edited by Forboding Angel on 30 Jun 2011, 10:30, edited 1 time in total.
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 10:29 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
hoijui wrote:
you have to define the env var SPRING_ISOLATED.

SL.bat
Code:
SET SPRING_ISOLATED=1
./springlobby.exe



Is not valid. Needs to be:

Code:
SET SPRING_ISOLATED 1
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 11:26 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
At least in win xp it is with the = sign
Pretty sure it was like that in previous windowses too.
I hope it did not change but I could not google any windows 7 or vista guide to check that.

btw iirc if you use setx, the change will be permanent (saved in registry) but i think it only works with some service packs or something. also would influence other spring installs so probally better not use that.
---
Anyway, it does work.
Now would be nice to have this in springsettings.cfg, it seems most logical.
Both "empty file in the install directory" or env variables seem a bit hackish.
But I guess this env variables thing is just for testing anway?

Out of interesst, does "portable install" have any function at all?
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 11:35 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Isolation mode is what portable mode should have been all along.

With this method that isolation uses, it is necessary to use both isolation and portable mode (portable mode being the failsafe).

It appears I was mistaken. SETX will not take =, but SET will.

No, Isolation is to be used for production environments, which is why imo an environment var is so offputting.

knorke wrote:

Both "empty file in the install directory" ... seem a bit hackish.


A 0kb file? I doubt that it would cause a stink.

From what I am told, using SET, child processes gain the environment var even if the cmd window is closes, same goes for grandchild processes (spring.exe would be a grandchild process). I have no real way to test this currently though.
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 11:41 
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
its not about filesize...
otherwise there might as well be a fullscreen.txt, no_audio.txt and reverse_mousewheel.txt

/edit
setx is without = because it is an extra programm while set is native part of the OS (or something like that)
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 11:43 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Ah come on, that's just silly exaggeration and you know it, but for things like this it actually makes sense.

On a sidenote, the extensions could be left off of the filename.
Top
 Offline Profile  
 
PostPosted: 30 Jun 2011, 16:17 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
please stop repeating the same stuff in every thread that somehow touched portable or isolation mode.
portable means, you can copy it around, and it still works.
isolation means, it does not look for stuff in external dirs.
isolation mode naturally "includes" portable mode.
just cause you want isolation mode and not portable mode, does not make portable mode useless, or badly implemented.
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.