Show error message and warnings after core.prepare_download
This commit is contained in:
parent
f8b467cd6d
commit
838783c1fb
|
@ -526,7 +526,7 @@ class LegendaryCLI:
|
|||
status_queue = MPQueue()
|
||||
logger.info('Preparing download...')
|
||||
try:
|
||||
dlm, analysis, game, igame, repair, repair_file = self.core.prepare_download(
|
||||
dlm, analysis, game, igame, repair, repair_file, res = self.core.prepare_download(
|
||||
app_name=args.app_name,
|
||||
base_path=args.base_path,
|
||||
force=args.force,
|
||||
|
@ -556,6 +556,15 @@ class LegendaryCLI:
|
|||
logger.fatal(e)
|
||||
exit(1)
|
||||
|
||||
if res.failures:
|
||||
for i in res.failures:
|
||||
logger.fatal(i)
|
||||
exit(1)
|
||||
|
||||
if res.warnings:
|
||||
for warn in res.warnings:
|
||||
logger.warning(warn)
|
||||
|
||||
logger.info(f'Install size: {analysis.install_size / 1024 / 1024:.02f} MiB')
|
||||
compression = (1 - (analysis.dl_size / analysis.uncompressed_dl_size)) * 100
|
||||
logger.info(f'Download size: {analysis.dl_size / 1024 / 1024:.02f} MiB '
|
||||
|
|
|
@ -1000,16 +1000,7 @@ class LegendaryCore:
|
|||
if res.warnings or res.failures:
|
||||
self.log.info('Installation requirements check returned the following results:')
|
||||
|
||||
if res.warnings:
|
||||
for warn in sorted(res.warnings):
|
||||
self.log.warning(warn)
|
||||
|
||||
if res.failures:
|
||||
for msg in sorted(res.failures):
|
||||
self.log.fatal(msg)
|
||||
raise RuntimeError('Installation cannot proceed, exiting.')
|
||||
|
||||
return dlm, anlres, game, igame, repair, repair_file
|
||||
return dlm, anlres, game, igame, repair, repair_file, res
|
||||
|
||||
@staticmethod
|
||||
def check_installation_conditions(analysis: AnalysisResult,
|
||||
|
|
|
@ -53,6 +53,9 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
self.install_dir_label.setVisible(False)
|
||||
self.install_dir_edit.setVisible(False)
|
||||
|
||||
self.warn_label.setVisible(False)
|
||||
self.warn_message.setVisible(False)
|
||||
|
||||
if self.core.lgd.config.has_option("Legendary", "max_workers"):
|
||||
max_workers = self.core.lgd.config.get("Legendary", "max_workers")
|
||||
else:
|
||||
|
@ -167,6 +170,11 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
self.install_size_info_label.setStyleSheet("font-style: normal; font-weight: bold")
|
||||
self.verify_button.setEnabled(self.options_changed)
|
||||
self.cancel_button.setEnabled(True)
|
||||
|
||||
if dl_item.res.warnings:
|
||||
self.warn_label.setVisible(True)
|
||||
self.warn_message.setText("\n".join(str(i) for i in dl_item.res.warnings))
|
||||
self.warn_message.setVisible(True)
|
||||
if self.silent:
|
||||
self.close()
|
||||
|
||||
|
@ -240,7 +248,10 @@ class InstallInfoWorker(QRunnable):
|
|||
# reset_sdl=,
|
||||
sdl_prompt=lambda app_name, title: self.dl_item.options.sdl_list
|
||||
))
|
||||
self.signals.result.emit(download)
|
||||
if not download.res.failures:
|
||||
self.signals.result.emit(download)
|
||||
else:
|
||||
self.signals.failed.emit("\n".join(str(i) for i in download.res.failures))
|
||||
except RuntimeError as e:
|
||||
self.signals.failed.emit(str(e))
|
||||
self.signals.finished.emit()
|
||||
|
|
|
@ -14,16 +14,93 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
|||
class Ui_InstallDialog(object):
|
||||
def setupUi(self, InstallDialog):
|
||||
InstallDialog.setObjectName("InstallDialog")
|
||||
InstallDialog.resize(338, 267)
|
||||
InstallDialog.setWindowTitle("Rare")
|
||||
self.install_dialog_layout = QtWidgets.QGridLayout(InstallDialog)
|
||||
self.install_dialog_layout.setObjectName("install_dialog_layout")
|
||||
self.force_download_check = QtWidgets.QCheckBox(InstallDialog)
|
||||
self.force_download_check.setObjectName("force_download_check")
|
||||
self.install_dialog_layout.addWidget(self.force_download_check, 3, 1, 1, 1)
|
||||
self.install_dir_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.install_dir_label.setObjectName("install_dir_label")
|
||||
self.install_dialog_layout.addWidget(self.install_dir_label, 1, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.download_only_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.download_only_label.setObjectName("download_only_label")
|
||||
self.install_dialog_layout.addWidget(self.download_only_label, 5, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.sdl_list_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.sdl_list_label.setObjectName("sdl_list_label")
|
||||
self.install_dialog_layout.addWidget(self.sdl_list_label, 6, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.install_size_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.install_size_info_label.setFont(font)
|
||||
self.install_size_info_label.setObjectName("install_size_info_label")
|
||||
self.install_dialog_layout.addWidget(self.install_size_info_label, 8, 1, 1, 2)
|
||||
self.install_dialog_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.install_dialog_label.setObjectName("install_dialog_label")
|
||||
self.install_dialog_layout.addWidget(self.install_dialog_label, 0, 0, 1, 3)
|
||||
spacerItem = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.install_dialog_layout.addItem(spacerItem, 3, 2, 1, 1)
|
||||
self.install_size_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.install_size_label.setObjectName("install_size_label")
|
||||
self.install_dialog_layout.addWidget(self.install_size_label, 8, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.download_only_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.download_only_info_label.setFont(font)
|
||||
self.download_only_info_label.setObjectName("download_only_info_label")
|
||||
self.install_dialog_layout.addWidget(self.download_only_info_label, 5, 2, 1, 1)
|
||||
self.max_workers_spin = QtWidgets.QSpinBox(InstallDialog)
|
||||
self.max_workers_spin.setObjectName("max_workers_spin")
|
||||
self.install_dialog_layout.addWidget(self.max_workers_spin, 2, 1, 1, 1)
|
||||
self.ignore_space_check = QtWidgets.QCheckBox(InstallDialog)
|
||||
self.ignore_space_check.setObjectName("ignore_space_check")
|
||||
self.install_dialog_layout.addWidget(self.ignore_space_check, 4, 1, 1, 1)
|
||||
self.download_only_check = QtWidgets.QCheckBox(InstallDialog)
|
||||
self.download_only_check.setText("")
|
||||
self.download_only_check.setObjectName("download_only_check")
|
||||
self.install_dialog_layout.addWidget(self.download_only_check, 5, 1, 1, 1)
|
||||
self.max_workers_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.max_workers_info_label.setFont(font)
|
||||
self.max_workers_info_label.setObjectName("max_workers_info_label")
|
||||
self.install_dialog_layout.addWidget(self.max_workers_info_label, 2, 2, 1, 1)
|
||||
self.warn_message = QtWidgets.QLabel(InstallDialog)
|
||||
self.warn_message.setWordWrap(True)
|
||||
self.warn_message.setObjectName("warn_message")
|
||||
self.install_dialog_layout.addWidget(self.warn_message, 9, 1, 1, 2)
|
||||
self.ignore_space_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.ignore_space_label.setObjectName("ignore_space_label")
|
||||
self.install_dialog_layout.addWidget(self.ignore_space_label, 4, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.install_dir_layout = QtWidgets.QHBoxLayout()
|
||||
self.install_dir_layout.setObjectName("install_dir_layout")
|
||||
self.install_dialog_layout.addLayout(self.install_dir_layout, 1, 1, 1, 2)
|
||||
self.download_size_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.download_size_label.setObjectName("download_size_label")
|
||||
self.install_dialog_layout.addWidget(self.download_size_label, 7, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.force_download_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.force_download_label.setObjectName("force_download_label")
|
||||
self.install_dialog_layout.addWidget(self.force_download_label, 3, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.ignore_space_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.ignore_space_info_label.setFont(font)
|
||||
self.ignore_space_info_label.setObjectName("ignore_space_info_label")
|
||||
self.install_dialog_layout.addWidget(self.ignore_space_info_label, 4, 2, 1, 1)
|
||||
self.max_workers_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.max_workers_label.setObjectName("max_workers_label")
|
||||
self.install_dialog_layout.addWidget(self.max_workers_label, 2, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.download_size_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.download_size_info_label.setFont(font)
|
||||
self.download_size_info_label.setObjectName("download_size_info_label")
|
||||
self.install_dialog_layout.addWidget(self.download_size_info_label, 7, 1, 1, 2)
|
||||
self.button_layout = QtWidgets.QHBoxLayout()
|
||||
self.button_layout.setObjectName("button_layout")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.button_layout.addItem(spacerItem)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.button_layout.addItem(spacerItem1)
|
||||
self.cancel_button = QtWidgets.QPushButton(InstallDialog)
|
||||
self.cancel_button.setObjectName("cancel_button")
|
||||
self.button_layout.addWidget(self.cancel_button)
|
||||
|
@ -33,76 +110,7 @@ class Ui_InstallDialog(object):
|
|||
self.install_button = QtWidgets.QPushButton(InstallDialog)
|
||||
self.install_button.setObjectName("install_button")
|
||||
self.button_layout.addWidget(self.install_button)
|
||||
self.install_dialog_layout.addLayout(self.button_layout, 9, 0, 1, 3)
|
||||
self.ignore_space_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.ignore_space_info_label.setFont(font)
|
||||
self.ignore_space_info_label.setObjectName("ignore_space_info_label")
|
||||
self.install_dialog_layout.addWidget(self.ignore_space_info_label, 4, 2, 1, 1)
|
||||
self.install_dir_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.install_dir_label.setObjectName("install_dir_label")
|
||||
self.install_dialog_layout.addWidget(self.install_dir_label, 1, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.ignore_space_check = QtWidgets.QCheckBox(InstallDialog)
|
||||
self.ignore_space_check.setObjectName("ignore_space_check")
|
||||
self.install_dialog_layout.addWidget(self.ignore_space_check, 4, 1, 1, 1)
|
||||
self.max_workers_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.max_workers_info_label.setFont(font)
|
||||
self.max_workers_info_label.setObjectName("max_workers_info_label")
|
||||
self.install_dialog_layout.addWidget(self.max_workers_info_label, 2, 2, 1, 1)
|
||||
self.max_workers_spin = QtWidgets.QSpinBox(InstallDialog)
|
||||
self.max_workers_spin.setObjectName("max_workers_spin")
|
||||
self.install_dialog_layout.addWidget(self.max_workers_spin, 2, 1, 1, 1)
|
||||
self.download_only_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.download_only_info_label.setFont(font)
|
||||
self.download_only_info_label.setObjectName("download_only_info_label")
|
||||
self.install_dialog_layout.addWidget(self.download_only_info_label, 5, 2, 1, 1)
|
||||
self.install_size_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.install_size_label.setObjectName("install_size_label")
|
||||
self.install_dialog_layout.addWidget(self.install_size_label, 8, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.install_dir_layout = QtWidgets.QHBoxLayout()
|
||||
self.install_dir_layout.setObjectName("install_dir_layout")
|
||||
self.install_dialog_layout.addLayout(self.install_dir_layout, 1, 1, 1, 2)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.install_dialog_layout.addItem(spacerItem1, 3, 2, 1, 1)
|
||||
self.ignore_space_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.ignore_space_label.setObjectName("ignore_space_label")
|
||||
self.install_dialog_layout.addWidget(self.ignore_space_label, 4, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.download_only_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.download_only_label.setObjectName("download_only_label")
|
||||
self.install_dialog_layout.addWidget(self.download_only_label, 5, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.max_workers_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.max_workers_label.setObjectName("max_workers_label")
|
||||
self.install_dialog_layout.addWidget(self.max_workers_label, 2, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.install_size_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.install_size_info_label.setFont(font)
|
||||
self.install_size_info_label.setObjectName("install_size_info_label")
|
||||
self.install_dialog_layout.addWidget(self.install_size_info_label, 8, 1, 1, 2)
|
||||
self.download_size_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.download_size_label.setObjectName("download_size_label")
|
||||
self.install_dialog_layout.addWidget(self.download_size_label, 7, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.download_size_info_label = QtWidgets.QLabel(InstallDialog)
|
||||
font = QtGui.QFont()
|
||||
font.setItalic(True)
|
||||
self.download_size_info_label.setFont(font)
|
||||
self.download_size_info_label.setObjectName("download_size_info_label")
|
||||
self.install_dialog_layout.addWidget(self.download_size_info_label, 7, 1, 1, 2)
|
||||
self.force_download_check = QtWidgets.QCheckBox(InstallDialog)
|
||||
self.force_download_check.setObjectName("force_download_check")
|
||||
self.install_dialog_layout.addWidget(self.force_download_check, 3, 1, 1, 1)
|
||||
self.install_dialog_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.install_dialog_label.setObjectName("install_dialog_label")
|
||||
self.install_dialog_layout.addWidget(self.install_dialog_label, 0, 0, 1, 3)
|
||||
self.download_only_check = QtWidgets.QCheckBox(InstallDialog)
|
||||
self.download_only_check.setText("")
|
||||
self.download_only_check.setObjectName("download_only_check")
|
||||
self.install_dialog_layout.addWidget(self.download_only_check, 5, 1, 1, 1)
|
||||
self.install_dialog_layout.addLayout(self.button_layout, 11, 0, 1, 3)
|
||||
self.sdl_list_frame = QtWidgets.QFrame(InstallDialog)
|
||||
self.sdl_list_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||
self.sdl_list_frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||
|
@ -111,32 +119,34 @@ class Ui_InstallDialog(object):
|
|||
self.sdl_list_layout.setSpacing(0)
|
||||
self.sdl_list_layout.setObjectName("sdl_list_layout")
|
||||
self.install_dialog_layout.addWidget(self.sdl_list_frame, 6, 1, 1, 2, QtCore.Qt.AlignTop)
|
||||
self.sdl_list_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.sdl_list_label.setObjectName("sdl_list_label")
|
||||
self.install_dialog_layout.addWidget(self.sdl_list_label, 6, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
self.warn_label = QtWidgets.QLabel(InstallDialog)
|
||||
self.warn_label.setObjectName("warn_label")
|
||||
self.install_dialog_layout.addWidget(self.warn_label, 9, 0, 1, 1, QtCore.Qt.AlignRight)
|
||||
|
||||
self.retranslateUi(InstallDialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(InstallDialog)
|
||||
|
||||
def retranslateUi(self, InstallDialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
self.install_dir_label.setText(_translate("InstallDialog", "Install directory"))
|
||||
self.download_only_label.setText(_translate("InstallDialog", "Download only"))
|
||||
self.sdl_list_label.setText(_translate("InstallDialog", "Optional packs"))
|
||||
self.install_size_info_label.setText(_translate("InstallDialog", "Click verify..."))
|
||||
self.install_dialog_label.setText(_translate("InstallDialog", "error"))
|
||||
self.install_size_label.setText(_translate("InstallDialog", "Total install size"))
|
||||
self.download_only_info_label.setText(_translate("InstallDialog", "Do not try to install."))
|
||||
self.max_workers_info_label.setText(_translate("InstallDialog", "Less is slower. (0: Default)"))
|
||||
self.warn_message.setText(_translate("InstallDialog", "TextLabel"))
|
||||
self.ignore_space_label.setText(_translate("InstallDialog", "Ignore free space"))
|
||||
self.download_size_label.setText(_translate("InstallDialog", "Download size"))
|
||||
self.force_download_label.setText(_translate("InstallDialog", "Force redownload"))
|
||||
self.ignore_space_info_label.setText(_translate("InstallDialog", "Use with caution!"))
|
||||
self.max_workers_label.setText(_translate("InstallDialog", "Max workers"))
|
||||
self.download_size_info_label.setText(_translate("InstallDialog", "Click verify..."))
|
||||
self.cancel_button.setText(_translate("InstallDialog", "Cancel"))
|
||||
self.verify_button.setText(_translate("InstallDialog", "Verify"))
|
||||
self.install_button.setText(_translate("InstallDialog", "Install"))
|
||||
self.ignore_space_info_label.setText(_translate("InstallDialog", "Use with caution!"))
|
||||
self.install_dir_label.setText(_translate("InstallDialog", "Install directory"))
|
||||
self.max_workers_info_label.setText(_translate("InstallDialog", "Less is slower. (0: Default)"))
|
||||
self.download_only_info_label.setText(_translate("InstallDialog", "Do not try to install."))
|
||||
self.install_size_label.setText(_translate("InstallDialog", "Total install size"))
|
||||
self.ignore_space_label.setText(_translate("InstallDialog", "Ignore free space"))
|
||||
self.download_only_label.setText(_translate("InstallDialog", "Download only"))
|
||||
self.max_workers_label.setText(_translate("InstallDialog", "Max workers"))
|
||||
self.install_size_info_label.setText(_translate("InstallDialog", "Click verify..."))
|
||||
self.download_size_label.setText(_translate("InstallDialog", "Download size"))
|
||||
self.download_size_info_label.setText(_translate("InstallDialog", "Click verify..."))
|
||||
self.install_dialog_label.setText(_translate("InstallDialog", "error"))
|
||||
self.sdl_list_label.setText(_translate("InstallDialog", "Optional packs"))
|
||||
self.warn_label.setText(_translate("InstallDialog", "Warnings"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -2,10 +2,145 @@
|
|||
<ui version="4.0">
|
||||
<class>InstallDialog</class>
|
||||
<widget class="QDialog" name="InstallDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>338</width>
|
||||
<height>267</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Rare</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="install_dialog_layout">
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="force_download_check"/>
|
||||
</item>
|
||||
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="install_dir_label">
|
||||
<property name="text">
|
||||
<string>Install directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="download_only_label">
|
||||
<property name="text">
|
||||
<string>Download only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="sdl_list_label">
|
||||
<property name="text">
|
||||
<string>Optional packs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<widget class="QLabel" name="install_size_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Click verify...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QLabel" name="install_dialog_label">
|
||||
<property name="text">
|
||||
<string>error</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="install_dialog_hspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="install_size_label">
|
||||
<property name="text">
|
||||
<string>Total install size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="download_only_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Do not try to install.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="max_workers_spin"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="ignore_space_check"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="download_only_check">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="max_workers_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Less is slower. (0: Default)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="2">
|
||||
<widget class="QLabel" name="warn_message">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="ignore_space_label">
|
||||
<property name="text">
|
||||
<string>Ignore free space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="install_dir_layout"/>
|
||||
</item>
|
||||
<item row="7" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="download_size_label">
|
||||
<property name="text">
|
||||
<string>Download size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="force_download_label">
|
||||
<property name="text">
|
||||
|
@ -13,7 +148,38 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="3">
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="ignore_space_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use with caution!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="max_workers_label">
|
||||
<property name="text">
|
||||
<string>Max workers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QLabel" name="download_size_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Click verify...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="button_layout">
|
||||
<item>
|
||||
<spacer name="button_hspacer">
|
||||
|
@ -51,147 +217,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="ignore_space_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use with caution!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="install_dir_label">
|
||||
<property name="text">
|
||||
<string>Install directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="ignore_space_check"/>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="max_workers_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Less is slower. (0: Default)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="max_workers_spin"/>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="download_only_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Do not try to install.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="install_size_label">
|
||||
<property name="text">
|
||||
<string>Total install size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<layout class="QHBoxLayout" name="install_dir_layout"/>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="install_dialog_hspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="ignore_space_label">
|
||||
<property name="text">
|
||||
<string>Ignore free space</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="download_only_label">
|
||||
<property name="text">
|
||||
<string>Download only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="max_workers_label">
|
||||
<property name="text">
|
||||
<string>Max workers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<widget class="QLabel" name="install_size_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Click verify...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="download_size_label">
|
||||
<property name="text">
|
||||
<string>Download size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" colspan="2">
|
||||
<widget class="QLabel" name="download_size_info_label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Click verify...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="force_download_check"/>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QLabel" name="install_dialog_label">
|
||||
<property name="text">
|
||||
<string>error</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="download_only_check">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" alignment="Qt::AlignTop">
|
||||
<widget class="QFrame" name="sdl_list_frame">
|
||||
<property name="frameShape">
|
||||
|
@ -207,10 +232,10 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="sdl_list_label">
|
||||
<item row="9" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="warn_label">
|
||||
<property name="text">
|
||||
<string>Optional packs</string>
|
||||
<string>Warnings</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
|
||||
from custom_legendary.models.downloading import ConditionCheckResult
|
||||
|
||||
class InstallOptionsModel:
|
||||
def __init__(self, app_name: str, base_path: str = os.path.expanduser("~/legendary"),
|
||||
|
@ -17,13 +17,14 @@ class InstallOptionsModel:
|
|||
|
||||
|
||||
class InstallDownloadModel:
|
||||
def __init__(self, dlmanager, analysis, game, igame, repair: bool, repair_file: str):
|
||||
def __init__(self, dlmanager, analysis, game, igame, repair: bool, repair_file: str, res: ConditionCheckResult):
|
||||
self.dlmanager = dlmanager
|
||||
self.analysis = analysis
|
||||
self.game = game
|
||||
self.igame = igame
|
||||
self.repair = repair
|
||||
self.repair_file = repair_file
|
||||
self.res = res
|
||||
|
||||
|
||||
class InstallQueueItemModel:
|
||||
|
|
Loading…
Reference in a new issue