source: trunk/tools/installer/batch/build.bat@ 585

Last change on this file since 585 was 561, checked in by Dmitry A. Kuminov, 16 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:executable set to *
File size: 6.0 KB
Line 
1:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2::
3:: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4:: All rights reserved.
5:: Contact: Nokia Corporation (qt-info@nokia.com)
6::
7:: This file is part of the tools applications of the Qt Toolkit.
8::
9:: $QT_BEGIN_LICENSE:LGPL$
10:: Commercial Usage
11:: Licensees holding valid Qt Commercial licenses may use this file in
12:: accordance with the Qt Commercial License Agreement provided with the
13:: Software or, alternatively, in accordance with the terms contained in
14:: a written agreement between you and Nokia.
15::
16:: GNU Lesser General Public License Usage
17:: Alternatively, this file may be used under the terms of the GNU Lesser
18:: General Public License version 2.1 as published by the Free Software
19:: Foundation and appearing in the file LICENSE.LGPL included in the
20:: packaging of this file. Please review the following information to
21:: ensure the GNU Lesser General Public License version 2.1 requirements
22:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23::
24:: In addition, as a special exception, Nokia gives you certain additional
25:: rights. These rights are described in the Nokia Qt LGPL Exception
26:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27::
28:: GNU General Public License Usage
29:: Alternatively, this file may be used under the terms of the GNU
30:: General Public License version 3.0 as published by the Free Software
31:: Foundation and appearing in the file LICENSE.GPL included in the
32:: packaging of this file. Please review the following information to
33:: ensure the GNU General Public License version 3.0 requirements will be
34:: met: http://www.gnu.org/copyleft/gpl.html.
35::
36:: If you have questions regarding the use of this file, please contact
37:: Nokia at qt-info@nokia.com.
38:: $QT_END_LICENSE$
39::
40:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
41call :%1 %2
42goto END
43
44:begin
45for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_COMPILER=%%~m& set IWMAKE_TMP=%%~n
46
47if "%IWMAKE_TMP%"=="" set IWMAKE_TMP=build_%IWMAKE_COMPILER%
48set IWMAKE_BUILD=%IWMAKE_ROOT%\%IWMAKE_TMP%
49if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD%
50
51if not "%PATH%"=="" set IWMAKE_OLD_PATH=%PATH%
52if not "%QMAKESPEC%"=="" set IWMAKE_OLD_QMAKESPEC=%QMAKESPEC%
53if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR%
54if not "%INCLUDE%"=="" set IWMAKE_OLD_INCLUDE=%INCLUDE%
55if not "%LIB%"=="" set IWMAKE_OLD_LIB=%LIB%
56
57set PATH=%IWMAKE_BUILD%\bin;%PATH%
58set QTDIR=%IWMAKE_BUILD%
59
60if "%IWMAKE_COMPILER%"=="vs2003" goto VS2003Env
61if "%IWMAKE_COMPILER%"=="vs2002" goto VS2002Env
62if "%IWMAKE_COMPILER%"=="vs2005" goto VS2005Env
63if "%IWMAKE_COMPILER%"=="vc60" goto VC60Env
64if "%IWMAKE_COMPILER%"=="mingw" goto MinGWEnv
65goto :eof
66
67:VS2003Env
68set QMAKESPEC=win32-msvc.net
69if not exist "%VS71COMNTOOLS%vsvars32.bat" echo VS2003 not found >> %IWMAKE_LOGFILE% & exit /b 1
70call "%VS71COMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE%
71set IWMAKE_MAKE=nmake
72goto :eof
73
74:VS2002Env
75set QMAKESPEC=win32-msvc.net
76if not exist "%VSCOMNTOOLS%vsvars32.bat" echo VS2002 not found >> %IWMAKE_LOGFILE% & exit /b 1
77call "%VSCOMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE%
78set IWMAKE_MAKE=nmake
79goto :eof
80
81:VS2005Env
82set QMAKESPEC=win32-msvc2005
83if not exist "%VS80COMNTOOLS%vsvars32.bat" echo VS2005 not found >> %IWMAKE_LOGFILE% & exit /b 1
84call "%VS80COMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE%
85set IWMAKE_MAKE=nmake
86goto :eof
87
88:VC60Env
89set QMAKESPEC=win32-msvc
90if not exist "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" echo VC60 not found >> %IWMAKE_LOGFILE% & exit /b 1
91call "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" >> %IWMAKE_LOGFILE%
92set IWMAKE_MAKE=nmake
93goto :eof
94
95:MinGWEnv
96set QMAKESPEC=win32-g++
97if not exist %IWMAKE_MINGWPATH%\bin\gcc.exe echo MinGW not found in %IWMAKE_MINGWPATH% >> %IWMAKE_LOGFILE% & exit /b 1
98set PATH=%IWMAKE_MINGWPATH%\bin;%PATH%
99set IWMAKE_MAKE=mingw32-make
100goto :eof
101
102:finish
103 if not "%IWMAKE_OLD_PATH%"=="" set PATH=%IWMAKE_OLD_PATH%& set IWMAKE_OLD_PATH=
104 if not "%IWMAKE_OLD_QMAKESPEC%"=="" set QMAKESPEC=%IWMAKE_OLD_QMAKESPEC%& set IWMAKE_OLD_QMAKESPEC=
105 if not "%IWMAKE_OLD_QTDIR%"=="" set QTDIR=%IWMAKE_OLD_QTDIR%& set IWMAKE_OLD_QTDIR=
106 if not "%IWMAKE_OLD_INCLUDE%"=="" set INCLUDE=%IWMAKE_OLD_INCLUDE%& set IWMAKE_OLD_INCLUDE=
107 if not "%IWMAKE_OLD_LIB%"=="" set LIB=%IWMAKE_OLD_LIB%& set IWMAKE_OLD_LIB=
108goto :eof
109
110:configure
111 pushd %IWMAKE_BUILD%
112 configure %~1 >> %IWMAKE_LOGFILE% 2>&1
113 popd
114goto :eof
115
116:bin
117 pushd %IWMAKE_BUILD%
118 %IWMAKE_MAKE% %~1 >>%IWMAKE_LOGFILE% 2>&1
119 popd
120goto :eof
121
122:binInDir
123 for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_TMP=%%~m& set IWMAKE_TMP2=%%~n
124 pushd %IWMAKE_BUILD%\%IWMAKE_TMP%
125 %IWMAKE_MAKE% %IWMAKE_TMP2% >> %IWMAKE_LOGFILE% 2>&1
126 popd
127goto :eof
128
129:DBPlugins
130 call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sql
131 set IWMAKE_SQL_OLD_LIB=%LIB%
132 pushd %IWMAKE_BUILD%\src\plugins\sqldrivers\mysql
133 set LIB=%IWMAKE_ROOT%\sql\mysql\lib\debug;%IWMAKE_SQL_OLD_LIB%
134 qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\mysql\include" "LIBS+=libmysql.lib ws2_32.lib advapi32.lib user32.lib" >> %IWMAKE_LOGFILE% 2>&1
135 %IWMAKE_MAKE% debug >> %IWMAKE_LOGFILE% 2>&1
136 set LIB=%IWMAKE_ROOT%\sql\mysql\lib\opt;%IWMAKE_SQL_OLD_LIB%
137 qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\mysql\include" "LIBS+=libmysql.lib ws2_32.lib advapi32.lib" >> %IWMAKE_LOGFILE% 2>&1
138 %IWMAKE_MAKE% release >> %IWMAKE_LOGFILE% 2>&1
139 popd
140
141 set LIB=%IWMAKE_ROOT%\sql\%IWMAKE_COMPILER%;%IWMAKE_SQL_OLD_LIB%
142 pushd %IWMAKE_BUILD%\src\plugins\sqldrivers\psql
143 qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpqd.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1
144 %IWMAKE_MAKE% debug >> %IWMAKE_LOGFILE% 2>&1
145 qmake "INCLUDEPATH+=%IWMAKE_ROOT%\sql\include\psql" "LIBS+=libpq.lib ws2_32.lib advapi32.lib shfolder.lib shell32.lib" >> %IWMAKE_LOGFILE% 2>&1
146 %IWMAKE_MAKE% release >> %IWMAKE_LOGFILE% 2>&1
147 popd
148 set LIB=%IWMAKE_SQL_OLD_LIB%
149 set IWMAKE_SQL_OLD_LIB=
150goto :eof
151
152:root
153 set IWMAKE_BUILD=%~1
154 if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD%
155goto :eof
156
157:END
Note: See TracBrowser for help on using the repository browser.