Read-Sensor-Resistances/make.bat

32 lines
622 B
Batchfile
Raw Permalink Normal View History

2023-03-04 05:37:01 +00:00
@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
2023-04-17 03:17:45 +00:00
if "%~1"=="exe" GOTO exe
2023-03-04 05:37:01 +00:00
:build
python -m venv %env%
%env%\Scripts\activate && pip install -r requirements.txt
GOTO run
2023-04-17 03:17:45 +00:00
:exe
%env%\Scripts\pyinstaller build.spec
GOTO End
2023-03-04 05:37:01 +00:00
: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
2023-04-14 11:20:34 +00:00
rmdir /s /q venv 2>nul
2023-03-04 05:37:01 +00:00
GOTO End
:run
%env%\Scripts\python test.py
:End