2022-05-06 11:18:46 +03:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
echo Building authenticator-helper for Windows...
|
|
|
|
cd helper
|
2022-11-18 12:12:14 +03:00
|
|
|
poetry install || goto :error
|
2022-05-06 11:18:46 +03:00
|
|
|
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
|
2022-06-05 20:22:00 +03:00
|
|
|
|
|
|
|
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
|
2022-06-05 20:22:00 +03:00
|
|
|
|
2022-05-06 11:18:46 +03:00
|
|
|
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%
|