-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.bat
More file actions
60 lines (54 loc) · 1.5 KB
/
build.bat
File metadata and controls
60 lines (54 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
echo ========================================
echo Personal Profile MCP 打包脚本
echo ========================================
echo.
echo 检查 PyInstaller 是否已安装...
pip show pyinstaller >nul 2>&1
if %errorlevel% neq 0 (
echo PyInstaller 未安装,正在安装...
pip install pyinstaller
if %errorlevel% neq 0 (
echo PyInstaller 安装失败!
pause
exit /b 1
)
) else (
echo PyInstaller 已安装
)
echo.
echo 清理之前的构建文件...
if exist "dist" rmdir /s /q "dist"
if exist "build" rmdir /s /q "build"
echo.
echo ========================================
echo 开始打包 main.py (UserBank_Stdio_Core.exe)
echo ========================================
pyinstaller build_main.spec --clean --noconfirm
if %errorlevel% neq 0 (
echo main.py 打包失败!
pause
exit /b 1
)
echo.
echo ========================================
echo 开始打包 main_sse.py (UserBank_SSE_Core.exe)
echo ========================================
pyinstaller build_main_sse.spec --clean --noconfirm
if %errorlevel% neq 0 (
echo main_sse.py 打包失败!
pause
exit /b 1
)
echo.
echo ========================================
echo 打包完成!
echo ========================================
echo.
echo 生成的文件位置:
echo - UserBank_Stdio_Core.exe: dist\UserBank_Stdio_Core.exe
echo - UserBank_SSE_Core.exe: dist\UserBank_SSE_Core.exe
echo.
echo 您可以将这些 exe 文件复制到任何 Windows 机器上运行。
echo.
pause