anchor.diff:     cecho {0D}OpenSSL already downloaded. Skipping.{# #}{\n}
   )
   
  +:: Todo 32-bit vs. 64-bit check.
   IF NOT EXIST "%DEPS%\openssl\bin\ssleay32.dll". (
       cd "%DEPS%\openssl\src"
       cecho {0D}Configuring OpenSSL build.{# #}{\n}
  
positive.code: )
  
  IF NOT EXIST "%DEPS%\boost". (
     cecho {0D}Cloning Boost into "%DEPS%\boost".{# #}{\n}
     cd "%DEPS%"
     svn checkout http://svn.boost.org/svn/boost/tags/release/Boost_1_49_0 boost
     IF NOT EXIST "%DEPS%\boost\.svn" GOTO :ERROR
     IF NOT EXIST "%DEPS%\boost\boost.css" GOTO :ERROR
     cd "%DEPS%\boost"
     cecho {0D}Building Boost build script.{# #}{\n}
     call bootstrap
  
  ::   cd "%DEPS%\boost\tools\build\v2"
  ::   sed s/"# using msvc ;"/"using msvc : 9.0 ;"/g <user-config.jam >user-config.new.jam
  ::
  ::   del user-config.jam
  ::   rename user-config.new.jam user-config.jam
     copy /Y "%TOOLS%\Mods\boost-user-config-%VS_VER%.jam" "%DEPS%\boost\tools\build\v2\user-config.jam"
  
     IF NOT %ERRORLEVEL%==0 GOTO :ERROR
     cd "%DEPS%\boost"
     cecho {0D}Building Boost. Please be patient, this will take a while.{# #}{\n}
     :: Building boost takes ages, so utilize all cores for the build process
     call .\b2 -j %NUMBER_OF_PROCESSORS% --without-mpi thread regex stage
  ) ELSE (
     ::TODO Even if %DEPS%\boost exists, we have no guarantee that boost is built successfully for real
     cecho {0D}Boost already built. Skipping.{# #}{\n}
  )
  
  :SKIP_BOOST
  
negative.code: )
  
  IF NOT EXIST "%DEPS%\qtscriptgenerator\plugins\script\qtscript_xml%POSTFIX_D%.dll". (
      cd "%DEPS%\qtscriptgenerator\generator"
      cecho {0D}Running qmake for QtScriptGenerator.{# #}{\n}
      :: We need to patch pp-iterator.h in order to make it compile with newer Visual Studio versions:
      :: http://stackoverflow.com/questions/2791525/stl-operator-behavior-change-with-visual-studio-2010
      :: Also cannot use QMake as it results in linker errors, so instead generate vcproj files and build using MSBuild.
      IF NOT %VS_VER%==vs2008 (
          copy /Y "%TOOLS%\Mods\QtScriptGenerator_pp-iterator.h" "%DEPS%\qtscriptgenerator\generator\parser\rpp\pp-iterator.h"
          qmake -tp vc
          cecho {0D}Building QtScriptGenerator. Please be patient, this will take a while.{# #}{\n}
          MSBuild generator.vcxproj /p:configuration=Release /nologo /m:%NUMBER_OF_PROCESSORS%
      ) ELSE (
          qmake
          IF NOT %ERRORLEVEL%==0 GOTO :ERROR
          cecho {0D}Building QtScriptGenerator.{# #}{\n}
          IF %USE_JOM%==TRUE (
              cecho {0D}- Building QtScriptGenerator with jom{# #}{\n}
              "%DEPS%\qt\jom\jom.exe"
          ) ELSE (
              cecho {0D}- Building QtScriptGenerator with nmake{# #}{\n}
              nmake /nologo
          )
      )
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      cecho {0D}Executing QtScriptGenerator.{# #}{\n}
      call release\generator
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      cd ..
      cd qtbindings
  
      sed -e "s/qtscript_phonon //" -e "s/qtscript_opengl //" -e "s/qtscript_uitools //" -e "s/qtscript_xml_patterns //" < qtbindings.pro > qtbindings.pro.sed
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      del /Q qtbindings.pro
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      ren qtbindings.pro.sed qtbindings.pro
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  
      REM Fix bad script generation for webkit.
      REM TODO: Could try some sed replacement, but can't make the regex escaping rules work from command line.
      REM sed -e s/"QWebPluginFactory_Extension_values[] = "/"QWebPluginFactory_Extension_values[1] = "// -e "s/qtscript_QWebPluginFactory_Extension_keys[] = /qtscript_QWebPluginFactory_Extension_keys[1] = //" < "%DEPS%\qtscriptgenerator\generated_cpp\com_trolltech_qt_webkit\qtscript_QWebPluginFactory.cpp" > "%DEPS%\qtscript_QWebPluginFactory.cpp"
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      del "%DEPS%\qtscriptgenerator\generated_cpp\com_trolltech_qt_webkit\qtscript_QWebPluginFactory.cpp"
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      REM move "%DEPS%\qtscript_QWebPluginFactory.cpp" "%DEPS%\qtscriptgenerator\generated_cpp\com_trolltech_qt_webkit"
      copy /Y "%TOOLS%\Mods\qtscript_QWebPluginFactory.cpp" "%DEPS%\qtscriptgenerator\generated_cpp\com_trolltech_qt_webkit"
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  
      cecho {0D}Running qmake for qtbindings plugins.{# #}{\n}
      qmake
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
      cecho {0D}Building qtscript plugins. Please be patient, this will take a while.{# #}{\n}
      IF %USE_JOM%==TRUE (
          cecho {0D}- Building %DEBUG_OR_RELEASE% qtscript plugins with jom{# #}{\n}
          "%DEPS%\qt\jom\jom.exe" %DEBUG_OR_RELEASE_LOWERCASE%
      ) ELSE (
          cecho {0D}- Building %DEBUG_OR_RELEASE% qtscript plugins with nmake{# #}{\n}
          nmake %DEBUG_OR_RELEASE_LOWERCASE%  /nologo
      )
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR    
  ) ELSE (
      cecho {0D}QtScriptGenerator already built. Skipping.{# #}{\n}
  )
  
  IF NOT EXIST "%TUNDRA_BIN%\qtplugins\script\qtscript_core%POSTFIX_D%.dll". (
  