Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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