Page 1 of 1
Questions about engines downloads
Posted: 09 Oct 2017, 13:02
by Jools
How does spads download a new engine if this isn't found? Does it use pr-downbloader?
Because there's a small issue: pr-downloader puts the stuff in a folder called:
Whereas spads appends -linux64 to the folder name:
Code: Select all
springdatadir/engine/103.0-linux64/
Is it possible to make both systems use same syntax?
Re: SPADS AutoHost
Posted: 09 Oct 2017, 16:54
by bibim
Jools wrote:How does spads download a new engine if this isn't found?
SPADS just retrieves the official Spring static binary packages and extracts the files required for autohosting only.
Jools wrote:Does it use pr-downbloader?
No, SPADS doesn't use pr-downloader.
SPADS doesn't store engines in Spring data dir, new engines are stored in the directory configured by the
autoManagedSpringDir setting.
Re: SPADS AutoHost
Posted: 09 Oct 2017, 17:28
by Jools
Would it be possible to have a an accessor to the module in spads that loads those files? Because it's obviously better to just download what you need, but ity's also better to download the engine before you restart the autohost. I'm thinking about the DownLoadArchives and SetEngine plugins.
Re: SPADS AutoHost
Posted: 10 Oct 2017, 09:32
by bibim
Jools wrote:Would it be possible to have a an accessor to the module in spads that loads those files? Because it's obviously better to just download what you need, but ity's also better to download the engine before you restart the autohost. I'm thinking about the DownLoadArchives and SetEngine plugins.
Sure, if you don't want to let SPADS core auto-manage Spring engines, you can call the SpadsUpdater module from a plugin instead (in particular the setupSpring function).
Re: Questions about engines downloads
Posted: 10 Oct 2017, 21:34
by Jools
Yes, for the purposes of testing the game, it's not always the latest test version that we want, so its better if it's easy to switch between versions easily.
Luckily it's just a matter of changing the automanaged setting in spads.conf, but the problem I have is finding the path and name of the config file itself, I do not always have it called spads.conf
Re: Questions about engines downloads
Posted: 11 Oct 2017, 09:49
by bibim
Jools wrote:the problem I have is finding the path and name of the config file itself, I do not always have it called spads.conf
Why do you need several spads.conf files?
Personally I find it much easier to manage when you use only one spads.conf file and declare several presets in it. That way, you just need to change the
defaultPreset value for each autohost instance.
Also, fortunately you don't need to edit the spads.conf file each time you want to change Spring version. You just need to use a config macro for the
autoManagedSpringVersion setting, so that you can declare the Spring version as command line parameter.
Re: Questions about engines downloads
Posted: 12 Oct 2017, 14:02
by Jools
bibim wrote:Jools wrote:the problem I have is finding the path and name of the config file itself, I do not always have it called spads.conf
Why do you need several spads.conf files?
In case I need to write to one conf file while another host is running. That way you can take down one host and do maintenance without affecting the others.
bibim wrote:Also, fortunately you don't need to edit the spads.conf file each time you want to change Spring version. You just need to use a config macro for the
autoManagedSpringVersion setting, so that you can declare the Spring version as command line parameter.
[/quote]
Nice, I'll look into this. Are there any examples of this? I'm rusty with perl/spads again.
Re: Questions about engines downloads
Posted: 12 Oct 2017, 15:10
by bibim
Jools wrote:bibim wrote:Why do you need several spads.conf files?
In case I need to write to one conf file while another host is running. That way you can take down one host and do maintenance without affecting the others.
There is a much simpler way to do that using config macros. You don't need to actually write a new conf file each time you change Spring version.
Jools wrote:Are there any examples of this? I'm rusty with perl/spads again.
Sure, config macros are explained in
this post.
In your case, you could edit your spads.conf so that the
autoManagedSpringVersion setting is defined using a config macro:
Code: Select all
autoManagedSpringVersion:%mySpringVersion%
Once you have done that, you just need to launch SPADS adding the config macro definition as command line parameter, for example:
Code: Select all
./spads.pl etc/spads.conf mySpringVersion=104.0
Don't hesitate if you need more details/explanations.
Re: Questions about engines downloads
Posted: 12 Oct 2017, 15:36
by Jools
bibim wrote:
In your case, you could edit your spads.conf so that the
autoManagedSpringVersion setting is defined using a config macro:
Code: Select all
autoManagedSpringVersion:%mySpringVersion%
Once you have done that, you just need to launch SPADS adding the config macro definition as command line parameter, for example:
Code: Select all
./spads.pl etc/spads.conf mySpringVersion=104.0
Don't hesitate if you need more details/explanations.
I'm not restarting via the command line but via spads method restartAfterGame(). Would it be possible to pass that parameter to that function instead?
Re: Questions about engines downloads
Posted: 12 Oct 2017, 19:05
by bibim
If you want to change the Spring version used by SPADS from lobby, you can directly use the
restart command, which accepts config macros redefinitions as parameters.
For example, if you used the mySpringVersion config macro as explained previously:
Code: Select all
!restart empty mySpringVersion=104.0
If you want to restart SPADS from a plugin, you could call the hRestart function which is the handler of the restart command, and redefine the config macros by passing the correct parameters as well.