aboutsummaryrefslogtreecommitdiffstats
path: root/tools/build-qt-sdk.bat
blob: 372448ab4158b064cc24d3f1b93510a106682b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@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\5.1.1-... 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 "%FrameworkDir64%"=="" (
  set API_BITS=64
) else (
  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\5.1.1-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 ========

rem We could probably get away with skipping several other modules, e.g.
rem qtsensors and qtserialport
configure -opensource -confirm-license -platform %QT_PLATFORM% -prefix %QT_PREFIX% ^
    -no-dbus ^
    -no-opengl -no-angle ^
    -no-sql-sqlite ^
    -no-cetest ^
    -mp ^
    -nomake examples ^
    -skip qtdoc ^
    -skip qtquickcontrols ^
    -skip qtwebkit ^
    -skip qtwebkit-examples ^
    -skip qtxmlpatterns ^


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