From c213bae01b2dde47407f1fcc526a02983e9d3606 Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:58:29 +0100 Subject: [PATCH] Display a message when venv doesn't exist --- build.bat | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.bat b/build.bat index 1e1c0f3..0fd6a09 100644 --- a/build.bat +++ b/build.bat @@ -2,8 +2,17 @@ cls set dirpath=%~dp0 if "%dirpath:~-1%" == "\" set dirpath=%dirpath:~0,-1% + +if not exist "%dirpath%\env" ( + echo: + echo No virtual environment found! Run setup_env.bat to set it up first. + echo: + pause + exit +) + if not exist "%dirpath%\env\scripts\pyinstaller.exe" ( "%dirpath%\env\scripts\pip" install pyinstaller "%dirpath%\env\scripts\python" "%dirpath%\env\scripts\pywin32_postinstall.py" -install -silent ) -"%dirpath%/env/scripts/pyinstaller" build.spec +"%dirpath%/env/scripts/pyinstaller" "%dirpath%\build.spec"