SteamGridDB/steamgriddb-manager

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

vacero opened this issue · 4 comments

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!

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.

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).

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.

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.