From be24fb98aef433ba00197563c3af204ae8fc1ec9 Mon Sep 17 00:00:00 2001 From: Jan-Paul van der Velden Date: Mon, 7 Jun 2021 09:28:29 +0200 Subject: [PATCH] Removed the reference to the local python installation. Changed script to use multiline command separator for the long command sequence. Added some comment lines. --- .../setup_and_run_movie_lister.bat | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/miniapps/movie-lister/setup_and_run_movie_lister.bat b/examples/miniapps/movie-lister/setup_and_run_movie_lister.bat index 6c6b942b..8f20daf0 100644 --- a/examples/miniapps/movie-lister/setup_and_run_movie_lister.bat +++ b/examples/miniapps/movie-lister/setup_and_run_movie_lister.bat @@ -1,11 +1,22 @@ echo on -set PYTHON37=%UserProfile%\AppData\Local\Programs\Python\Python37\python.exe +REM The assumption is made that the python executable can be found. -REM set variabless +REM Set variabless set ENV_NAME=wslenv2-win set VENV_DIR=%ENV_NAME%\Scripts set PYTHON_VENV=%VENV_DIR%\python.exe -%PYTHON37% -m venv %ENV_NAME% +REM Create virtual environment +python -m venv %ENV_NAME% + +REM Populate dependencies and run the example +Start /WAIT cmd /k "%VENV_DIR%\activate&^ +%PYTHON_VENV% -m pip install --upgrade pip&^ +%PYTHON_VENV% -m pip install -r .\requirements.txt&^ +set MOVIE_FINDER_TYPE=csv&^ +%PYTHON_VENV% -m movies&^ +set MOVIE_FINDER_TYPE=sqlite&^ +%PYTHON_VENV% -m movies&^ +%VENV_DIR%\deactivate&^ +pause -Start /WAIT cmd /k "%VENV_DIR%\activate & %PYTHON_VENV% -m pip install --upgrade pip & %PYTHON_VENV% -m pip install -r .\requirements.txt & set MOVIE_FINDER_TYPE=csv& %PYTHON_VENV% -m movies & set MOVIE_FINDER_TYPE=sqlite& %PYTHON_VENV% -m movies&%VENV_DIR%\deactivate & pause & exit 0"