-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfs.py
47 lines (40 loc) · 1.66 KB
/
fs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Author: SISUBENY <https://github.com/SISUBEN>
# Version: 0.0.1
# Date: 2025-03-23
# License: GPL-3.0-or-later
# Copyright (c) 2025-2026 SISUBENY
# This file is part of FairySearch.
# FairySearch is free software: you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
# FairySearch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along with FairySearch.
# If not, see <https://www.gnu.org/licenses/>.
from app.__init__ import Console, Rule, QApplication, QIcon
from app.libs.login import LoginWindow
from app.assets.resource_manager import ResourceManager
from app.libs.expection import UnsupportedLanguageError
from app.libs.dialog import Dialog
from app.utils.logger.logger import logger
from app.i18n import _
rm = ResourceManager()
dialog = Dialog()
if __name__ == "__main__":
try:
console = Console()
console.print(Rule(_("初始化")))
app = QApplication([])
rm = ResourceManager(app)
rm.setTranslation()
app.setWindowIcon(QIcon(":/icons/icons/icon.ico"))
loginWindow = LoginWindow(app)
loginWindow.show()
app.exec()
except KeyboardInterrupt:
logger.error(_(f"The program was interrupted by the user"))
except UnsupportedLanguageError:
pass
finally:
app.shutdown()