Skip to content

Commit

Permalink
build: 修正構建時建制UI的相關問題
Browse files Browse the repository at this point in the history
  • Loading branch information
northgreen committed Jun 22, 2024
1 parent b6968b6 commit a0ff62c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
17 changes: 15 additions & 2 deletions ictye-live-dm/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling","hatch-build-scripts","PyQT5"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -30,6 +30,9 @@ Homepage = "https://github.com/northgreen/ictye-live-dm"

[tool.hatch.build.targets.wheel]
packages = ["src/ictye_live_dm","src/ictye-live-Danmku/depends"]
exclude = [
"src/ictye_live_dm/QT-GUI/*"
]

[project.optional-dependencies]
gui = ["PyQt5"]
Expand All @@ -47,4 +50,14 @@ ictye-live-dm-gui = "ictye_live_dm.GUI_main:main"
minversion = 5.0
testpaths ="./tests"
asyncio_mode = "auto"
log_cli = true
log_cli = true

[[tool.hatch.build.hooks.build-scripts.scripts]]
out_dir = ".\\src\\ictye_live_dm\\GUI"
work_dir = ".\\src\\ictye_live_dm\\QT-GUI"
commands = [
"pyuic5 .\\main.ui -o ..\\GUI\\Ui_MainWindow.py"
]
artifacts = [
"Ui_MainWindow.py"
]

This file was deleted.

4 changes: 2 additions & 2 deletions ictye-live-dm/src/ictye_live_dm/GUI/Ui_MainWindow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '.\ictye-live-dm\src\QT-GUI\main.ui'
# Form implementation generated from reading ui file '.\main.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
Expand All @@ -17,7 +17,7 @@ def setupUi(self, Form):
Form.setWindowModality(QtCore.Qt.WindowModal)
Form.resize(729, 499)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(".\\ictye-live-dm\\src\\QT-GUI\\../ictye_live_dm/icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
icon.addPixmap(QtGui.QPixmap(".\\../ictye_live_dm/icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Form.setWindowIcon(icon)
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
self.verticalLayout.setObjectName("verticalLayout")
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion ictye-live-dm/src/ictye_live_dm/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
log = logging.getLogger(__name__)
runner: web.TCPSite


def return_file(file: str):
async def healder(request):
nonlocal file
Expand Down

0 comments on commit a0ff62c

Please sign in to comment.