Initial commit

master
Marco Cawthorne 2 years ago
commit 493b0aab4d
Signed by: eukara
GPG Key ID: CE2032F0A2882A22

@ -0,0 +1,13 @@
"compatibilitytools"
{
"compat_tools"
{
"custom-tool" // Internal name of this tool
{
"install_path" "."
"display_name" "SteamPlay Custom"
"from_oslist" "windows"
"to_oslist" "linux"
}
}
}

@ -0,0 +1,7 @@
"manifest"
{
"commandline" "/wrapper run"
"commandline_waitforexitandrun" "/wrapper wait-before-run"
"commandline_getnativepath" "/wrapper get-native-path"
"commandline_getcompatpath" "/wrapper get-compat-path"
}

@ -0,0 +1,24 @@
#!/bin/sh
SPC_CFG="$HOME/.config/steamcustomrc"
COMMANDTYPE=$1
if [ "$COMMANDTYPE" = "wait-before-run" ]; then
# env check
STEAM_APPID="$SteamGameId"
# find something valid, first result only
CHECK_GAME=$(grep "$STEAM_APPID:" "$SPC_CFG" | head -n 1)
# nothing found? throw a message...
if [ -z "$CHECK_GAME" ]; then
notify-send -a "SteamPlay-Custom" \
-i "steam" "SteamPlay-Custom" \
"AppID $STEAM_APPID has no entry in $SPC_CFG"
exit
fi
# run our alternative
RUN_GAME=$(echo "$CHECK_GAME" | cut -d ':' -f 2)
exec $RUN_GAME
fi
Loading…
Cancel
Save