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 »

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?..
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim »

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

Re: Changing Spring engine version

Post by tzaeru »

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. ^^
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim »

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.
User avatar
ThinkSome
Posts: 387
Joined: 14 Jun 2015, 13:36

Re: Changing Spring engine version

Post by ThinkSome »

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)
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim »

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.
User avatar
ThinkSome
Posts: 387
Joined: 14 Jun 2015, 13:36

Re: Changing Spring engine version

Post by ThinkSome »

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)
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim »

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).
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Changing Spring engine version

Post by Jools »

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?
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Changing Spring engine version

Post by bibim »

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.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Changing Spring engine version

Post by Jools »

Post Reply

Return to “SPADS AutoHost”