mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-19 09:10:18 +00:00
Compare commits
4 Commits
39ee379010
...
48c5682e55
Author | SHA1 | Date | |
---|---|---|---|
48c5682e55 | |||
ee03770764 | |||
b45c7f7de5 | |||
15bc56e6f9 |
22
README.md
22
README.md
@ -1,9 +1,27 @@
|
||||
# Arcaea Offline PySide UI
|
||||
|
||||
GUI for both [283375/arcaea-offline](https://github.com/283375/arcaea-offline) and [283375/arcaea-offline-ocr](https://github.com/283375/arcaea-offline-ocr)
|
||||
GUI for both [283375/arcaea-offline](https://github.com/283375/arcaea-offline) and [ArcaeaOffline/core-ocr](https://github.com/ArcaeaOffline/core-ocr).
|
||||
|
||||
## Before you run `python index.py`...
|
||||
## Prerequisites
|
||||
|
||||
* Install requirements
|
||||
* Release translation files from `ui/resources/lang/*.ts`
|
||||
* Run `prebuild.py`
|
||||
* Compile `ui/resources/resources.qrc` to `ui/resources/resources_rc.py`
|
||||
|
||||
You can refer to the [GitHub Actions file](./.github/workflows/build.yml) for a rough reference.
|
||||
|
||||
```
|
||||
pip install -r ./requirements.txt
|
||||
pyside6-lrelease ./ui/resources/lang/en_US.ts ./ui/resources/lang/zh_CN.ts
|
||||
python prebuild.py
|
||||
pyside6-rcc ./ui/resources/resources.qrc -o ./ui/resources/resources_rc.py
|
||||
```
|
||||
|
||||
Sometimes you have to install the latest, unpublished version of `arcaea-offline` and `arcaea-offline-ocr`.
|
||||
|
||||
```
|
||||
pip uninstall -y arcaea-offline arcaea-offline-ocr
|
||||
pip install git+https://github.com/283375/arcaea-offline
|
||||
pip install git+https://github.com/ArcaeaOffline/core-ocr
|
||||
```
|
||||
|
@ -1,4 +1,5 @@
|
||||
arcaea-offline==0.2.1
|
||||
arcaea-offline-ocr==0.0.97
|
||||
exif==1.6.0
|
||||
Pillow==10.1.0
|
||||
PySide6==6.5.2
|
||||
|
@ -3,7 +3,7 @@ import traceback
|
||||
from enum import IntEnum
|
||||
|
||||
from arcaea_offline.database import Database
|
||||
from PySide6.QtCore import QCoreApplication, QDir, QFileInfo, Qt, QUrl, Slot
|
||||
from PySide6.QtCore import QCoreApplication, QDir, QFileInfo, QSysInfo, Qt, QUrl, Slot
|
||||
from PySide6.QtWidgets import QDialog, QMessageBox
|
||||
|
||||
from ui.extends.shared.database import create_engine
|
||||
@ -59,8 +59,13 @@ class DatabaseChecker(Ui_DatabaseChecker, QDialog):
|
||||
return QUrl.fromLocalFile(self.dbFileInfo().filePath())
|
||||
|
||||
def dbSqliteUrl(self):
|
||||
# dbSqliteUrl.setScheme("sqlite")
|
||||
kernelType = QSysInfo.kernelType()
|
||||
# the slash count varies depending on the kernel
|
||||
# https://docs.sqlalchemy.org/en/20/core/engines.html#sqlite
|
||||
if kernelType == "winnt":
|
||||
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite://"))
|
||||
else:
|
||||
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite:///"))
|
||||
|
||||
def confirmDb(self) -> DatabaseCheckerResult:
|
||||
flags = 0x000
|
||||
|
Loading…
x
Reference in New Issue
Block a user