splash_preference: order in which splashes are going to be tried
zenity_bigpicture: allow zenity as splash in bigpicture mode
util.install_from_zip has been moved to download in an effort to slim down utils and since it made more sense to be there
metal slug fixes and doom have been modified to use download.install_from_zip, install_from_zip now has a filesha parameter like in the metal slug fixes
How the progress bar works
TrackProgress is created in progress.py, it has an internal registry
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)
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
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.
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)
We have a progress bar :tada: (should fix #8)
Minor things that have changed:
config.ini
: new config optionssplash_preference
: order in which splashes are going to be triedzenity_bigpicture
: allow zenity as splash in bigpicture modeutil.install_from_zip
has been moved to download in an effort to slim down utils and since it made more sense to be theredownload.install_from_zip
,install_from_zip
now has afilesha
parameter like in the metal slug fixesHow the progress bar works
TrackProgress
is created inprogress.py
, it has an internal registryfix.py
imports all the modules that haveTrackProgress
-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
)fix.py
finds a suitable fix, it loads the.py
file intoprogress.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 theTrackProgress
registry and sets theTOTAL_STEPS
variablemain()
is actually called the decorator indirectly calls functions insplash.py
to update the title and increment the progress bar.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)