mirror of
https://github.com/lutris/lutris
synced 2024-10-14 11:42:36 +00:00
Remove unused code in launcher script
This commit is contained in:
parent
9b312c9a75
commit
dcf0633f58
37
bin/lutris
37
bin/lutris
|
@ -26,40 +26,3 @@ from lutris.gui.application import Application
|
|||
|
||||
app = Application()
|
||||
sys.exit(app.run(sys.argv))
|
||||
|
||||
|
||||
if game_slug or installer:
|
||||
if not game_slug and not os.path.isfile(installer):
|
||||
print("No such file: %s" % installer)
|
||||
exit()
|
||||
|
||||
db_game = None
|
||||
if game_slug:
|
||||
db_game = (pga.get_game_by_field(game_slug, 'id')
|
||||
or pga.get_game_by_field(game_slug, 'slug')
|
||||
or pga.get_game_by_field(game_slug, 'installer_slug'))
|
||||
|
||||
runtime_updater = RuntimeUpdater()
|
||||
|
||||
if db_game and db_game['installed'] and not options.reinstall:
|
||||
logger.info("Launching %s", db_game['name'])
|
||||
if lutris.is_running():
|
||||
lutris.run_game(db_game['id'])
|
||||
else:
|
||||
runtime_updater.update()
|
||||
lutris_game = Game(db_game['id'])
|
||||
lutris_game.exit_main_loop = True
|
||||
lutris_game.play()
|
||||
try:
|
||||
GLib.MainLoop().run()
|
||||
except KeyboardInterrupt:
|
||||
lutris_game.stop()
|
||||
else:
|
||||
logger.info("Installing %s", game_slug)
|
||||
if lutris.is_running():
|
||||
lutris.install_game(installer or game_slug)
|
||||
else:
|
||||
runtime_updater.update()
|
||||
InstallerDialog(installer or game_slug)
|
||||
exit()
|
||||
|
||||
|
|
Loading…
Reference in a new issue