23
|
1 |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
2 |
::
|
|
3 |
:: Copyright (C) 2010 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 Qt Mobility Components.
|
|
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 |
|
|
42 |
@echo off
|
|
43 |
|
|
44 |
set QT_MOBILITY_PREFIX= C:\QtMobility
|
|
45 |
set BUILD_PATH=%CD%
|
|
46 |
set SOURCE_PATH= %~dp0
|
|
47 |
cd /D %SOURCE_PATH%
|
|
48 |
set SOURCE_PATH=%CD%
|
|
49 |
cd /D %BUILD_PATH%
|
|
50 |
|
|
51 |
set PROJECT_CONFIG=%BUILD_PATH%\config.in
|
|
52 |
set PROJECT_LOG=%BUILD_PATH%\config.log
|
|
53 |
set RELEASEMODE=release
|
|
54 |
set WIN32_RELEASEMODE=debug_and_release build_all
|
|
55 |
set QT_MOBILITY_LIB=
|
|
56 |
set BUILD_UNITTESTS=no
|
|
57 |
set BUILD_EXAMPLES=no
|
|
58 |
set BUILD_DOCS=yes
|
|
59 |
set BUILD_TOOLS=yes
|
|
60 |
set MOBILITY_MODULES=bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors
|
|
61 |
set MOBILITY_MODULES_UNPARSED=
|
|
62 |
set VC_TEMPLATE_OPTION=
|
|
63 |
set QT_PATH=
|
|
64 |
set QMAKE_CACHE=%BUILD_PATH%\.qmake.cache
|
|
65 |
|
|
66 |
REM We use these variables to indicate which modules are selected
|
|
67 |
REM They are used for example to see which modules need config.tests built
|
|
68 |
set CONTACTS_SELECTED=yes
|
|
69 |
set BEARER_SELECTED=yes
|
|
70 |
set SYSTEMINFO_SELECTED=yes
|
|
71 |
set SENSORS_SELECTED=yes
|
|
72 |
set MESSAGING_SELECTED=yes
|
|
73 |
set MULTIMEDIA_SELECTED=yes
|
|
74 |
set LOCATION_SELECTED=yes
|
|
75 |
if exist "%QMAKE_CACHE%" del /Q %QMAKE_CACHE%
|
|
76 |
if exist "%PROJECT_LOG%" del /Q %PROJECT_LOG%
|
|
77 |
if exist "%PROJECT_CONFIG%" del /Q %PROJECT_CONFIG%
|
|
78 |
|
|
79 |
echo QT_MOBILITY_SOURCE_TREE = %SOURCE_PATH% > %QMAKE_CACHE%
|
|
80 |
echo QT_MOBILITY_BUILD_TREE = %BUILD_PATH% >> %QMAKE_CACHE%
|
|
81 |
set QMAKE_CACHE=
|
|
82 |
|
|
83 |
:cmdline_parsing
|
|
84 |
if "%1" == "" goto startProcessing
|
|
85 |
if "%1" == "-debug" goto debugTag
|
|
86 |
if "%1" == "-release" goto releaseTag
|
|
87 |
if "%1" == "-silent" goto silentTag
|
|
88 |
if "%1" == "-prefix" goto prefixTag
|
|
89 |
if "%1" == "-libdir" goto libTag
|
|
90 |
if "%1" == "-bindir" goto binTag
|
|
91 |
if "%1" == "-headerdir" goto headerTag
|
|
92 |
if "%1" == "-plugindir" goto pluginTag
|
|
93 |
if "%1" == "-tests" goto testTag
|
|
94 |
if "%1" == "-examples" goto exampleTag
|
|
95 |
if "%1" == "-qt" goto qtTag
|
|
96 |
if "%1" == "-vc" goto vcTag
|
|
97 |
if "%1" == "-no-docs" goto nodocsTag
|
|
98 |
if "%1" == "-no-tools" goto noToolsTag
|
|
99 |
if "%1" == "-modules" goto modulesTag
|
|
100 |
if "%1" == "/?" goto usage
|
|
101 |
if "%1" == "-h" goto usage
|
|
102 |
if "%1" == "-help" goto usage
|
|
103 |
if "%1" == "--help" goto usage
|
|
104 |
if "%1" == "-symbian-unfrozen" goto unfrozenTag
|
|
105 |
|
|
106 |
|
|
107 |
echo Unknown option: "%1"
|
|
108 |
goto usage
|
|
109 |
|
|
110 |
:usage
|
|
111 |
echo Usage: configure.bat [-prefix (dir)] [headerdir (dir)] [libdir (dir)]
|
|
112 |
echo [-bindir (dir)] [-tests] [-examples]
|
|
113 |
echo [-debug] [-release] [-silent]
|
|
114 |
echo.
|
|
115 |
echo Options:
|
|
116 |
echo.
|
|
117 |
echo -prefix (dir) ..... This will install everything relative to dir
|
|
118 |
echo (default prefix: C:\QtMobility)
|
|
119 |
echo -headerdir (dir) .. Header files will be installed to dir
|
|
120 |
echo (default prefix: PREFIX/include)
|
|
121 |
echo -libdir (dir) ..... Libraries will be installed to dir
|
|
122 |
echo (default PREFIX/lib)
|
|
123 |
echo -bindir (dir) ..... Executables will be installed to dir
|
|
124 |
echo (default PREFIX/bin)
|
|
125 |
echo -plugindir (dir) .. Plug-ins will be installed to dir
|
|
126 |
echo (default PREFIX/plugins)
|
|
127 |
echo -debug ............ Build with debugging symbols
|
|
128 |
echo -release .......... Build without debugging symbols
|
|
129 |
echo -silent ........... Reduces build output
|
|
130 |
echo -tests ............ Build unit tests (not build by default)
|
|
131 |
echo Note, this adds test symbols to all libraries
|
|
132 |
echo and should not be used for release builds.
|
|
133 |
echo -examples ......... Build example applications
|
|
134 |
echo -no-docs .......... Do not build documentation (build by default)
|
|
135 |
echo -modules ^<list^> ... Build only the specified modules (default all)
|
|
136 |
echo Choose from: bearer contacts location publishsubscribe
|
|
137 |
echo messaging multimedia systeminfo serviceframework versit
|
|
138 |
echo sensors
|
|
139 |
echo Modules should be separated by a space and surrounded
|
|
140 |
echo by double quotation. If a
|
|
141 |
echo selected module depends on other modules dependencies
|
|
142 |
echo will automatically be enabled.
|
|
143 |
echo -vc ............... Generate Visual Studio make files
|
|
144 |
|
|
145 |
|
|
146 |
if exist "%PROJECT_CONFIG%" del %PROJECT_CONFIG%
|
|
147 |
goto exitTag
|
|
148 |
|
|
149 |
:qtTag
|
|
150 |
shift
|
|
151 |
set QT_PATH=%1\
|
|
152 |
shift
|
|
153 |
goto cmdline_parsing
|
|
154 |
|
|
155 |
:debugTag
|
|
156 |
if "%RELEASEMODE%" == "release" set RELEASEMODE=debug
|
|
157 |
set WIN32_RELEASEMODE=
|
|
158 |
shift
|
|
159 |
goto cmdline_parsing
|
|
160 |
|
|
161 |
:releaseTag
|
|
162 |
if "%RELEASEMODE%" == "debug" set RELEASEMODE=release
|
|
163 |
set WIN32_RELEASEMODE=
|
|
164 |
shift
|
|
165 |
goto cmdline_parsing
|
|
166 |
|
|
167 |
:silentTag
|
|
168 |
echo CONFIG += silent > %PROJECT_CONFIG%
|
|
169 |
shift
|
|
170 |
goto cmdline_parsing
|
|
171 |
|
|
172 |
:prefixTag
|
|
173 |
shift
|
|
174 |
set QT_MOBILITY_PREFIX=%1
|
|
175 |
shift
|
|
176 |
goto cmdline_parsing
|
|
177 |
|
|
178 |
:libTag
|
|
179 |
shift
|
|
180 |
echo QT_MOBILITY_LIB = %1 >> %PROJECT_CONFIG%
|
|
181 |
shift
|
|
182 |
goto cmdline_parsing
|
|
183 |
|
|
184 |
:binTag
|
|
185 |
shift
|
|
186 |
echo QT_MOBILITY_BIN = %1 >> %PROJECT_CONFIG%
|
|
187 |
shift
|
|
188 |
goto cmdline_parsing
|
|
189 |
|
|
190 |
:headerTag
|
|
191 |
shift
|
|
192 |
echo QT_MOBILITY_INCLUDE = %1 >> %PROJECT_CONFIG%
|
|
193 |
shift
|
|
194 |
goto cmdline_parsing
|
|
195 |
|
|
196 |
:pluginTag
|
|
197 |
shift
|
|
198 |
echo QT_MOBILITY_PLUGINS = %1 >> %PROJECT_CONFIG%
|
|
199 |
shift
|
|
200 |
echo
|
|
201 |
goto cmdline_parsing
|
|
202 |
|
|
203 |
:unfrozenTag
|
|
204 |
REM Should never be used in release builds
|
|
205 |
REM Some SDK's seem to exclude Q_AUTOTEST_EXPORT symbols if the
|
|
206 |
REM libraries are frozen. This breaks unit tests relying on the auto test exports
|
|
207 |
REM This flag unfreezes the SYMBIAN libraries for the purpose of unit test building.
|
|
208 |
REM Ideally this should be connected to '-tests' option but that would prevent
|
|
209 |
REM integration testing for frozen symbols as the CI system should test unit tests
|
|
210 |
REM and frozen symbol compliance.
|
|
211 |
echo symbian_symbols_unfrozen = 1 >> %PROJECT_CONFIG%
|
|
212 |
shift
|
|
213 |
goto cmdline_parsing
|
|
214 |
|
|
215 |
:testTag
|
|
216 |
set BUILD_UNITTESTS=yes
|
|
217 |
shift
|
|
218 |
goto cmdline_parsing
|
|
219 |
|
|
220 |
:exampleTag
|
|
221 |
set BUILD_EXAMPLES=yes
|
|
222 |
shift
|
|
223 |
goto cmdline_parsing
|
|
224 |
|
|
225 |
:vcTag
|
|
226 |
shift
|
|
227 |
set VC_TEMPLATE_OPTION=-tp vc
|
|
228 |
goto cmdline_parsing
|
|
229 |
|
|
230 |
:nodocsTag
|
|
231 |
set BUILD_DOCS=no
|
|
232 |
shift
|
|
233 |
goto cmdline_parsing
|
|
234 |
|
|
235 |
:noToolsTag
|
|
236 |
set BUILD_TOOLS=no
|
|
237 |
shift
|
|
238 |
goto cmdline_parsing
|
|
239 |
|
|
240 |
:modulesTag
|
|
241 |
shift
|
|
242 |
:: %1 can have leading/trailing quotes, so we can't use if "%1" == ""
|
|
243 |
if xx%1xx == xxxx (
|
|
244 |
echo. >&2
|
|
245 |
echo >&2The -modules option requires a list of modules.
|
|
246 |
echo. >&2
|
|
247 |
goto usage
|
|
248 |
)
|
|
249 |
|
|
250 |
:: Remove leading/trailing quotes, if we have them
|
|
251 |
set MOBILITY_MODULES_UNPARSED=xxx%1xxx
|
|
252 |
set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:"xxx=%
|
|
253 |
set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:xxx"=%
|
|
254 |
set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:xxx=%
|
|
255 |
|
|
256 |
REM reset default modules as we expect a modules list
|
|
257 |
set MOBILITY_MODULES=
|
|
258 |
|
|
259 |
set CONTACTS_SELECTED=
|
|
260 |
set BEARER_SELECTED=
|
|
261 |
set SYSTEMINFO_SELECTED=
|
|
262 |
set SENSORS_SELECTED=
|
|
263 |
set MESSAGING_SELECTED=
|
|
264 |
set MULTIMEDIA_SELECTED=
|
|
265 |
set LOCATION_SELECTED=
|
|
266 |
echo Checking selected modules:
|
|
267 |
:modulesTag2
|
|
268 |
|
|
269 |
for /f "tokens=1,*" %%a in ("%MOBILITY_MODULES_UNPARSED%") do (
|
|
270 |
set FIRST=%%a
|
|
271 |
set REMAINING=%%b
|
|
272 |
)
|
|
273 |
|
|
274 |
: What we want is a switch as we need to check module name and only want to
|
|
275 |
: distinguish between false and correct module names being passed
|
|
276 |
if %FIRST% == bearer (
|
|
277 |
echo Bearer Management selected
|
|
278 |
set BEARER_SELECTED=yes
|
|
279 |
) else if %FIRST% == contacts (
|
|
280 |
echo Contacts selected
|
|
281 |
set CONTACTS_SELECTED=yes
|
|
282 |
) else if %FIRST% == location (
|
|
283 |
echo Location selected
|
|
284 |
set LOCATION_SELECTED=yes
|
|
285 |
) else if %FIRST% == messaging (
|
|
286 |
echo Messaging selected
|
|
287 |
set MESSAGING_SELECTED=yes
|
|
288 |
) else if %FIRST% == multimedia (
|
|
289 |
echo Multimedia selected
|
|
290 |
set MULTIMEDIA_SELECTED=yes
|
|
291 |
) else if %FIRST% == publishsubscribe (
|
|
292 |
echo PublishSubscribe selected
|
|
293 |
) else if %FIRST% == systeminfo (
|
|
294 |
echo Systeminfo selected
|
|
295 |
set SYSTEMINFO_SELECTED=yes
|
|
296 |
) else if %FIRST% == serviceframework (
|
|
297 |
echo ServiceFramework selected
|
|
298 |
) else if %FIRST% == versit (
|
|
299 |
echo Versit selected ^(implies Contacts^)
|
|
300 |
set CONTACTS_SELECTED=yes
|
|
301 |
) else if %FIRST% == sensors (
|
|
302 |
echo Sensors selected
|
|
303 |
set SENSORS_SELECTED=yes
|
|
304 |
) else (
|
|
305 |
echo Unknown module %FIRST%
|
|
306 |
goto errorTag
|
|
307 |
)
|
|
308 |
|
|
309 |
set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST%
|
|
310 |
|
|
311 |
if "%REMAINING%" == "" (
|
|
312 |
shift
|
|
313 |
) else (
|
|
314 |
set MOBILITY_MODULES_UNPARSED=%REMAINING%
|
|
315 |
goto modulesTag2
|
|
316 |
)
|
|
317 |
|
|
318 |
SET REMAINING=
|
|
319 |
SET FIRST=
|
|
320 |
goto cmdline_parsing
|
|
321 |
|
|
322 |
:startProcessing
|
|
323 |
|
|
324 |
echo CONFIG += %RELEASEMODE% >> %PROJECT_CONFIG%
|
|
325 |
echo CONFIG_WIN32 += %WIN32_RELEASEMODE% %RELEASEMODE% >> %PROJECT_CONFIG%
|
|
326 |
set RELEASEMODE=
|
|
327 |
set WIN32_RELEASEMODE=
|
|
328 |
|
|
329 |
set CURRENTDIR=%CD%
|
|
330 |
echo %CURRENTDIR%
|
|
331 |
if exist %QT_MOBILITY_PREFIX% goto prefixExists
|
|
332 |
mkdir %QT_MOBILITY_PREFIX%
|
|
333 |
if errorlevel 1 goto invalidPrefix
|
|
334 |
cd /D %QT_MOBILITY_PREFIX%
|
|
335 |
set QT_MOBILITY_PREFIX=%CD%
|
|
336 |
cd /D %CURRENTDIR%
|
|
337 |
rd /S /Q %QT_MOBILITY_PREFIX%
|
|
338 |
goto endprefixProcessing
|
|
339 |
|
|
340 |
:invalidPrefix
|
|
341 |
echo "%QT_MOBILITY_PREFIX%" is not a valid directory path.
|
|
342 |
goto :exitTag
|
|
343 |
|
|
344 |
:prefixExists
|
|
345 |
cd /D %QT_MOBILITY_PREFIX%
|
|
346 |
set QT_MOBILITY_PREFIX=%CD%
|
|
347 |
cd /D %CURRENTDIR%
|
|
348 |
|
|
349 |
:endprefixProcessing
|
|
350 |
echo QT_MOBILITY_PREFIX = %QT_MOBILITY_PREFIX% >> %PROJECT_CONFIG%
|
|
351 |
|
|
352 |
echo build_unit_tests = %BUILD_UNITTESTS% >> %PROJECT_CONFIG%
|
|
353 |
set BUILD_UNITTESTS=
|
|
354 |
|
|
355 |
echo build_examples = %BUILD_EXAMPLES% >> %PROJECT_CONFIG%
|
|
356 |
set BUILD_EXAMPLES=
|
|
357 |
|
|
358 |
echo build_docs = %BUILD_DOCS% >> %PROJECT_CONFIG%
|
|
359 |
set BUILD_DOCS=
|
|
360 |
|
|
361 |
echo build_tools = %BUILD_TOOLS% >> %PROJECT_CONFIG%
|
|
362 |
set BUILD_TOOLS=
|
|
363 |
|
|
364 |
echo qmf_enabled = no >> %PROJECT_CONFIG%
|
|
365 |
|
|
366 |
echo !symbian:isEmpty(QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include >> %PROJECT_CONFIG%
|
|
367 |
echo isEmpty(QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib >> %PROJECT_CONFIG%
|
|
368 |
echo isEmpty(QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin >> %PROJECT_CONFIG%
|
|
369 |
echo isEmpty(QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins >> %PROJECT_CONFIG%
|
|
370 |
|
|
371 |
echo mobility_modules = %MOBILITY_MODULES% >> %PROJECT_CONFIG%
|
|
372 |
REM no Sysinfo support on Maemo yet
|
|
373 |
echo maemo5^|maemo6:mobility_modules -= systeminfo >> %PROJECT_CONFIG%
|
|
374 |
echo contains(mobility_modules,versit): mobility_modules *= contacts >> %PROJECT_CONFIG%
|
|
375 |
|
|
376 |
echo Checking available Qt
|
|
377 |
call %QT_PATH%qmake -v >> %PROJECT_LOG% 2>&1
|
|
378 |
if errorlevel 1 goto qmakeNotFound
|
|
379 |
goto qmakeFound
|
|
380 |
:qmakeNotFound
|
|
381 |
echo ... Not found >> %PROJECT_LOG% 2>&1
|
|
382 |
if "%QT_PATH%" == "" (
|
|
383 |
echo >&2Cannot find 'qmake' in your PATH.
|
|
384 |
echo >&2Your PATH is: %PATH%
|
|
385 |
) else (
|
|
386 |
echo >&2Cannot find 'qmake' in %QT_PATH%.
|
|
387 |
)
|
|
388 |
echo >&2Aborting.
|
|
389 |
goto errorTag
|
|
390 |
|
|
391 |
:qmakeFound
|
|
392 |
call %QT_PATH%qmake -query QT_VERSION
|
|
393 |
|
|
394 |
goto checkMake
|
|
395 |
|
|
396 |
:makeTest
|
|
397 |
setlocal
|
|
398 |
set CURRENT_PWD=%CD%
|
|
399 |
|
|
400 |
if %BUILD_PATH% == %SOURCE_PATH% (
|
|
401 |
cd %SOURCE_PATH%\config.tests\make
|
|
402 |
if exist make del make
|
|
403 |
) else (
|
|
404 |
rmdir /S /Q config.tests\make
|
|
405 |
mkdir config.tests\make
|
|
406 |
cd config.tests\make
|
|
407 |
)
|
|
408 |
|
|
409 |
for /f "tokens=2,3" %%a in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do (
|
|
410 |
if "%%a" == "MESSAGE:" (
|
|
411 |
set BUILDSYSTEM=%%b)
|
|
412 |
)
|
|
413 |
|
|
414 |
if "%BUILDSYSTEM%" == "symbian-abld" (
|
|
415 |
call make -h >> %PROJECT_LOG% 2>&1
|
|
416 |
if not errorlevel 1 (
|
|
417 |
echo ... Symbian abld make found.
|
|
418 |
set MAKE=make
|
|
419 |
)
|
|
420 |
) else if "%BUILDSYSTEM%" == "symbian-sbsv2" (
|
|
421 |
call make -h >> %PROJECT_LOG% 2>&1
|
|
422 |
if not errorlevel 1 (
|
|
423 |
echo ... Symbian sbsv2 make found.
|
|
424 |
set MAKE=make
|
|
425 |
)
|
|
426 |
) else if "%BUILDSYSTEM%" == "win32-nmake" (
|
|
427 |
call nmake /? >> %PROJECT_LOG% 2>&1
|
|
428 |
if not errorlevel 1 (
|
|
429 |
echo ... nmake found.
|
|
430 |
set MAKE=nmake
|
|
431 |
)
|
|
432 |
) else if "%BUILDSYSTEM%" == "win32-mingw" (
|
|
433 |
call mingw32-make -v >> %PROJECT_LOG% 2>&1
|
|
434 |
if not errorlevel 1 (
|
|
435 |
echo ... mingw32-make found.
|
|
436 |
set MAKE=mingw32-make
|
|
437 |
)
|
|
438 |
) else (
|
|
439 |
echo ... Unknown target environment %BUILDSYSTEM%.
|
|
440 |
)
|
|
441 |
call cd %CURRENT_PWD%
|
|
442 |
call endlocal&set %1=%MAKE%&set %2=%BUILDSYSTEM%&goto :EOF
|
|
443 |
|
|
444 |
:checkMake
|
|
445 |
echo Checking make
|
|
446 |
call :makeTest MOBILITY_MAKE MOBILITY_BUILDSYSTEM
|
|
447 |
if not "%MOBILITY_MAKE%" == "" goto compileTests
|
|
448 |
|
|
449 |
echo >&2Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH
|
|
450 |
echo >&2Aborting.
|
|
451 |
goto errorTag
|
|
452 |
|
|
453 |
:compileTest
|
|
454 |
setlocal
|
|
455 |
@echo off
|
|
456 |
echo Checking %1
|
|
457 |
set CURRENT_PWD=%CD%
|
|
458 |
|
|
459 |
if %BUILD_PATH% == %SOURCE_PATH% (
|
|
460 |
cd %SOURCE_PATH%\config.tests\%2
|
|
461 |
if exist %2 del %2
|
|
462 |
) else (
|
|
463 |
rmdir /S /Q config.tests\%2
|
|
464 |
mkdir config.tests\%2
|
|
465 |
cd config.tests\%2
|
|
466 |
)
|
|
467 |
|
|
468 |
call %QT_PATH%qmake %SOURCE_PATH%\config.tests\%2\%2.pro >> %PROJECT_LOG% 2>&1
|
|
469 |
|
|
470 |
set FAILED=0
|
|
471 |
if "%MOBILITY_BUILDSYSTEM%" == "symbian-sbsv2" (
|
|
472 |
call %MOBILITY_MAKE% release-armv5 >> %PROJECT_LOG% 2>&1
|
|
473 |
for /f "tokens=2" %%i in ('%MOBILITY_MAKE% release-armv5 SBS^="@sbs --check"') do set FAILED=1
|
|
474 |
call %MOBILITY_MAKE% clean >> %PROJECT_LOG% 2>&1
|
|
475 |
) else if "%MOBILITY_BUILDSYSTEM%" == "symbian-abld" (
|
|
476 |
call %MOBILITY_MAKE% release-gcce >> %PROJECT_LOG% 2>&1
|
|
477 |
for /f "tokens=2" %%i in ('%MOBILITY_MAKE% release-gcce ABLD^="@ABLD.BAT -c" 2^>^&1') do if not %%i == bldfiles set FAILED=1
|
|
478 |
call %MOBILITY_MAKE% clean >> %PROJECT_LOG% 2>&1
|
|
479 |
) else {
|
|
480 |
REM Make for other builds
|
|
481 |
call %MOBILITY_MAKE% >> %PROJECT_LOG% 2>&1
|
|
482 |
REM have to check error level for windows / other builds to be sure.
|
|
483 |
if errorlevel 1 (
|
|
484 |
set FAILED=1
|
|
485 |
)
|
|
486 |
)
|
|
487 |
|
|
488 |
if %FAILED% == 0 (
|
|
489 |
echo ... OK
|
|
490 |
echo %2_enabled = yes >> %PROJECT_CONFIG%
|
|
491 |
) else (
|
|
492 |
echo ... Not Found
|
|
493 |
echo %2_enabled = no >> %PROJECT_CONFIG%
|
|
494 |
)
|
|
495 |
|
|
496 |
cd %CURRENT_PWD%
|
|
497 |
endlocal&goto :EOF
|
|
498 |
|
|
499 |
:compileTests
|
|
500 |
|
|
501 |
echo.
|
|
502 |
echo Start of compile tests
|
|
503 |
REM compile tests go here.
|
|
504 |
for /f "tokens=3" %%i in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do set BUILDSYSTEM=%%i
|
|
505 |
if "%BUILDSYSTEM%" == "symbian-abld" goto symbianTests
|
|
506 |
if "%BUILDSYSTEM%" == "symbian-sbsv2" goto symbianTests
|
|
507 |
goto windowsTests
|
|
508 |
|
|
509 |
:symbianTests
|
|
510 |
|
|
511 |
if "%MULTIMEDIA_SELECTED%" == "yes" (
|
|
512 |
call :compileTest Audiorouting_s60 audiorouting_s60
|
|
513 |
call :compileTest Tunerlibrary_for_3.1 tunerlib_s60
|
|
514 |
call :compileTest RadioUtility_for_post_3.1 radioutility_s60
|
|
515 |
call :compileTest OpenMaxAl_support openmaxal_symbian
|
|
516 |
call :compileTest Surfaces_s60 surfaces_s60
|
|
517 |
)
|
|
518 |
if "%CONTACTS_SELECTED%" == "yes" (
|
|
519 |
call :compileTest SymbianContactSIM symbiancntsim
|
|
520 |
)
|
|
521 |
if "%BEARER_SELECTED%" == "yes" (
|
|
522 |
call :compileTest SNAP snap
|
|
523 |
call :compileTest OCC occ
|
|
524 |
)
|
|
525 |
if "%SENSORS_SELECTED%" == "yes" (
|
|
526 |
call :compileTest S60_Sensor_API sensors_s60_31
|
|
527 |
call :compileTest Symbian_Sensor_Framework sensors_symbian
|
|
528 |
)
|
|
529 |
if "%MESSAGING_SELECTED%" == "yes" (
|
|
530 |
call :compileTest Symbian_Messaging_Freestyle messaging_freestyle
|
|
531 |
)
|
|
532 |
if "%SYSTEMINFO_SELECTED%" == "yes" (
|
|
533 |
call :compileTest Symbian_Hb hb_symbian
|
|
534 |
)
|
|
535 |
if "%LOCATION_SELECTED%" == "yes" (
|
|
536 |
call :compileTest LBT lbt
|
|
537 |
)
|
|
538 |
goto noTests
|
|
539 |
|
|
540 |
:windowsTests
|
|
541 |
|
|
542 |
if "%MULTIMEDIA_SELECTED%" == "yes" (
|
|
543 |
call :compileTest DirectShow directshow
|
|
544 |
call :compileTest WindowsMediaSDK wmsdk
|
|
545 |
call :compileTest WindowMediaPlayer wmp
|
|
546 |
call :compileTest EnhancedVideoRenderer evr
|
|
547 |
)
|
|
548 |
|
|
549 |
:noTests
|
|
550 |
|
|
551 |
echo End of compile tests
|
|
552 |
echo.
|
|
553 |
echo.
|
|
554 |
|
|
555 |
REM we could skip generating headers if a module is not enabled
|
|
556 |
if not exist "%BUILD_PATH%\features" mkdir %BUILD_PATH%\features
|
|
557 |
copy %SOURCE_PATH%\features\strict_flags.prf %BUILD_PATH%\features
|
|
558 |
echo Generating Mobility Headers...
|
|
559 |
rd /s /q %BUILD_PATH%\include
|
|
560 |
mkdir %BUILD_PATH%\include
|
|
561 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\global
|
|
562 |
|
|
563 |
set MODULES_TEMP=%MOBILITY_MODULES%
|
|
564 |
|
|
565 |
:generateHeaders
|
|
566 |
|
|
567 |
for /f "tokens=1,*" %%a in ("%MODULES_TEMP%") do (
|
|
568 |
set FIRST=%%a
|
|
569 |
set REMAINING=%%b
|
|
570 |
)
|
|
571 |
|
|
572 |
if %FIRST% == bearer (
|
|
573 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtBearer %SOURCE_PATH%\src\bearer
|
|
574 |
) else if %FIRST% == contacts (
|
|
575 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts
|
|
576 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\requests
|
|
577 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\filters
|
|
578 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\details
|
|
579 |
) else if %FIRST% == location (
|
|
580 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtLocation %SOURCE_PATH%\src\location
|
|
581 |
) else if %FIRST% == messaging (
|
|
582 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMessaging %SOURCE_PATH%\src\messaging
|
|
583 |
) else if %FIRST% == multimedia (
|
|
584 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia
|
|
585 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia\audio
|
|
586 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia\video
|
|
587 |
) else if %FIRST% == publishsubscribe (
|
|
588 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtPublishSubscribe %SOURCE_PATH%\src\publishsubscribe
|
|
589 |
) else if %FIRST% == systeminfo (
|
|
590 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtSystemInfo %SOURCE_PATH%\src\systeminfo
|
|
591 |
) else if %FIRST% == serviceframework (
|
|
592 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtServiceFramework %SOURCE_PATH%\src\serviceframework
|
|
593 |
) else if %FIRST% == versit (
|
|
594 |
REM versit implies contacts
|
|
595 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtVersit %SOURCE_PATH%\src\versit
|
|
596 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts
|
|
597 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\requests
|
|
598 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\filters
|
|
599 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\details
|
|
600 |
) else if %FIRST% == sensors (
|
|
601 |
perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtSensors %SOURCE_PATH%\src\sensors
|
|
602 |
)
|
|
603 |
|
|
604 |
if "%REMAINING%" == "" (
|
|
605 |
shift
|
|
606 |
) else (
|
|
607 |
set MODULES_TEMP=%REMAINING%
|
|
608 |
goto generateHeaders
|
|
609 |
)
|
|
610 |
|
|
611 |
SET REMAINING=
|
|
612 |
SET FIRST=
|
|
613 |
SET MODULES_TEMP=
|
|
614 |
|
|
615 |
if exist config.pri del config.pri
|
|
616 |
ren %PROJECT_CONFIG% config.pri
|
|
617 |
|
|
618 |
echo.
|
|
619 |
echo Running qmake...
|
|
620 |
call %QT_PATH%qmake -recursive %VC_TEMPLATE_OPTION% %SOURCE_PATH%\qtmobility.pro
|
|
621 |
if errorlevel 1 goto qmakeRecError
|
|
622 |
echo.
|
|
623 |
echo configure has finished. You may run %MOBILITY_MAKE% to build the project now.
|
|
624 |
goto exitTag
|
|
625 |
|
|
626 |
:qmakeRecError
|
|
627 |
echo.
|
|
628 |
echo configure failed.
|
|
629 |
goto errorTag
|
|
630 |
|
|
631 |
:errorTag
|
|
632 |
set BUILD_PATH=
|
|
633 |
set CURRENTDIR=
|
|
634 |
set MOBILITY_MAKE=
|
|
635 |
set MOBILITY_BUILDSYSTEM=
|
|
636 |
set PROJECT_CONFIG=
|
|
637 |
set PROJECT_LOG=
|
|
638 |
set QT_MOBILITY_PREFIX=
|
|
639 |
set QT_PATH=
|
|
640 |
set SOURCE_PATH=
|
|
641 |
set MOBILITY_MODULES=
|
|
642 |
set MOBILITY_MODULES_UNPARSED=
|
|
643 |
SET REMAINING=
|
|
644 |
SET FIRST=
|
|
645 |
SET MODULES_TEMP=
|
|
646 |
set CONTACTS_SELECTED=
|
|
647 |
set BEARER_SELECTED=
|
|
648 |
set SYSTEMINFO_SELECTED=
|
|
649 |
set SENSORS_SELECTED=
|
|
650 |
set MESSAGING_SELECTED=
|
|
651 |
set MULTIMEDIA_SELECTED=
|
|
652 |
set LOCATION_SELECTED=
|
|
653 |
exit /b 1
|
|
654 |
|
|
655 |
:exitTag
|
|
656 |
set BUILD_PATH=
|
|
657 |
set CURRENTDIR=
|
|
658 |
set MOBILITY_MAKE=
|
|
659 |
set MOBILITY_BUILDSYSTEM=
|
|
660 |
set PROJECT_CONFIG=
|
|
661 |
set PROJECT_LOG=
|
|
662 |
set QT_MOBILITY_PREFIX=
|
|
663 |
set QT_PATH=
|
|
664 |
set SOURCE_PATH=
|
|
665 |
set MOBILITY_MODULES=
|
|
666 |
set MOBILITY_MODULES_UNPARSED=
|
|
667 |
SET REMAINING=
|
|
668 |
SET FIRST=
|
|
669 |
SET MODULES_TEMP=
|
|
670 |
set CONTACTS_SELECTED=
|
|
671 |
set BEARER_SELECTED=
|
|
672 |
set SYSTEMINFO_SELECTED=
|
|
673 |
set SENSORS_SELECTED=
|
|
674 |
set MESSAGING_SELECTED=
|
|
675 |
set MULTIMEDIA_SELECTED=
|
|
676 |
set LOCATION_SELECTED=
|
|
677 |
exit /b 0
|