From 5286f43fda79c732c3fe979dd2058fdae445b990 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Wed, 29 Aug 2018 07:45:41 -0500 Subject: [PATCH] proton: Call python3 explicitly on Linux Frustratingly, Ubuntu ships no python binary by default, only python3, so we can't just call python and expect it to work. This will fail on distros that don't ship python3, but them's the breaks. --- build_proton.sh | 9 ++++++--- proton => proton.in | 4 +++- user_settings.sample.py | 2 -- 3 files changed, 9 insertions(+), 6 deletions(-) rename proton => proton.in (99%) diff --git a/build_proton.sh b/build_proton.sh index 73493f91..f9928540 100755 --- a/build_proton.sh +++ b/build_proton.sh @@ -672,13 +672,16 @@ if [ "$PACKAGE" = true ]; then cp -a toolmanifest.vdf dist/ cp -a filelock.py dist/ - cp -a proton dist/ cp -a user_settings.sample.py dist/ if [ "$PLATFORM" == "Darwin" ]; then - cp -a dist.LICENSE.osx dist/LICENSE + cp -a dist.LICENSE.osx dist/LICENSE + sed -e 's/@PYTHON_NAME@/python/' proton.in > dist/proton else - cp -a dist.LICENSE.lin dist/LICENSE + cp -a dist.LICENSE.lin dist/LICENSE + #work around Ubuntu 18.04 failing to ship a python by default + sed -e 's/@PYTHON_NAME@/python3/' proton.in > dist/proton fi + chmod 755 dist/proton date '+%s' > dist/version echo "Proton ready in dist/" diff --git a/proton b/proton.in similarity index 99% rename from proton rename to proton.in index 70e6d9bc..265cfd66 100755 --- a/proton +++ b/proton.in @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env @PYTHON_NAME@ #script to launch Wine with the correct environment @@ -509,3 +509,5 @@ else: sys.exit(1) sys.exit(0) + +# vim: set syntax=python: diff --git a/user_settings.sample.py b/user_settings.sample.py index a3ee5331..084f0c5b 100755 --- a/user_settings.sample.py +++ b/user_settings.sample.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - #to enable these settings, name this file "user_settings.py" user_settings = {