jaydenmilne / steamsync

Tool to automatically add games from the Epic Games Launcher to Steam
GNU Affero General Public License v3.0
157 stars 17 forks source link

Launch all xbox games with explorer #12

Closed idbrii closed 2 years ago

idbrii commented 2 years ago

Bug: sometimes new xbox games fail to launch.

Reason: Xbox games put their version number in their path, so we can't rely on running the exe directly. We need to use explorer to launch by id or else the shortcut will break when the game updates.

The game display now looks like this when using --use-uri:

Num | Game Name                 | Source     | App ID                                        | Executable
============================================================================================================
  1 | Axiom Verge               | epicstore  | Puffin                                        | com.epicgames.launcher://apps/Puffin?action=launch&silent=true
  2 | Carcassonne               | epicstore  | Thrush                                        | com.epicgames.launcher://apps/Thrush?action=launch&silent=true
  3 | Celeste                   | epicstore  | Salt                                          | com.epicgames.launcher://apps/Salt?action=launch&silent=true
  4 | Genesis Noir for Windows  | xbox       | SurpriseAttackPtyLtd.GenesisNoirforWindows_8k | C:/WINDOWS/explorer.exe shell:appsFolder\SurpriseAttackPtyLtd.GenesisNoirforWindows_8k24hnfn3vvj0!GenesisNoir
  5 | Ghost of a Tale PC        | xbox       | PlugInDigital.GhostofaTalePC_9e3ank8rmgj0t!Ga | C:/WINDOWS/explorer.exe shell:appsFolder\PlugInDigital.GhostofaTalePC_9e3ank8rmgj0t!Game

Test

On master I started with:

steamsync.py --download-art --replace-existing --all

Carto                     | HumbleBundle.CartoWin10                            | C:\Program Files\WindowsApps\HumbleBundle.CartoWin10_1.0.73.0_x64__q2mcdwmzx4qja\Carto.exe
Curse of the Dead Gods    | FocusHomeInteractiveSA.CurseoftheDeadGods-Windows1 | C:\Program Files\WindowsApps\FocusHomeInteractiveSA.CurseoftheDeadGods-Windows1_1.0.3.0_x64__4hny5m903y3g0\oTempleGame.exe
Genesis Noir for Windows  | SurpriseAttackPtyLtd.GenesisNoirforWindows         | C:\Program Files\WindowsApps\SurpriseAttackPtyLtd.GenesisNoirforWindows_1.0.24.0_x64__8k24hnfn3vvj0\GenesisNoir.exe
Ghost of a Tale PC        | PlugInDigital.GhostofaTalePC                       | C:\Program Files\WindowsApps\PlugInDigital.GhostofaTalePC_1.0.9.0_x64__9e3ank8rmgj0t\GhostofaTale.exe
Katamari Damacy Reroll_Wi | NAMCOBANDAIGamesInc.KatamariDamacyRerollWindows    | C:\Program Files\WindowsApps\NAMCOBANDAIGamesInc.KatamariDamacyRerollWindows_1.0.19.0_x64__gdy2aq6ez762w\Katamari Damacy Reroll.exe
Monster Train             | 69C22BB6.MonsterTrain                              | C:\Program Files\WindowsApps\69C22BB6.MonsterTrain_1.0.12838.0_x64__8ekbzbj4dakee\MonsterTrain.exe
Prey                      | BethesdaSoftworks.LiluDallas-Multipass             | C:\Program Files\WindowsApps\BethesdaSoftworks.LiluDallas-Multipass_1.11.7.0_x64__3275kfvn8vcwc\Binaries\Danielle\Gaming.Desktop.x64\Release\Prey.exe
Raji An Ancient Epic      | SUPER.COM.499901B22ECB3                            | C:\Program Files\WindowsApps\SUPER.COM.499901B22ECB3_1.0.3.0_x64__khac1bdnsjzc4\Raji\Binaries\WinGDK\Raji-WinGDK-Shipping.exe
ReCore                    | Microsoft.ReCore                                   | C:\WINDOWS\explorer.exe shell:appsFolder\Microsoft.ReCore_8wekyb3d8bbwe!App
Recompile                 | PlugInDigital.Recompile                            | C:\Program Files\WindowsApps\PlugInDigital.Recompile_1.0.3.0_x64__9e3ank8rmgj0t\Recompile.exe
Supraland                 | HumbleBundle.SupralandWin10                        | C:\Program Files\WindowsApps\HumbleBundle.SupralandWin10_1.21.18.0_x64__q2mcdwmzx4qja\Supraland\Binaries\WinGDK\Supraland-WinGDK-Shipping.exe
Tetris® Effect: Connected | 48710EnhanceIncorporated.TRIP2.0                   | C:\Program Files\WindowsApps\48710EnhanceIncorporated.TRIP2.0_1.2.2.0_x64__63vy8jfbpt4dt\TetrisEffect\Binaries\WinGDK\TetrisEffect-WinGDK-Shipping.exe

After using this branch to update: steamsync.py --download-art --replace-existing --remove-missing --all

The game selection table shows the exe and not the thing we're planning to use.

Carto                     | HumbleBundle.CartoWin10_q2mcdwmzx4qja!Game                                      | C:\Program Files\WindowsApps\HumbleBundle.CartoWin10_1.0.73.0_x64__q2mcdwmzx4qja\Carto.exe
Curse of the Dead Gods    | FocusHomeInteractiveSA.CurseoftheDeadGods-Windows1_4hny5m903y3g0!Game           | C:\Program Files\WindowsApps\FocusHomeInteractiveSA.CurseoftheDeadGods-Windows1_1.0.3.0_x64__4hny5m903y3g0\oTempleGame.exe
Genesis Noir for Windows  | SurpriseAttackPtyLtd.GenesisNoirforWindows_8k24hnfn3vvj0!GenesisNoir            | C:\Program Files\WindowsApps\SurpriseAttackPtyLtd.GenesisNoirforWindows_1.0.24.0_x64__8k24hnfn3vvj0\GenesisNoir.exe
Ghost of a Tale PC        | PlugInDigital.GhostofaTalePC_9e3ank8rmgj0t!Game                                 | C:\Program Files\WindowsApps\PlugInDigital.GhostofaTalePC_1.0.9.0_x64__9e3ank8rmgj0t\GhostofaTale.exe
Katamari Damacy Reroll_Wi | NAMCOBANDAIGamesInc.KatamariDamacyRerollWindows_gdy2aq6ez762w!Game              | C:\Program Files\WindowsApps\NAMCOBANDAIGamesInc.KatamariDamacyRerollWindows_1.0.19.0_x64__gdy2aq6ez762w\Katamari Damacy Reroll.exe
Monster Train             | 69C22BB6.MonsterTrain_8ekbzbj4dakee!Game                                        | C:\Program Files\WindowsApps\69C22BB6.MonsterTrain_1.0.12838.0_x64__8ekbzbj4dakee\MonsterTrain.exe
Prey                      | BethesdaSoftworks.LiluDallas-Multipass_3275kfvn8vcwc!App                        | C:\Program Files\WindowsApps\BethesdaSoftworks.LiluDallas-Multipass_1.11.7.0_x64__3275kfvn8vcwc\Binaries\Danielle\Gaming.Desktop.x64\Release\Prey.exe
Raji An Ancient Epic      | SUPER.COM.499901B22ECB3_khac1bdnsjzc4!AppRajiShipping                           | C:\Program Files\WindowsApps\SUPER.COM.499901B22ECB3_1.0.3.0_x64__khac1bdnsjzc4\Raji\Binaries\WinGDK\Raji-WinGDK-Shipping.exe
Recompile                 | PlugInDigital.Recompile_9e3ank8rmgj0t!Game                                      | C:\Program Files\WindowsApps\PlugInDigital.Recompile_1.0.3.0_x64__9e3ank8rmgj0t\Recompile.exe
Supraland                 | HumbleBundle.SupralandWin10_q2mcdwmzx4qja!AppSupralandShipping                  | C:\Program Files\WindowsApps\HumbleBundle.SupralandWin10_1.21.18.0_x64__q2mcdwmzx4qja\Supraland\Binaries\WinGDK\Supraland-WinGDK-Shipping.exe
Tetris® Effect: Connected | 48710EnhanceIncorporated.TRIP2.0_63vy8jfbpt4dt!AppTetrisEffectConnectedShipping | C:\Program Files\WindowsApps\48710EnhanceIncorporated.TRIP2.0_1.2.2.0_x64__63vy8jfbpt4dt\TetrisEffect\Binaries\WinGDK\TetrisEffect-WinGDK-Shipping.exe

Replacing Carto (C:\Program Files\WindowsApps\HumbleBundle.CartoWin10_1.0.73.0_x64__q2mcdwmzx4qja\Carto.exe )
    with Carto (C:/WINDOWS/explorer.exe shell:appsFolder\HumbleBundle.CartoWin10_q2mcdwmzx4qja!Game)
Replacing Curse of the Dead Gods (C:\Program Files\WindowsApps\FocusHomeInteractiveSA.CurseoftheDeadGods-Windows1_1.0.3.0_x64__4hny5m903y3g0\oTempleGame.exe )
    with Curse of the Dead Gods (C:/WINDOWS/explorer.exe shell:appsFolder\FocusHomeInteractiveSA.CurseoftheDeadGods-Windows1_4hny5m903y3g0!Game)
Replacing Genesis Noir for Windows (C:\Program Files\WindowsApps\SurpriseAttackPtyLtd.GenesisNoirforWindows_1.0.24.0_x64__8k24hnfn3vvj0\GenesisNoir.exe )
    with Genesis Noir for Windows (C:/WINDOWS/explorer.exe shell:appsFolder\SurpriseAttackPtyLtd.GenesisNoirforWindows_8k24hnfn3vvj0!GenesisNoir)
Replacing Ghost of a Tale PC (C:\Program Files\WindowsApps\PlugInDigital.GhostofaTalePC_1.0.9.0_x64__9e3ank8rmgj0t\GhostofaTale.exe )
    with Ghost of a Tale PC (C:/WINDOWS/explorer.exe shell:appsFolder\PlugInDigital.GhostofaTalePC_9e3ank8rmgj0t!Game)
Replacing Katamari Damacy Reroll_Windows (C:\Program Files\WindowsApps\NAMCOBANDAIGamesInc.KatamariDamacyRerollWindows_1.0.19.0_x64__gdy2aq6ez762w\Katamari Damacy Reroll.exe )
    with Katamari Damacy Reroll_Windows (C:/WINDOWS/explorer.exe shell:appsFolder\NAMCOBANDAIGamesInc.KatamariDamacyRerollWindows_gdy2aq6ez762w!Game)
Replacing Monster Train (C:\Program Files\WindowsApps\69C22BB6.MonsterTrain_1.0.12838.0_x64__8ekbzbj4dakee\MonsterTrain.exe )
    with Monster Train (C:/WINDOWS/explorer.exe shell:appsFolder\69C22BB6.MonsterTrain_8ekbzbj4dakee!Game)
Replacing Prey (C:\Program Files\WindowsApps\BethesdaSoftworks.LiluDallas-Multipass_1.11.7.0_x64__3275kfvn8vcwc\Binaries\Danielle\Gaming.Desktop.x64\Release\Prey.exe )
    with Prey (C:/WINDOWS/explorer.exe shell:appsFolder\BethesdaSoftworks.LiluDallas-Multipass_3275kfvn8vcwc!App)
Replacing Raji An Ancient Epic (C:\Program Files\WindowsApps\SUPER.COM.499901B22ECB3_1.0.3.0_x64__khac1bdnsjzc4\Raji\Binaries\WinGDK\Raji-WinGDK-Shipping.exe )
    with Raji An Ancient Epic (C:/WINDOWS/explorer.exe shell:appsFolder\SUPER.COM.499901B22ECB3_khac1bdnsjzc4!AppRajiShipping)
Replacing Recompile (C:\Program Files\WindowsApps\PlugInDigital.Recompile_1.0.3.0_x64__9e3ank8rmgj0t\Recompile.exe )
    with Recompile (C:/WINDOWS/explorer.exe shell:appsFolder\PlugInDigital.Recompile_9e3ank8rmgj0t!Game)
Replacing Supraland (C:\Program Files\WindowsApps\HumbleBundle.SupralandWin10_1.21.18.0_x64__q2mcdwmzx4qja\Supraland\Binaries\WinGDK\Supraland-WinGDK-Shipping.exe )
    with Supraland (C:/WINDOWS/explorer.exe shell:appsFolder\HumbleBundle.SupralandWin10_q2mcdwmzx4qja!AppSupralandShipping)
Replacing Tetris® Effect: Connected (C:\Program Files\WindowsApps\48710EnhanceIncorporated.TRIP2.0_1.2.2.0_x64__63vy8jfbpt4dt\TetrisEffect\Binaries\WinGDK\TetrisEffect-WinGDK-Shipping.exe )
    with Tetris® Effect: Connected (C:/WINDOWS/explorer.exe shell:appsFolder\48710EnhanceIncorporated.TRIP2.0_63vy8jfbpt4dt!AppTetrisEffectConnectedShipping)

All of those games launch correctly from Steam for me.

~However, I'm not seeing any art download and I'm not sure why yet (hence draft pr). I haven't had much time to work on this, but I thought I should post soon so you can see the bug I introduced :(~

idbrii commented 2 years ago

I figured out the art problem -- I wasn't passing the right exe there. The same fix for that also fixes double downloading art when using uris. And that fix led me to fixing uri games never getting downloaded art.

idbrii commented 2 years ago

Fixed an error when installing shortcuts for old-style xbox games (like Spiritfarer) -- exe_name not defined.