anki/qt/package/build.bat
Abdo 896d11546b
Fix invalid path in cargo-env.bat (#1477)
* Fix invalid path in cargo-env.bat

* Assume cargo-env.bat is run from repo root; fix package script (dae)

* mention cargo-raze doesn't work on Windows (dae)
2021-11-05 11:08:23 +10:00

22 lines
610 B
Batchfile
Executable File

:: ensure wheels are built and set up Rust env
pushd ..\..
call scripts\build || exit /b
call scripts\cargo-env
set ROOT=%CD%
popd
:: ensure venv exists
set OUTPUT_ROOT=%ROOT%/bazel-pkg
set VENV=%OUTPUT_ROOT%/venv
if not exist %VENV% (
mkdir %OUTPUT_ROOT%
pushd %ROOT%
call scripts\python -m venv %VENV% || exit /b
popd
)
:: run the rest of the build in Python
FOR /F "tokens=*" %%g IN ('call ..\..\bazel.bat info output_base --ui_event_filters=-INFO') do (SET BAZEL_EXTERNAL=%%g/external)
call ..\..\bazel.bat query @pyqt515//:*
%VENV%\scripts\python build.py %ROOT% %BAZEL_EXTERNAL% || exit /b