@echo off

pushd

echo ----------------------------------------------------------------------
echo  jenkins-windows-exe.bat
echo ----------------------------------------------------------------------

echo ----(Set path to c:\pgm\python396)------
set path=c:\pgm\python396;c:\pgm\python396\Scripts;%PATH%

python -V

echo ----(Crate virtual environment)------
python -m venv venv


echo ----(Activate virtual environment)------
call venv/Scripts/activate.bat


echo ----(Upgrade pip)------
python -m pip install --upgrade pip

echo ----(Install humblewx)------
pip install git+https://github.com/thetimelineproj/humblewx.git


echo ----(Install icalendar)------
pip install icalendar

echo ----(Install Markdown)------
pip install Markdown

echo ----(Install wxPython)------
pip install --force-reinstall -v "wxPython==4.1.1"

echo ----(Run tests)------
python tools/execute-specs.py --write-testlist testlist.txt

echo ----(Start build)------
cd tools\winbuildtools
buildwinsetup.cmd %1


echo ----(Deactivate virtual environment)------
deactivate.bat


popd
