mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Don't update platforms at the module level (awful idea)
This commit is contained in:
parent
8a6ce16f28
commit
d368945f0f
|
@ -27,7 +27,8 @@ gi.require_version('Gtk', '3.0')
|
||||||
from gi.repository import Gio, GLib, Gtk
|
from gi.repository import Gio, GLib, Gtk
|
||||||
|
|
||||||
from lutris import pga
|
from lutris import pga
|
||||||
from lutris.config import check_config # , register_handler
|
from lutris.config import check_config
|
||||||
|
from lutris.platforms import update_platforms
|
||||||
from lutris.game import Game
|
from lutris.game import Game
|
||||||
from lutris.gui.installgamedialog import InstallerDialog
|
from lutris.gui.installgamedialog import InstallerDialog
|
||||||
from lutris.gui.dialogs import ErrorDialog
|
from lutris.gui.dialogs import ErrorDialog
|
||||||
|
@ -44,8 +45,13 @@ from .lutriswindow import LutrisWindow
|
||||||
|
|
||||||
class Application(Gtk.Application):
|
class Application(Gtk.Application):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
Gtk.Application.__init__(self, application_id='net.lutris.Lutris',
|
Gtk.Application.__init__(self, application_id='net.lutris.Lutris',
|
||||||
flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
|
flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE)
|
||||||
|
check_config()
|
||||||
|
migrate()
|
||||||
|
update_platforms()
|
||||||
|
|
||||||
GLib.set_application_name(_('Lutris'))
|
GLib.set_application_name(_('Lutris'))
|
||||||
self.window = None
|
self.window = None
|
||||||
self.css_provider = Gtk.CssProvider.new()
|
self.css_provider = Gtk.CssProvider.new()
|
||||||
|
@ -189,9 +195,6 @@ class Application(Gtk.Application):
|
||||||
self.execute_command(command)
|
self.execute_command(command)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
check_config(force_wipe=False)
|
|
||||||
migrate()
|
|
||||||
|
|
||||||
game_slug = ''
|
game_slug = ''
|
||||||
uri = options.lookup_value(GLib.OPTION_REMAINING)
|
uri = options.lookup_value(GLib.OPTION_REMAINING)
|
||||||
if uri:
|
if uri:
|
||||||
|
|
|
@ -16,7 +16,7 @@ def _init_platforms():
|
||||||
__all__[platform].append(runner_name)
|
__all__[platform].append(runner_name)
|
||||||
|
|
||||||
|
|
||||||
def _update_platforms():
|
def update_platforms():
|
||||||
pga_games = pga.get_games(filter_installed=True)
|
pga_games = pga.get_games(filter_installed=True)
|
||||||
for pga_game in pga_games:
|
for pga_game in pga_games:
|
||||||
if pga_game.get('platform') or not pga_game['runner']:
|
if pga_game.get('platform') or not pga_game['runner']:
|
||||||
|
@ -27,4 +27,3 @@ def _update_platforms():
|
||||||
|
|
||||||
|
|
||||||
_init_platforms()
|
_init_platforms()
|
||||||
_update_platforms()
|
|
||||||
|
|
Loading…
Reference in a new issue