-
Notifications
You must be signed in to change notification settings - Fork 81
Add Non Steam Game
Adding a Non-Steam Game to Steam using SteamTinkerLaunch can be done either completely via Command Line or via GUI.
The GUI can either be started via commandline steamtinkerlaunch addnonsteamgame
or steamtinkerlaunch ansg
without any further arguments, or with the additional -ep=|--exepath=
parameter plus a gui
parameter.
There is also an option on the Main Menu as an Extra Button to launch the Add Non-Steam Game GUI.
When setting the game artwork, SteamTinkerLaunch will change the name so that it uses the correct format expected by Steam, including adding the AppID. Therefore, it doesn't really matter what name you give your source artwork files, as they will get renamed and moved into the Steam Grid artwork folder.
The artwork folder is typically located at ~/.local/share/Steam/userdata/<userid>/config/grid
.
Note that all paths passed to this command from the commandline should be absolute paths.
For Command Line usage, you can use steamtinkerlaunch addnonsteamgame
or steamtinkerlaunch ansg
, followed by some of these parameters (EXE path is the only required field):
-
-an=|--appname=
(App Name - optional) -
-ep=|--exepath=
(Full gamepath required!) -
-sd=|--startdir=
(Start Dir - optional) -
-ip=|--iconpath=
(Icon Path - optional) -
-lo=|--launchoptions
(Game Launch Options - optional) -
-hd=|--hide=
(Hide Game - optional, default disabled) -
-adc=|--allowdesktopconf=
(Allow Desktop Conf - optional,?, default disabled) -
-ao=|--allowoverlay=
(Allow Overlay - optional, default disabled) -
-vr=|--openvr=
(OpenVR - optional, default disabled) -
-t=|--tags=
(Tags - comma-separated, default empty) -
-ct|--compatibilitytool=
(Compatibility Tool name, default empty, use name 'default' to use Steam default tool)
You can also pass various game artworks to this command with any (or none) of the following. A handy place to get game artwork is from SteamGridDB. This functionality mirrors that of the Set Game Artwork command.
-
-hr=|--hero=
(Hero/Banner Artwork Path - Recommended resolution of 3840x1240) -
-lg=|--logo=
(Logo Artwork Path - Recommended 16:9 aspect ratio) -
-ba=|--boxart=
(Boxart/Cover Artwork Path - Recommended resolution of 600x900) -
-tf=|--tenfoot=
("Last Played" Artwork Path - Recommended resolution of 600x350) -
--copy
(Copy files to artwork folder - This is the default if no option is passed) -
--link
(Symlink files to artwork folder) -
--move
(Move files to artwork folder)
A working example for a bare minimum command line is:
steamtinkerlaunch ansg -ep=/media/B4-1/GOG/Pirates\!/start.sh
Here, the game will be added with the title "start.sh
" to the Steam Library, as no -an
was provided. The Start Directory (-sd
) will default to the game directory will be used automatically.
A more in-depth example would be the following:
steamtinkerlaunch addnonsteamgame --appname="Cake Mania" --exepath="/home/gaben/games/Cake Mania/HorizonXI-Launcher.exe" --startdir="/home/gaben/games/Cake Mania" --iconpath="/home/gaben/games/Cake Mania/icon.png" --compatibilitytool="default" --hero="/home/gaben/games/Cake Mania/hero.png" --logo="/home/gaben/games/Cake Mania/logo.png" --boxart="/home/gaben/games/Cake Mania/boxart.png" --tenfoot="/home/gaben/games/Cake Mania/tenfoot.png" --copy
If no compatibility tool is provided, then no compatibility tool will be selected for the game when it is added to Steam, even if you have added what might be a Windows program that you would expect to use under Wine. The Steam Client does not set a compatibility tool automatically for Non-Steam Games, therefore SteamTinkerLaunch also does not.
If you try to run a Windows program without setting the compatibility tool, it will attempt to launch it with whatever program your system would default to launching it with. In the case of Windows EXEs, it will try to use your system Wine. This may be desirable in some advanced circumstances!
When a Non-Steam Game is added, you must restart Steam to make the newly added shortcut available.
When adding a shortcut, Non-Steam games are stored in a file called shortcuts.vdf
(typical path is ~/.local/share/Steam/userdata/<userid>/config/shortcuts.vdf
. This is a binary file.
This file contains information about Non-Steam games (or "Steam Shortcuts"). One field that each entry contains is the AppID. This AppID is stored in hexadecimal, and represents a 32bit little endian signed integer. When writing a shortcut out to this file, you can actually write any AppID you want into the appid
field!
SteamTinkerLaunch takes advantage of this, and generates an AppID to use based on the entered game name and path. This means the AppID is predictable, so if you remove a shortcut and add it again, and the name and path are EXACTLY the same, the AppID should also be the same.
This is how SteamTinkerLaunch is able to calculate the AppID before the shortcuts are written out, and how it is able to set the game artwork when adding a Non-Steam Game on-the-fly.
To see the code for installing Non-Steam Games, check addNonSteamGame
for the core logic, and addNonSteamGameGui
for the UI portion of the code. There are also various helper utilities for parsing and writing out to VDF files which you can check out too if you'd like.
Quick Links
- Changelog
- Installation
- Usage
- Main Menu
- Global Menu
- Tray Icon
- Modding
- Platform-Specific Documentation
- Tweaks
- Utilities
- Advanced