portable/isolation mode
Moderator: Moderators
portable/isolation mode
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?
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?
Re: portable/isolation mode
you have to define the env var SPRING_ISOLATED.
SL.bat (windows)
SL.sh (linux & mac)
not a very nice/clean way i guess, but for testing it should be enough, and it would also meet your criteria.
SL.bat (windows)
Code: Select all
SET SPRING_ISOLATED=1
./springlobby.exe
Code: Select all
#!/bin/sh
export SPRING_ISOLATED=1
./springlobby
Last edited by hoijui on 30 Jun 2011, 17:11, edited 3 times in total.
Re: portable/isolation mode
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?
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?
Re: portable/isolation mode
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.
if springsettings uses unitsync, then it will also use the correct data-dirs of course.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: portable/isolation mode
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.
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, 11:30, edited 1 time in total.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: portable/isolation mode
Is not valid. Needs to be:hoijui wrote:you have to define the env var SPRING_ISOLATED.
SL.batCode: Select all
SET SPRING_ISOLATED=1 ./springlobby.exe
Code: Select all
SET SPRING_ISOLATED 1
Re: portable/isolation mode
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?
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?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: portable/isolation mode
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.
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.
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.
A 0kb file? I doubt that it would cause a stink.knorke wrote:
Both "empty file in the install directory" ... seem a bit hackish.
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.
Re: portable/isolation mode
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)
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)
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: portable/isolation mode
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.
On a sidenote, the extensions could be left off of the filename.
Re: portable/isolation mode
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.
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.