aunaseef / protonup Goto Github PK
View Code? Open in Web Editor NEWInstall and Update Proton-GE
License: GNU General Public License v3.0
Install and Update Proton-GE
License: GNU General Public License v3.0
Because this project is borked since months where the naming scheme of Proton-GE changed to GE-Proton (https://www.patreon.com/posts/63101415) and @AUNaseef didn't react to this here, i made a fork called protonup-ng. The tool already works with the new naming scheme.
After refactoring is done i want to fix some issues from over here, but enhancements will happen later. If you want to contribute, just ask or make a pull request at my repo.
I hope @AUNaseef is alright and will be back soon! I will link all additions to his codebase with pull requests.
Links:
https://pypi.org/project/protonup-ng/
https://github.com/cloudishBenne/protonup-ng
I found this neat little library called asciimatics.
https://github.com/peterbrittain/asciimatics
It can dynamically create ui inside of terminal, supports color displays and mouse input.
If something like pyqt4 or gi is too large of a dependency (though ui would look cooler with them), this lib is fairly smol - around 4 megabytes, while providing at least somewhat good UI
Hi just wanted to inform you of a bug I am having, I am using the protonup-git aur package on Manjaro and when I now run protonup I get this error
Traceback (most recent call last):
File "/usr/bin/protonup", line 33, in <module>
sys.exit(load_entry_point('protonup==0.1.4', 'console_scripts', 'protonup')())
File "/usr/bin/protonup", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 919, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 518, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for protonup
This is what I get when I try to install the latest protonup I get two different types of messages
Ready to download Proton-GE-Proton7-2
Size : 407.2 MiB
Published : 2022-02-27
Continue? (Y/n): y
Downloaded 100.00% - 407.2 MiB / 407.2 MiB
Traceback (most recent call last):
File "/home/callum/.local/bin/protonup", line 8, in
sys.exit(main())
File "/home/callum/.local/lib/python3.9/site-packages/protonup/init.py", line 4, in main
return main()
File "/home/callum/.local/lib/python3.9/site-packages/protonup/cli.py", line 33, in main
get_proton(version=args.tag, yes=args.yes, dl_only=args.download,
File "/home/callum/.local/lib/python3.9/site-packages/protonup/api.py", line 152, in get_proton
tarfile.open(destination, "r:gz").extractall(install_directory())
File "/usr/lib/python3.9/tarfile.py", line 2036, in extractall
self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
File "/usr/lib/python3.9/tarfile.py", line 2077, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File "/usr/lib/python3.9/tarfile.py", line 2150, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python3.9/tarfile.py", line 2191, in makefile
with bltn_open(targetpath, "wb") as target:
PermissionError: [Errno 13] Permission denied: '/home/callum/.steam/root/compatibilitytools.d/GE-Proton7-2/protonfixes/gamefixes/1434950.py'
Ready to download Proton-GE-Proton7-2
Size : 407.2 MiB
Published : 2022-02-27
Continue? (Y/n): Y
Downloaded 100.00% - 407.2 MiB / 407.2 MiB
[INFO] Installed in: /root/.steam/root/compatibilitytools.d/Proton-GE-Proton7-2
Traceback (most recent call last):
File "/usr/local/bin/protonup", line 33, in
sys.exit(load_entry_point('protonup==0.1.4', 'console_scripts', 'protonup')())
File "/usr/local/lib/python3.9/dist-packages/protonup-0.1.4-py3.9.egg/protonup/init.py", line 4, in main
File "/usr/local/lib/python3.9/dist-packages/protonup-0.1.4-py3.9.egg/protonup/cli.py", line 33, in main
File "/usr/local/lib/python3.9/dist-packages/protonup-0.1.4-py3.9.egg/protonup/api.py", line 154, in get_proton
FileNotFoundError: [Errno 2] No such file or directory: '/root/.steam/root/compatibilitytools.d/Proton-GE-Proton7-2/sha512sum'
It would be nice to have a CLI option to import user_settings.py from latest locally installed Proton GE.
When no new versions are found, perhaps he could give a hint to the list of commands, too.
Hi,
I recently decided to try Steam in Linux again.
I noticed that protonup
was installing the latest GE Proton to ~/.steam/root/compatibilituttools.d
but Steam was not noticing the custom Proton, and I couldn't select it in the UI.
However, after running this, Steam was able to find custom Proton:
cp -r ~/.steam/root/compatibilitytools.d ~/.local/share/Steam/
Thanks for your script. It's great.
You write "By default the downloads are stored in a temporary folder."
Which folder is it? And will the downloaded file be deleted after unpacking?
Automated way to download from forks such as GloriousEggroll / proton-ge-custom.
The list command lists the newest version at the top of the list, which might sound fine at first but since we are in the terminal, output scrolls and only the oldest available versions are visible.
Reversing the direction would mean that whe newest version is right where we're about to type next.
One more thing, -t
for "install" is quite unintuitive and -i
is not used anywhere, why is it like this?
I would recommend switching -t
,and --tag
for -i
and --install
as install syntax.
Eventually -S
just as arch does it.
In case of remove, -r
is fine but I would replace --rem
with full --remove
I know there is a GUI version to update Luxtorpeda (https://github.com/luxtorpeda-dev/luxtorpeda) and it will nice to have a CLI version to do this and also proton tkg (ttps://github.com/Frogging-Family/wine-tkg-git/releases/tag/7.6.r12.g51472395). Is it possible?
It's tappable from the home-screen and doesn't even need desktop mode either even to install.
(Chrome Just involved clicking an automatic dialog box prompt that popped up when looking at non-steam apps section)
It could make life so much easier for getting automatic updates on Steamdeck :) ๐๐ผ
Move all CLI-related code from the API to the CLI
Steps to reproduce:
expected result: view proton releasese
actual result
protonup --releases Traceback (most recent call last): File "/home/cetadmin/.local/bin/protonup", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/cetadmin/.local/share/pipx/venvs/protonup/lib/python3.12/site-packages/protonup/__init__.py", line 4, in main return main() ^^^^^^ File "/home/cetadmin/.local/share/pipx/venvs/protonup/lib/python3.12/site-packages/protonup/cli.py", line 47, in main for tag in fetch_releases(): ^^^^^^^^^^^^^^^^ File "/home/cetadmin/.local/share/pipx/venvs/protonup/lib/python3.12/site-packages/protonup/api.py", line 41, in fetch_releases tags.append(release['tag_name']) ~~~~~~~^^^^^^^^^^^^ TypeError: string indices must be integers, not 'str'
OS: Fedora
Python 3.12.3
when listing all the version of proton ge with the command protonup -l it does not show up you need to "install" that version
but after doing both show up
I've just installed this program, I'm not sure if this is an issue only on my side but if not, I hope it'll be useful.
โฏ protonup -l
Proton-6.08-GE-1 - 1.4 GiB
Proton-5.11-GE-3-MF - 1.2 GiB
Proton-5.09-GE-6-ST - 1.2 GiB
Proton-5.08-GE-2-MF - 1.2 GiB
Proton-6.01-GE-1 - 1.2 GiB
Proton-6.19-GE-1 - 1.5 GiB
Proton-6.14-GE-2 - 1.5 GiB
Proton-6.01-GE-2 - 1.2 GiB
Proton-6.10-GE-1 - 1.4 GiB
Proton-5.00-7-alyx-2 - 1.4 GiB
Proton-5.11-GE-1-MF - 1.2 GiB
Proton-6.16-GE-1 - 1.5 GiB
Traceback (most recent call last):
File "/usr/bin/protonup", line 33, in <module>
sys.exit(load_entry_point('protonup==0.1.4', 'console_scripts', 'protonup')())
File "/usr/lib/python3.10/site-packages/protonup/__init__.py", line 4, in main
return main()
File "/usr/lib/python3.10/site-packages/protonup/cli.py", line 44, in main
print(f"{item} - {readable_size(folder_size(_install_directory + item))}")
File "/usr/lib/python3.10/site-packages/protonup/utilities.py", line 70, in folder_size
size += os.path.getsize(os.path.join(root, file))
File "/usr/lib/python3.10/genericpath.py", line 50, in getsize
return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: '/home/cryen/.steam/root/compatibilitytools.d/Proton-6.21-GE-2/files/share/default_pfx/drive_c/windows/system32/uiautomationcore.dll'
When attempting to remove installed Proton-GE versions, the output says "Proton-GE-Proton7-18 not installed".
ls ~/.steam/steam/compatibilitytools.d/
Proton-7.2-GE-2 proton_tkg_7.2.r0.g68441b1d
protonup -l
while there are versions installed and protonup itself updated everything they aren't shown in protonup -l
Do i miss something ?
Is it possible to add Proton-GE 5.21-GE-1 to ProtonUp?
I'm trying to test Jamestown+ which is reported to work on that version but I don't see it available as an option to install.
-y
/--yes
doesn't usually suppress all output, it just automatically answers "yes" to all prompts.
It would be nice to have a version of -y
, which shows normal output (to monitor progress, etc.), but still suppress all prompts.
So, maybe a separate "quiet" flag (-q
/--quiet
) for suppressing all output (which would also imply -y
)? This is how e.g. apt
and dnf
/yum
do things.
topgrade is a wonderful tool to update the OS in one swoop and it will be wonderful protonup support this https://github.com/r-darwish/topgrade
I'm not aware of a native way of removing all versions of proton GE, except the latest one and as a result I made a bash script that solves this issue.
#!/bin/bash
# Download the latest proton ge version
yes | protonup
# List all proton ge versions (protonup -l), find the latest version (grep -v), remove it from the list and remove any part not associated with the version tag (grep -o)
binaries=$(protonup -l | grep -v "$(protonup --releases | tail -n 1)" | grep -o '^\S*')
if [ -z "$binaries" ]
then
echo "No proton GE versions to remove..."
else
while IFS= read -r line ; do
# Remove "Proton-" from older versions of proton ge, because the uninstaller fails to match the folders
line="${line//Proton-/}"
# Remove all proton ge versions, except the latest one
yes | protonup -r "$line" && printf "\n"
done <<< "$binaries"
fi
Not really an issue, but did you consider doing the same thing for Wine-GE?
Hi
I typed protonup amd the output is:
Ready to download Proton-GE-Proton7-37
Size : 397.0 MiB
Published : 2022-10-05
Continue? (Y/n): y
Downloaded 100.00% - 397.1 MiB / 397.0 MiB
Traceback (most recent call last):
File "/home/user/.local/bin/protonup", line 8, in
sys.exit(main())
File "/home/user/.local/lib/python3.10/site-packages/protonup/init.py", line 4, in main
return main()
File "/home/user/.local/lib/python3.10/site-packages/protonup/cli.py", line 33, in main
get_proton(version=args.tag, yes=args.yes, dl_only=args.download,
File "/home/user/.local/lib/python3.10/site-packages/protonup/api.py", line 152, in get_proton
tarfile.open(destination, "r:gz").extractall(install_directory())
File "/usr/lib/python3.10/tarfile.py", line 2059, in extractall
self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
File "/usr/lib/python3.10/tarfile.py", line 2100, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File "/usr/lib/python3.10/tarfile.py", line 2173, in _extract_member
self.makefile(tarinfo, targetpath)
File "/usr/lib/python3.10/tarfile.py", line 2214, in makefile
with bltn_open(targetpath, "wb") as target:
PermissionError: [Errno 13] Permission denied: '/home/user/.steam/root/compatibilitytools.d/GE-Proton7-37/files/lib64/wine/vkd3d-proton/libvkd3d-proton-utils-3.dll'
But, even I download the package and exract the file to the ~/.var/app/com.valvesoftware.Steam/data/Steam/compatibilitytools.d/ manually. it still prompted me to update and does not detect the current release
I saw that you have to add something to ~/.profile, but i really dont know what .profile is or where i can find it, i would like to solve this, thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.