GithubHelp home page GithubHelp logo

ribbon-studios / protontweaks Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 226 KB

Automatically apply necessary protontricks to your games!

Home Page: https://protontweaks.com

License: GNU General Public License v3.0

Makefile 0.81% Rust 88.02% Nix 11.17%
automation proton protontricks gaming linux steam winetricks

protontweaks's Introduction

Coverage CI Build

Important

This is the Protontweaks CLI repository, you can find its sister repositories at the following links!

Protontweaks

Automatically apply necessary protontricks to your games!

Requirements

Installation

This will automatically install protontweaks with your systems package manager if its available

$ bash -c "$(curl -fsSL https://protontweaks.com/install.sh)"

NixOS

NixOS Flake Example
{
  description = "NixOS Example";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    protontweaks.url = "github:rain-cafe/protontweaks/main";
    protontweaks.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, ... } @ inputs: {
    nixosConfigurations =
      let
        inherit (self) outputs;
        inherit (nixpkgs.lib) nixosSystem;
      in
      {
        your-hostname = nixosSystem {
          specialArgs = { inherit inputs outputs; };

          modules = [
            # This is just an example, you can obviously format this however you want!
            ({ pkgs, ... }: {
              imports = [
                inputs.protontweaks.nixosModules.protontweaks
              ];

              nixpkgs = {
                overlays = [
                  inputs.protontweaks.overlay
                ];
              };

              # This will install protontweaks and enable the watch service that automatically updates the launch options
              services.protontweaks.enable = true;
            })
            # Your NixOS Modules here...
            ../defaults/configuration.nix
          ];
        };
      };
  };
}

Usage

Automatic

This installs a systemd service that automatically updates your launch options when you install a game.

$ protontweaks service --install

Manual

Add the following to the launch options for a steam game!

protontweaks %command%

Configuration

We attempt to load a configuration file from the following locations, from highest to lowest priority:

  1. $XDG_CONFIG_HOME/protontweaks.json
  2. $HOME/.config/protontweaks.json
  3. /etc/protontweaks.json
{
  // Whether to automatically run games with gamemoderun (if installed and supported)
  // Default: true
  "gamemode": true,
  // Whether to automatically run games with mangohud (if installed and supported)
  // Default: false
  "mangohud": true
}

protontweaks's People

Contributors

cecilia-sanare avatar

Stargazers

 avatar Jason Miller avatar  avatar

Watchers

 avatar

protontweaks's Issues

[Feature] `watch` command

Description

Ideally this would support two modes.

  1. Would simply add protontweaks to the launch options as protontweaks %command%
  2. Would automatically install tweaks when changes are made and adjust the launch options with any env variables / flags.
  • PROTON_NO_ESYNC=1 %command% --use-dx11 (just as an example)

The primary reason for the latter existing is that it would remove the layer of obfuscation from the end user.
Ideally with the second mode if a flag or optional already exists we'd respect the new value.

Biggest downside is this would greatly increase the complexity of this command.
As such for a first go at this we should aim for the first mode and keep the second mode in mind when designing.

v1.0.0 - Tracking Issue

This is a overarching list of all the necessary tasks to reach release candidate for v1.0.0

Issues

Stretch Goals

  • ribbon-studios/protontweaks-db#2
  • #2
  • #3
  • Setup a repository for easily keeping binaries up to date (v1+)
  • Look into improving the performance of installing tweaks
    • everything is async, not sure if there's any more performance gains we can make

Things to think about

  • Given the number of protontweak specific repos it may make sense to split it off from rain-cafe

Add support for mods

Use Case

Some games effectively require mods before they'll run like they used to on modern hardware.

We should support the following:

  • automatic patching to enable mods (if necessary)
  • automatically installing specific necessary mods

The latter could be subjective so we should focus on primarily bug fixes.

Examples

  • Fallout Series (has a lot of bugs fixed via mods and some fixed via config updates)

:bug: Steam unable to detect `nix-shell`

Output

INFO  protontweaks::config > Checking /home/ceci/.config/protontweaks.json for config...
App ID: 644930
 TRACE protontweaks_api     > Requesting apps from 'https://api.protontweaks.com/644930.json'...
 WARN  wgpu_hal::gles::egl  > No config found!
 WARN  wgpu_hal::gles::egl  > EGL says it can present to the window but not natively
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
 INFO  protontweaks_api::system > Detected gpu as 'nvidia'
 TRACE protontweaks::utils::command > Running command... "mangohud" "--version"
 TRACE protontweaks::utils::command > Running command... "gamemoderun"
 WARN  wgpu_hal::gles::egl          > No config found!
 WARN  wgpu_hal::gles::egl          > EGL says it can present to the window but not natively
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
 INFO  protontweaks_api::system     > Detected gpu as 'nvidia'
 TRACE protontweaks::apps           > App ID: 644930; Name: They Are Billions
 TRACE protontweaks::apps           > Installing tricks for 644930 -> They Are Billions
 TRACE protontweaks::utils::commands > Running command... "protontricks" "--version"
 TRACE protontweaks::utils::commands > Running command... "nix-shell" "--version"
 ERROR protontweaks::apps            > Please install 'nix-shell' or 'protontricks'!
No tweaks were necessary! (1 tweaks attempted)
 INFO  protontweaks::commands::run   > Starting app... "gamemoderun" "mangohud" "/home/ceci/.local/share/Steam/ubuntu12_32/reaper" "SteamLaunch" "AppId=644930" "/home/ceci/.local/share/Steam/ubuntu12_32/steam-launch-wrapper" "--" "/home/ceci/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point" "--verb=waitforexitandrun" "--" "/home/ceci/.local/share/Steam/steamapps/common/Proton 9.0 (Beta)/proton" "waitforexitandrun" "/home/ceci/.local/share/Steam/steamapps/common/They Are Billions/TheyAreBillions.exe"
/bin/sh\0-c\0nix-shell --version && echo /home/ceci/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=644930 -- /home/ceci/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/ceci/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/home/ceci/.local/share/Steam/steamapps/common/Proton 9.0 (Beta)'/proton waitforexitandrun  '/home/ceci/.local/share/Steam/steamapps/common/They Are Billions/TheyAreBillions.exe'\0
chdir "/home/ceci/.local/share/Steam/steamapps/common/They Are Billions"
ERROR: ld.so: object '/home/ceci/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/ceci/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
nix-shell: symbol lookup error: /nix/store/62fm7r6175k2bgvhc19hn9bdhw90wa3n-nix-2.18.1/lib/libnixstore.so: undefined symbol: curl_multi_wait
Uploaded AppInterfaceStats to Steam

Add more installation options

We should support the following installation methods:

  • AppImage #10
  • cargo install (not implementing)
  • any other prebuilt packaging formats (e.g. rpm)

Convert existing code to run async

Description

Code should be updated to run async, primary reason I didn't do this out of the gate was because I wasn't sure what the defacto standard was for Async CLIs (e.g. if tokio was the goto for CLIs as well)

Also anything that can be run in parallel should.

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.