Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #517 from rockerbacon/steamdeck-cabextract-dependency
Browse files Browse the repository at this point in the history
Enforce Flatpak Protontricks on the Steam Deck
  • Loading branch information
rockerbacon authored Aug 17, 2023
2 parents 87bb33c + 8ce7b02 commit ced3e5d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ The following requirements should be available out-of-the-box in most systems:

All requirements should be readily available in your distribution's package manager.

**Steam Deck users**: Protontricks must be installed through the Discover app.

#### Installation steps

1. Install the game you want to play on Steam;
Expand Down
9 changes: 9 additions & 0 deletions step/check_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,14 @@ if [ ! -f "$redirector/main.exe" ]; then
exit 1
fi

os_id=$("$utils/get_os_id.sh")

if [ "$os_id" == "steamos" ] && [ "$using_flatpak_protontricks" == "0" ]; then
log_error "Using non-flatpak Protontricks on SteamOS"
"$dialog" errorbox \
"Only Flatpak releases of Protontricks are supported on SteamOS.\nPlease install Protontricks through the Discover app and try again."
exit 1
fi

log_info "all dependencies met"

19 changes: 19 additions & 0 deletions utils/get_os_id.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

function get_from_os_release() {
if [ ! -f /etc/os-release ]; then
return 1
fi

os_id=$(bash -c 'source /etc/os-release; echo $ID')
status=$?

if [ "$status" != "0" ] || [ -z "$os_id" ]; then
return 1
fi

echo $os_id
}

get_from_os_release || echo "unknown"

0 comments on commit ced3e5d

Please sign in to comment.