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.
This commit is contained in:
Andrew Eikum 2018-08-29 07:45:41 -05:00
parent 59b018c19d
commit 5286f43fda
3 changed files with 9 additions and 6 deletions

View file

@ -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/"

View file

@ -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:

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
#to enable these settings, name this file "user_settings.py"
user_settings = {