init
This commit is contained in:
51
build.bat
Normal file
51
build.bat
Normal file
@@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
echo 开始优化打包配置...
|
||||
|
||||
pip install pyinstaller pandas openpyxl flet
|
||||
|
||||
echo 清理旧文件...
|
||||
if exist "dist" rmdir /s /q "dist"
|
||||
if exist "build" rmdir /s /q "build"
|
||||
if exist "main.spec" del "main.spec"
|
||||
|
||||
echo 开始打包(优化模式)...
|
||||
pyinstaller --onefile --windowed ^
|
||||
--exclude-module=torch ^
|
||||
--exclude-module=torchvision ^
|
||||
--exclude-module=transformers ^
|
||||
--exclude-module=onnxruntime ^
|
||||
--exclude-module=scipy ^
|
||||
--exclude-module=IPython ^
|
||||
--exclude-module=pytest ^
|
||||
--exclude-module=pil ^
|
||||
--exclude-module=PIL ^
|
||||
--exclude-module=cv2 ^
|
||||
--exclude-module=sklearn ^
|
||||
--exclude-module=nltk ^
|
||||
--exclude-module=spacy ^
|
||||
--exclude-module=plotly ^
|
||||
--exclude-module=matplotlib ^
|
||||
--exclude-module=seaborn ^
|
||||
--exclude-module=sympy ^
|
||||
--exclude-module=statsmodels ^
|
||||
--exclude-module=pandas.plotting ^
|
||||
--exclude-module=pandas.io.formats ^
|
||||
--exclude-module=jinja2 ^
|
||||
--exclude-module=packaging ^
|
||||
--exclude-module=aiohttp ^
|
||||
--exclude-module=websockets ^
|
||||
main.py
|
||||
|
||||
echo 复制示例文件...
|
||||
if not exist "dist" mkdir "dist"
|
||||
if exist "老师信息示例.xlsx" copy "老师信息示例.xlsx" "dist\" /Y
|
||||
if exist "学生信息示例.xlsx" copy "学生信息示例.xlsx" "dist\" /Y
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo 打包完成!
|
||||
echo ========================================
|
||||
echo.
|
||||
dir dist
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user