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

Splash overhaul #113

Closed mrjackv closed 4 years ago

mrjackv commented 4 years ago

We have a progress bar :tada: (should fix #8)

Minor things that have changed:

How the progress bar works

  1. TrackProgress is created in progress.py, it has an internal registry
  2. fix.py imports all the modules that have TrackProgress-decorated functions, the decorator is invoked and the internal registry is populated with fully-qualified function names that are being decorated (e.g. protonfixes.utils.protontricks)
  3. When fix.py finds a suitable fix, it loads the .py file into progress.parse_fix, this in turn runs ast (static parsing) and outputs a list of fully-qualified function calls in the specified .py file, it then filters out any that are not in the TrackProgress registry and sets the TOTAL_STEPS variable
  4. Once a fix's main() is actually called the decorator indirectly calls functions in splash.py to update the title and increment the progress bar.
  5. splash checks which method it used for displaying progress and uses an appropriate way to updated it. (CEF needs a Queue since it runs on a separate process)
pchome commented 4 years ago

enable_splash = false config option is broken now.

mrjackv commented 4 years ago

Whoops must have forgotten while refactoring :grimacing: PR already published