From 3564e0b2f1cb23b8c169de43dd26fa0559626771 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 27 Mar 2012 23:00:25 +0000 Subject: Add a script for building 32 and 64 bit Qt libraries for Visual C++ 2008 and 2010 from source. svn path=/trunk/; revision=41810 --- tools/build-qt-sdk.bat | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 tools/build-qt-sdk.bat diff --git a/tools/build-qt-sdk.bat b/tools/build-qt-sdk.bat new file mode 100755 index 0000000000..a0339f467e --- /dev/null +++ b/tools/build-qt-sdk.bat @@ -0,0 +1,76 @@ +@echo off + +rem Directions: + +rem Download the latest source archive from +rem http://qt.nokia.com/downloads/downloads#qt-lib + +rem Unpack the archive and run this script from the archive directory. + +rem The default installation prefix is c:\Qt\4.8.0-... You can change +rem it below. + +echo "%PATH%" | find "cygwin" +if errorlevel 1 set PATH=%PATH%;c:\cygwin\bin + +set VS_VERSION="" +set API_BITS="" + +rem Visual Studio version + +if not "%VCINSTALLDIR%"=="" ( + echo "%VCINSTALLDIR%" | find "10.0" + if not errorlevel 1 ( + set VS_VERSION=2010 + ) else ( + echo "%VCINSTALLDIR%" | find "9.0" + if not errorlevel 1 ( + set VS_VERSION=2008 + ) + ) +) + +if "%VS_VERSION%"=="" goto no_vs_version + +rem Target API + +if not "%FrameworkDir%"=="" ( + echo %FrameworkDir% | find "64" + if not errorlevel 1 ( + set API_BITS=64 + ) else ( + set API_BITS=32 + ) +) + +if "%API_BITS%"=="" goto no_api_bits + +set QT_PLATFORM=win32-msvc%VS_VERSION% +set QT_PREFIX=c:\Qt\4.8.0-MSVC%VS_VERSION%-win%API_BITS% + +nmake confclean || echo ...and that's probably OK. + +echo. +echo ======== +echo Building using mkspec %QT_PLATFORM% (%API_BITS% bit) +echo Installing in %QT_PREFIX% +echo ======== + +configure -opensource -platform %QT_PLATFORM% -prefix %QT_PREFIX% -no-qt3support -no-script -no-scripttools -no-multimedia -no-dbus -no-opengl -no-s60 -no-sql-sqlite -no-xmlpatterns -no-webkit -mp -nomake demos -nomake tools -nomake examples -nomake docs -nomake translations + +nmake + +echo. +echo You'll have to run nmake install yourself. + +goto end + +:no_vs_version +echo "Unable to find your Visual Studio version. Did you run vcvarsall.bat?" +goto end + +:no_api_bits +echo "Unable to find your target API. Did you run vcvarsall.bat?" +goto end + +:end -- cgit v1.2.3