anchor.diff:     cecho {0D}Qt already downloaded. Skipping.{# #}{\n}
   )
   
  +IF %USE_JOM%==FALSE GOTO :SKIP_JOM
  +IF NOT EXIST "%DEPS%\Qt\jom\jom.exe". (
  +   cd "%DEPS%"
  +   IF NOT EXIST jom_1_0_11.zip. (
  +      cecho {0D}Downloading JOM build tool for Qt.{# #}{\n}
  +      wget ftp://ftp.qt.nokia.com/jom/jom_1_0_11.zip
  +      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  +   )
  +
  +   cecho {0D}Installing JOM build tool for to %DEPS%\Qt\jom.{# #}{\n}
  +   mkdir %DEPS%\Qt\jom
  +   7za x -y -oQt\jom jom_1_0_11.zip
  +) ELSE (
  +   cecho {0D}JOM already installed to %DEPS%\Qt\jom. Skipping.{# #}{\n}
  +)
  +
  +:SKIP_JOM
  +
   :: Enable OpenSSL in the Qt if OpenSSL build is enabled. For some reason if you 
   :: echo QT_OPENSSL_CONFIGURE inside the IF statement it will always be empty. 
  -:: Hence the secondary IF to print it out when build is enabled.
  +:: Hence the secondary IF to print it out when build is enabled. Only print these if Qt will be built
   SET QT_OPENSSL_CONFIGURE=
   IF %BUILD_OPENSSL%==TRUE (
  -   cecho {0D}Configuring OpenSSL into the Qt build with:{# #}{\n}
  +   IF NOT EXIST "%DEPS%\Qt\lib\QtWebKit4.dll". cecho {0D}Configuring OpenSSL into the Qt build with:{# #}{\n}
      SET QT_OPENSSL_CONFIGURE=-openssl -I "%DEPS%\openssl\include" -L "%DEPS%\openssl\lib"
   ) ELSE (
  -   cecho {0D}OpenSSL build disabled, not confguring OpenSSL to Qt.{# #}{\n}
  -)
  -IF %BUILD_OPENSSL%==TRUE echo '%QT_OPENSSL_CONFIGURE%'
  +   IF NOT EXIST "%DEPS%\Qt\lib\QtWebKit4.dll". cecho {0D}OpenSSL build disabled, not confguring OpenSSL to Qt.{# #}{\n}
  +)
  +IF %BUILD_OPENSSL%==TRUE (
  +    IF NOT EXIST "%DEPS%\Qt\lib\QtWebKit4.dll". echo '%QT_OPENSSL_CONFIGURE%'
  +)
  +
  +IF NOT EXIST "%DEPS%\Qt\lib\QtWebKit4.dll". (
  +   cd "%DEPS%\Qt"
      
  -IF NOT EXIST "%DEPS%\Qt\lib\QtCore4.dll". (
  -   cd "%DEPS%\Qt"
  -   cecho {0D}Configuring Qt build. Please answer 'y'!{# #}{\n}  
  -   configure -platform win32-msvc2008 -debug-and-release -opensource -shared -ltcg -mp -no-qt3support -no-opengl -no-openvg  -no-dbus -nomake examples -nomake demos -qt-zlib -qt-libpng -qt-libmng -qt-libjpeg -qt-libtiff %QT_OPENSSL_CONFIGURE%
  -   IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  +   IF NOT EXIST "configure.cache". (
  +      cecho {0D}Configuring Qt build. Please answer 'y'!{# #}{\n}
  +      configure -platform win32-msvc2008 -debug-and-release -opensource -shared -no-qt3support -no-opengl -no-openvg  -no-dbus -nomake examples -nomake demos -qt-zlib -qt-libpng -qt-libmng -qt-libjpeg -qt-libtiff %QT_OPENSSL_CONFIGURE%
  +      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  +   ) ELSE (
  +      cecho {0D}Qt already configured. Remove %DEPS%\Qt\configure.cache to trigger a reconfigure.{# #}{\n}
  +   )
  +   
      cecho {0D}Building Qt. Please be patient, this will take a while.{# #}{\n}
  -   nmake /nologo
  -   :: Qt build system is slightly broken: see https://bugreports.qt-project.org/browse/QTBUG-6470. Work around the issue.
  -   set ERRORLEVEL=0
  -   del /s /q mocinclude.tmp
  -   nmake /nologo
  -   IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  -   REM We (re)built Qt, so delete QtCore4.dll in Tundra bin\ to force DLL deployment below.
  -   del /Q "%TUNDRA_BIN%\QtCore4.dll"
  +   IF %USE_JOM%==TRUE (
  +      cecho {0D}- Building Qt with jom{# #}{\n}
  +      jom\jom.exe
  +      :: Qt build system is slightly broken: see https://bugreports.qt-project.org/browse/QTBUG-6470. Work around the issue.
  +      set ERRORLEVEL=0
  +      del /s /q mocinclude.tmp
  +      jom\jom.exe
  +   ) ELSE (
  +      cecho {0D}- Building Qt with nmake{# #}{\n}
  +      nmake /nologo
  +      :: Qt build system is slightly broken: see https://bugreports.qt-project.org/browse/QTBUG-6470. Work around the issue.
  +      set ERRORLEVEL=0
  +      del /s /q mocinclude.tmp
  +      nmake /nologo
  +   )
  +   
  +   IF NOT EXIST "%DEPS%\Qt\lib\QtWebKit4.dll". (
  +      cecho {0E}Warning: Qt\lib\QtWebKit4.dll not present, Qt build failed?.{# #}{\n}
  +      GOTO :ERROR
  +   )
  +   
  +   IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  +   REM We (re)built Qt, so delete QtWebKit4.dll in Tundra bin\ to force DLL deployment below.
  +   del /Q "%TUNDRA_BIN%\QtWebKit4.dll"
   ) ELSE (
      cecho {0D}Qt already built. Skipping.{# #}{\n}
   )
   
  -IF NOT EXIST "%TUNDRA_BIN%\QtCore4.dll". (
  +IF NOT EXIST "%TUNDRA_BIN%\QtWebKit4.dll". (
      cecho {0D}Deploying Qt DLLs to Tundra bin\.{# #}{\n}
      copy /Y "%DEPS%\qt\bin\*.dll" "%TUNDRA_BIN%"
      IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  
positive.code:    7za x -y protobuf-2.4.1.zip
     IF NOT %ERRORLEVEL%==0 GOTO :ERROR
     ren protobuf-2.4.1 protobuf
     IF NOT EXIST "%DEPS%\Qt" GOTO :ERROR
  ) ELSE (
     cecho {0D}Profobuf already downloaded. Skipping.{# #}{\n}
  )
  
  :: This project builds both release and debug as libprotobuf.lib but CMake >=2.8.5
  
negative.code: )
  
  IF NOT EXIST "%DEPS%\speex". (
     cd "%DEPS%"
     :: Speex does not have a tagged release for MSVC2008! So, check out trunk instead.
     cecho {0D}Cloning Speex into "%DEPS%\speex".{# #}{\n}
     svn checkout http://svn.xiph.org/trunk/speex/ speex
     cd speex\win32\VS2008
     IF NOT %ERRORLEVEL%==0 GOTO :ERROR
     cecho {0D}Building Speex. Please be patient, this will take a while.{# #}{\n}
     msbuild libspeex.sln /p:configuration=Debug /t:libspeex /clp:ErrorsOnly /nologo
     msbuild libspeex.sln /p:configuration=Release /t:libspeex /clp:ErrorsOnly /nologo
     :: For some reason /t:libspeex;libspeexdsp wont build the dsp lib, so do it separately.
     :: Only build release because the target directory and name are the same for debug and release.
     msbuild libspeexdsp\libspeexdsp.vcproj /p:configuration=Release /clp:ErrorsOnly /nologo
     :: Copy libspeex.lib also to \lib
     copy /Y Win32\Release\libspeex.lib "%DEPS%\speex\lib"
     IF NOT %ERRORLEVEL%==0 GOTO :ERROR
  ) ELSE (
     cecho {0D}Speex already built. Skipping.{# #}{\n}
  