diff --git a/README.md b/README.md index 47403626..7b227675 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ Using the exe file could cause errors - For Arch Linux is an AUR package available: [rare-git](https://aur.archlinux.org/packages/rare-git) or [rare](https://aur.archlinux.org/packages/rare) -- Other distributions have to install it with pip or clone the repo and install it manually: *python3 setup.py install* +- For Debian-based Distros is a .deb package at the releases +- Other distributions have to install it with pip or clone the repo and install it manually: *python3 setup.py install (--user)* ## Features @@ -51,6 +52,7 @@ Using the exe file could cause errors - Offline mode - More Translations (Need help) - More Information about Games +More planned features are in projects ## Contributing There are more options to contribute. diff --git a/Rare/Components/Tabs/CloudSaves/SyncWidget.py b/Rare/Components/Tabs/CloudSaves/SyncWidget.py index f3b48457..e19ce92b 100644 --- a/Rare/Components/Tabs/CloudSaves/SyncWidget.py +++ b/Rare/Components/Tabs/CloudSaves/SyncWidget.py @@ -147,7 +147,6 @@ class SyncWidget(QWidget): def change_path(self): path = PathInputDialog("Select directory", "Select savepath. Warning: Do not change if you are not sure", self.igame.save_path).get_path() - print(path) if path != "": self.igame.save_path = path self.core.lgd.set_installed_game(self.igame.app_name, self.igame) diff --git a/Rare/Components/Tabs/Games/GameWidgets/UninstalledIconWidget.py b/Rare/Components/Tabs/Games/GameWidgets/UninstalledIconWidget.py index 68ac870a..a5eec79b 100644 --- a/Rare/Components/Tabs/Games/GameWidgets/UninstalledIconWidget.py +++ b/Rare/Components/Tabs/Games/GameWidgets/UninstalledIconWidget.py @@ -36,11 +36,11 @@ class IconWidgetUninstalled(BaseUninstalledWidget): self.setLayout(self.layout) self.setFixedWidth(self.sizeHint().width()) - def mousePressEvent(self, a0) -> None: + def mousePressEvent(self, e) -> None: self.install() - def enterEvent(self, QEvent): + def enterEvent(self, e): self.info_label.setText(self.tr("Install Game")) - def leaveEvent(self, QEvent): + def leaveEvent(self, e): self.info_label.setText("") diff --git a/Rare/Main.py b/Rare/Main.py index b10f4669..bb3b1566 100644 --- a/Rare/Main.py +++ b/Rare/Main.py @@ -1,3 +1,4 @@ +import configparser import logging import os import sys @@ -23,11 +24,22 @@ class App(QApplication): def __init__(self): super(App, self).__init__(sys.argv) # init Legendary - self.core = LegendaryCore() + try: + self.core = LegendaryCore() + except configparser.MissingSectionHeaderError as e: + logger.warning(f"Config is corrupt: {e}") + if config_path := os.environ.get('XDG_CONFIG_HOME'): + path = os.path.join(config_path, 'legendary') + else: + path = os.path.expanduser('~/.config/legendary') + with open(os.path.join(path, "config.ini"), "w") as config_file: + config_file.write("[Legendary]") + self.core = LegendaryCore() if not "Legendary" in self.core.lgd.config.sections(): self.core.lgd.config.add_section("Legendary") self.core.lgd.save_config() + # set Application name for settings self.setApplicationName("Rare") self.setOrganizationName("Rare") settings = QSettings() @@ -46,12 +58,14 @@ class App(QApplication): self.setStyleSheet(open(style_path + "RareStyle.qss").read()) self.setWindowIcon(QIcon(style_path + "Logo.png")) + # launch app self.launch_dialog = LaunchDialog(self.core) self.launch_dialog.start_app.connect(self.start_app) self.launch_dialog.show() def start_app(self): self.mainwindow = MainWindow(self.core) + # close launch dialog after app widgets were created self.launch_dialog.close()