jaydenmilne / steamsync Goto Github PK
View Code? Open in Web Editor NEWTool to automatically add games from the Epic Games Launcher to Steam
License: GNU Affero General Public License v3.0
Tool to automatically add games from the Epic Games Launcher to Steam
License: GNU Affero General Public License v3.0
Hi, I'm not sure if there are some prerequisites to use this tool, I just downloaded the exe and tried it and got:
steamsync v0.3.0 - Encountered An Error. Please submit a bug report at https://github.com/jaydenmilne/steamsync/issues with this log!
Traceback (most recent call last):
File "main.py", line 63, in next
File "main.py", line 228, in init
File "steamsync.py", line 106, in egs_collect_games
File "json_init_.py", line 293, in load
File "json_init_.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 353, in raw_decode
json.decoder.JSONDecodeError: Invalid \escape: line 6 column 25 (char 136)
Log:
steampath C:\Program Files (x86)\Steam
manifestPath C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests
Scanning EGS manifest store (C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests)...
Exception!!!
Hello, something very strange is happening to me with Steam sync, and that is that when I manually add covers to the games that I have added with it, when I open and close Steam they are deleted. Someone else happens? I tried manually adding one game and another with uwphook and this cover art thing doesn't happen to me.
Awhile ago, I had a Steam client update and then downloaded art no longer displayed in Steam (all downloaded art suddenly disappeared and new art also doesn't appear). I assumed it was a steam bug, but at this point it doesn't seem like they're changing back. It worked for a long time before (even in the new Big Picture), but now it doesn't.
I also tried BoilR and it does work. Looks like steamsync is not using the correct ids. For TMNT Shredder's Revenge on Xbox:
steamsync:
boilr:
So it looks like the naming scheme is the same, but the number is wrong.
Epic games have the same problem. For Adios:
steamsync:
boilr:
So I guess Valve changed the algorithm to generate the numeric id for shortcuts?
I looked a bit in Boilr's revision history but didn't see an obvious commit fix. Probably need to dig into their code to figure it out.
Using desktop and new Big Picture in Steam Version 1690583737.
Are Steamsync 0.4.0 and up not available through PIP?
I cannot upgrade it:
C:\Users\<user>\AppData\Local\Programs\Python\Python37\Scripts>pip install steamsync --upgrade
Requirement already satisfied: steamsync in c:\users\<user>\appdata\local\programs\python\python37\lib\site-packages (0.3.0)
Requirement already satisfied: vdf<4,>=3 in c:\users\<user>\appdata\local\programs\python\python37\lib\site-packages (from steamsync) (3.4)
Running Steam ROM Manager after SteamSync runs results in:
Fatal error occurred in Preview. See event log for details.
Could not read required steam files:
Error: "c:\program files (x86)\steam\userdata\[UID]\config\shortcuts.vdf" is corrupted.
TypeError: Cannot convert undefined or null to object
Hi! I'm trying to use the steamsync exe, with custom install folders for Steam and Epic Games. When I run it, I get the error "the path 'D;/Games/Epic Games/Data/Manifests' does not exist, is that an actual epic games store install directory?" Any advice? That is my actual Epic Games install directory.
It would be good if we supported Origin.
When trying to use the CIL to add itch.io games into the steam library the optional arguments are not recognized. Only Epic Games Store integration is currently working.
A recent update to Xbox Game Pass introduced an invisible launcher (GameLaunchHelper.exe, I think) which breaks gamepad support when launched from Steam.
Possibly we could solve this by launching our own application that launches the game (with explorer.exe) and watches for the game to exit. I think UWPHook does something like that for Steam Link streaming support. I haven't tried it recently and who knows how they'll break that next?
Switch Desktop Layout to use Gamepad.
This setting means if you have any desktop apps, you won't get mouse emulation on gamepad unless you set them up as a Steam shortcut with Steam Input using the normal Desktop Configuration layout.
Cant seem to find manifest file. Reinstalled twice, logged in and nothing is in Launcher/Data.
Hey there, this is a really neat project!
I personally prefer Steam for organzing my library, so it would be quite cool if this would support GOG as well.
There is no official API documentation, but there is this: https://gogapidocs.readthedocs.io/en/latest/
Generally, this would probably make most sense to implement using GOG Galaxy installed on the PC, because it has a URL scheme to launch games. When using that you wouldn't need to know the location of the installed games themselves:
\path\to\GalaxyClient.exe /command=runGame /gameId=xxxxxxxxxx
For example, on my PC this would run Gato Roboto:
"C:\Program Files (x86)\GOG Galaxy\GalaxyClient.exe" /command=runGame /gameId=1727534143
For getting the game list, I suppose opening a browser window for authentication would make most sense, as detailed here. This doc here details how to get a listing of games owned by the signed-in account.
I guess you'd need to cache authentication somehow using an embedded browser. Or, to make it a lot easier to implement, just open the desktop browser and ask the user to copy-paste the json from requests.
I sadly do not know python, but if necessary I can try helping with this. If you don't want to do this or don't have time, that's totally fine too - just close the issue again.
Thanks for the cool project all in all!
I'm working with a Retrobat (EmulationStation) on my Windows machine, and I've already found a way to automatically generate Steam shortcuts for it to work with...looks like your script will get most of the way there, just need to generate Windows shortcuts instead of Steam launcher shortcuts.
Please help. I'm trying to figure all this out, but (despite pushing 30) I'm kinda very new at this. Trying to learn, know a little java and a little HTML, but more than a bit rusty on both of those. Want to learn as much as I can through modding, not sure what language I'm working with or how to dig into all of it proper to fix whatever this issue is. At a precursory glance, I don't notice anything amiss. Here's what I'm looking at.
Immediate edit: I placed shortcuts.vdf in the indicated folder earlier and got this, it was originally a much larger block before I gleaned that bit of information. I'm sure I'm just overlooking something and need a pair of trained eyes to find it for me.
steamsync v0.3.0 - Encountered An Error. Please submit a bug report at https://github.com/jaydenmilne/steamsync/issues with this log!
Traceback (most recent call last):
File "main.py", line 150, in add_shortcuts
File "steamsync.py", line 367, in add_games_to_shortcut_file
KeyError: 'shortcuts'
Log:
steampath C:\Program Files (x86)\Steam
manifestPath C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests
Scanning EGS manifest store (C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests)...
Collected 3 games from the EGS manifest store
⚠ ⚠ NOTICE: ⚠ ⚠
Using the path to the executable instead of the Epic Games Launcher URI
You may experience issues with online games (eg GTAV!)
Exception!!!
If a user has used UWPHook in the past, running SteamSync with --download-art
will fail:
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steamsync.py", line 652, in main
result, msg = add_games_to_shortcut_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steamsync.py", line 355, in add_games_to_shortcut_file
success = steamdb.download_art(user, game, should_replace_existing=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steameditor.py", line 292, in download_art
appid = self.guess_appid(game.display_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steameditor.py", line 203, in guess_appid
name = self._make_gamename_comparable(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ani\AppData\Local\Programs\Python\Python312\Lib\site-packages\steamsync\steameditor.py", line 128, in _make_gamename_comparable
name = re_remove_hyphen.sub("", name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'
This is because UWPHook ends up creating shortcuts that SteamSync finds that are bogus:
{'app_name': None,
'art_url': None,
'display_name': None, ## No Display Name so we blow up
'executable_path': '"C:\\Users\\ani\\AppData\\Roaming\\Briano\\UWPHook\\UWPHook.exe"',
'icon': '"C:\\Users\\ani\\AppData\\Roaming\\Briano\\UWPHook\\UWPHook.exe"',
'install_folder': '"C:\\Users\\ani\\AppData\\Roaming\\Briano\\UWPHook',
'launch_arguments': '',
'shortcut_id': -1915271522,
'storetag': 'ignore tag',
'uri': None}
The solution is probably to either recognize these bogus entries and ignore them or to tell the user about it
Not sure if this would be a problem for other games. Seems like Astroneer has a messed up PrettyName. Hacking up list_xbox_games.ps1 to list all results outputs this for Astroneer:
|| {
|| "Kind": "ASTRONEER",
|| "Appid": "SystemEraSoftworks.29415440E1269",
|| "PrettyName": "ms-resource:PackageDisplayName",
|| "Icon": "C:\\Program Files\\WindowsApps\\SystemEraSoftworks.29415440E1269_1.28.65.0_x64__ftk5pbg2rayv2\\Resources\\SmallLogo.png",
|| "InstallLocation": "C:\\Program Files\\WindowsApps\\SystemEraSoftworks.29415440E1269_1.28.65.0_x64__ftk5pbg2rayv2",
|| "Aumid": "SystemEraSoftworks.29415440E1269_ftk5pbg2rayv2!ASTRONEER"
|| },
At the moment, I can't see how we could support this without special casing for this one game. Might not be worth fixing, but having this report should help people work around it.
You can use this path in a shortcut to launch it:
C:/WINDOWS/explorer.exe shell:appsFolder\SystemEraSoftworks.29415440E1269_ftk5pbg2rayv2!ASTRONEER
Hi @jaydenmilne,
Thanks for making this! Excited to use it to avoid opening the Epic Games Launcher as little as possible :)
Running into two separate issues:
vdf
library didn't get installed via pip install steamsync
. Had to install it manually with pip install vdf
. Not familiar with setuptools
, but my guess is that it should use the imports from steamsync.py
based on the setup.py
script. That's the only dependency that didn't make it; maybe all the others are a part of the standard library?UnicodeDecodeError
on line 199 trying to load the localconfig.vdf
. Maybe this is related to the upstream issue ValvePython/vdf#20? That was supposed to be fixed in ValvePython/vdf#21.Would attempt to add a try/except or set the encoding a la file = open(filename, encoding="utf8")
, but not sure how to control (heh) for the error here.
Installing GTA V in Epic to see if it's a trend or just isolated to Control -- either due to the unicode string or possibly that Control hasn't dropped in Steam yet?
Scanning EGS manifest store (C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests)...
Collected 1 games from the EGS manifest store
Num | Game Name | App ID | Install Path
================================================================================================================
1 | Control | Calluna | C:\Program Files\Epic Games\Control\Control.exe
Which games do you want to install (blank = all, or comma seperated list of numbers from table)?
:
Traceback (most recent call last):
File ".\steamsync.py", line 327, in <module>
accounts = enumerate_steam_accounts(args.steam_path)
File ".\steamsync.py", line 199, in enumerate_steam_accounts
cfg = vdf.load(localconfig)
File "C:\Python38\lib\site-packages\vdf\__init__.py", line 198, in load
return parse(fp, **kwargs)
File "C:\Python38\lib\site-packages\vdf\__init__.py", line 96, in parse
for lineno, line in enumerate(fp, 1):
File "C:\Python38\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 6298: character maps to <undefined>
At least for Final Fantasy VII Remake "Path to Game" doesn't work, it will just tell you to start the game through the Epic Launcher.
URL will launch the game, but the Steam Overlay won't work.
The way I've found to launch FFVII Remake that works is to have the target be "C:\Windows\System32\cmd.exe" with launch options set to "/k start com.epicgames.launcher://apps/appidofgamehere?action=launch^&silent=true & exit"
It does not work, seemingly due to an exception.
Command used: steamsync.py --all
9 games were found.
Traceback (most recent call last): File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python39\Scripts\steamsync.py", line 437, in <module> add_games_to_shortcut_file( File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python39\Scripts\steamsync.py", line 358, in add_games_to_shortcut_file last_index = int(max(shortcuts["shortcuts"].keys())) ValueError: max() arg is an empty sequence
OS: Windows 10
My steam/epic installations are at their default folder paths.
GTAV doesn't launch because apparently some authentication needs to happen through the EGL before it will work, verified by looking at the command line arguments that invoke PlayGTAV.exe
, there are some tokens passed in from the EGL.
It seems that we can work around this by using the URI format that the Epic Games Launcher uses when you make a shortcut (Library -> 3 dot menu -> create shortcut)
Instead of the target being
D:\Epic Games\GTAV\PlayGTAV.exe
it should be
com.epicgames.launcher://apps/9d2d0eb64d5c44529cece33fe2a46482?action=launch&silent=true
Where 9d2d0....
is the AppName
field of the .item
file (see https://jayd.ml/games/2020/05/16/epic-games-store-steam-libraries.html)
We're already collecting the AppName
(I figured it would be useful) so we should change the link format we inject into shortcuts.vdf
. That will break the picture previews in steam coming from the .exe
though, which would be sad.
A simple yes/no in the GUI, which will include tags like [Epic Games] Borderlands 3
When using the --download-art-all-shortcuts options it returns the following:
Traceback (most recent call last):
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\Scripts\steamsync.exe_main.py", line 7, in
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\site-packages\steamsync\steamsync.py", line 643, in main
result, msg = add_games_to_shortcut_file(
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\site-packages\steamsync\steamsync.py", line 346, in add_games_to_shortcut_file
success = steamdb.download_art(user, game, should_replace_existing=False)
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\site-packages\steamsync\steameditor.py", line 280, in download_art
targets = self._get_grid_art_destinations(game, user)
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\site-packages\steamsync\steameditor.py", line 384, in _get_grid_art_destinations
shortcut = self._get_steam_shortcut_id(exe, game.display_name)
File "C:\Users\LaneT\AppData\Local\Programs\Python\Python310\lib\site-packages\steamsync\steameditor.py", line 373, in _get_steam_shortcut_id
unique_id = "".join([exe, appname])
TypeError: sequence item 1: expected str instance, NoneType found
And no art is added to the shortcut, of course.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.