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
|
||||
14
gui.py
14
gui.py
@@ -584,10 +584,16 @@ def index():
|
||||
)
|
||||
processing_dialog.props("persistent")
|
||||
|
||||
with ui.header().classes("bg-primary text-white p-4 shadow-lg"):
|
||||
ui.label("海上风电场集电线路设计优化系统 v1.0").classes("text-2xl font-bold")
|
||||
ui.label("Wind Farm Collector System Design Optimizer").classes(
|
||||
"text-sm opacity-80"
|
||||
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")
|
||||
with ui.column().classes("gap-0"):
|
||||
ui.label("Wind Farm Collector System Design Optimizer").classes(
|
||||
"text-sm opacity-80"
|
||||
)
|
||||
ui.space()
|
||||
ui.label("中能建西北院海上能源业务开发部").classes(
|
||||
"text-xl font-bold"
|
||||
)
|
||||
|
||||
with ui.row().classes("w-full p-4 gap-4"):
|
||||
|
||||
Reference in New Issue
Block a user