feat: 添加Makefile用于PyInstaller打包
提供便捷的打包命令:make build/rebuild/clean/help 使用uv run确保在虚拟环境中执行pyinstaller命令
This commit is contained in:
28
Makefile
Normal file
28
Makefile
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
.PHONY: help clean build rebuild
|
||||||
|
|
||||||
|
# 默认目标
|
||||||
|
help:
|
||||||
|
@echo "海上风电场集电线路设计优化系统 - 打包脚本"
|
||||||
|
@echo ""
|
||||||
|
@echo "可用命令:"
|
||||||
|
@echo " make build - 打包成独立的exe程序"
|
||||||
|
@echo " make rebuild - 清理后重新打包"
|
||||||
|
@echo " make clean - 清理打包生成的临时文件"
|
||||||
|
@echo " make help - 显示此帮助信息"
|
||||||
|
|
||||||
|
# 打包成独立的exe程序
|
||||||
|
build:
|
||||||
|
@echo "开始打包程序..."
|
||||||
|
uv run pyinstaller build.spec
|
||||||
|
@echo "打包完成!"
|
||||||
|
@echo "可执行文件位于: dist/海上风电场集电线路设计优化系统.exe"
|
||||||
|
|
||||||
|
# 清理打包生成的临时文件
|
||||||
|
clean:
|
||||||
|
@echo "清理打包临时文件..."
|
||||||
|
@if exist build rmdir /s /q build
|
||||||
|
@if exist dist rmdir /s /q dist
|
||||||
|
@echo "清理完成!"
|
||||||
|
|
||||||
|
# 清理后重新打包
|
||||||
|
rebuild: clean build
|
||||||
8
gui.py
8
gui.py
@@ -584,11 +584,17 @@ def index():
|
|||||||
)
|
)
|
||||||
processing_dialog.props("persistent")
|
processing_dialog.props("persistent")
|
||||||
|
|
||||||
with ui.header().classes("bg-primary text-white p-4 shadow-lg"):
|
with ui.header().classes("bg-primary text-white p-4 shadow-lg items-center no-wrap"):
|
||||||
|
with ui.column().classes("gap-0"):
|
||||||
ui.label("海上风电场集电线路设计优化系统 v1.0").classes("text-2xl font-bold")
|
ui.label("海上风电场集电线路设计优化系统 v1.0").classes("text-2xl font-bold")
|
||||||
|
with ui.column().classes("gap-0"):
|
||||||
ui.label("Wind Farm Collector System Design Optimizer").classes(
|
ui.label("Wind Farm Collector System Design Optimizer").classes(
|
||||||
"text-sm opacity-80"
|
"text-sm opacity-80"
|
||||||
)
|
)
|
||||||
|
ui.space()
|
||||||
|
ui.label("中能建西北院海上能源业务开发部").classes(
|
||||||
|
"text-xl font-bold"
|
||||||
|
)
|
||||||
|
|
||||||
with ui.row().classes("w-full p-4 gap-4"):
|
with ui.row().classes("w-full p-4 gap-4"):
|
||||||
with ui.card().classes("w-1/4 p-4 shadow-md"):
|
with ui.card().classes("w-1/4 p-4 shadow-md"):
|
||||||
|
|||||||
Reference in New Issue
Block a user