Closed i30817 closed 2 years ago
the changes you made suggest you were using a directory name with spaces in it, which seems unrelated to "current directory". but if you can be more specific to what exactly the breakage was, we can look into fixing it. (and yes, i never use directory names with spaces in it, because it breaks all sorts of tooling)
Yes, it had spaces, like the game has. Personally i don't think it's a step too far to request that scripts don't break with spaces, but that was a easy fix, the main 'problem' manifested if i tried to pass the game executable argument as a file not on the current directory, which broke on agsextract, spaces or not.
When i tried it on the current directory of the executable, still with spaces, it worked.
$ agstract artoftheft/artoftheft.exe ~/shm/TMP
:::AGStract 0.9.8 by rofl0r:::
artoftheft/artoftheft.exe: mfl version 15, containing 87 files.
music1.mid -> /home/user/shm/TMP/music1.mid
music10.mid -> /home/user/shm/TMP/music10.mid
music11.mid -> /home/user/shm/TMP/music11.mid
...
works for me
Maybe i shouldn't have said 'spaces or not' the first time.
Here:
i3@sleipnir:~/Downloads/Ashina the Red Witch/wtf$ ./agsex "game/ATRW.exe" game/ script/
:::AGStract 0.9.8 by rofl0r:::
error opening mfl datafile ATRW.001
error opening game/ATRW.exe
I just find it strange that it would break with a space on relative paths when if i then 'cd game' and tried again with ../agsex "./ATRW.exe" . ../script/
it would work
ok so the issue seems to be with multifile lib split into .exe, .001, etc parts. i'll look around if i can find such a game in my collection to reproduce.
There is a demo of the game on the dev itch.io page if you haven't found one. 180 mb though - the demo is not smaller than the game, in fact i bet they're the same data with the executable with a 'demo' flag turned on and baked in statically.
Also you need a recent AGS to run it, i reported a thing that was bugfixed (AGS 3.6.0 beta had a api in testing that was removed that this game uses because it was made with it).
thanks. i pushed a commit fixing this on the agstract side, let me know whether there are further issues, and feel free to open a PR with your changes to support filenames with spaces in them.
No problems afaik, will open a PR.
Long story short, i tried to invoke agsex from a parent dir containing the scripts to a game dir and extraction dir children.
It broke a lot.
First the script agsex, where I changed
BINDIR=$(dirname $(readlink -f "$0"))
->BINDIR="$(dirname "$(readlink -f "$0")")"
and->
Then it broken in agsextract and i gave up and tried to execute in the same directory as the executable (of the game). Behold, it worked. Maybe it's best to detect this case and warn it's not supported before exiting.