1
0
Fork 0
mirror of synced 2024-05-18 19:42:54 +12:00

Add --test-start to use in appimage-builder

This commit is contained in:
Dummerle 2021-12-11 00:18:57 +01:00
parent 782968b1d0
commit d93294536a
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1
4 changed files with 27 additions and 19 deletions

View file

@ -23,20 +23,20 @@ AppDir:
exec: usr/bin/python3
exec_args: $APPDIR/usr/src/rare/__main__.py $@
apt:
arch: amd64
allow_unauthenticated: true
sources:
- 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
arch: amd64
allow_unauthenticated: true
sources:
- 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-distutils
@ -56,23 +56,23 @@ AppDir:
test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
command: ./AppRun --test-start
use_host_x: true
debian-stable:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
command: ./AppRun --test-start
use_host_x: true
archlinux-latest:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
command: ./AppRun --test-start
use_host_x: true
centos-7:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
command: ./AppRun --test-start
use_host_x: true
ubuntu-xenial:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
command: ./AppRun --test.start
use_host_x: true
AppImage:

View file

@ -23,6 +23,7 @@ def main():
help="Launch Rare in background. Open it from System Tray Icon")
parser.add_argument("--debug", action="store_true", help="Launch in debug mode")
parser.add_argument("--offline", action="store_true", help="Launch Rare in offline mode")
parser.add_argument("--test-start", action="store_true", help="Quit immediately after launch")
parser.add_argument("--desktop-shortcut", action="store_true", dest="desktop_shortcut",
help="Use this, if there is no link on desktop to start Rare")

View file

@ -139,6 +139,7 @@ class App(QApplication):
self.launch_dialog.login()
def start_app(self):
self.mainwindow = MainWindow()
self.launch_dialog.close()
@ -162,6 +163,9 @@ class App(QApplication):
"Could not find {} in installed games. Did you modify the shortcut? ").format(
shared.args.app_name))
if shared.args.test_start:
self.exit_app(0)
def tray(self, reason):
if reason == QSystemTrayIcon.DoubleClick:
self.mainwindow.show()

View file

@ -5,6 +5,7 @@ from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QSizePolicy, QLayout, QDialog, QMessageBox
from legendary.core import LegendaryCore
from rare import shared
from rare.components.dialogs.login.browser_login import BrowserLogin
from rare.components.dialogs.login.import_login import ImportLogin
from rare.ui.components.dialogs.login.login_dialog import Ui_LoginDialog
@ -79,6 +80,8 @@ class LoginDialog(QDialog, Ui_LoginDialog):
self.import_page.do_login()
def login(self):
if shared.args.test_start:
return False
self.exec_()
return self.logged_in