mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-21 10:10:17 +00:00
Compare commits
No commits in common. "48c5682e55440634f9f15bc74240819608adc55c" and "39ee3790109f6912c8391d94426a88f4c699036c" have entirely different histories.
48c5682e55
...
39ee379010
22
README.md
22
README.md
@ -1,27 +1,9 @@
|
|||||||
# Arcaea Offline PySide UI
|
# Arcaea Offline PySide UI
|
||||||
|
|
||||||
GUI for both [283375/arcaea-offline](https://github.com/283375/arcaea-offline) and [ArcaeaOffline/core-ocr](https://github.com/ArcaeaOffline/core-ocr).
|
GUI for both [283375/arcaea-offline](https://github.com/283375/arcaea-offline) and [283375/arcaea-offline-ocr](https://github.com/283375/arcaea-offline-ocr)
|
||||||
|
|
||||||
## Prerequisites
|
## Before you run `python index.py`...
|
||||||
|
|
||||||
* Install requirements
|
* Install requirements
|
||||||
* Release translation files from `ui/resources/lang/*.ts`
|
* Release translation files from `ui/resources/lang/*.ts`
|
||||||
* Run `prebuild.py`
|
|
||||||
* Compile `ui/resources/resources.qrc` to `ui/resources/resources_rc.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,5 +1,4 @@
|
|||||||
arcaea-offline==0.2.1
|
arcaea-offline==0.2.1
|
||||||
arcaea-offline-ocr==0.0.97
|
arcaea-offline-ocr==0.0.97
|
||||||
exif==1.6.0
|
exif==1.6.0
|
||||||
Pillow==10.1.0
|
|
||||||
PySide6==6.5.2
|
PySide6==6.5.2
|
||||||
|
@ -3,7 +3,7 @@ import traceback
|
|||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
from arcaea_offline.database import Database
|
from arcaea_offline.database import Database
|
||||||
from PySide6.QtCore import QCoreApplication, QDir, QFileInfo, QSysInfo, Qt, QUrl, Slot
|
from PySide6.QtCore import QCoreApplication, QDir, QFileInfo, Qt, QUrl, Slot
|
||||||
from PySide6.QtWidgets import QDialog, QMessageBox
|
from PySide6.QtWidgets import QDialog, QMessageBox
|
||||||
|
|
||||||
from ui.extends.shared.database import create_engine
|
from ui.extends.shared.database import create_engine
|
||||||
@ -59,13 +59,8 @@ class DatabaseChecker(Ui_DatabaseChecker, QDialog):
|
|||||||
return QUrl.fromLocalFile(self.dbFileInfo().filePath())
|
return QUrl.fromLocalFile(self.dbFileInfo().filePath())
|
||||||
|
|
||||||
def dbSqliteUrl(self):
|
def dbSqliteUrl(self):
|
||||||
kernelType = QSysInfo.kernelType()
|
# dbSqliteUrl.setScheme("sqlite")
|
||||||
# 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://"))
|
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite://"))
|
||||||
else:
|
|
||||||
return QUrl(self.dbFileUrl().toString().replace("file://", "sqlite:///"))
|
|
||||||
|
|
||||||
def confirmDb(self) -> DatabaseCheckerResult:
|
def confirmDb(self) -> DatabaseCheckerResult:
|
||||||
flags = 0x000
|
flags = 0x000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user