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

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

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

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