Some fixes: Update gamelist; dl_tab.finished; AppImageBuilder.yml; install_dialog: auto verify
This commit is contained in:
parent
e1c6e03812
commit
96806274f9
|
@ -1,7 +1,7 @@
|
|||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
|
||||
|
||||
version: 1
|
||||
|
||||
|
||||
script:
|
||||
# Remove any previous build
|
||||
- rm -rf AppDir Rare | true
|
||||
|
@ -18,7 +18,6 @@ script:
|
|||
|
||||
|
||||
AppDir:
|
||||
|
||||
path: AppDir
|
||||
app_info:
|
||||
id: org.dummerle.rare
|
||||
|
@ -26,18 +25,27 @@ AppDir:
|
|||
icon: Logo
|
||||
version: 1.5.0
|
||||
exec: usr/bin/python3
|
||||
exec_args: "$APPDIR/usr/src/__main__.py $@"
|
||||
exec_args: $APPDIR/usr/src/__main__.py $@
|
||||
apt:
|
||||
arch: amd64
|
||||
allow_unauthenticated: true
|
||||
sources:
|
||||
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ groovy-updates main
|
||||
'
|
||||
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
|
||||
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy main restricted
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy-updates main restricted
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy universe
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy-updates universe
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy multiverse
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy-updates multiverse
|
||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy-backports main restricted
|
||||
universe multiverse
|
||||
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security main restricted
|
||||
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security universe
|
||||
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security multiverse
|
||||
include:
|
||||
- python3
|
||||
- python3-pkg-resources
|
||||
exclude: [ ]
|
||||
- python3-distutils
|
||||
- python3-pyqt5
|
||||
|
||||
runtime:
|
||||
env:
|
||||
|
@ -49,29 +57,31 @@ AppDir:
|
|||
PYTHONPATH: '${APPDIR}/usr/lib/python3.8/site-packages'
|
||||
|
||||
|
||||
AppImage:
|
||||
arch: x86_64
|
||||
update-information: 'gh-releases-zsync|Dummerle|Rare|latest|Rare-*x86_64.AppImage.zsync'
|
||||
|
||||
files:
|
||||
include: [ ]
|
||||
exclude: [ ]
|
||||
|
||||
test:
|
||||
fedora:
|
||||
image: appimagecrafters/tests-env:fedora-30
|
||||
command: ./AppRun
|
||||
use_host_x: true
|
||||
debian:
|
||||
debian-stable:
|
||||
image: appimagecrafters/tests-env:debian-stable
|
||||
command: ./AppRun
|
||||
use_host_x: true
|
||||
arch:
|
||||
archlinux-latest:
|
||||
image: appimagecrafters/tests-env:archlinux-latest
|
||||
command: ./AppRun
|
||||
use_host_x: true
|
||||
centos:
|
||||
centos-7:
|
||||
image: appimagecrafters/tests-env:centos-7
|
||||
command: ./AppRun
|
||||
use_host_x: true
|
||||
ubuntu:
|
||||
ubuntu-xenial:
|
||||
image: appimagecrafters/tests-env:ubuntu-xenial
|
||||
command: ./AppRun
|
||||
use_host_x: true
|
||||
AppImage:
|
||||
arch: x86_64
|
||||
update-information: gh-releases-zsync|Dummerle|Rare|latest|Rare-*x86_64.AppImage.zsync
|
||||
|
|
|
@ -110,9 +110,10 @@ class App(QApplication):
|
|||
self.tray_icon.start_rare.triggered.connect(self.mainwindow.show)
|
||||
self.tray_icon.activated.connect(self.tray)
|
||||
if not offline:
|
||||
self.mainwindow.tab_widget.downloadTab.finished.connect(lambda update: self.tray_icon.showMessage(
|
||||
self.tr("Download finished"), self.tr("Download finished. Game is playable now"),
|
||||
QSystemTrayIcon.Information, 4000) if update else None)
|
||||
self.mainwindow.tab_widget.downloadTab.finished.connect(lambda x: self.tray_icon.showMessage(
|
||||
self.tr("Download finished"),
|
||||
self.tr("Download finished. {} is playable now").format(self.core.get_game(x[1]).app_title),
|
||||
QSystemTrayIcon.Information, 4000) if x[0] else None)
|
||||
|
||||
if not self.args.silent:
|
||||
self.mainwindow.show()
|
||||
|
|
|
@ -95,7 +95,9 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
self.reject_close = True
|
||||
|
||||
self.resize(self.minimumSize())
|
||||
self.setFixedSize(self.size())
|
||||
# self.setFixedSize(self.size())
|
||||
|
||||
self.verify_clicked()
|
||||
|
||||
def execute(self):
|
||||
if self.silent:
|
||||
|
@ -154,9 +156,6 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
|
||||
def on_worker_result(self, dl_item: InstallDownloadModel):
|
||||
self.dl_item.download = dl_item
|
||||
# TODO: Check available size and act accordingly
|
||||
# TODO: (show message in label | color it | disable install unless ignore)
|
||||
# TODO: Find a way to get the installation size delta and show it
|
||||
download_size = self.dl_item.download.analysis.dl_size
|
||||
install_size = self.dl_item.download.analysis.install_size
|
||||
if download_size:
|
||||
|
@ -175,6 +174,7 @@ class InstallDialog(QDialog, Ui_InstallDialog):
|
|||
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()
|
||||
|
||||
|
|
|
@ -147,8 +147,6 @@ class DownloadTab(QWidget):
|
|||
if len(self.update_widgets) == 0:
|
||||
self.update_text.setVisible(True)
|
||||
|
||||
for i in self.update_widgets.values():
|
||||
i.update_button.setDisabled(False)
|
||||
|
||||
self.finished.emit((True, app_name))
|
||||
|
||||
|
@ -165,7 +163,7 @@ class DownloadTab(QWidget):
|
|||
elif text == "stop":
|
||||
self.reset_infos()
|
||||
self.active_game = None
|
||||
self.finished.emit((False, None))
|
||||
self.finished.emit((False, ""))
|
||||
if self.dl_queue:
|
||||
self.start_installation(self.dl_queue[0])
|
||||
|
||||
|
|
|
@ -297,53 +297,12 @@ class GameList(QStackedWidget):
|
|||
self.widgets.pop(widgets[0].game.app_name)
|
||||
|
||||
# QWidget().setLayout(self.icon_layout)
|
||||
icon_layout = FlowLayout()
|
||||
|
||||
# QWidget().setLayout(self.list_layout)
|
||||
list_layout = QVBoxLayout()
|
||||
|
||||
igame = self.core.get_installed_game(app_name)
|
||||
self.add_installed_widget(igame)
|
||||
|
||||
for igame in sorted(self.core.get_installed_list(), key=lambda x: x.title):
|
||||
i_widget, l_widget = self.widgets[igame.app_name]
|
||||
icon_layout.addWidget(i_widget)
|
||||
list_layout.addWidget(l_widget)
|
||||
|
||||
self.uninstalled_names = []
|
||||
installed_names = [i.app_name for i in self.core.get_installed_list()]
|
||||
# get Uninstalled games
|
||||
games, self.dlcs = self.core.get_game_and_dlc_list()
|
||||
for game in sorted(games, key=lambda x: x.app_title):
|
||||
if not game.app_name in installed_names:
|
||||
self.uninstalled_names.append(game)
|
||||
for game in self.uninstalled_names:
|
||||
i_widget, list_widget = self.widgets[game.app_name]
|
||||
icon_layout.addWidget(i_widget)
|
||||
list_layout.addWidget(list_widget)
|
||||
|
||||
QWidget().setLayout(self.icon_layout)
|
||||
QWidget().setLayout(self.list_layout)
|
||||
|
||||
self.icon_widget = QWidget()
|
||||
self.list_widget = QWidget()
|
||||
|
||||
self.icon_widget.setLayout(icon_layout)
|
||||
self.list_widget.setLayout(list_layout)
|
||||
|
||||
self.list_scrollarea.setWidget(QWidget())
|
||||
self.icon_scrollarea.setWidget(QWidget())
|
||||
|
||||
self.icon_scrollarea.setWidget(self.icon_widget)
|
||||
self.list_scrollarea.setWidget(self.list_widget)
|
||||
|
||||
self.icon_layout = icon_layout
|
||||
self.list_layout = list_layout
|
||||
|
||||
self.icon_widget.setLayout(self.icon_layout)
|
||||
self.list_widget.setLayout(self.list_layout)
|
||||
|
||||
self.update()
|
||||
self._update_games()
|
||||
|
||||
# uninstalled
|
||||
elif not self.core.is_installed(widgets[0].game.app_name) and isinstance(widgets[0],
|
||||
|
@ -356,8 +315,8 @@ class GameList(QStackedWidget):
|
|||
game = self.core.get_game(app_name, True)
|
||||
self.add_uninstalled_widget(game)
|
||||
|
||||
self.icon_layout.addWidget(self.widgets[app_name][0])
|
||||
self.list_layout.addWidget(self.widgets[app_name][1])
|
||||
self._update_games()
|
||||
|
||||
else:
|
||||
installed_names = [i.app_name for i in self.core.get_installed_list()]
|
||||
# get Uninstalled games
|
||||
|
@ -407,3 +366,49 @@ class GameList(QStackedWidget):
|
|||
i_widget, list_widget = self.widgets[name]
|
||||
self.icon_layout.addWidget(i_widget)
|
||||
self.list_layout.addWidget(list_widget)
|
||||
|
||||
def _update_games(self):
|
||||
# new layouts to remove from old layout
|
||||
icon_layout = FlowLayout()
|
||||
# QWidget().setLayout(self.list_layout)
|
||||
list_layout = QVBoxLayout()
|
||||
|
||||
for igame in sorted(self.core.get_installed_list(), key=lambda x: x.title):
|
||||
i_widget, l_widget = self.widgets[igame.app_name]
|
||||
icon_layout.addWidget(i_widget)
|
||||
list_layout.addWidget(l_widget)
|
||||
|
||||
self.uninstalled_names = []
|
||||
installed_names = [i.app_name for i in self.core.get_installed_list()]
|
||||
# get Uninstalled games
|
||||
games, self.dlcs = self.core.get_game_and_dlc_list()
|
||||
for game in sorted(games, key=lambda x: x.app_title):
|
||||
if not game.app_name in installed_names:
|
||||
self.uninstalled_names.append(game)
|
||||
for game in self.uninstalled_names:
|
||||
i_widget, list_widget = self.widgets[game.app_name]
|
||||
icon_layout.addWidget(i_widget)
|
||||
list_layout.addWidget(list_widget)
|
||||
|
||||
QWidget().setLayout(self.icon_layout)
|
||||
QWidget().setLayout(self.list_layout)
|
||||
|
||||
self.icon_widget = QWidget()
|
||||
self.list_widget = QWidget()
|
||||
|
||||
self.icon_widget.setLayout(icon_layout)
|
||||
self.list_widget.setLayout(list_layout)
|
||||
|
||||
self.list_scrollarea.setWidget(QWidget())
|
||||
self.icon_scrollarea.setWidget(QWidget())
|
||||
|
||||
self.icon_scrollarea.setWidget(self.icon_widget)
|
||||
self.list_scrollarea.setWidget(self.list_widget)
|
||||
|
||||
self.icon_layout = icon_layout
|
||||
self.list_layout = list_layout
|
||||
|
||||
self.icon_widget.setLayout(self.icon_layout)
|
||||
self.list_widget.setLayout(self.list_layout)
|
||||
|
||||
self.update()
|
||||
|
|
Loading…
Reference in a new issue