Read-Sensor-Resistances/make.bat

27 lines
524 B
Batchfile

@REM "make" file for windows-side compiling
@ECHO OFF
for %%I in ("%cd%") do set env=%%~nxI
if "%~1"=="build" GOTO build
if "%~1"=="clean" GOTO clean
if "%~1"=="run" GOTO run
:build
python -m venv %env%
%env%\Scripts\activate && pip install -r requirements.txt
GOTO run
:clean
del *.json 2>nul
rmdir /s /q RecordedData 2>nul
rmdir /s /q __pycache__ 2>nul
rmdir /s /q %env% 2>nul
rmdir /s /q build 2>nul
rmdir /s /q dist 2>nul
GOTO End
:run
%env%\Scripts\python test.py
pause
:End