Closed konsumer closed 1 year ago
Sure, please go ahead with the PR. This will be beneficial for many users.
Seems like main prob is here. Not sure of best way to solve it.
I could do a test more like this:
if (os.path.exists(os.path.expanduser('~/Games/Heroic/'))):
instead of:
if("Games/Heroic/" in os.getcwd()):
It's a bit hard to test, though, as the installed version is a binary (not python.) Are there any tricks for testing it?
Also it's started in ~/Games/Heroic/HeroicBashLauncher/GameFiles/
, so it seems like this would always return false, right?
Maybe I am misunderstanding some key part.
Basically, the HeroicBashLauncher
folder should always be present in ~/Games/Heroic
due to permission issues related to Heroic, especially if you're using Heroic as a Flatpak.
Thus the following code
if("Games/Heroic/" in os.getcwd()):
checks if the HeroicBashLauncher and naturally, the binary, are placed in ~/Games/Heroic
Otherwise, users will face issues if they place the folder anywhere else.
Hope this makes it clear. Maybe I should add a comment to the code.
Also it's started in ~/Games/Heroic/HeroicBashLauncher/GameFiles/, so it seems like this would always return false, right?
Yes, GameFiles is only reserved for the bash/launch files generated by the program.
The program/binary should always be placed in the root HeroicBashLauncher
folder. It's not neat but it is what it is.
Ah, ok, so I will do this sort of test, maybe:
if (os.path.exists(os.path.expanduser('~/Games/Heroic/HeroicBashLauncher'))):
I will probly need to adjust a few other paths to follow the expanduser
pattern.
I am testing over ssh on my steamdeck and building on another linux box. I think I need to just run it directly on a linux box, this is a bit hard to test.
By the way, you can also use the --silent
argument to disable GUI popups for faster testing.
I think I have the fix in place, but can't seem to build a working HeroicBashLauncher
, in linux docker or on real steamdeck. when I run it, it says modules that are installed (requests, wget) are not available. I will just PR, and you can test it, and if it works I will use the release.
Yeah, you will need pyinstaller and the necessary dependencies to be installed for building the executable. The build.sh
file runs pyinstaller.
I need to add a requirements.txt file for convenience.
Anyway, do check your PR for some additional context.
I have pyinstaller. it seems like the built runtime is not setup right, like it requests modules that are definitely installed on both devices (my desktop and the actual steamdeck.) I noticed today that Hero Launcher now has an "add to steam" feature, which seems to work great, so i will just use that.
The "Add to Steam" has been there since HGL v2.4.0 I think. I would personally recommend using it if you're a heavy Steam user or use a Deck.
Bash Launcher serves a wider audience looking to integrate Heroic into other game launchers other than Steam.
That makes sense! I didn't see it before, which is what got me on this path, but it seems to work pretty well. Thanks for your help!
Is your feature request related to a problem? Please describe.
I have my games symlinked to sdcard, which works fine in Heroic Games Launcher, but not the launchers made with this.
Describe the solution you'd like
I'd like if the scripts accepted the resolved
~/Games/Heroic/
as the correct dir.Describe alternatives you've considered
Maybe some sort of setting that let me point to the correct dir.
Additional context
I'm going to work on a PR for it, if anyone else is interested (otherwise it's what I will use for myself.)