Skip to content

Commit

Permalink
Fix issues preventing GOG games from installing
Browse files Browse the repository at this point in the history
  • Loading branch information
strycore committed Jul 21, 2020
1 parent f1d1d09 commit bc1cf5a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lutris/gui/installerwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def on_installer_selected(self, _widget, installer_slug):
)
self.destroy()
return
self.title_label.set_markup(_(u"<b>Installing {}</b>").format(gtk_safe(self.interpreter.game_name)))
self.title_label.set_markup(_(u"<b>Installing {}</b>").format(gtk_safe(self.interpreter.installer.game_name)))
self.select_install_folder()

def select_install_folder(self):
Expand Down
10 changes: 0 additions & 10 deletions lutris/gui/widgets/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from lutris.gui.widgets.common import FileChooserEntry
from lutris.gui.widgets.download_progress import DownloadProgressBox
from lutris.gui.widgets.utils import get_icon
from lutris.installer.steam_installer import SteamInstaller
from lutris.util import system
from lutris.util.log import logger
Expand Down Expand Up @@ -43,7 +42,6 @@ def __init__(self, script, parent=None, revealed=False):
self.set_margin_left(12)
self.set_margin_right(12)
box = Gtk.Box(spacing=12, margin_top=6, margin_bottom=6)
box.add(self.get_icon())
box.pack_start(self.get_infobox(), True, True, 0)
box.add(self.get_install_button())
self.add(box)
Expand Down Expand Up @@ -77,11 +75,6 @@ def get_revealer(self, revealed):
self.revealer.set_reveal_child(revealed)
return self.revealer

def get_icon(self):
"""Return the runner icon widget"""
icon = get_icon(self.script["runner"], size=(32, 32))
return icon

def get_install_button(self):
"""Return the install button widget"""
align = Gtk.Alignment()
Expand Down Expand Up @@ -217,9 +210,6 @@ def get_file_provider_widget(self):
self.stop_func = steam_installer.stop_func

steam_box = Gtk.HBox(spacing=6)
icon = get_icon("steam", size=(32, 32))
icon.set_margin_right(6)
steam_box.add(icon)
info_box = Gtk.VBox(spacing=6)
steam_label = InstallerLabel("Steam game for %s (appid: <b>%s</b>)" % (
steam_installer.platform,
Expand Down
2 changes: 2 additions & 0 deletions lutris/installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def swap_steam_install(self):

def swap_gog_game_files(self):
"""Replace user provided file with downloads from GOG"""
logger.info("Swap GOG game files")
if not self.gogid:
raise UnavailableGame("The installer has no GOG ID!")
try:
Expand Down Expand Up @@ -167,6 +168,7 @@ def prepare_game_files(self):
# If this is a GOG installer, download required files.
version = self.version.lower()
if version.startswith("gog"):
logger.debug("GOG game detected")
try:
self.swap_gog_game_files()
except UnavailableGame as ex:
Expand Down
7 changes: 0 additions & 7 deletions lutris/installer/installer_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ def __init__(self, game_slug, file_id, file_meta):
if self.url.startswith("/"):
self.url = "file://" + self.url

if not self.filename:
logger.error("Couldn't find a filename for file %s in %s", file_id, file_meta)
raise ScriptingError(
"No filename provided for %s, please provide 'url' "
"and 'filename' parameters in the script" % file_id
)

def __str__(self):
return "%s/%s" % (self.game_slug, self.id)

Expand Down
2 changes: 1 addition & 1 deletion lutris/installer/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def _finish_install(self):
)
logger.warning("No executable found at specified location %s", path)
else:
install_complete_text = (self.script.get("install_complete_text") or "Installation completed!")
install_complete_text = (self.installer.script.get("install_complete_text") or "Installation completed!")
self.parent.set_status(install_complete_text)
self.parent.on_install_finished()

Expand Down

0 comments on commit bc1cf5a

Please sign in to comment.