anchor.diff:  :CreateBuildDirectory
   setlocal
   
  -:: Create a copy of the Portable Python directory. This is where we'll be
  -:: installing RBTools and dependencies, and what we'll actually be
  -:: distributing.
  +:: Create a copy of the Python directory. This is where we'll be installing
  +:: RBTools and dependencies, and what we'll actually be distributing.
   echo.
   echo == Creating build directory ==
   
   call :DeleteIfExists "%BUILD_ROOT%"
  -xcopy /EYI "%PORTABLE_PYTHON_DEP%\App" "%BUNDLED_PYTHON_DIR%" >NUL
  +xcopy /EYI "%PYTHON_DEP%" "%BUNDLED_PYTHON_DIR%" >NUL
  +
  +goto :EOF
  +
  +
  +::-------------------------------------------------------------------------
  +:: Install package tools
  +::-------------------------------------------------------------------------
  +:InstallPackagers
  +setlocal
  +
  +echo.
  +echo == Installing pip and setuptools ==
  +echo.
  +echo --------------------------- [Install log] ---------------------------
  +
  +pushd %TREE_ROOT%
  +"%BUNDLED_PYTHON%" -m ensurepip --upgrade
  +"%BUNDLED_PYTHON%" -m pip install -U pip setuptools
  +
  +if ERRORLEVEL 1 (
  +    popd
  +    exit /B 1
  +)
  +
  +popd
  +
  +echo ---------------------------------------------------------------------
   
   goto :EOF
   
  
positive.code: 
  
  ::-------------------------------------------------------------------------
  :: Installs and trims the Portable Python dependency
  ::-------------------------------------------------------------------------
  :InstallPortablePython
  setlocal
  
  echo.
  echo == Installing Portable Python ==
  
  set _PORTABLE_PYTHON_INSTALLER=%TEMP%\PortablePython-%PORTABLE_PYTHON_VERSION%.exe
  
  if not exist "%PORTABLE_PYTHON_DEP%" (
      if not exist "%_PORTABLE_PYTHON_INSTALLER%" (
          echo Downloading Portable Python v%PORTABLE_PYTHON_VERSION%...
          call :DownloadAndVerify %PORTABLE_PYTHON_URL% ^
                                  "%_PORTABLE_PYTHON_INSTALLER%" ^
                                  %PORTABLE_PYTHON_MD5% || exit /B 1
  
          echo Downloaded to %_PORTABLE_PYTHON_INSTALLER%
      )
  
      echo Running the installer...
      echo.
      echo **PAY ATTENTION**
      echo.
      echo You need to use the default destination path for the installer, and you
      echo must choose the "Minimum" install type.
      echo.
  
      start "" /wait "%_PORTABLE_PYTHON_INSTALLER%" /D=%PORTABLE_PYTHON_DEP%
  
      if ERRORLEVEL 1 exit /B 1
  
      del /F /Q "%_PORTABLE_PYTHON_INSTALLER%"
  )
  
  goto :EOF
  
negative.code: 
  call :DeleteIfExists "%BUNDLED_PYTHON_DIR%\Doc"
  call :DeleteIfExists "%BUNDLED_PYTHON_DIR%\tcl"
  call :DeleteIfExists "%BUNDLED_PYTHON_DIR%\python-%PYTHON_VERSION%.msi"
  
  goto :EOF
  
  