-
Notifications
You must be signed in to change notification settings - Fork 73
Steam First Time Setup
install Regular or Custom First-Time-Setups on the fly
steamtinkerlaunch can start the first-time setup
game dependency installation using iscriptevaluator,
which usually is triggered by steam "magically" without any obvious traces.
Being able to control iscriptevaluator
programmatically not only opens the door to many new useful features,
but also offers the possibility to enhance the steam-default install-mechanism of Steamworks-Shared dependencies.
Some Origin games may not automatically run the First Time Setup automatically from Steam if the evaluator script denotes "mode" "2"
. In such an instance the evaluator script may only run if a compatibility tool using Manifest v2 for its toolmanifest.vdf
file. SteamTinkerLaunch does not do this as Manifest v2 tools run inside of the Steam Linux Runtime, and SteamTinkerLaunch does not work in this instance. Therefore it stays on the default Manifest v1, and so Steam does not trigger the First Time Setup for apps which denote "mode" "2"
. See #767 for some discussion around this.
The regular default steam mechanism works as follows:
The iscriptevaluator
tool (~/.local/share/Steam/legacycompat/iscriptevaluatorexe) usually is started automatically with proton
before the game itself is started with two different command line parameters (coming from Steam):
-
legacycompat\evaluatorscript_$GAMESTEAMAPPID.vdf
(hereinafterEVALSC
): This vdf file contains all packages which are supposed to be installed on the first run of the game (so on proton Wineprefix (re-)creation) The file does not exist, though but is temporarily auto-created and removed directly after it was used for the installation. -
--get-current-step $GAMESTEAMAPPID
(hereinafterGECUST
): This command is called as long the first command is not finished yet, and its only function is to update the current installation state for the Steam status requester.
The functionality in steamtinkerlaunch requires some modifications (but also offers additional options):
(using steamtinkerlaunch)
- Find and use a Proton version
Before the iscriptevaluator
installation can even be started steamtinkerlaunch needs to find a usable proton version and is searching in the following order:
- in the current gameconfig (see Configuration-Files) (allow minor proton version mismatch)
- in the default game template (see Configuration-Files) (allow minor proton version mismatch)
- check for variable
$EARLYPROT
which contains the absolute path to a proton binary - read the file
STLEARLYPROTCONF
(~/.config/steamtinkerlaunch/protonearlyproton.conf) which defines the variable$EARLYPROT
When a proton executable is found, it is used to launch the above iscriptevaluator
commands.
Initially, only the EVALSC
command is important as it triggers the creation of the required EVALSC
file:
- Capture the
EVALSC
vdf config
As the EVALSC
is not available, steamtinkerlaunch starts a capture function, which saves the file as soon as it is available.
The storage directory used is described under Metadata-Support.
If the file is already found there, it is directly used, and the capture is skipped.
- Start the First Time Setup
The captured EVALSC
can't be used directly with iscriptevaluator,
as the path to the directory which holds the corresponding installer file is unknown.
It can be either in the game directory or in the Steamworks-Shared path (or in the steamtinkerlaunch Download Dir '$STLDLDIR', when rolling a custom own one).
Fortunately, the game directory is inside a variable, and Steamworks-Shared is hardcoded and can't be changed by the user and, therefore, always is "$STEAM_COMPAT_CLIENT_INSTALL_PATH/steamapps/common/Steamworks Shared"
(which should resolve to ~/.local/share/Steam/steamapps/common/Steamworks Shared
on most systems)
steamtinkerlaunch does some magic to find and set the correct winepath for each of the install packages and inserts it as linux_install_path
variable in EVALSC
(which is empty by default)
(found a hint to the formerly used foreign_install_path
string in this excellent wiki - Read it!)
A windows variant of the path (auto-created with some bash expansions) is seded
into a copy of EVALSC
and finally, the iscriptevaluator
install process is started using the modified EVALSC.
-
Updating the Steam Status Requester
GECUST
WhileEVALSC
is running, Steam repeatedly triggers theGECUST
command to fetch the Installation Status for the Steam Requester. This works the same way in steamtinkerlaunch with the additional feature that the currently running Installation exe is shown inside the same Steam Requester as well.
- When the installation is finished, the start process continues as usual
Using steamtinkerlaunch, it is straightforward to start a customized Steam First-Time-Setup
for a game and Re-Create it's Compatdata and Wineprefix simultaneously.
The CUSTOM
variant is basically identical to the REGULAR
one; the decision on which of both is being used depends on the launch and constellation of the Evaluator Scripts
WARNING, Please be careful as this includes save data for the game, and deleting the compatdata folder will cause Steam to sync an empty game save to Steam cloud; however, by default, steamtinkerlaunch will create a backup in PATHTOSTEAMTINKERLAUNCHCONFIG/Backup/
See Backup-Support for more info
A Compatdata and the Wineprefix inside can be simply recreated for a game, by clicking either the Extra Button from the Main Menu or via Command Line.
The First-Time-Setup is automatically executed as well - either as Regular First-Time-Setup or as Custom First-Time-Setup
First-Time-Setup
implementation supports the following source EVALSC
files:
- a copy
REGULAR
of the temporary regular one (looks like the temporary one created/fetched from Steam can only be initially created when the function is started directly from steam - not sure yet) in$EVMETAID/${EVALSC}_${GAMESTEAMAPPID}.vdf
(= f.e. ~/.config/steamtinkerlaunch/meta/eval/id/evaluatorscript_1091500.vdf) - a
CUSTOM
created one in$EVMETACUSTOMID/${EVALSC}_${GAMESTEAMAPPID}.vdf
(= f.e. ~/.config/steamtinkerlaunch/meta/eval/id/custom/evaluatorscript_1091500.vdf) - a custom
ADDON
, which is installed additional to the previous one (= f.e. ~/.config/steamtinkerlaunch/meta/eval/id/addon/evaluatorscript_1091500.vdf) - (a
SKIP
one)
The priority between REGULAR
and CUSTOM
depends on the launch constellation as follows:
-
First-Time-Setup started manually
- if neither a
REGULAR
nor aCUSTOM
file exists, the Create Custom Gui opens (automatically when started with Extra Button, and via 2nd GUI parameter when started from the command line) where aCUSTOM
(orADDON
) file can be created - if one of both exists, all required variables are autodetected (if possible) and the Regular First-Time-Setup is started
- if neither a
-
First-Time-Setup started automatically
- if neither the
REGULAR
nor aCUSTOM
file exists, the regularFirst-Time-Setup
is started, which also catches theREGULAR
file for later use - if the
REGULAR
file does exist and theCUSTOM
file does not, theREGULAR
one is used - if both the
REGULAR
and theCUSTOM
files do exist, theCUSTOM
one is used - if only the
CUSTOM
file exists, it will be used - if an
ADDON
file exists in the "addon" subdirectory as well, it will be started after the previous one
- if neither the
steamtinkerlaunch offers the option to also create a First-Time-Setup Evaluator Script via Gui, either started via Extra Button from the Main Menu
or via Command Line.
Open gui to create a Steam First Time Setup:
steamtinkerlaunch createfirstinstall|cfi <gameid> <a|c|r|file>
where the single letter as optional last parameter stands for the file which is used as a template to pre-enable the available packages:
- a (the
ADDON
file will be used as a template) - c (the
CUSTOM
file will be used as a template) - r (the
REGULAR
file will be used as a template) Without a template shortcut, no files are preselected. The place of the available packages isGLOBALEVALDIR
(i.e. /usr/share/steamtinkerlaunch/eval/packages/) The path could be expanded with a custom one; generally, more could be added, and this wiki probably is missing some features which are already implemented, but nobody reads this lorem ipsum dolor anyway.
When done with selecting packages, one can choose from the following options:
-
SAVE AS ADDON
(The created file will be saved as anADDON
file for further use) -
SAVE AS CUSTOM
(The created file will be saved as aCUSTOM
file for further use) -
INSTALL WITHOUT SAVING
(The created file will be used immediately for installation without storing it permanently)
If the last parameter is a valid writeable path, the created file will be stored under that filename!
The whole iscriptevaluator
process can be skipped by simply creating the Metadata file
$EVMETASKIPID/${EVALSC}_${STEAM_COMPAT_APP_ID}.vdf
(= ~/.config/steamtinkerlaunch/meta/eval/id/skip/evaluatorscript_${STEAM_COMPAT_APP_ID}.vdf)
EVALSC
files without any package are skipped early automatically as well.
This skips both the Regular and the Custom First-Time-Setup
The First-Time-Setup
process is automatically triggered automatically or manually
Depending on the availability of the EVALSC
files, the Setup is either a Regular or a Custom First-Time-Setup
(see Evaluator Scripts for file descriptions)
- when on game launch the
[Compatdata](https://github.com/frostworx/steamtinkerlaunch/wiki/Compatdata)
/ Wineprefix does not yet exist - when on game launch the
EVALSC
file does not exist in Metadata
WARNING, Please be careful as this includes save data for the game, and deleting the compatdata folder will cause Steam to sync an empty game save to Steam cloud; however, by default, steamtinkerlaunch will create a backup in PATHTOSTEAMTINKERLAUNCHCONFIG/Backup/
See Backup-Support for more info
**
This can be either done by simply clicking the RE-CREATE WINEPREFIX
Extra Button from the Main Menu
or by using the Command Line*:
steamtinkerlaunch createcompatdata|ccd <gameid>
: (re-)create Compatdata for
(optional 2nd gui parameter opens Create Custom Gui to configure custom setup)
When started manually, the Steam-internal requester showing the installation status doesn't open; that's why the Notifier is used here instead.
Note: Steam does not even have to be running for the manual install method!
Customizing the Steam First Time Setup process is pretty complicated and might require some more optimizations and improvements. Future work depends on general feedback
Quick Links
- Changelog
- Installation
- Usage
- Main Menu
- Global Menu
- Tray Icon
- Modding
- Platform-Specific Documentation
- Tweaks
- Utilities
- Advanced