nbusseneau / hephaistos

Supergiant Games' Hades mod adding support for ultrawide monitors (21:9, 32:9), multi-monitor (48:9), Steam Deck (16:10), and custom resolutions.
MIT License
211 stars 4 forks source link

Install documentation incorrect re: placement #34

Closed aph3rson closed 2 weeks ago

aph3rson commented 3 weeks ago

Hephaistos specifies in its documentation that the binary must be placed within the Hades folder to run correctly.

This doesn't appear to be accurate - it seems that it's actually checking the current directory when running, and throwing an error if the current directory doesn't contain expected Hades files.

(deck@steamdeck Downloads)$ ~/.local/share/Steam/steamapps/common/Hades/hephaistos
ERROR:hephaistos:Did not find expected items ['Content', 'x64', 'x64Vk', 'x86'] in '.'
ERROR:hephaistos:Hephaistos does not seem to be located in the Hades directory:
  - /home/deck/.local/share/Steam/steamapps/common/Hades
Please move Hephaistos directly to the Hades directory.

If you know what you're doing, you can also re-run with '--hades-dir' to manually specify Hades directory while storing Hephaistos elsewhere.

Press any key to exit...

In this case, the binary is already in the right directory. It looks like it expects to be run as ./hephaistos, rather than from any other working directory.

Could the readme be updated accordingly? Alternatively, rather than default to checking ., check in the location the file is in?

aph3rson commented 3 weeks ago

https://github.com/nbusseneau/hephaistos/blob/9c11ccbd215bfd70c2155bc2548331665608c2e7/hephaistos/cli.py#L47

This could be updated to default to something like os.path.dirname(os.path.realpath(__file__)), which gets the directory of the current Python file.

nbusseneau commented 2 weeks ago

Correct -- the default behaviour basically assumes the user double clicks the executable, the "running via absolute path on the command line" use case was not really considered 😅

nbusseneau commented 2 weeks ago

Should be fixed by 078772ea33722672c7bad3fe30f7fb4753f3538d, released in v1.7.10.