SteamGridDB / steamgriddb-manager

Automatically find games from launchers on your system and import them into your Steam library with a click of a button.
https://www.steamgriddb.com/manager
MIT License
396 stars 56 forks source link

Steam's "Launch Options" has a character limit of 260 #89

Open vacero opened 4 years ago

vacero commented 4 years ago

Describe the bug I just imported a game from Epic Games Launcher: Thimbleweed Park. The import process completed successfully, I got my banner images, the game added to Steam as a shortcut, etc. But this is the content of the "Launch Options" needed to trigger the launch of the game: -windowstyle hidden -NoProfile -ExecutionPolicy Bypass -Command "& \"C:\Users\fogok\AppData\Local\Programs\SteamGridDB Manager\LauncherAutoClose.ps1\"" -launcher \"EpicGamesLauncher\" -game \"ThimbleweedPark\" -launchcmd \"com.epicgames.launcher://apps/Tulip?

As you can see, it gets cut at the end, at exactly 260 characters.

For this specific case, it still launches the game, but this can cause games to not launch at all if the ID of the app gets cut, if it's longer. Or if the install path is longer, etc.

I guess one option to solve this could be creating a custom launch script for each game on import to workaround this 260 character limitation.

For now, I am going to try and install the program in a shorter path to avoid this as much as possible. Thanks for the great program!

aranel616 commented 3 years ago

This might have been missed if developers increased the character limit when installing Python, as the installer offers to do this for you once Python is installed.

aranel616 commented 3 years ago

Article on how to enable long paths in Windows 10: https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/

This is something we could check in the manager and offer to change for the user. It would require elevated permissions, but it can be done (this is what the Python installer for Windows does).

vacero commented 3 years ago

I enabled that registry key long ago, that is not the problem I am describing here. This is a problem of the shortcut being saved to Steam having the string for the launch options cut at 260 characters. It seems to be a hard limit imposed by Steam itself, not Windows.

applesauce9 commented 3 years ago

As a workaround, I copied the LauncherAutoClose.ps1 script to my C drive to shorten the command, and then used Epic launcher to create a desktop shortcut for the game and copied the rest of the launchcmd from there.