Problem in loading a rapid archive with --write-dir enable

Problem in loading a rapid archive with --write-dir enable

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

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

Problem in loading a rapid archive with --write-dir enable

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

Re: Problem in loading a rapid archive with --write-dir enable

Post by Jools »

Are you really going to use 'Chobby' as the name?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Problem in loading a rapid archive with --write-dir enable

Post by gajop »

Yes
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Problem in loading a rapid archive with --write-dir enable

Post by Forboding Angel »

Jools wrote:Are you really going to use 'Chobby' as the name?
Chobby is the name of the lobby.
Last edited by Forboding Angel on 24 Jul 2017, 18:29, edited 1 time in total.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Problem in loading a rapid archive with --write-dir enable

Post 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.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Problem in loading a rapid archive with --write-dir enable

Post by gajop »

Seems like options are executed as they're parsed (line 132 in main.cpp). Should be an easy fix.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Problem in loading a rapid archive with --write-dir enable

Post 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'
tzaeru
Posts: 283
Joined: 28 Oct 2007, 02:23

Re: Problem in loading a rapid archive with --write-dir enable

Post 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.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Problem in loading a rapid archive with --write-dir enable

Post 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.
tzaeru
Posts: 283
Joined: 28 Oct 2007, 02:23

Re: Problem in loading a rapid archive with --write-dir enable

Post 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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Problem in loading a rapid archive with --write-dir enable

Post 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 ...
Post Reply

Return to “Help & Bugs”