Changing Spring engine version

Changing Spring engine version

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
tzaeru
Posts: 283
Joined: 28 Oct 2007, 02:23

Changing Spring engine version

Post by tzaeru » 03 Jun 2015, 13:45

Heya,

I tried to set up a PrincessHost for Spring engine testing. Figuring it'd be as easy as to change the "springServer" variable, I tried that -- But SpringLobby still reports the engine in use as 0.98, even though I've double-checked that the Spring binaries behind springServer path are of development version.

I tried to disable automatic updates and tried putting "onBadSpringVersion" to empty. I also deleted the cache files behind spads/var/, though a "cache/98rel-" is still generated there when I start the autohost.

So, what else would there be that I need to change & configure to get a non-standard Spring version to run on the server? Should I somehow point SPADS to a different libunitsync.so or?..
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim » 03 Jun 2015, 14:03

0 x

tzaeru
Posts: 283
Joined: 28 Oct 2007, 02:23

Re: Changing Spring engine version

Post by tzaeru » 03 Jun 2015, 14:13

So this implies that I should keep a separately installed SPADS version for non-lobby default Spring engine versions? I was hoping I could neatly have just one installed SPADS, but I suppose this'll have to do, then. ^^
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim » 04 Jun 2015, 12:35

If you really want to use multiple Spring versions at the same time with same SPADS installation, you can always force SPADS to use a specific unitsync library at runtime with:

Code: Select all

LD_PRELOAD=/path/to/libunitsync.so ./spads.pl etc/spads.conf
Just ensure you always use a unitsync version consistent with the spring server binary configured in spads.conf.
0 x

User avatar
ThinkSome
Posts: 288
Joined: 14 Jun 2015, 13:36

Re: Changing Spring engine version

Post by ThinkSome » 27 Jun 2015, 11:31

Would it not be better to have spads.conf independent from engine version (since the spads installation is bound to a specific unitsync/engine anyway (with or without the preload hack)). This just means I have to change stuff in two different places when switching engine and from what I know, spads knows which engine it was started with (indirectly via unitsync or directly if it the engine path was moved from spads.conf to install dir)
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim » 27 Jun 2015, 12:13

I don't understand what you mean.

SPADS needs to know 3 Spring related paths in order to work correctly with a given Spring version:
1) the unitsync library path
2) the Spring data directory containing Spring base content
3) the spring server path (spring-dedicated or spring-headless)

I want SPADS to be compatible with any specific Spring installation, which means knowing one of these paths doesn't give any information concerning the others.

Currently, on Linux:
1) is configured through springInstaller.pl script which generates the PerlUnitSync.so library containing hardcoded path to libunitsync.so (which can be overwritten at runtime using the LD_PRELOAD trick as seen above)
2) and 3) are configured in spads.conf, respectively with springDataDir and springServer global settings.

Can you explain why do you think it would be better to have spads.conf independent from engine version and how do you propose to implement it exactly?

FYI, the plan for next major SPADS version is on the contrary to add the unitsync library path in spads.conf, which would gather all Spring related paths in one location. This way, the PerlUnitSync module regeneration step (spadsInstaller.pl -g) wouldn't be needed anymore when changing Spring version, but there would still be potentially 3 different settings to update in spads.conf.
0 x

User avatar
ThinkSome
Posts: 288
Joined: 14 Jun 2015, 13:36

Re: Changing Spring engine version

Post by ThinkSome » 27 Jun 2015, 16:16

making spads install independent from spring version would be just as good. Will it keep the perl unitsync module inside var/ and autodetect when the spring version changes?

Actually this sounds even better, as I do not have to make one spads install per engine version (yes, I know you told me about a workaround in lobby PM)
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim » 27 Jun 2015, 16:43

ThinkSome wrote:Will it keep the perl unitsync module inside var/ and autodetect when the spring version changes?
No, the PerlUnitSync module will stay where it is. It's just that the PerlUnitSync module won't contain a hardcoded runtime library search path for a specific unitsync library anymore, so it should be usable for any unitsync version (it will basically work as it currently works on Windows already).
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Changing Spring engine version

Post by Jools » 27 Jun 2015, 17:26

We also made a plugin that can set the engine version with the !setengine command, but it requires a restart. So the preload trick can do it without restarting the host?
0 x

User avatar
bibim
Lobby Developer
Posts: 901
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim » 27 Jun 2015, 18:01

No, you still need to restart the host to change the unitsync library in use, even if you use the LD_PRELOAD trick.

But anyway current lobby protocol doesn't support changing the engine version without rehosting, hence kicking all players in the battle room. So it's not really worse to restart entirely.
0 x

User avatar
Jools
XTA Developer
Posts: 2804
Joined: 23 Feb 2009, 16:29

Re: Changing Spring engine version

Post by Jools » 28 Jun 2015, 09:54

0 x

Post Reply

Return to “SPADS AutoHost”