0
|
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 |
:: No Commercial Usage
|
|
11 |
:: This file contains pre-release code and may not be distributed.
|
|
12 |
:: You may use this file in accordance with the terms and conditions
|
|
13 |
:: contained in the Technology Preview License Agreement accompanying
|
|
14 |
:: this package.
|
|
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 |
:: If you have questions regarding the use of this file, please contact
|
|
29 |
:: Nokia at qt-info@nokia.com.
|
|
30 |
::
|
|
31 |
::
|
|
32 |
::
|
|
33 |
::
|
|
34 |
::
|
|
35 |
::
|
|
36 |
::
|
|
37 |
::
|
|
38 |
:: $QT_END_LICENSE$
|
|
39 |
::
|
|
40 |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
41 |
call :%1 %2
|
|
42 |
goto END
|
|
43 |
|
|
44 |
:begin
|
|
45 |
for /F "tokens=1*" %%m in ("%~1") do set IWMAKE_COMPILER=%%~m& set IWMAKE_TMP=%%~n
|
|
46 |
|
|
47 |
if "%IWMAKE_TMP%"=="" set IWMAKE_TMP=build_%IWMAKE_COMPILER%
|
|
48 |
set IWMAKE_BUILD=%IWMAKE_ROOT%\%IWMAKE_TMP%
|
|
49 |
if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD%
|
|
50 |
|
|
51 |
if not "%PATH%"=="" set IWMAKE_OLD_PATH=%PATH%
|
|
52 |
if not "%QMAKESPEC%"=="" set IWMAKE_OLD_QMAKESPEC=%QMAKESPEC%
|
|
53 |
if not "%QTDIR%"=="" set IWMAKE_OLD_QTDIR=%QTDIR%
|
|
54 |
if not "%INCLUDE%"=="" set IWMAKE_OLD_INCLUDE=%INCLUDE%
|
|
55 |
if not "%LIB%"=="" set IWMAKE_OLD_LIB=%LIB%
|
|
56 |
|
|
57 |
set PATH=%IWMAKE_BUILD%\bin;%PATH%
|
|
58 |
set QTDIR=%IWMAKE_BUILD%
|
|
59 |
|
|
60 |
if "%IWMAKE_COMPILER%"=="vs2003" goto VS2003Env
|
|
61 |
if "%IWMAKE_COMPILER%"=="vs2002" goto VS2002Env
|
|
62 |
if "%IWMAKE_COMPILER%"=="vs2005" goto VS2005Env
|
|
63 |
if "%IWMAKE_COMPILER%"=="vc60" goto VC60Env
|
|
64 |
if "%IWMAKE_COMPILER%"=="mingw" goto MinGWEnv
|
|
65 |
goto :eof
|
|
66 |
|
|
67 |
:VS2003Env
|
|
68 |
set QMAKESPEC=win32-msvc.net
|
|
69 |
if not exist "%VS71COMNTOOLS%vsvars32.bat" echo VS2003 not found >> %IWMAKE_LOGFILE% & exit /b 1
|
|
70 |
call "%VS71COMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE%
|
|
71 |
set IWMAKE_MAKE=nmake
|
|
72 |
goto :eof
|
|
73 |
|
|
74 |
:VS2002Env
|
|
75 |
set QMAKESPEC=win32-msvc.net
|
|
76 |
if not exist "%VSCOMNTOOLS%vsvars32.bat" echo VS2002 not found >> %IWMAKE_LOGFILE% & exit /b 1
|
|
77 |
call "%VSCOMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE%
|
|
78 |
set IWMAKE_MAKE=nmake
|
|
79 |
goto :eof
|
|
80 |
|
|
81 |
:VS2005Env
|
|
82 |
set QMAKESPEC=win32-msvc2005
|
|
83 |
if not exist "%VS80COMNTOOLS%vsvars32.bat" echo VS2005 not found >> %IWMAKE_LOGFILE% & exit /b 1
|
|
84 |
call "%VS80COMNTOOLS%vsvars32.bat" >> %IWMAKE_LOGFILE%
|
|
85 |
set IWMAKE_MAKE=nmake
|
|
86 |
goto :eof
|
|
87 |
|
|
88 |
:VC60Env
|
|
89 |
set QMAKESPEC=win32-msvc
|
|
90 |
if not exist "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" echo VC60 not found >> %IWMAKE_LOGFILE% & exit /b 1
|
|
91 |
call "%ProgramFiles%\Microsoft Visual Studio\VC98\Bin\vcvars32.bat" >> %IWMAKE_LOGFILE%
|
|
92 |
set IWMAKE_MAKE=nmake
|
|
93 |
goto :eof
|
|
94 |
|
|
95 |
:MinGWEnv
|
|
96 |
set QMAKESPEC=win32-g++
|
|
97 |
if not exist %IWMAKE_MINGWPATH%\bin\gcc.exe echo MinGW not found in %IWMAKE_MINGWPATH% >> %IWMAKE_LOGFILE% & exit /b 1
|
|
98 |
set PATH=%IWMAKE_MINGWPATH%\bin;%PATH%
|
|
99 |
set IWMAKE_MAKE=mingw32-make
|
|
100 |
goto :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=
|
|
108 |
goto :eof
|
|
109 |
|
|
110 |
:configure
|
|
111 |
pushd %IWMAKE_BUILD%
|
|
112 |
configure %~1 >> %IWMAKE_LOGFILE% 2>&1
|
|
113 |
popd
|
|
114 |
goto :eof
|
|
115 |
|
|
116 |
:bin
|
|
117 |
pushd %IWMAKE_BUILD%
|
|
118 |
%IWMAKE_MAKE% %~1 >>%IWMAKE_LOGFILE% 2>&1
|
|
119 |
popd
|
|
120 |
goto :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
|
|
127 |
goto :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=
|
|
150 |
goto :eof
|
|
151 |
|
|
152 |
:root
|
|
153 |
set IWMAKE_BUILD=%~1
|
|
154 |
if not exist %IWMAKE_BUILD% mkdir %IWMAKE_BUILD%
|
|
155 |
goto :eof
|
|
156 |
|
|
157 |
:END
|