1
0
Fork 0
mirror of synced 2024-05-15 01:52:53 +12:00

Update translation and remove notify-py as dependency

This commit is contained in:
Dummerle 2021-09-01 22:12:27 +02:00
parent b8be750c6c
commit 134c06a726
9 changed files with 1626 additions and 2248 deletions

View file

@ -2,9 +2,8 @@
## A frontend for legendary, the open source Epic Games Launcher alternative
Rare is a GUI for Legendary, a command line aternative to Epic Games launcher. It is currently considered beta software.
You will probably run into issues, so it is recommend to make a backup. If you run into an issue, please report it by
creating an issue on github or on Discord: https://discord.gg/YvmABK9YSk
Rare is a GUI for Legendary, a command line alternative to Epic Games launcher. If you run into an issue, please report
it by creating an issue on GitHub or on Discord: https://discord.gg/YvmABK9YSk
![Discord Shield](https://discordapp.com/api/guilds/826881530310819914/widget.png?style=shield)
@ -33,16 +32,16 @@ There are some AUR packages available:
- [rare](https://aur.archlinux.org/packages/rare) - for stable releases
- [rare-git](https://aur.archlinux.org/packages/rare-git) - for the latest features, which are not in a stable release
#### Debian based
There is a `.deb` package available from
the [releases page](https://github.com/Dummerle/Rare/releases): `sudo apt install ./Rare.deb`
#### Other
Install via `pip`.
## Run from source
### Packages
In [releases page](https://github.com/Dummerle/Rare/releases) are AppImages for Linux and a msi file for windows
available
### Run from source
1. Run `pip install -r requirements.txt` to get dependencies. If you use `pacman` you can
run `sudo pacman --needed -S python-wheel python-setuptools python-pyqt5 python-qtawesome python-requests python-pillow`

View file

@ -12,7 +12,6 @@ requirements = [
"wheel",
"PyQt5",
"qtawesome",
"notifypy",
"psutil",
"pypresence",
'win32com'

View file

@ -71,8 +71,8 @@ class App(QApplication):
# Translator
self.translator = QTranslator()
lang = settings.value("language", get_lang(), type=str)
if os.path.exists(languages_path + lang + ".qm"):
self.translator.load(languages_path + lang + ".qm")
if os.path.exists(p := os.path.join(languages_path, lang + ".qm")):
self.translator.load(p)
logger.info("Your language is supported: " + lang)
elif not lang == "en":
logger.info("Your language is not supported")
@ -89,6 +89,7 @@ class App(QApplication):
if custom_palette is not None:
self.setPalette(custom_palette)
qtawesome.set_defaults(color=custom_palette.color(QPalette.Text))
elif style := settings.value("style_sheet", False):
settings.setValue("color_scheme", "")
stylesheet = open(os.path.join(resources_path, "stylesheets", style, "stylesheet.qss")).read()
@ -127,7 +128,8 @@ class App(QApplication):
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)
QSystemTrayIcon.Information, 4000) if (
x[0] and QSettings().value("notification", True, bool)) else None)
if not self.args.silent:
self.mainwindow.show()

View file

@ -121,16 +121,6 @@ class DownloadTab(QWidget):
pass
elif text == "finish":
self.installing_game.setText(self.tr("Download finished. Reload library"))
if QSettings().value("notification", True, bool):
try:
from notifypy import Notify
except ModuleNotFoundError:
logger.warning("No Notification Module found")
else:
notification = Notify()
notification.title = self.tr("Installation finished")
notification.message = self.tr("Finished Download of game {}").format(self.active_game.app_title)
notification.send()
# QMessageBox.information(self, "Info", "Download finished")
logger.info("Download finished: " + self.active_game.app_title)

View file

@ -42,7 +42,7 @@ class LegendarySettings(QStackedWidget, Ui_legendary_settings):
self.back_button.clicked.connect(lambda: self.setCurrentIndex(0))
self.path_info.setText(self.tr(r"EGL path is at C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests"))
self.path_info.setText(self.tr("EGL path is at C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests"))
path = os.path.expanduser("~/")
if self.core.egl.programdata_path:
path = self.core.egl.programdata_path

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,6 @@ requests
Pillow
PyQt5
QtAwesome
notify-py
psutil
pypresence
pywin32; platform_system == "Windows"

View file

@ -14,7 +14,6 @@ requirements = [
"wheel",
"PyQt5",
"QtAwesome",
"notify-py",
"psutil",
"pypresence",
'pywin32; platform_system == "Windows"'