Add license header (attributing to Jakub) for a few of the npl files.
[metze/wireshark/wip.git] / tools / build-qt-sdk.bat
1 @echo off
2
3 rem Directions:
4
5 rem Download the latest source archive from
6 rem http://qt.nokia.com/downloads/downloads#qt-lib
7
8 rem Unpack the archive and run this script from the archive directory.
9
10 rem The default installation prefix is c:\Qt\4.8.3-... You can change
11 rem it below.
12
13 echo "%PATH%" | find "cygwin"
14 if errorlevel 1 set PATH=%PATH%;c:\cygwin\bin
15
16 set VS_VERSION=""
17 set API_BITS=""
18
19 rem Visual Studio version
20
21 if not "%VCINSTALLDIR%"=="" (
22   echo "%VCINSTALLDIR%" | find "10.0"
23   if not errorlevel 1 (
24     set VS_VERSION=2010
25   ) else (
26     echo "%VCINSTALLDIR%" | find "9.0"
27     if not errorlevel 1 (
28       set VS_VERSION=2008
29     )
30   )
31 )
32
33 if "%VS_VERSION%"=="" goto no_vs_version
34
35 rem Target API
36
37 if not "%FrameworkDir64%"=="" (
38   set API_BITS=64
39 ) else (
40   if not "%FrameworkDir%"=="" (
41     echo %FrameworkDir% | find "64"
42     if not errorlevel 1 (
43       set API_BITS=64
44     ) else (
45       set API_BITS=32
46     )
47   )
48 )
49
50 if "%API_BITS%"=="" goto no_api_bits
51
52 set QT_PLATFORM=win32-msvc%VS_VERSION%
53 set QT_PREFIX=c:\Qt\5.1.1-MSVC%VS_VERSION%-win%API_BITS%
54
55 nmake confclean || echo ...and that's probably OK.
56
57 echo.
58 echo ========
59 echo Building using mkspec %QT_PLATFORM% (%API_BITS% bit)
60 echo Installing in %QT_PREFIX%
61 echo ========
62
63 rem We could probably get away with skipping several other modules, e.g.
64 rem qtsensors and qtserialport
65 configure -opensource -platform %QT_PLATFORM% -prefix %QT_PREFIX% ^
66     -no-dbus ^
67     -no-opengl -no-angle ^
68     -no-sql-sqlite ^
69     -no-cetest ^
70     -mp ^
71     -nomake examples ^
72     -skip qtdoc ^
73     -skip qtmultimedia ^
74     -skip qtquickcontrols ^
75     -skip qtwebkit ^
76     -skip qtwebkit-examples ^
77     -skip qtxmlpatterns ^
78
79
80 nmake
81
82 echo.
83 echo You'll have to run nmake install yourself.
84
85 goto end
86
87 :no_vs_version
88 echo "Unable to find your Visual Studio version. Did you run vcvarsall.bat?"
89 goto end
90
91 :no_api_bits
92 echo "Unable to find your target API. Did you run vcvarsall.bat?"
93 goto end
94
95 :end