I've found that I tend to maintain WINE prefixes from the command line (winecfg, winetricks, DXVK/mf-cab/d9vk installers, environment variables, etc), and all I use Lutris for, is adding the games and their prefixes to its menu after I've already set them up.
No, I don't use the game installation scripts provided by Lutris' community. Is my way the best way? Maybe not, but it's what I'm used to.
Anyway, if that's all I'm doing with Lutris then I don't need it. To replace it, I just came up with a menuing system to launch these games after you've set up their prefixes.
The data for the menu is a JSON file, at ~/.config/wine_games.json. Here's an example with one entry:
Code:
{
"GOG Galaxy": {
"exe": "/home/dugan/.local/share/wineprefixes/galaxy/drive_c/Program Files (x86)/GOG Galaxy/GalaxyClient.exe",
"prefix": "/home/dugan/.local/share/wineprefixes/galaxy"
}
}
I assume it's self-explanatory and readable. "GOG Galaxy" is what appears in the menu. We also have the path to the prefix and the path to the executable.
Note that the paths do not, and cannot, contain tildes or variables. This is actually a technical limitation of the menuing script:
Code:
#!/usr/bin/env bash
set -e
GAME=$(jq -r 'keys[]' ~/.config/wine_games.json | dmenu)
if [[ "$GAME" == "" ]]; then
exit
fi
EXE="$(jq -r ".\"$GAME"\".\"exe\" ~/.config/wine_games.json)"
PREFIX="$(jq -r ".\"$GAME"\".\"prefix\" ~/.config/wine_games.json)"
if [ ! -d "$PREFIX" ]; then
echo Prefix not found
exit 1
fi
if [ ! -f "$EXE" ]; then
echo Executable not found
exit 1
fi
WINEDEBUG="-all" WINEPREFIX="$PREFIX" wine start /unix "$EXE"
Note the use of
dmenu (feel free to replace it with smenu, rofi, or even FZF) and
jq. Note also the use of "wine start /unix", which properly sets the Windows program's working directory.
You just execute the script, select the game from the menu, and launch it.
This is actually my third project to work with WINE prefixes, after
wine_env and
Wine Bottler, so I do have some experience with this.