38 lines
1.4 KiB
Batchfile
38 lines
1.4 KiB
Batchfile
@echo off
|
|
setlocal
|
|
|
|
cd /d "%~dp0"
|
|
|
|
uv run --with pyinstaller pyinstaller --clean --noconfirm --onedir --console --noupx ^
|
|
--name sinopec-auto-answer ^
|
|
--paths src ^
|
|
--collect-all playwright ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\libmpdec-4.dll;." ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\libcrypto-3-x64.dll;." ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\liblzma.dll;." ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\libbz2.dll;." ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\libssl-3-x64.dll;." ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\ffi.dll;." ^
|
|
--add-binary "C:\ProgramData\miniconda3\Library\bin\libexpat.dll;." ^
|
|
--distpath pack ^
|
|
--workpath build\pyinstaller ^
|
|
src\auto_answer\cli.py
|
|
|
|
if errorlevel 1 exit /b %errorlevel%
|
|
|
|
copy /Y ".env.example" "pack\sinopec-auto-answer\.env.example" >nul
|
|
copy /Y ".env.example" "pack\sinopec-auto-answer\.env" >nul
|
|
|
|
(
|
|
echo @echo off
|
|
echo cd /d "%%~dp0"
|
|
echo sinopec-auto-answer.exe practice --answer-count -1 --answer-wait-s 5-10 --result-delay-s 2
|
|
echo pause
|
|
) > "pack\sinopec-auto-answer\start.bat"
|
|
|
|
if exist "pack\sinopec-auto-answer.zip" del /f /q "pack\sinopec-auto-answer.zip"
|
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "Compress-Archive -Path 'pack\sinopec-auto-answer' -DestinationPath 'pack\sinopec-auto-answer.zip' -Force"
|
|
|
|
echo.
|
|
echo Package created: pack\sinopec-auto-answer.zip
|