├── screenshot.png ├── PKGBUILD ├── LICENSE ├── README.md └── protonlaunch /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/h0m3/protonlaunch/HEAD/screenshot.png -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Artur 'h0m3' Paiva 2 | pkgname="protonlaunch" 3 | pkgver="0.9" 4 | pkgrel=1 5 | pkgdesc="A small piece of script to launch Proton directly from the CLI, similar to Wine" 6 | arch=('any') 7 | url="https://github.com/h0m3/protonlaunch" 8 | license=('BSD') 9 | depends=("steam") 10 | optdepends=("steam-native-runtime") 11 | source=("$pkgname::git+https://github.com/h0m3/$pkgname.git#branch=main") 12 | sha256sums=('SKIP') 13 | 14 | package() { 15 | mkdir -pv "$pkgdir/usr/bin" 16 | mkdir -pv "$pkgdir/usr/share/licenses/$pkgname/" 17 | mkdir -pv "$pkgdir/usr/share/doc/$pkgname/" 18 | 19 | mv -v "$srcdir/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname" 20 | mv -v "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 21 | mv -v "$srcdir/$pkgname/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" 22 | mv -v "$srcdir/$pkgname/screenshot.png" "$pkgdir/usr/share/doc/$pkgname/screenshot.png" 23 | 24 | chmod +x "$pkgdir/usr/bin/$pkgname" 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022, Artur 'h0m3' Paiva 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of protonlaunch nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ProtonLaunch 2 | 3 | A small piece of script to launch Steam Proton instance directly from the CLI, similar to Wine. It also allows you to set custom proton prefixes instead of Steam default ones 4 | 5 | ![Protonlaunch running Winecfg](https://raw.githubusercontent.com/h0m3/protonlaunch/main/screenshot.png) 6 | 7 | # installation 8 | 9 | ## Requirements 10 | 11 | - [Steam](https://store.steampowered.com/) 12 | - [POSIX Shell](https://en.wikipedia.org/wiki/POSIX) eg. [bash](https://www.gnu.org/software/bash/) 13 | - [curl](https://curl.se/) (only needed for automatic installation) 14 | - [sudo](https://www.sudo.ws/) (only needed for automatic installation) 15 | 16 | ## Enable Steam Play Compatibility 17 | 18 | You need to enable Steam Play Compatibility Layer (proton) for all games. 19 | 20 | For that, open Steam and go to **Steam > Settings > Steam Play > Advanced** and check *Enable Steam Play for all other titles* 21 | 22 | ## Install Proton on Steam 23 | 24 | Make sure you're in your Steam **Library** and in the Search Bar type *proton*, you should see all available Proton versions, install the ones that you want to use. I recommend using the latest non-experimental one. 25 | 26 | ## Arch Linux Users 27 | 28 | Protonlaunch is available on [AUR](https://aur.archlinux.org/packages/protonlaunch) for Arch Linux users. 29 | 30 | You can build it and install using the standard AUR build commands 31 | ```bash 32 | git clone https://aur.archlinux.org/protonlaunch.git 33 | cd protonlaunch 34 | makepkg -si 35 | ``` 36 | 37 | If you're not running Arch Linux you can still use the single line automatic installation below or the [manual installation process](https://github.com/h0m3/protonlaunch/wiki/Manual-installation). 38 | 39 | ## Single line automatic installation 40 | 41 | Just copy and paste to install protonlaunch to your `/usr/local/bin` 42 | 43 | ```bash 44 | curl -O https://raw.githubusercontent.com/h0m3/protonlaunch/main/protonlaunch; sudo mv ./protonlaunch /usr/local/bin/protonlaunch; sudo chmod +x /usr/local/bin/protonlaunch 45 | ``` 46 | 47 | ## You're done 48 | 49 | Now just test it, if you have a standard Steam / Proton installation, it should work by just typing `protonlaunch winecfg` in your terminal. If you want to know where to go next follow the [getting started guide](https://github.com/h0m3/protonlaunch/wiki/Getting-Started). 50 | 51 | # Manual installation 52 | 53 | We have a [manual installation process](https://github.com/h0m3/protonlaunch/wiki/Manual-installation) guide on your wiki if you prefer 54 | 55 | # Check out our FAQ 56 | 57 | We have a [FAQ](https://github.com/h0m3/protonlaunch/wiki/FAQ) with the most common questions on our wiki, if you have any problems check it out. Also feel free to report a bug or a improvement using the github issue tracker. 58 | 59 | 60 | # Notice 61 | 62 | Protonlaunch **IS NOT** associated with [Valve Software](https://www.valvesoftware.com) or [ProtonDB](https://www.protondb.com/). [Steam](https://steampowered.com), [Valve](https://www.valvesoftware.com) and [Proton](https://github.com/ValveSoftware/Proton/) are developed by and trademarks of [Valve Software](https://www.valvesoftware.com). [ProtonDB](https://www.protondb.com/) is a passion project from [@bdefore](https://github.com/bdefore) and a dedicated community of reporters. 63 | -------------------------------------------------------------------------------- /protonlaunch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # Copyright (c) 2022, Artur 'h0m3' Paiva 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright notice, 12 | # this list of conditions and the following disclaimer in the documentation 13 | # and/or other materials provided with the distribution. 14 | # 15 | # * Neither the name of protonlaunch nor the names of its 16 | # contributors may be used to endorse or promote products derived from 17 | # this software without specific prior written permission. 18 | # 19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | # Protonlaunch IS NOT associated with Valve Software. Steam, Valve and Proton 31 | # are developed by and trademarks of of Valve Software. 32 | # 33 | 34 | 35 | # Version string 36 | VERSION="0.10" 37 | 38 | # Get program name 39 | PROGRAM_NAME="$(basename "${0}")" 40 | 41 | 42 | # Show message logs 43 | pl_info() { 44 | if [ -z "${PL_QUIET}" ] || [ "${PL_QUIET}" = "0" ]; then 45 | echo "${pl_bold}${pl_blue}${PROGRAM_NAME}:${pl_normal} ${1}" >&1 46 | fi 47 | } 48 | 49 | 50 | # Show a warning message 51 | pl_warning() { 52 | echo "${pl_bold}${pl_yellow}${PROGRAM_NAME}:${pl_normal} warning: ${1}" >&1 53 | } 54 | 55 | 56 | # Raise an error and terminate the application 57 | pl_error() { 58 | echo "${pl_bold}${pl_red}${PROGRAM_NAME}:${pl_normal} error: ${1}" >&2 59 | exit 1 60 | } 61 | 62 | 63 | # Show debug messages 64 | pl_debug() { 65 | if [ "${PL_DEBUG}" = "1" ]; then 66 | echo "${pl_normal}${PROGRAM_NAME}: debug: ${1}" >&1 67 | fi 68 | } 69 | 70 | # Show a usage message 71 | pl_usage() { 72 | printf "Usage: %s [option] program [arguments...]\n" "${PROGRAM_NAME}" 73 | printf "\n" 74 | printf "Options:\n" 75 | printf "\t--help\t\t\tDisplay this message and exit\n" 76 | printf "\t--version\t\tDisplay version and exit\n" 77 | printf "\t--steam-path\t\tPath to Steam installation user files (usually \$HOME/.steam/steam). STEAM_COMPAT_CLIENT_INSTALL_PATH have priority\n" 78 | printf "\t--proton-version\tVersion of proton to use, check out --proton-version-list\n" 79 | printf "\t--proton-version-list\tReturn a list of all found Proton versions\n" 80 | printf "\t--quiet\t\t\tSupress information messages, makes protonlaunch more quiet, ideal for scripts\n" 81 | printf "\t--debug\t\t\tEnable debug messages, may help troubleshooting. I recommend enable debug for posting protonlaunch issues\n" 82 | printf "\n" 83 | printf "Environment Variables:\n" 84 | printf "\tPROTONPREFIX\n" 85 | printf "\t\tPath to proton prefix (Default is \$HOME/.proton). STEAM_COMPAT_DATA_PATH have priority\n" 86 | printf "\n" 87 | printf "\tPL_STEAM_PATH\n" 88 | printf "\t\tPath to Steam installation user files (usually \$HOME/.steam/steam). STEAM_COMPAT_CLIENT_INSTALL_PATH have priority\n" 89 | printf "\n" 90 | printf "\tPL_LIBRARY_PATH\n" 91 | printf "\t\tPath to Steam Library folder (Default is \$STEAM_COMPAT_CLIENT_INSTALL_PATH)\n" 92 | printf "\n" 93 | printf "\tPL_PROTON_VERSION\n" 94 | printf "\t\tVersion of proton to use, check out --proton-version-list\n" 95 | printf "\n" 96 | } 97 | 98 | 99 | # Show a version message 100 | pl_version() { 101 | echo "ProtonLaunch version ${VERSION}" 102 | echo "Protonlaunch is licensed under BSD 3-Clause License " 103 | 104 | echo 105 | echo "This is free software; you are free to change and redistribute it." 106 | echo "There is NO WARRANTY, to the extent permitted by law." 107 | } 108 | 109 | 110 | # Set colors if supported 111 | pl_set_colors() { 112 | pl_debug "detecting terminal color support" 113 | ncolors="$(tput colors)" 114 | if [ -z "${PL_NO_COLORS}" ] && [ -t 1 ] && [ -n "${ncolors}" ] && [ "$(tput colors)" -ge 8 ]; then 115 | pl_debug "colors are enabled" 116 | pl_bold="$(tput bold)" 117 | export pl_bold 118 | pl_underline="$(tput smul)" 119 | export pl_underline 120 | pl_standout="$(tput smso)" 121 | export pl_standout 122 | pl_normal="$(tput sgr0)" 123 | export pl_normal 124 | pl_black="$(tput setaf 0)" 125 | export pl_black 126 | pl_red="$(tput setaf 1)" 127 | export pl_red 128 | pl_green="$(tput setaf 2)" 129 | export pl_green 130 | pl_yellow="$(tput setaf 3)" 131 | export pl_yellow 132 | pl_blue="$(tput setaf 4)" 133 | export pl_blue 134 | pl_magenta="$(tput setaf 5)" 135 | export pl_magenta 136 | pl_cyan="$(tput setaf 6)" 137 | export pl_cyan 138 | pl_white="$(tput setaf 7)" 139 | export pl_white 140 | fi 141 | } 142 | 143 | 144 | # Set legacy support variables 145 | pl_set_legacy() { 146 | pl_debug "setting legacy variables" 147 | if [ -n "${_STEAM_PATH}" ]; then 148 | #pl_warning "_STEAM_PATH is deprecated, you should use PL_STEAM_PATH" 149 | PL_STEAM_PATH="${_STEAM_PATH}" 150 | export PL_STEAM_PATH 151 | fi 152 | 153 | if [ -n "${_STEAM_LIBRARY_PATH}" ]; then 154 | #pl_warning "_STEAM_LIBRARY_PATH is deprecated, you should use PL_LIBRARY_PATH" 155 | pl_add_library_path "${_STEAM_LIBRARY_PATH}" 156 | fi 157 | 158 | if [ -n "${_PROTON_VERSION}" ]; then 159 | #pl_warning "_PROTON_VERSION is deprecated, you should use PL_PROTON_VERSION" 160 | PL_PROTON_VERSION="${_PROTON_VERSION}" 161 | export PL_PROTON_VERSION 162 | fi 163 | } 164 | 165 | 166 | # Check if a command is available 167 | pl_cmd_exists() { 168 | pl_debug "testing if command '${1}' exists" 169 | command -v "${1}" > /dev/null 2>&1 170 | } 171 | 172 | 173 | # Find Steam installation path 174 | pl_get_steam_path() { 175 | pl_debug "locating steam installation path" 176 | if [ -z "${STEAM_COMPAT_CLIENT_INSTALL_PATH}" ]; then 177 | 178 | if [ -n "${PL_STEAM_PATH}" ]; then 179 | STEAM_COMPAT_CLIENT_INSTALL_PATH="${PL_STEAM_PATH}" 180 | 181 | elif [ -d "${HOME}/.local/share/Steam" ] && [ -e "${HOME}/.local/share/Steam/steam.sh" ]; then 182 | STEAM_COMPAT_CLIENT_INSTALL_PATH="${HOME}/.local/share/Steam" 183 | 184 | elif [ -d "${HOME}/.steam/debian-installaton" ] && [ -e "${HOME}/.steam/debian-installation/steam.sh" ]; then 185 | STEAM_COMPAT_CLIENT_INSTALL_PATH="${HOME}/.steam/debian-installation" 186 | 187 | elif [ -h "${HOME}/.steam/steam" ]; then 188 | path="$(readlink "${HOME}/.steam/steam")" 189 | if [ -e "${path}/steam.sh" ]; then 190 | STEAM_COMPAT_CLIENT_INSTALL_PATH="${path}" 191 | fi 192 | 193 | elif [ -d "${HOME}/.steam/steam" ] && [ -e "${HOME}/.steam/steam/steam.sh" ]; then 194 | STEAM_COMPAT_CLIENT_INSTALL_PATH="${HOME}/.steam/steam" 195 | 196 | else 197 | pl_error "unable to find Steam path, please set PL_STEAM_PATH" 198 | fi 199 | 200 | export STEAM_COMPAT_CLIENT_INSTALL_PATH 201 | 202 | fi 203 | } 204 | 205 | 206 | # Add a path to the steam library paths 207 | pl_add_library_path() { 208 | pl_debug "adding ${1} to PL_LIBRARY_PATH" 209 | if [ -z "${PL_LIBRARY_PATH}" ]; then 210 | PL_LIBRARY_PATH="${1}" 211 | else 212 | PL_LIBRARY_PATH="${PL_LIBRARY_PATH}:${1}" 213 | fi 214 | export PL_LIBRARY_PATH 215 | 216 | } 217 | 218 | 219 | # Find Steam library paths 220 | pl_get_steam_library() { 221 | pl_debug "locating steam library paths" 222 | if [ -f "${STEAM_COMPAT_CLIENT_INSTALL_PATH}/config/libraryfolders.vdf" ]; then 223 | pl_paths="$(grep -i path "${STEAM_COMPAT_CLIENT_INSTALL_PATH}/config/libraryfolders.vdf" | cut -d '"' -f 4)" 224 | for pl_path in ${pl_paths}; do 225 | if [ -d "${pl_path}/steamapps/common" ]; then 226 | pl_add_library_path "${pl_path}" 227 | fi 228 | done 229 | fi 230 | 231 | if [ -z "${PL_LIBRARY_PATH}" ]; then 232 | if [ -d "${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/common" ]; then 233 | pl_add_library_path "${STEAM_COMPAT_CLIENT_INSTALL_PATH}" 234 | else 235 | pl_error "unable to find Steam library, make sure that Proton is installed and set PL_LIBRARY_PATH if necessary" 236 | fi 237 | fi 238 | } 239 | 240 | 241 | # Add proton to proton list 242 | pl_add_proton_list() { 243 | pl_debug "adding '${1}' to proton list" 244 | if [ -z "${PL_PROTON_LIST}" ]; then 245 | PL_PROTON_LIST="${1}" 246 | else 247 | PL_PROTON_LIST="${PL_PROTON_LIST}:${1}" 248 | fi 249 | export PL_PROTON_LIST 250 | } 251 | 252 | 253 | # Get all proton versions 254 | pl_get_proton_list() { 255 | pl_debug "locating steam proton installations" 256 | old_ifs="${IFS}" 257 | IFS=":" 258 | for pl_path in ${PL_LIBRARY_PATH}; do 259 | library_path="${pl_path}/steamapps/common" 260 | for proton in "${library_path}"/*; do 261 | if echo "${proton}" | grep -Fqi proton && [ -f "${proton}/proton" ]; then 262 | pl_add_proton_list "${proton}" 263 | fi 264 | done 265 | done 266 | IFS="${old_ifs}" 267 | } 268 | 269 | 270 | # Get proton 271 | pl_get_proton() { 272 | pl_debug "getting a usable proton version" 273 | old_ifs="${IFS}" 274 | IFS=":" 275 | for proton in ${PL_PROTON_LIST}; do 276 | 277 | # https://stackoverflow.com/questions/67069192/quick-sorting-a-list-of-files-in-posix-sh 278 | # Since it check the whole filepath it isn't fixed yet 279 | [ -e "$proton" ] || continue # Order file in lexicogaphical order 280 | 281 | name="$(basename "${proton}")" 282 | if [ -z "${PL_PROTON_VERSION}" ]; then 283 | if [ "${name}" != "Proton - Experimental" ]; then 284 | PL_PROTON_VERSION="${name}" 285 | pl_proton_path="${proton}" 286 | export pl_proton_path 287 | export PL_PROTON_VERSION 288 | break 289 | fi 290 | elif [ "${name}" = "${PL_PROTON_VERSION}" ]; then 291 | pl_proton_path="${proton}" 292 | export pl_proton_path 293 | fi 294 | done 295 | IFS="${old_ifs}" 296 | 297 | if [ -z "${pl_proton_path}" ]; then 298 | if [ -z "${PL_PROTON_VERSION}" ]; then 299 | pl_error "no Proton installation found, make sure you've installed Proton trough Steam" 300 | else 301 | pl_error "Unable to find Proton installation of '${PL_PROTON_VERSION}'" 302 | fi 303 | fi 304 | } 305 | 306 | 307 | # Get prefix path 308 | pl_get_prefix() { 309 | pl_debug "locating current prefix" 310 | if [ -z "${STEAM_COMPAT_DATA_PATH}" ]; then 311 | if [ -n "${PROTONPREFIX}" ]; then 312 | STEAM_COMPAT_DATA_PATH="${PROTONPREFIX}" 313 | 314 | elif [ -n "${WINEPREFIX}" ]; then 315 | pl_warning "is not recommended to use WINEPREFIX. Use PROTONPREFIX instead" 316 | STEAM_COMPAT_DATA_PATH="${WINEPREFIX}" 317 | 318 | else 319 | pl_debug "no variable located, ${HOME}/.proton will be" 320 | STEAM_COMPAT_DATA_PATH="${HOME}/.proton" 321 | fi 322 | 323 | export STEAM_COMPAT_DATA_PATH 324 | fi 325 | } 326 | 327 | 328 | # Bootstrap prefix 329 | pl_bootstrap() { 330 | if [ ! -d "${1}/pfx/drive_c" ]; then 331 | pl_info "bootstrapping '${1}'" 332 | "${pl_proton}" run wineboot 333 | fi 334 | } 335 | 336 | 337 | # Run a program 338 | pl_run() { 339 | pl_command="${1}" 340 | shift 341 | pl_params=${*} 342 | pl_info "Program is '${pl_command}'" 343 | 344 | if [ -z "${pl_params}" ]; then 345 | pl_debug "using 'run' since theres no parameters" 346 | pl_debug "Running: \"${pl_proton}\" run \"${pl_command}\"" 347 | "${pl_proton}" run "${pl_command}" 348 | else 349 | pl_debug "using 'runinprefix' since there is paramenters" 350 | pl_debug "Running: \"${pl_proton}\" runinprefix \"${pl_command}\" ${pl_params}" 351 | "${pl_proton}" runinprefix "${pl_command}" "${pl_params}" 352 | fi 353 | } 354 | 355 | 356 | # Print a list of proton versions 357 | pl_proton_version_list() { 358 | if [ "${PL_PROTON_VERSION_LIST}" = "1" ]; then 359 | old_ifs="${IFS}" 360 | IFS=":" 361 | for pl_path in ${PL_PROTON_LIST}; do 362 | basename "${pl_path}" 363 | done 364 | IFS="${old_ifs}" 365 | exit 0 366 | fi 367 | } 368 | 369 | # Manage launch options 370 | while [ -n "${1}" ] && echo "${1}" | grep -Fq -- "--"; do 371 | case ${1} in 372 | "--help") 373 | pl_usage 374 | exit 0 375 | ;; 376 | "--version") 377 | pl_version 378 | exit 0 379 | ;; 380 | "--steam-path") 381 | STEAM_COMPAT_CLIENT_INSTALL_PATH="${2}" 382 | shift 2 383 | ;; 384 | "--proton-version") 385 | PL_PROTON_VERSION="${2}" 386 | shift 2 387 | ;; 388 | "--proton-version-list") 389 | PL_PROTON_VERSION_LIST=1 390 | shift 391 | ;; 392 | "--quiet") 393 | PL_QUIET=1 394 | shift 395 | ;; 396 | "--debug") 397 | PL_DEBUG=1 398 | shift 399 | ;; 400 | *) 401 | pl_error "${1} is not a valid argument, try ${PROGRAM_NAME} --help" 402 | ;; 403 | esac 404 | done 405 | 406 | if [ -z "${1}" ] && [ -z "${PL_PROTON_VERSION_LIST}" ]; then 407 | pl_error "Expecting a program name or aregument, try --help" 408 | fi 409 | 410 | # Set colors and legacy environment variables 411 | pl_set_colors 412 | pl_set_legacy 413 | 414 | # Get variables 415 | pl_get_steam_path 416 | pl_info "steam installation path is '${STEAM_COMPAT_CLIENT_INSTALL_PATH}'" 417 | 418 | pl_get_steam_library 419 | pl_debug "steam library path found: ${PL_LIBRARY_PATH}" 420 | 421 | pl_get_proton_list 422 | pl_proton_version_list 423 | 424 | pl_get_proton 425 | pl_info "proton version '${PL_PROTON_VERSION}'" 426 | pl_proton="${pl_proton_path}/proton" 427 | 428 | pl_get_prefix 429 | pl_info "prefix '${STEAM_COMPAT_DATA_PATH}'" 430 | 431 | # Create and bootstrap prefix 432 | if ! mkdir -pv "${STEAM_COMPAT_DATA_PATH}"; then 433 | pl_error "failed to create prefix '${STEAM_COMPAT_DATA_PATH}'" 434 | fi 435 | if ! pl_bootstrap "${STEAM_COMPAT_DATA_PATH}"; then 436 | pl_error "failed to bootstrap '${STEAM_COMPAT_DATA_PATH}'" 437 | fi 438 | 439 | # Run proton 440 | pl_run "${@}" 441 | --------------------------------------------------------------------------------