-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added README.md with documentation #124
base: master
Are you sure you want to change the base?
Changes from 5 commits
04d2d66
5741ad3
0c919ba
19d6625
65af67a
dbea02b
9eb1082
b5cc223
ace5b8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
# UMU-Protonfixes | ||
|
||
This project acts as a stopgap for fixing games that don't work out of the box on Proton. It implements game-specific patches, such as installing Winetricks verbs. | ||
|
||
It is the heart of `UMU-Proton` and `GE-Proton`. | ||
|
||
## Start parameter fixes | ||
|
||
The [default fix file for Steam](gamefixes-steam/default.py) implements a feature to install Winetricks / Protontricks verbs via startup parameters. Just add `-pf_tricks=<verb>` to it. You can install multiple verbs by adding the parameter more than once. | ||
|
||
```bash | ||
-pf_tricks=xliveless -pf_tricks=d3dcompiler_47 | ||
``` | ||
|
||
You can also set [dxvk options](https://github.com/doitsujin/dxvk/wiki/Configuration). | ||
|
||
```bash | ||
-pf_dxvk_set=dxgi.maxFrameRate=40 -pf_dxvk_set=d3d9.maxFrameRate=40 | ||
``` | ||
|
||
The order is not important and the arguments are not passed on to the game. | ||
|
||
## Local fixes | ||
|
||
The easiest way to implement a new fix or modify an existing one, is to use local fixes. | ||
|
||
First of all, you should find the Steam-ID of the game (right click the game in your Steam library -> 'Properties...' -> 'Updates' -> 'App ID:') and use it as the filename, with a `.py` extension. | ||
|
||
Example `Day of Defeat: Source` (AppID 300): | ||
|
||
> ~/.config/protonfixes/localfixes/300.py | ||
|
||
Another type of fix is one that runs before each game. This allows you to set defaults for all games. | ||
|
||
> ~/.config/protonfixes/localfixes/default.py | ||
|
||
Note that local fixes override the included "global" fixes. So using an existing fix might be a good starting point for modifications, as they will not be executed. | ||
|
||
For example, overriding the default fix will disable [the parameter parsing for Steam games](#start-parameter-fixes). This can be restored by copying [the global default file](gamefixes-steam/default.py) and applying your changes accordingly. | ||
|
||
## Non-Steam games | ||
|
||
As we support platforms other than Steam, these fixes can also be used by other launchers, such as Lutris, Heroic, Legendary or Bottles. | ||
|
||
The current implementation requires entries in a special database that looks up the `UMU-ID`, which consists of the prefix `umu-` and in most cases the SteamID (if the game exists on that platform). | ||
|
||
https://github.com/Open-Wine-Components/umu-database | ||
|
||
## Config file | ||
|
||
There is a config file located at: | ||
|
||
> ~/.config/protonfixes/config.ini | ||
|
||
It's not widely used at the moment, but you can configure some aspects. | ||
|
||
### Defaults | ||
|
||
```toml | ||
[main] | ||
enable_checks = true | ||
enable_global_fixes = true | ||
|
||
[path] | ||
cache_dir = ~/.cache/protonfixes | ||
``` | ||
|
||
### Variables | ||
|
||
`enable_checks`: De-/activate checks that are run on every startup. Currently only a check if esync might cause problems. | ||
|
||
`enable_global_fixes`: De-/activate global fixes, which are the built-in files in the `gamefix-*` folders. Only [local fixes](#local-fixes) will be executed. | ||
|
||
`cache_dir`: Used when something needs to be unpacked or similar. | ||
|
||
### Values | ||
|
||
Valid "enable" values are: `yes`, `y`, `true`, `1` | ||
|
||
Any other value is interpreted as disabled. | ||
|
||
## Building binaries | ||
|
||
UMU-Protonfixes ships some binaries - used by some fixes - that need to be built. | ||
|
||
**You probably do not need to build them to contribute.** | ||
|
||
These binaries are not included in this repository, but are built from git-submodules in the [subprojects folder](subprojects/). To get the submodules, run the following command: | ||
|
||
```bash | ||
git submodule update --init --recursive | ||
``` | ||
|
||
To actually build the binaries, simply run: | ||
|
||
```bash | ||
make | ||
``` | ||
|
||
## Contributing | ||
|
||
We do enforce some linting and testing that can and should be done locally - before you open a pull request. | ||
|
||
### Linting | ||
|
||
To install the necessary tools, just run: | ||
|
||
```bash | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
``` | ||
|
||
On Arch / Manjaro, you should run this instead: | ||
|
||
```bash | ||
sudo pacman -Sy ruff | ||
``` | ||
|
||
To run a check, just execute: | ||
|
||
```bash | ||
ruff check . | ||
Root-Core marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
You are good to go when you see the message `All checks passed!`. | ||
|
||
### Testing | ||
|
||
The filenames of the fixes are checked against the Steam and GOG APIs. All symbolic links are also checked. This is not mandatory to run locally, as you should have a working game fix to begin with, and it will be done automatically by Github's CI. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once we get more fixes related to other stores, it'd be nice to validate their store IDs against an API too. Or if there isn't an API, maybe query the game's store page if it includes the game's identifier in the URL like Steam's. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I was just documenting the current state. Loosely related, but I had some discussion about the other stores here: Open-Wine-Components/umu-database#39 |
||
|
||
You can still run it though: | ||
|
||
```bash | ||
cd .github/scripts | ||
python check_gamefixes.py | ||
``` | ||
|
||
You need the following prerequisites: | ||
|
||
```bash | ||
python -m pip install --upgrade pip | ||
pip install ijson | ||
``` | ||
|
||
On Arch / Manjaro: | ||
|
||
```bash | ||
sudo pacman -Sy python-ijson | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
DEFAULT_CONF = """ | ||
[main] | ||
enable_checks = true | ||
enable_splash = false | ||
enable_global_fixes = true | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I doubt this feature is widely used too, so we should definitely consider deprecating this feature along with the GDrive functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can add more config parameters and actually use that feature. Not sure yet.