17db96d56Sopenharmony_ci@echo off
27db96d56Sopenharmony_ci
37db96d56Sopenharmony_cirem This file is UTF-8 encoded, so we need to update the current code page while executing it
47db96d56Sopenharmony_cifor /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do (
57db96d56Sopenharmony_ci    set _OLD_CODEPAGE=%%a
67db96d56Sopenharmony_ci)
77db96d56Sopenharmony_ciif defined _OLD_CODEPAGE (
87db96d56Sopenharmony_ci    "%SystemRoot%\System32\chcp.com" 65001 > nul
97db96d56Sopenharmony_ci)
107db96d56Sopenharmony_ci
117db96d56Sopenharmony_ciset VIRTUAL_ENV=__VENV_DIR__
127db96d56Sopenharmony_ci
137db96d56Sopenharmony_ciif not defined PROMPT set PROMPT=$P$G
147db96d56Sopenharmony_ci
157db96d56Sopenharmony_ciif defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT%
167db96d56Sopenharmony_ciif defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%
177db96d56Sopenharmony_ci
187db96d56Sopenharmony_ciset _OLD_VIRTUAL_PROMPT=%PROMPT%
197db96d56Sopenharmony_ciset PROMPT=__VENV_PROMPT__%PROMPT%
207db96d56Sopenharmony_ci
217db96d56Sopenharmony_ciif defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%
227db96d56Sopenharmony_ciset PYTHONHOME=
237db96d56Sopenharmony_ci
247db96d56Sopenharmony_ciif defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH%
257db96d56Sopenharmony_ciif not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH%
267db96d56Sopenharmony_ci
277db96d56Sopenharmony_ciset PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%
287db96d56Sopenharmony_ciset VIRTUAL_ENV_PROMPT=__VENV_PROMPT__
297db96d56Sopenharmony_ci
307db96d56Sopenharmony_ci:END
317db96d56Sopenharmony_ciif defined _OLD_CODEPAGE (
327db96d56Sopenharmony_ci    "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul
337db96d56Sopenharmony_ci    set _OLD_CODEPAGE=
347db96d56Sopenharmony_ci)
35