simons-public / protonfixes

A module for applying fixes at runtime to unsupported games with Steam Proton without changing game installation files
https://simons-public.github.io/protonfixes/
Other
233 stars 114 forks source link

cleanup no longer working/needed fixes #111

Closed soredake closed 4 years ago

mrjackv commented 4 years ago

This PR is quite interesting as it raises an issue that @simons-public has not yet addressed regarding backwards-compatibility of fixes. While it does make sense to always be consistent with the latest version I still think that some degree of compatibility with older version of protons might be beneficial (e.g. in case of regressions). IMHO supporting the last 3 releases (currently 5.0, 4.11 and 4.2) might be the right balance. Maybe something like a decorator (somthing like @DeprecatedSince(1544476838) or @DeprecatedSince("4.2-2") ) applied to the main() function would do the trick.

That said I've looked at the changes and it is true that some fixes, especially those corefonts-related and games that have been whitelisted in the meantime should be dropped (it has been 2 years since the inclusion of corefonts in proton). However I compared the fixes with protondb and the proton issue threads (as I do not own most of them) and found some irregularities:

simons-public commented 4 years ago

@mrjackv backwards compatibility is a problem I'd been putting off addressing. I like your idea and I merged your pull request with the '@DeprecatedSince' decorator. Up until now I hadn't seen any fixes that cause issues when they are no longer required, but I assume thats a possibility and it clearly slows things down to install unnecessary winetricks.

@soredake Since mrjackv's changes have been merged, if you want to resubmit with the @DeprecatedSince decorator on main for the games not mentioned above I'd be happy to merge.

Unfortunately for games I don't have I've been relying entirely on pull requests/issues for info, so I appreciate the input.

On a sidenote, I've keep the corefonts fix even after the proton implementation since they are using liberation-fonts which doesn't include all of the same fonts and may not have 100% coverage or compatibility.

soredake commented 4 years ago

Where i should put @DeprecatedSince?

mrjackv commented 4 years ago

You put it on top of the main() function

""" Example fix
"""

from protonfixes import util
from protonfixes.protonversion import DeprecatedSince

@DeprecatedSince("4.11-10")
def main():
  util.protontricks("corefonts")

You can also use timestamps (e.g. @DeprecatedSince(1582148269)), although imho you loose some readability

soredake commented 4 years ago

Updated.