)\r
)\r
\r
- if not defined PYTHON_HOME (\r
- if defined PYTHONHOME (\r
- set PYTHON_HOME=%PYTHONHOME%\r
- ) else (\r
- echo.\r
- echo !!! ERROR !!! Binary python tools are missing. PYTHON_HOME environment variable is not set.\r
- echo PYTHON_HOME is required to build or execute the python tools.\r
- echo.\r
- goto end\r
+set PYTHON3=py -3\r
+:check_python_version\r
+ %PYTHON3% --version >NUL 2>&1\r
+ if %ERRORLEVEL% NEQ 0 (\r
+ if defined PYTHON_HOME (\r
+ if EXIST "%PYTHON_HOME%" (\r
+ set PYTHON3=%PYTHON_HOME%\python.exe\r
+ )\r
)\r
)\r
+ %PYTHON3% --version >NUL 2>&1\r
+ if %ERRORLEVEL% NEQ 0 (\r
+ echo.\r
+ echo !!! ERROR !!! %PYTHON3% not install.\r
+ echo.\r
+ goto end\r
+ )\r
+ FOR /F "TOKENS=1,2" %%i IN ('%PYTHON3% --version') DO set VERSION=%%j\r
+ if /I "%VERSION%" LSS "3.6" (\r
+ echo.\r
+ echo !!! ERROR !!! python version should greater than or equal to version 3.6.\r
+ echo.\r
+ goto end\r
+ )\r
\r
+:check_freezer_path\r
@REM We have Python, now test for FreezePython application\r
if not defined PYTHON_FREEZER_PATH (\r
echo.\r