Display a message when venv doesn't exist
This commit is contained in:
1 parent
f4602d40fd
commit
c213bae01b
1 file changed
+10
-1
@@ -2,8 +2,17 @@
|
|||||||
cls
|
cls
|
||||||
set dirpath=%~dp0
|
set dirpath=%~dp0
|
||||||
if "%dirpath:~-1%" == "\" set dirpath=%dirpath:~0,-1%
|
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" (
|
if not exist "%dirpath%\env\scripts\pyinstaller.exe" (
|
||||||
"%dirpath%\env\scripts\pip" install pyinstaller
|
"%dirpath%\env\scripts\pip" install pyinstaller
|
||||||
"%dirpath%\env\scripts\python" "%dirpath%\env\scripts\pywin32_postinstall.py" -install -silent
|
"%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"
|
||||||
Reference in new issue
Block a user