yubioath-flutter/build-helper.bat

25 lines
1008 B
Batchfile
Raw Normal View History

@echo off
echo Building authenticator-helper for Windows...
cd helper
2022-11-18 12:12:14 +03:00
poetry install || goto :error
rmdir /s /q ..\build\windows\helper
2022-11-18 12:12:14 +03:00
poetry run pyinstaller authenticator-helper.spec --distpath ..\build\windows || goto :error
echo Generating license files...
rmdir /s /q ..\build\windows\helper-license-venv
2022-11-18 12:12:14 +03:00
poetry build || goto :error
poetry run python -m venv ..\build\windows\helper-license-venv || goto :error
..\build\windows\helper-license-venv\Scripts\python -m pip install --upgrade pip wheel || goto :error
..\build\windows\helper-license-venv\Scripts\python -m pip install dist\authenticator_helper-0.1.0-py3-none-any.whl pip-licenses || goto :error
..\build\windows\helper-license-venv\Scripts\pip-licenses --format=json --no-license-path --with-license-file --ignore-packages authenticator-helper zxing-cpp --output-file ..\assets\licenses\helper.json || goto :error
cd ..
echo All done, output in build/windows/
2022-11-18 12:12:14 +03:00
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%