Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colons in "-e"/extra frontend options are omitted when saving Pegasus metadata file #320

Open
andrewphorn opened this issue Oct 28, 2021 · 4 comments

Comments

@andrewphorn
Copy link

Describe the bug
When specifying an absolute windows path including the drive letter and a colon in the -e option, the resulting pegasus metadata lacks any colons.

To Reproduce
Run a scrape with frontend set to pegasus, and path set to an absolute windows path including colons. For example:

skyscraper.exe -p snes -i C:\test\snes -g C:\test\snes -f pegasus -e "C:/emu/launcher.exe C:/emu/RetroArch/retroarch.exe -L "C:/emu/RetroArch/cores/snes9x_libretro.dll" "{file.path}""

Skyscraper's startup indicates that the extra flag is seen as:

C:/emu/launcher.exe C:/emu/RetroArch/retroarch.exe -L C:/emu/RetroArch/cores/snes9x_libretro.dll {file.path}

so it's happening somewhere after the initialization.

Special circumstances
Running on (unsupported) windows

Technical information

  • Skyscraper version: Skyscraper 3.6.12
  • Internet connection: Gigabit cable
  • OS: Windows
  • OS Version: 10

Additional context
This is being automated through a script I wrote, but it looks like that isn't the root cause since skyscraper is getting the path correct at startup.

@andrewphorn
Copy link
Author

Workaround (as long as the program you want to launch is on the same drive): Windows seems to allow you to omit the drive letter and it will use the current drive.

@andrewphorn andrewphorn changed the title Colons in "-e"/extra frontend options are omitted Colons in "-e"/extra frontend options are omitted when saving Pegasus metadata file Oct 28, 2021
@andrewphorn
Copy link
Author

Per https://github.com/muldjord/skyscraper/blob/master/src/pegasus.cpp#L282 looks intentional, curious why?

Perhaps it should be ifdef'd out from windows builds?

@muldjord
Copy link
Owner

muldjord commented Nov 1, 2021

I honestly can't remember, but yes, there's a reason for it, I do remember that much.

EDIT: I think I remember now. The format of the pegasus gamelists is such that a headline is a title with a ":" after it. That signifies new data. And I have a homebrewed parser that can read those files. But it breaks with multiple colons in a line. I even remember trying to work around that to allow those colons, but I gave up after it turned out to be not so simple to do.

@andrewphorn
Copy link
Author

Looking at the source code of the parser, it certainly does seem non-trivial to fix. Maybe in the interim, throw a debug print out when a colon is detected?

Typical usage won't see windows users going across drives to run their games, I think, so offering that explanation and a suggested alternative on windows may be enough.

Thanks for the awesome work on the software btw! Works pretty well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants