-set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe
-set zipPath="%ProgramFilesPath%\7-Zip\7z.exe"
-set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
-set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
-set vcvarsall="%ProgramFilesPath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
-
-set installpath=%thirdpartyGeneration%\thirdparty_install
-set binpath=%thirdpartyGeneration%\thirdparty_bin
-set sourcepath=%thirdpartyGeneration%\thirdparty_source
-
-set xercesc=xerces-c-3.1.1
-set itk=InsightToolkit-3.20.0
-set gdcm=gdcm
-set vtk=VTK
-rem ---End Setting Global Variables----
-rem -----------------------------------
-
-call %vcvarsall%
-
-rem -----------------------------------
-rem -------Creating Folders------------
-rem -----------------------------------
-rmdir %binpath% /s /q
-
-rmdir %thirdpartyGeneration% /s /q
-mkdir %thirdpartyGeneration%
-cd %thirdpartyGeneration%
-mkdir thirdparty_source
-mkdir thirdparty_bin
-mkdir thirdparty_install
-rem ------End Creating Folders---------
-
-rem -----------------------------------
-rem ------Downloading Sources----------
-rem -----------------------------------
-cd %thirdpartyGeneration%\thirdparty_source\
-%wgetPath% %urlCreatisSource%/qt-4.7.3.zip
-%wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
-%wgetPath% %urlCreatisSource%/boost_1_47_0.7z
-%wgetPath% %urlCreatisSource%/vtk-5.6.1.zip
-%wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
-%wgetPath% %urlCreatisSource%/gdcm_05_Mai_2011.tar.gz
-%wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
-rem ------End Downloading Sources------
-
-rem -----------------------------------
-rem --------Qt Installation------------
-rem -----------------------------------
-rem ---Setting Enviroment Variables----
-set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source\
-mkdir Qt\
-cd Qt\
-%zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
-del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
-
-rem --------Renaming Folder------------
-rename qt-everywhere-opensource-src-4.7.3 4.7.3
-rem ----------Installing---------------
-cd 4.7.3
-echo y | configure -debug-and-release -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
-nmake
+if %x86Comp%==ON (
+ set addressmodel=32
+ call %vcvarsall%
+ echo "Compilation forced x86"
+) else (
+ set addressmodel=64
+ if %PROCESSOR_ARCHITECTURE%==x86 (
+ call %vcvarsall%
+ ) else (
+ call %vcvarsall% amd64
+ )
+)
+
+if %EEDinstallQT%==FALSE GOTO SKIPINSTALLQT
+echo -----------------------------------
+echo --------Qt Installation------------
+echo -----------------------------------
+cd %QTDIR%
+set QMAKESPEC=win32-msvc2010
+echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp >> %LogFolder%\qtInstall.log 2>&1
+%JOMDIR%\jom.exe -j %NUMBER_OF_PROCESSORS% >> %LogFolder%\qtInstall.log 2>&1