Giter Site home page Giter Site logo

protonup's People

Contributors

aunaseef avatar davidotek avatar fabaff avatar ianwijma avatar oniaom avatar photochlorination avatar ryn-ann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protonup's Issues

NOTICE: THIS PROJECT IS UNMAINTAINED SINCE MONTHS -> install my fork protonup-ng

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

Proper CLI by having terminal based GUI

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

Python error when I run protonup

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

Permission denied & Missing sha512sum? when installing the latest update

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'

Location of temp folder

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?

[enhancement] Reverse list direction & syntax suggestion

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

TypeError: when running protonup --releases

Steps to reproduce:

  1. python 3.12.3
  2. pip install protonup
  3. run protonup --releases

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

other versions of proton ge

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

List command failed with Proton-6.21-GE-2

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'

protonup -l doesn't show installed versions

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 ?

Add separate `-q`/`--quiet` flag

-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.

[SCRIPT] Remove all Proton GE versions installed, except the latest one

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

Protonup does not worked

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

how to fix protonup command not found

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.