Many places can use this to be more readable, and I've updated some.
Many subclasses of Runner might still benefit.
But the real win is fs-uae. This still installs in 'fs-uae' not the
expected 'fsuae'; overriding directory lets us work around this.
So, now you can uninstall fs-uae.
This dialog wasn't quite all there.
I've put in Cancel and OK buttons, with proper keyboard shortcuts and
styling.
Also, the file chooser did not work properly here, probably because it
needs to be modal.
So, use run() instead of show(), and no 'response' signal stuff.
It needs to fetch the *dependencies* installer, not just try to use
the current installer list.
Also, we do support multiple InstallerWindows; no need to close the
original. We'll want it once the dependency is in!
Resolves#4539
Unstab the stab in the dark. It worked, but the wineexec hack is a hack.
Instead, runners 'always' have a self.config, and
lazy allocate a LutrisConfig on demand if need be.
This won't have game configuration, so a separate flag drags if we were given an
explicit game config so we can preserve the warning about that.
InstallerWindow has been a real sore point for good error reporting;
lets try to fix it.
This commit uses @watch_errors() to provide error handling on all the
signal handlers in InstallerWindow,
Some of the methods named 'on_xxx' were not signal handlers.
I have renamed these.
Some were signal handlers, but were also directly called too.
I've split these into an on_xxx method with @watch_errors and
another method without.
The idea is that errors should be reported before GTK sees them,
but otherwise should propagate through the code as before.
This is done with a decorator like @watch_lutris_errors, but it is
a more simpler, more general design that calls back into 'self'.
I've also renamed watch_lutris_errors to watch_game_errors;
I think that's a clearer name.
Resolves#4489
So, replace it with a specific exception and catch it so lutris can start and the replacements dict can be generated (with None for WINEBIN).
Resolves#4533
We wouldn't want the save to fail just because we can't get an icon, and
rooting around in an EXE for an icon has got to be fraught with failure.
This will now log the error and continue with the save.
./utils contains stand alone utility scripts; utility routines used
by wine seem to be in lutris/util/wine, so lets move this there.
I am hoping this will address issue #4529
Some systems, like those that use musl libc, do not have the `locale` program. This change fixes a crash in that case.
Methodology:
1. try to run `locale -a`, if success, use that output
2. if that fails, check the environment variable `LANG`
3. if `LANG` is empty or unset, return an empty locale list