Add --test-start to use in appimage-builder
This commit is contained in:
parent
782968b1d0
commit
d93294536a
|
@ -23,20 +23,20 @@ AppDir:
|
||||||
exec: usr/bin/python3
|
exec: usr/bin/python3
|
||||||
exec_args: $APPDIR/usr/src/rare/__main__.py $@
|
exec_args: $APPDIR/usr/src/rare/__main__.py $@
|
||||||
apt:
|
apt:
|
||||||
arch: amd64
|
arch: amd64
|
||||||
allow_unauthenticated: true
|
allow_unauthenticated: true
|
||||||
sources:
|
sources:
|
||||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy main restricted
|
- 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-updates main restricted
|
||||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy universe
|
- 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-updates universe
|
||||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy multiverse
|
- 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-updates multiverse
|
||||||
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy-backports main restricted
|
- sourceline: deb http://de.archive.ubuntu.com/ubuntu/ groovy-backports main restricted
|
||||||
universe multiverse
|
universe multiverse
|
||||||
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security main restricted
|
- 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 universe
|
||||||
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security multiverse
|
- sourceline: deb http://security.ubuntu.com/ubuntu groovy-security multiverse
|
||||||
include:
|
include:
|
||||||
- python3
|
- python3
|
||||||
- python3-distutils
|
- python3-distutils
|
||||||
|
@ -56,23 +56,23 @@ AppDir:
|
||||||
test:
|
test:
|
||||||
fedora:
|
fedora:
|
||||||
image: appimagecrafters/tests-env:fedora-30
|
image: appimagecrafters/tests-env:fedora-30
|
||||||
command: ./AppRun
|
command: ./AppRun --test-start
|
||||||
use_host_x: true
|
use_host_x: true
|
||||||
debian-stable:
|
debian-stable:
|
||||||
image: appimagecrafters/tests-env:debian-stable
|
image: appimagecrafters/tests-env:debian-stable
|
||||||
command: ./AppRun
|
command: ./AppRun --test-start
|
||||||
use_host_x: true
|
use_host_x: true
|
||||||
archlinux-latest:
|
archlinux-latest:
|
||||||
image: appimagecrafters/tests-env:archlinux-latest
|
image: appimagecrafters/tests-env:archlinux-latest
|
||||||
command: ./AppRun
|
command: ./AppRun --test-start
|
||||||
use_host_x: true
|
use_host_x: true
|
||||||
centos-7:
|
centos-7:
|
||||||
image: appimagecrafters/tests-env:centos-7
|
image: appimagecrafters/tests-env:centos-7
|
||||||
command: ./AppRun
|
command: ./AppRun --test-start
|
||||||
use_host_x: true
|
use_host_x: true
|
||||||
ubuntu-xenial:
|
ubuntu-xenial:
|
||||||
image: appimagecrafters/tests-env:ubuntu-xenial
|
image: appimagecrafters/tests-env:ubuntu-xenial
|
||||||
command: ./AppRun
|
command: ./AppRun --test.start
|
||||||
use_host_x: true
|
use_host_x: true
|
||||||
|
|
||||||
AppImage:
|
AppImage:
|
||||||
|
|
|
@ -23,6 +23,7 @@ def main():
|
||||||
help="Launch Rare in background. Open it from System Tray Icon")
|
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("--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("--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",
|
parser.add_argument("--desktop-shortcut", action="store_true", dest="desktop_shortcut",
|
||||||
help="Use this, if there is no link on desktop to start Rare")
|
help="Use this, if there is no link on desktop to start Rare")
|
||||||
|
|
|
@ -139,6 +139,7 @@ class App(QApplication):
|
||||||
|
|
||||||
self.launch_dialog.login()
|
self.launch_dialog.login()
|
||||||
|
|
||||||
|
|
||||||
def start_app(self):
|
def start_app(self):
|
||||||
self.mainwindow = MainWindow()
|
self.mainwindow = MainWindow()
|
||||||
self.launch_dialog.close()
|
self.launch_dialog.close()
|
||||||
|
@ -162,6 +163,9 @@ class App(QApplication):
|
||||||
"Could not find {} in installed games. Did you modify the shortcut? ").format(
|
"Could not find {} in installed games. Did you modify the shortcut? ").format(
|
||||||
shared.args.app_name))
|
shared.args.app_name))
|
||||||
|
|
||||||
|
if shared.args.test_start:
|
||||||
|
self.exit_app(0)
|
||||||
|
|
||||||
def tray(self, reason):
|
def tray(self, reason):
|
||||||
if reason == QSystemTrayIcon.DoubleClick:
|
if reason == QSystemTrayIcon.DoubleClick:
|
||||||
self.mainwindow.show()
|
self.mainwindow.show()
|
||||||
|
|
|
@ -5,6 +5,7 @@ from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import QSizePolicy, QLayout, QDialog, QMessageBox
|
from PyQt5.QtWidgets import QSizePolicy, QLayout, QDialog, QMessageBox
|
||||||
|
|
||||||
from legendary.core import LegendaryCore
|
from legendary.core import LegendaryCore
|
||||||
|
from rare import shared
|
||||||
from rare.components.dialogs.login.browser_login import BrowserLogin
|
from rare.components.dialogs.login.browser_login import BrowserLogin
|
||||||
from rare.components.dialogs.login.import_login import ImportLogin
|
from rare.components.dialogs.login.import_login import ImportLogin
|
||||||
from rare.ui.components.dialogs.login.login_dialog import Ui_LoginDialog
|
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()
|
self.import_page.do_login()
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
|
if shared.args.test_start:
|
||||||
|
return False
|
||||||
self.exec_()
|
self.exec_()
|
||||||
return self.logged_in
|
return self.logged_in
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue