Closed idbrii closed 2 years ago
If we can figure out if an app is a UWP app, then it seems like we have the pieces to go through this process and make a shortcut to C:\Windows\explorer.exe
with launch options shell:appsFolder\Microsoft.Halo5Forge_8wekyb3d8bbwe!Ausar
to launch the game. We don't get steam input, but streaming works.
Just thinking out loud here
Final thoughts for merge:
I just found that Spiritfarer doesn't actually work (my testing was that games get added, but not that they were launching properly). So I need to run through some additional testing.
The shell:appsFolder trick doesn't work for it either:
explorer.exe shell:appsFolder\44905ThunderLotusGames.40196900AE792!App
Maybe it can only get executed with whatever trick UWPHook is using.
I'd guess that neither Halo 5 Forge nor Roblox would get detected on the 7be671d version and it's the later commits that try to be more wide-reaching that pick them up.
Looks like the Spiritfarer exe isn't a readable file, so that may be a good way to detect if it will be launchable.
I was wrong about Spiritfarer, you can launch via explorer.exe but I had the aumid wrong. Figured out how to get the right aumid and I've changed the code to launch via explorer.exe anything without a MicrosoftGame.config (which seems to indicate it's not a UWP app). I feel a lot better about using the explorer trick for starting games that don't seem to follow modern conventions. Thanks for the suggestion!
Can you try it with Halo 5? It should either no longer be detected or now launch properly.
I tested with a bunch of games. I tried using a Dual Sense gamepad to see if launching from steam would have better support, but no dice.
detected | runs | dual sense | game |
---|---|---|---|
y | y | y | Carto |
y | y | n | Genesis Noir for Windows |
y | y | y | Ghost of a Tale PC |
y | y | n (partial) | Monster Train |
y | y | n | Prey |
y | y | n | Rain on Your Parade |
no | -- | -- | Roblox |
y | y | n | Spiritfarer |
y | y | n | Supraland |
y | y | n | Tetris® Effect: Connected |
y | y | n | Unto The End |
I also added sorting the game list (useful when I was comparing the list in steam to the list in the output) and some formatting changes.
Halo 5: detected, launch OK via the explorer.exe hack 🎉(halo 5 forge is ftp by the way so you can test with it). No steam input, as expected.
I'll do a final code review; do you have anything else you want to include in this?
Thanks for the work on this, turned out great!
I'll do a final code review; do you have anything else you want to include in this?
🎆 Nope. I'm happy with it.
This builds on top of changes from #8, so that commit is included here.
Uses a method similar to BrianLima/UWPHook to discover app packages. See https://github.com/BrianLima/UWPHook/blob/master/UWPHook/Resources/GetAUMIDScript.ps1
However, instead of creating a wrapper like UWPHook, we find the exe and add it directly to steam. This might not work for UWP games, but probably most games are win32.
I included the
--skip-xbox-library
argument just in case this adds something someone doesn't want. All the other libraries can be skipped by setting their path to somewhere invalid, but xbox doesn't have paths, so this seemed appropriate.Test