]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/toolsetup.bat
BaseTools/CommonLib: get rid of 'native' type string parsing routines
[mirror_edk2.git] / BaseTools / toolsetup.bat
index 0d4028db785f573e9ddf4a3f9b3694d3e4bfac09..06a877ee6bbade12c6b4253398ded1048ec49cb6 100755 (executable)
@@ -265,27 +265,17 @@ IF NOT EXIST "%EDK_TOOLS_BIN%\GenFv.exe" goto check_c_tools
 IF NOT EXIST "%EDK_TOOLS_BIN%\GenFw.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\GenPage.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\GenSec.exe" goto check_c_tools\r
-IF NOT EXIST "%EDK_TOOLS_BIN%\GenVtf.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\Split.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\TianoCompress.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\VfrCompile.exe" goto check_c_tools\r
 IF NOT EXIST "%EDK_TOOLS_BIN%\VolInfo.exe" goto check_c_tools\r
 \r
-goto check_python_tools\r
+goto check_build_environment\r
 \r
 :check_c_tools\r
   echo.\r
   echo !!! ERROR !!! Binary C tools are missing. They are requried to be built from BaseTools Source.\r
   echo.\r
-  goto check_build_environment\r
-\r
-:check_python_tools\r
-IF NOT EXIST "%EDK_TOOLS_BIN%\build.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_BIN%\GenFds.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_BIN%\TargetTool.exe" goto check_build_environment\r
-IF NOT EXIST "%EDK_TOOLS_BIN%\Trim.exe" goto check_build_environment\r
-\r
-goto end\r
 \r
 :check_build_environment\r
   if defined BASETOOLS_PYTHON_SOURCE goto VisualStudioAvailable\r
@@ -299,50 +289,25 @@ goto end
      )\r
   )\r
 \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
+  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
     )\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
-    echo !!! WARNING !!! PYTHON_FREEZER_PATH environment variable is not set.\r
-    echo Setup environment to run Python scripts directly.\r
-    echo.\r
-    set "PATH=%BASE_TOOLS_PATH%\BinWrappers\WindowsLike;%PATH%"\r
-  )\r
 \r
+  set "PATH=%BASE_TOOLS_PATH%\BinWrappers\WindowsLike;%PATH%"\r
   set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python\r
   set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%\r
 \r
   echo                PATH = %PATH%\r
   echo         PYTHON_HOME = %PYTHON_HOME%\r
   echo          PYTHONPATH = %PYTHONPATH%\r
-  if defined PYTHON_FREEZER_PATH (\r
-    echo PYTHON_FREEZER_PATH = %PYTHON_FREEZER_PATH%\r
-  )\r
   echo.\r
 \r
 :VisualStudioAvailable\r
@@ -374,18 +339,6 @@ set PYTHON3=py -3
   cd %BASE_TOOLS_PATH%\r
   call nmake c\r
   popd\r
-\r
-  if defined PYTHON_FREEZER_PATH (\r
-    echo BUILDING PYTHON TOOLS\r
-    pushd .\r
-    cd %BASE_TOOLS_PATH%\r
-    call nmake python\r
-    popd\r
-  ) else (\r
-    echo.\r
-    echo !!! WARNING !!! Cannot make executable from Python code, executing python scripts instead !!!\r
-    echo.\r
-  )\r
   goto end\r
 \r
 \r