Page 1 of 1
Problem in loading a rapid archive with --write-dir enable
Posted: 21 Jul 2017, 18:33
by tzaeru
Heyas,
I'm making a small wrapper/installer for Chobby & Spring. When I run the engine with
Code: Select all
spring.exe --write-dir "C:\Users\tzaeru\Documents\ChobbyWrapper\data" --menu "Chobby $VERSION"
with Chobby.sdd in C:\Users\tzaeru\Documents\ChobbyWrapper\data\games, all works fine.
When I do:
Code: Select all
spring.exe --write-dir "C:\Users\tzaeru\Documents\ChobbyWrapper\data" --menu "rapid://chobby:test"
It can not find the archive for Chobby, saying "Archive chobby test-2194-bf5356a not found"
Previously I've downloaded Chobby to the aforementioned directory as so:
Code: Select all
pr-downloader --download-game chobby:test --filesystem-writepath C:\Users\tzaeru\Documents\ChobbyWrapper\data
and looking at the data directory, the rapid directory structure is in place and all that.
Halp!
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 21 Jul 2017, 20:27
by Jools
Are you really going to use 'Chobby' as the name?
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 21 Jul 2017, 20:46
by gajop
Yes
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 21 Jul 2017, 22:33
by Forboding Angel
Jools wrote:Are you really going to use 'Chobby' as the name?
Chobby is the name of the lobby.
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 22 Jul 2017, 04:50
by gajop
Can you provide the output of each of the commands please?
Using RC candidate, there's one thing I noticed:
Code: Select all
➜ spring_{develop}103.0.1-1222-g37dc534_minimal-port ./pr-downloader --download-game chobby:test --filesystem-writepath $PWD
pr-downloader 0.7-375-g0212ada
[Info] Using filesystem-writepath: /home/gajop/.spring
While:
Code: Select all
➜ spring_{develop}103.0.1-1222-g37dc534_minimal-port ./pr-downloader --filesystem-writepath $PWD chobby:test
pr-downloader 0.7-375-g0212ada
[Info] Using filesystem-writepath: /home/gajop/spring-static/spring_{develop}103.0.1-1222-g37dc534_minimal-port
Obviously very different results depending on where --filesystem-writepath is located! Sounds like a pr-downloader bug
PS: Doing it in the 2nd way then works, even if I make an isolated.txt in that folder.
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 22 Jul 2017, 06:12
by gajop
Seems like options are executed as they're parsed (line 132 in main.cpp). Should be an easy fix.
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 22 Jul 2017, 10:53
by Jools
Forboding Angel wrote:Jools wrote:Are you really going to use 'Chobby' as the name?
Chubby is the name of the lobby.
Yes, that would be a better name.
Well, even a name like 'Estelle' would be better, or 'Jim'
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 22 Jul 2017, 14:11
by tzaeru
No luck.
Here's the Python script I use to test:
Code: Select all
from subprocess import call
import os
ver_string = "103.0.1-1222-g37dc534 develop"
call(['pr-downloader', '--filesystem-writepath', 'data/', '--download-engine', ver_string])
call(['pr-downloader', '--filesystem-writepath', 'data/', 'chobby:test'])
call(["data/engine/" + ver_string + "/spring.exe", "--write-dir", os.getcwd() + "/data", "--menu", "rapid://chobby:test"])
If I manually place Chobby.sdd to data/games and use "Chobby $VERSION" instead of "rapid://chobby:test", it works. Looking at the data-directory, Rapid's file structure is in place and the total file size of it gives some suggestion that it has downloaded Chobby to the data dir.
I'm getting the vibe that when using a rapid archive, Spring somehow fails to take --write-dir properly into account when looking for the archive. If I remove both filesystem-writepath and write-dir arguments and let Spring use default paths instead, it works.
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 22 Jul 2017, 16:08
by gajop
Code: Select all
#!/usr/bin/python
from subprocess import call
import os
ver_string = "103.0.1-1222-g37dc534 develop"
print("first call")
call(['./pr-downloader', '--filesystem-writepath', 'data/', '--download-engine', ver_string])
print("second call")
call(['./pr-downloader', '--filesystem-writepath', 'data/', 'chobby:test'])
print("third call")
call(["data/engine/" + ver_string + "/spring", "--write-dir", os.getcwd() + "/data", "--menu", "rapid://chobby:test"])
This works for me (with pr-downloader from RC1). I tried putting isolated.txt in the newly downloaded engine folder and running the last line to ensure it really doesn't use any globally available chobby install.
I wonder if this is a Windows/Linux system difference.
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 24 Jul 2017, 16:35
by tzaeru
Well, I spent some time grepping the sources. Would need to build Spring and start doing debug prints to figure out where it goes off - the data directory handling stuff has a quite few indirections in it.
I guess it's a Windows-specific problem.
Re: Problem in loading a rapid archive with --write-dir enable
Posted: 31 Jul 2017, 18:50
by abma
tzaeru wrote:Heyas,
When I do:
Code: Select all
spring.exe --write-dir "C:\Users\tzaeru\Documents\ChobbyWrapper\data" --menu "rapid://chobby:test"
It can not find the archive for Chobby, saying "Archive chobby test-2194-bf5356a not found"
can you paste infolog.txt / and the console output of pr-downloader when it can't find the archive? very likely there is some previous error ...