Changeset 846 for trunk/tools/configure/configureapp.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/configure/configureapp.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 62 62 QT_BEGIN_NAMESPACE 63 63 64 std::ostream &operator<<( std::ostream &s, const QString &val) {64 std::ostream &operator<<() { 65 65 s << val.toLocal8Bit().data(); 66 66 return s; … … 90 90 } 91 91 92 Configure::Configure( int& argc, char** argv)92 Configure::Configure() 93 93 { 94 94 useUnixSeparators = false; … … 112 112 dictionary[ "CONFIGCMD" ] = argv[ 0 ]; 113 113 114 for ( i = 1; i < argc; i++)114 for () 115 115 configCmdLine += argv[ i ]; 116 116 … … 128 128 const QString installPath = buildPath; 129 129 #endif 130 if (sourceDir != buildDir) { //shadow builds!130 if(sourceDir != buildDir) { //shadow builds! 131 131 if (!findFile("perl") && !findFile("perl.exe")) { 132 132 cout << "Error: Creating a shadow build of Qt requires" << endl … … 141 141 QStack<QString> qmake_dirs; 142 142 qmake_dirs.push("qmake"); 143 while (!qmake_dirs.isEmpty()) {143 while(!qmake_dirs.isEmpty()) { 144 144 QString dir = qmake_dirs.pop(); 145 145 QString od(buildPath + "/" + dir); 146 146 QString id(sourcePath + "/" + dir); 147 147 QFileInfoList entries = QDir(id).entryInfoList(QDir::NoDotAndDotDot|QDir::AllEntries); 148 for (int i = 0; i < entries.size(); ++i) {148 for(int i = 0; i < entries.size(); ++i) { 149 149 QFileInfo fi(entries.at(i)); 150 if (fi.isDir()) {150 if(fi.isDir()) { 151 151 qmake_dirs.push(dir + "/" + fi.fileName()); 152 152 QDir().mkpath(od + "/" + fi.fileName()); 153 153 } else { 154 QDir().mkpath(od 154 QDir().mkpath(od); 155 155 bool justCopy = true; 156 156 const QString fname = fi.fileName(); 157 157 const QString outFile(od + "/" + fname), inFile(id + "/" + fname); 158 if (fi.fileName() == "Makefile") { //ignore159 } else if (fi.suffix() == "h" || fi.suffix() == "cpp") {158 if(fi.fileName() == "Makefile") { //ignore 159 } else if(fi.suffix() == "h" || fi.suffix() == "cpp") { 160 160 QTemporaryFile tmpFile; 161 if (tmpFile.open()) {161 if(tmpFile.open()) { 162 162 QTextStream stream(&tmpFile); 163 163 stream << "#include \"" << inFile << "\"" << endl; … … 165 165 stream.flush(); 166 166 tmpFile.flush(); 167 if (filesDiffer(tmpFile.fileName(), outFile)) {167 if(filesDiffer(tmpFile.fileName(), outFile)) { 168 168 QFile::remove(outFile); 169 169 tmpFile.copy(outFile); … … 171 171 } 172 172 } 173 if (justCopy && filesDiffer(inFile, outFile))173 if(justCopy && filesDiffer(inFile, outFile)) 174 174 QFile::copy(inFile, outFile); 175 175 } … … 180 180 { //make a syncqt script(s) that can be used in the shadow 181 181 QFile syncqt(buildPath + "/bin/syncqt"); 182 if (syncqt.open(QFile::WriteOnly)) {182 if(syncqt.open(QFile::WriteOnly)) { 183 183 QTextStream stream(&syncqt); 184 184 stream << "#!/usr/bin/perl -w" << endl … … 186 186 } 187 187 QFile syncqt_bat(buildPath + "/bin/syncqt.bat"); 188 if (syncqt_bat.open(QFile::WriteOnly)) {188 if(syncqt_bat.open(QFile::WriteOnly)) { 189 189 QTextStream stream(&syncqt_bat); 190 190 stream << "@echo off" << endl … … 196 196 } 197 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 198 226 // For Windows CE and shadow builds we need to copy these to the 199 227 // build directory. 200 228 QFile::copy(sourcePath + "/bin/setcepaths.bat" , buildPath + "/bin/setcepaths.bat"); 201 202 229 //copy the mkspecs 203 230 buildDir.mkpath("mkspecs"); 204 if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){231 if(!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ 205 232 cout << "Couldn't copy mkspecs!" << sourcePath << " " << buildPath << endl; 206 233 dictionary["DONE"] = "error"; … … 249 276 dictionary[ "MULTIMEDIA" ] = "yes"; 250 277 dictionary[ "AUDIO_BACKEND" ] = "auto"; 278 251 279 dictionary[ "DIRECTSHOW" ] = "no"; 252 280 dictionary[ "WEBKIT" ] = "auto"; 253 281 dictionary[ "DECLARATIVE" ] = "auto"; 282 254 283 dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; 255 284 … … 277 306 { 278 307 QRegExp version_re("([0-9]*)\\.([0-9]*)\\.([0-9]*)(|-.*)"); 279 if (version_re.exactMatch(version)) {308 if(version_re.exactMatch(version)) { 280 309 dictionary[ "VERSION_MAJOR" ] = version_re.cap(1); 281 310 dictionary[ "VERSION_MINOR" ] = version_re.cap(2); … … 314 343 dictionary[ "OPENGL" ] = "yes"; 315 344 dictionary[ "OPENVG" ] = "no"; 316 dictionary[ "IPV6" ] = "yes"; // Always, dynamic ly loaded345 dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded 317 346 dictionary[ "OPENSSL" ] = "auto"; 318 347 dictionary[ "DBUS" ] = "auto"; … … 345 374 QString tmp = dictionary[ "QMAKESPEC" ]; 346 375 if (tmp.contains("\\")) { 347 tmp = tmp.mid( tmp.lastIndexOf( "\\" ) + 1);376 tmp = tmp.mid(); 348 377 } else { 349 tmp = tmp.mid( tmp.lastIndexOf("/") + 1);378 tmp = tmp.mid(); 350 379 } 351 380 dictionary[ "QMAKESPEC" ] = tmp; … … 354 383 dictionary[ "LTCG" ] = "no"; 355 384 dictionary[ "NATIVE_GESTURES" ] = "yes"; 385 356 386 } 357 387 … … 365 395 } 366 396 367 QString Configure::fixSeparators(QString somePath) 368 { 369 return useUnixSeparators ? 370 QDir::fromNativeSeparators(somePath) : 371 QDir::toNativeSeparators(somePath); 397 QString Configure::fixSeparators(const QString &somePath, bool escape) 398 { 399 if (useUnixSeparators) 400 return QDir::fromNativeSeparators(somePath); 401 QString ret = QDir::toNativeSeparators(somePath); 402 return escape ? escapeSeparators(ret) : ret; 403 } 404 405 QString Configure::escapeSeparators(const QString &somePath) 406 { 407 QString out = somePath; 408 out.replace(QLatin1Char('\\'), QLatin1String("\\\\")); 409 return out; 372 410 } 373 411 … … 404 442 if (argCount < 1) // skip rest if no arguments 405 443 ; 406 else if ( configCmdLine.at(i) == "-redo") {444 else if) { 407 445 dictionary[ "REDO" ] = "yes"; 408 446 configCmdLine.clear(); 409 447 reloadCmdLine(); 410 448 } 411 else if ( configCmdLine.at(i) == "-loadconfig") {449 else if) { 412 450 ++i; 413 451 if (i != argCount) { … … 425 463 426 464 // Look first for XQMAKESPEC 427 for (int j = 0 ; j < argCount; ++j)465 for(int j = 0 ; j < argCount; ++j) 428 466 { 429 if (configCmdLine.at(j) == "-xplatform") {467 ifconfigCmdLine.at(j) == "-xplatform") { 430 468 ++j; 431 469 if (j == argCount) … … 437 475 } 438 476 439 for ( ; i<configCmdLine.size(); ++i) {477 for) { 440 478 bool continueElse[] = {false, false}; 441 if (configCmdLine.at(i) == "-help"479 ifconfigCmdLine.at(i) == "-help" 442 480 || configCmdLine.at(i) == "-h" 443 || configCmdLine.at(i) == "-?" 481 || configCmdLine.at(i) == "-?") 444 482 dictionary[ "HELP" ] = "yes"; 445 483 446 484 #if !defined(EVAL) 447 else if ( configCmdLine.at(i) == "-qconfig") {485 else if) { 448 486 ++i; 449 if (i ==argCount)487 if (iargCount) 450 488 break; 451 489 dictionary[ "QCONFIG" ] = configCmdLine.at(i); 452 490 } 453 491 454 else if ( configCmdLine.at(i) == "-buildkey") {492 else if () { 455 493 ++i; 456 if (i ==argCount)494 if (iargCount) 457 495 break; 458 496 dictionary[ "USER_BUILD_KEY" ] = configCmdLine.at(i); 459 497 } 460 498 461 else if ( configCmdLine.at(i) == "-release") {499 else if) { 462 500 dictionary[ "BUILD" ] = "release"; 463 501 if (dictionary[ "BUILDALL" ] == "auto") 464 502 dictionary[ "BUILDALL" ] = "no"; 465 } else if ( configCmdLine.at(i) == "-debug") {503 } else if) { 466 504 dictionary[ "BUILD" ] = "debug"; 467 505 if (dictionary[ "BUILDALL" ] == "auto") 468 506 dictionary[ "BUILDALL" ] = "no"; 469 } else if ( configCmdLine.at(i) == "-debug-and-release")507 } else if) 470 508 dictionary[ "BUILDALL" ] = "yes"; 471 509 472 else if ( configCmdLine.at(i) == "-shared")510 else if) 473 511 dictionary[ "SHARED" ] = "yes"; 474 else if ( configCmdLine.at(i) == "-static")512 else if) 475 513 dictionary[ "SHARED" ] = "no"; 476 else if ( configCmdLine.at(i) == "-developer-build")514 else if) 477 515 dictionary[ "BUILDDEV" ] = "yes"; 478 else if ( configCmdLine.at(i) == "-nokia-developer") {516 else if) { 479 517 cout << "Detected -nokia-developer option" << endl; 480 518 cout << "Nokia employees and agents are allowed to use this software under" << endl; … … 487 525 } 488 526 } 489 else if ( configCmdLine.at(i) == "-opensource") {527 else if) { 490 528 dictionary[ "BUILDTYPE" ] = "opensource"; 491 529 } 492 else if ( configCmdLine.at(i) == "-commercial") {530 else if) { 493 531 dictionary[ "BUILDTYPE" ] = "commercial"; 494 532 } 495 else if ( configCmdLine.at(i) == "-ltcg") {533 else if) { 496 534 dictionary[ "LTCG" ] = "yes"; 497 535 } 498 else if ( configCmdLine.at(i) == "-no-ltcg") {536 else if) { 499 537 dictionary[ "LTCG" ] = "no"; 500 538 } 539 540 541 542 543 544 545 501 546 #endif 502 547 503 else if ( configCmdLine.at(i) == "-platform") {548 else if) { 504 549 ++i; 505 if (i ==argCount)550 if (iargCount) 506 551 break; 507 552 dictionary[ "QMAKESPEC" ] = configCmdLine.at(i); 508 553 dictionary[ "QMAKESPEC_FROM" ] = "commandline"; 509 } else if ( configCmdLine.at(i) == "-arch") {554 } else if) { 510 555 ++i; 511 if (i ==argCount)556 if (iargCount) 512 557 break; 513 558 dictionary[ "ARCHITECTURE" ] = configCmdLine.at(i); … … 516 561 qtConfig += "boundschecker"; // but also needs this CONFIG option 517 562 } 518 } else if ( configCmdLine.at(i) == "-embedded") {563 } else if) { 519 564 dictionary[ "EMBEDDED" ] = "yes"; 520 } else if (configCmdLine.at(i) == "-xplatform") {565 } else ifconfigCmdLine.at(i) == "-xplatform") { 521 566 ++i; 522 567 // do nothing … … 525 570 526 571 #if !defined(EVAL) 527 else if ( configCmdLine.at(i) == "-no-zlib") {572 else if) { 528 573 // No longer supported since Qt 4.4.0 529 574 // But save the information for later so that we can print a warning … … 537 582 538 583 dictionary[ "ZLIB_FORCED" ] = "yes"; 539 } else if ( configCmdLine.at(i) == "-qt-zlib") {584 } else if) { 540 585 dictionary[ "ZLIB" ] = "qt"; 541 } else if ( configCmdLine.at(i) == "-system-zlib") {586 } else if) { 542 587 dictionary[ "ZLIB" ] = "system"; 543 588 } 544 589 545 590 // Image formats -------------------------------------------- 546 else if ( configCmdLine.at(i) == "-no-gif")591 else if) 547 592 dictionary[ "GIF" ] = "no"; 548 else if( configCmdLine.at(i) == "-qt-gif" ) 549 dictionary[ "GIF" ] = "auto"; 550 551 else if( configCmdLine.at(i) == "-no-libtiff" ) { 552 dictionary[ "TIFF"] = "no"; 553 dictionary[ "LIBTIFF" ] = "no"; 554 } else if( configCmdLine.at(i) == "-qt-libtiff" ) { 555 dictionary[ "TIFF" ] = "plugin"; 593 else if (configCmdLine.at(i) == "-qt-gif") 594 dictionary[ "GIF" ] = "plugin"; 595 596 else if (configCmdLine.at(i) == "-no-libtiff") { 597 dictionary[ "TIFF"] = "no"; 598 dictionary[ "LIBTIFF" ] = "no"; 599 } else if (configCmdLine.at(i) == "-qt-libtiff") { 556 600 dictionary[ "LIBTIFF" ] = "qt"; 557 } else if( configCmdLine.at(i) == "-system-libtiff" ) { 558 dictionary[ "TIFF" ] = "plugin"; 559 dictionary[ "LIBTIFF" ] = "system"; 560 } 561 562 else if( configCmdLine.at(i) == "-no-libjpeg" ) { 601 } else if (configCmdLine.at(i) == "-system-libtiff") { 602 dictionary[ "LIBTIFF" ] = "system"; 603 } 604 605 else if (configCmdLine.at(i) == "-no-libjpeg") { 563 606 dictionary[ "JPEG" ] = "no"; 564 607 dictionary[ "LIBJPEG" ] = "no"; 565 } else if( configCmdLine.at(i) == "-qt-libjpeg" ) { 566 dictionary[ "JPEG" ] = "plugin"; 608 } else if (configCmdLine.at(i) == "-qt-libjpeg") { 567 609 dictionary[ "LIBJPEG" ] = "qt"; 568 } else if( configCmdLine.at(i) == "-system-libjpeg" ) { 569 dictionary[ "JPEG" ] = "plugin"; 610 } else if (configCmdLine.at(i) == "-system-libjpeg") { 570 611 dictionary[ "LIBJPEG" ] = "system"; 571 612 } 572 613 573 else if ( configCmdLine.at(i) == "-no-libpng") {614 else if) { 574 615 dictionary[ "PNG" ] = "no"; 575 616 dictionary[ "LIBPNG" ] = "no"; 576 } else if( configCmdLine.at(i) == "-qt-libpng" ) { 577 dictionary[ "PNG" ] = "qt"; 617 } else if (configCmdLine.at(i) == "-qt-libpng") { 578 618 dictionary[ "LIBPNG" ] = "qt"; 579 } else if( configCmdLine.at(i) == "-system-libpng" ) { 580 dictionary[ "PNG" ] = "qt"; 619 } else if (configCmdLine.at(i) == "-system-libpng") { 581 620 dictionary[ "LIBPNG" ] = "system"; 582 621 } 583 622 584 else if ( configCmdLine.at(i) == "-no-libmng") {623 else if) { 585 624 dictionary[ "MNG" ] = "no"; 586 625 dictionary[ "LIBMNG" ] = "no"; 587 } else if( configCmdLine.at(i) == "-qt-libmng" ) { 588 dictionary[ "MNG" ] = "qt"; 626 } else if (configCmdLine.at(i) == "-qt-libmng") { 589 627 dictionary[ "LIBMNG" ] = "qt"; 590 } else if( configCmdLine.at(i) == "-system-libmng" ) { 591 dictionary[ "MNG" ] = "qt"; 628 } else if (configCmdLine.at(i) == "-system-libmng") { 592 629 dictionary[ "LIBMNG" ] = "system"; 593 630 } 594 631 595 632 // Text Rendering -------------------------------------------- 596 else if ( configCmdLine.at(i) == "-no-freetype")633 else if) 597 634 dictionary[ "FREETYPE" ] = "no"; 598 else if ( configCmdLine.at(i) == "-qt-freetype")635 else if) 599 636 dictionary[ "FREETYPE" ] = "yes"; 600 637 601 638 // CE- C runtime -------------------------------------------- 602 else if ( configCmdLine.at(i) == "-crt") {639 else if) { 603 640 ++i; 604 if (i ==argCount)641 if (iargCount) 605 642 break; 606 643 QDir cDir(configCmdLine.at(i)); … … 626 663 } 627 664 // Qt/CE - signing tool ------------------------------------- 628 else if (configCmdLine.at(i) == "-signature") {665 else ifconfigCmdLine.at(i) == "-signature") { 629 666 ++i; 630 if (i ==argCount)667 if (iargCount) 631 668 break; 632 669 QFileInfo info(configCmdLine.at(i)); … … 637 674 } 638 675 // Styles --------------------------------------------------- 639 else if ( configCmdLine.at(i) == "-qt-style-windows")676 else if) 640 677 dictionary[ "STYLE_WINDOWS" ] = "yes"; 641 else if ( configCmdLine.at(i) == "-no-style-windows")678 else if) 642 679 dictionary[ "STYLE_WINDOWS" ] = "no"; 643 680 644 else if ( configCmdLine.at(i) == "-qt-style-windowsce")681 else if) 645 682 dictionary[ "STYLE_WINDOWSCE" ] = "yes"; 646 else if ( configCmdLine.at(i) == "-no-style-windowsce")683 else if) 647 684 dictionary[ "STYLE_WINDOWSCE" ] = "no"; 648 else if ( configCmdLine.at(i) == "-qt-style-windowsmobile")685 else if) 649 686 dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes"; 650 else if ( configCmdLine.at(i) == "-no-style-windowsmobile")687 else if) 651 688 dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; 652 689 653 else if ( configCmdLine.at(i) == "-qt-style-windowsxp")690 else if) 654 691 dictionary[ "STYLE_WINDOWSXP" ] = "yes"; 655 else if ( configCmdLine.at(i) == "-no-style-windowsxp")692 else if) 656 693 dictionary[ "STYLE_WINDOWSXP" ] = "no"; 657 694 658 else if ( configCmdLine.at(i) == "-qt-style-windowsvista")695 else if) 659 696 dictionary[ "STYLE_WINDOWSVISTA" ] = "yes"; 660 else if ( configCmdLine.at(i) == "-no-style-windowsvista")697 else if) 661 698 dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; 662 699 663 else if ( configCmdLine.at(i) == "-qt-style-plastique")700 else if) 664 701 dictionary[ "STYLE_PLASTIQUE" ] = "yes"; 665 else if ( configCmdLine.at(i) == "-no-style-plastique")702 else if) 666 703 dictionary[ "STYLE_PLASTIQUE" ] = "no"; 667 704 668 else if ( configCmdLine.at(i) == "-qt-style-cleanlooks")705 else if) 669 706 dictionary[ "STYLE_CLEANLOOKS" ] = "yes"; 670 else if ( configCmdLine.at(i) == "-no-style-cleanlooks")707 else if) 671 708 dictionary[ "STYLE_CLEANLOOKS" ] = "no"; 672 709 673 else if ( configCmdLine.at(i) == "-qt-style-motif")710 else if) 674 711 dictionary[ "STYLE_MOTIF" ] = "yes"; 675 else if ( configCmdLine.at(i) == "-no-style-motif")712 else if) 676 713 dictionary[ "STYLE_MOTIF" ] = "no"; 677 714 678 else if ( configCmdLine.at(i) == "-qt-style-cde")715 else if) 679 716 dictionary[ "STYLE_CDE" ] = "yes"; 680 else if ( configCmdLine.at(i) == "-no-style-cde")717 else if) 681 718 dictionary[ "STYLE_CDE" ] = "no"; 682 719 683 else if ( configCmdLine.at(i) == "-qt-style-s60")720 else if) 684 721 dictionary[ "STYLE_S60" ] = "yes"; 685 else if ( configCmdLine.at(i) == "-no-style-s60")722 else if) 686 723 dictionary[ "STYLE_S60" ] = "no"; 687 724 688 725 // Qt 3 Support --------------------------------------------- 689 else if ( configCmdLine.at(i) == "-no-qt3support")726 else if) 690 727 dictionary[ "QT3SUPPORT" ] = "no"; 691 728 … … 697 734 698 735 // OpenGL Support ------------------------------------------- 699 else if ( configCmdLine.at(i) == "-no-opengl") {736 else if) { 700 737 dictionary[ "OPENGL" ] = "no"; 701 } else if ( configCmdLine.at(i) == "-opengl-es-cm") {738 } else if () { 702 739 dictionary[ "OPENGL" ] = "yes"; 703 740 dictionary[ "OPENGL_ES_CM" ] = "yes"; 704 } else if ( configCmdLine.at(i) == "-opengl-es-cl" ) { 705 dictionary[ "OPENGL" ] = "yes"; 706 dictionary[ "OPENGL_ES_CL" ] = "yes"; 707 } else if ( configCmdLine.at(i) == "-opengl-es-2" ) { 741 } else if (configCmdLine.at(i) == "-opengl-es-2") { 708 742 dictionary[ "OPENGL" ] = "yes"; 709 743 dictionary[ "OPENGL_ES_2" ] = "yes"; 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 710 761 } 711 762 712 763 // OpenVG Support ------------------------------------------- 713 else if ( configCmdLine.at(i) == "-openvg") {764 else if) { 714 765 dictionary[ "OPENVG" ] = "yes"; 715 } else if ( configCmdLine.at(i) == "-no-openvg") {766 } else if) { 716 767 dictionary[ "OPENVG" ] = "no"; 717 768 } 718 769 719 770 // Databases ------------------------------------------------ 720 else if ( configCmdLine.at(i) == "-qt-sql-mysql")771 else if) 721 772 dictionary[ "SQL_MYSQL" ] = "yes"; 722 else if ( configCmdLine.at(i) == "-plugin-sql-mysql")773 else if) 723 774 dictionary[ "SQL_MYSQL" ] = "plugin"; 724 else if ( configCmdLine.at(i) == "-no-sql-mysql")775 else if) 725 776 dictionary[ "SQL_MYSQL" ] = "no"; 726 777 727 else if ( configCmdLine.at(i) == "-qt-sql-odbc")778 else if) 728 779 dictionary[ "SQL_ODBC" ] = "yes"; 729 else if ( configCmdLine.at(i) == "-plugin-sql-odbc")780 else if) 730 781 dictionary[ "SQL_ODBC" ] = "plugin"; 731 else if ( configCmdLine.at(i) == "-no-sql-odbc")782 else if) 732 783 dictionary[ "SQL_ODBC" ] = "no"; 733 784 734 else if ( configCmdLine.at(i) == "-qt-sql-oci")785 else if) 735 786 dictionary[ "SQL_OCI" ] = "yes"; 736 else if ( configCmdLine.at(i) == "-plugin-sql-oci")787 else if) 737 788 dictionary[ "SQL_OCI" ] = "plugin"; 738 else if ( configCmdLine.at(i) == "-no-sql-oci")789 else if) 739 790 dictionary[ "SQL_OCI" ] = "no"; 740 791 741 else if ( configCmdLine.at(i) == "-qt-sql-psql")792 else if) 742 793 dictionary[ "SQL_PSQL" ] = "yes"; 743 else if ( configCmdLine.at(i) == "-plugin-sql-psql")794 else if) 744 795 dictionary[ "SQL_PSQL" ] = "plugin"; 745 else if ( configCmdLine.at(i) == "-no-sql-psql")796 else if) 746 797 dictionary[ "SQL_PSQL" ] = "no"; 747 798 748 else if ( configCmdLine.at(i) == "-qt-sql-tds")799 else if) 749 800 dictionary[ "SQL_TDS" ] = "yes"; 750 else if ( configCmdLine.at(i) == "-plugin-sql-tds")801 else if) 751 802 dictionary[ "SQL_TDS" ] = "plugin"; 752 else if ( configCmdLine.at(i) == "-no-sql-tds")803 else if) 753 804 dictionary[ "SQL_TDS" ] = "no"; 754 805 755 else if ( configCmdLine.at(i) == "-qt-sql-db2")806 else if) 756 807 dictionary[ "SQL_DB2" ] = "yes"; 757 else if ( configCmdLine.at(i) == "-plugin-sql-db2")808 else if) 758 809 dictionary[ "SQL_DB2" ] = "plugin"; 759 else if ( configCmdLine.at(i) == "-no-sql-db2")810 else if) 760 811 dictionary[ "SQL_DB2" ] = "no"; 761 812 762 else if ( configCmdLine.at(i) == "-qt-sql-sqlite")813 else if) 763 814 dictionary[ "SQL_SQLITE" ] = "yes"; 764 else if ( configCmdLine.at(i) == "-plugin-sql-sqlite")815 else if) 765 816 dictionary[ "SQL_SQLITE" ] = "plugin"; 766 else if ( configCmdLine.at(i) == "-no-sql-sqlite")817 else if) 767 818 dictionary[ "SQL_SQLITE" ] = "no"; 768 else if ( configCmdLine.at(i) == "-system-sqlite")819 else if) 769 820 dictionary[ "SQL_SQLITE_LIB" ] = "system"; 770 else if ( configCmdLine.at(i) == "-qt-sql-sqlite2")821 else if) 771 822 dictionary[ "SQL_SQLITE2" ] = "yes"; 772 else if ( configCmdLine.at(i) == "-plugin-sql-sqlite2")823 else if) 773 824 dictionary[ "SQL_SQLITE2" ] = "plugin"; 774 else if ( configCmdLine.at(i) == "-no-sql-sqlite2")825 else if) 775 826 dictionary[ "SQL_SQLITE2" ] = "no"; 776 827 777 else if ( configCmdLine.at(i) == "-qt-sql-ibase")828 else if) 778 829 dictionary[ "SQL_IBASE" ] = "yes"; 779 else if ( configCmdLine.at(i) == "-plugin-sql-ibase")830 else if) 780 831 dictionary[ "SQL_IBASE" ] = "plugin"; 781 else if ( configCmdLine.at(i) == "-no-sql-ibase")832 else if) 782 833 dictionary[ "SQL_IBASE" ] = "no"; 783 834 #endif 784 835 // IDE project generation ----------------------------------- 785 else if ( configCmdLine.at(i) == "-no-dsp")836 else if) 786 837 dictionary[ "DSPFILES" ] = "no"; 787 else if ( configCmdLine.at(i) == "-dsp")838 else if) 788 839 dictionary[ "DSPFILES" ] = "yes"; 789 840 790 else if ( configCmdLine.at(i) == "-no-vcp")841 else if) 791 842 dictionary[ "VCPFILES" ] = "no"; 792 else if ( configCmdLine.at(i) == "-vcp")843 else if) 793 844 dictionary[ "VCPFILES" ] = "yes"; 794 845 795 else if ( configCmdLine.at(i) == "-no-vcproj")846 else if) 796 847 dictionary[ "VCPROJFILES" ] = "no"; 797 else if ( configCmdLine.at(i) == "-vcproj")848 else if) 798 849 dictionary[ "VCPROJFILES" ] = "yes"; 799 850 800 else if ( configCmdLine.at(i) == "-no-incredibuild-xge")851 else if) 801 852 dictionary[ "INCREDIBUILD_XGE" ] = "no"; 802 else if ( configCmdLine.at(i) == "-incredibuild-xge")853 else if) 803 854 dictionary[ "INCREDIBUILD_XGE" ] = "yes"; 804 else if ( configCmdLine.at(i) == "-native-gestures")855 else if) 805 856 dictionary[ "NATIVE_GESTURES" ] = "yes"; 806 else if ( configCmdLine.at(i) == "-no-native-gestures")857 else if) 807 858 dictionary[ "NATIVE_GESTURES" ] = "no"; 808 859 #if !defined(EVAL) 809 860 // Symbian Support ------------------------------------------- 810 else if (configCmdLine.at(i) == "-fpu" 861 else if (configCmdLine.at(i) == "-fpu") 811 862 { 812 863 ++i; 813 if (i==argCount)864 ifargCount) 814 865 break; 815 866 dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i); 816 867 } 817 868 818 else if ( configCmdLine.at(i) == "-s60")869 else if) 819 870 dictionary[ "S60" ] = "yes"; 820 else if ( configCmdLine.at(i) == "-no-s60")871 else if) 821 872 dictionary[ "S60" ] = "no"; 822 873 823 else if ( configCmdLine.at(i) == "-usedeffiles")874 else if) 824 875 dictionary[ "SYMBIAN_DEFFILES" ] = "yes"; 825 else if ( configCmdLine.at(i) == "-no-usedeffiles")876 else if) 826 877 dictionary[ "SYMBIAN_DEFFILES" ] = "no"; 827 878 828 879 // Others --------------------------------------------------- 829 else if (configCmdLine.at(i) == "-fast" 880 else if (configCmdLine.at(i) == "-fast") 830 881 dictionary[ "FAST" ] = "yes"; 831 else if (configCmdLine.at(i) == "-no-fast" 882 else if (configCmdLine.at(i) == "-no-fast") 832 883 dictionary[ "FAST" ] = "no"; 833 884 834 else if ( configCmdLine.at(i) == "-stl")885 else if) 835 886 dictionary[ "STL" ] = "yes"; 836 else if ( configCmdLine.at(i) == "-no-stl")887 else if) 837 888 dictionary[ "STL" ] = "no"; 838 889 839 else if ( configCmdLine.at(i) == "-exceptions")890 else if () 840 891 dictionary[ "EXCEPTIONS" ] = "yes"; 841 else if ( configCmdLine.at(i) == "-no-exceptions")892 else if () 842 893 dictionary[ "EXCEPTIONS" ] = "no"; 843 894 844 else if ( configCmdLine.at(i) == "-rtti")895 else if () 845 896 dictionary[ "RTTI" ] = "yes"; 846 else if ( configCmdLine.at(i) == "-no-rtti")897 else if () 847 898 dictionary[ "RTTI" ] = "no"; 848 899 849 else if ( configCmdLine.at(i) == "-accessibility")900 else if) 850 901 dictionary[ "ACCESSIBILITY" ] = "yes"; 851 else if ( configCmdLine.at(i) == "-no-accessibility") {902 else if) { 852 903 dictionary[ "ACCESSIBILITY" ] = "no"; 853 904 cout << "Setting accessibility to NO" << endl; … … 875 926 dictionary[ "IWMMXT" ] = "yes"; 876 927 877 else if ( configCmdLine.at(i) == "-no-openssl") {928 else if) { 878 929 dictionary[ "OPENSSL"] = "no"; 879 } else if ( configCmdLine.at(i) == "-openssl") {930 } else if) { 880 931 dictionary[ "OPENSSL" ] = "yes"; 881 } else if ( configCmdLine.at(i) == "-openssl-linked") {932 } else if) { 882 933 dictionary[ "OPENSSL" ] = "linked"; 883 } else if ( configCmdLine.at(i) == "-no-qdbus") {934 } else if) { 884 935 dictionary[ "DBUS" ] = "no"; 885 } else if ( configCmdLine.at(i) == "-qdbus") {936 } else if) { 886 937 dictionary[ "DBUS" ] = "yes"; 887 } else if ( configCmdLine.at(i) == "-no-dbus") {938 } else if) { 888 939 dictionary[ "DBUS" ] = "no"; 889 } else if ( configCmdLine.at(i) == "-dbus") {940 } else if) { 890 941 dictionary[ "DBUS" ] = "yes"; 891 } else if ( configCmdLine.at(i) == "-dbus-linked") {942 } else if) { 892 943 dictionary[ "DBUS" ] = "linked"; 893 } else if ( configCmdLine.at(i) == "-no-script") {944 } else if) { 894 945 dictionary[ "SCRIPT" ] = "no"; 895 } else if ( configCmdLine.at(i) == "-script") {946 } else if) { 896 947 dictionary[ "SCRIPT" ] = "yes"; 897 } else if ( configCmdLine.at(i) == "-no-scripttools") {948 } else if) { 898 949 dictionary[ "SCRIPTTOOLS" ] = "no"; 899 } else if ( configCmdLine.at(i) == "-scripttools") {950 } else if) { 900 951 dictionary[ "SCRIPTTOOLS" ] = "yes"; 901 } else if ( configCmdLine.at(i) == "-no-xmlpatterns") {952 } else if) { 902 953 dictionary[ "XMLPATTERNS" ] = "no"; 903 } else if ( configCmdLine.at(i) == "-xmlpatterns") {954 } else if) { 904 955 dictionary[ "XMLPATTERNS" ] = "yes"; 905 } else if ( configCmdLine.at(i) == "-no-multimedia") {956 } else if) { 906 957 dictionary[ "MULTIMEDIA" ] = "no"; 907 } else if ( configCmdLine.at(i) == "-multimedia") {958 } else if) { 908 959 dictionary[ "MULTIMEDIA" ] = "yes"; 909 } else if ( configCmdLine.at(i) == "-audio-backend") {960 } else if) { 910 961 dictionary[ "AUDIO_BACKEND" ] = "yes"; 911 } else if ( configCmdLine.at(i) == "-no-audio-backend") {962 } else if) { 912 963 dictionary[ "AUDIO_BACKEND" ] = "no"; 913 } else if ( configCmdLine.at(i) == "-no-phonon") {964 } else if) { 914 965 dictionary[ "PHONON" ] = "no"; 915 } else if ( configCmdLine.at(i) == "-phonon") {966 } else if) { 916 967 dictionary[ "PHONON" ] = "yes"; 917 } else if ( configCmdLine.at(i) == "-no-phonon-backend") {968 } else if) { 918 969 dictionary[ "PHONON_BACKEND" ] = "no"; 919 } else if ( configCmdLine.at(i) == "-phonon-backend") {970 } else if) { 920 971 dictionary[ "PHONON_BACKEND" ] = "yes"; 921 } else if ( configCmdLine.at(i) == "-phonon-wince-ds9") {972 } else if) { 922 973 dictionary[ "DIRECTSHOW" ] = "yes"; 923 } else if ( configCmdLine.at(i) == "-no-webkit") {974 } else if) { 924 975 dictionary[ "WEBKIT" ] = "no"; 925 } else if ( configCmdLine.at(i) == "-webkit") {976 } else if) { 926 977 dictionary[ "WEBKIT" ] = "yes"; 927 } else if( configCmdLine.at(i) == "-no-declarative" ) { 978 } else if (configCmdLine.at(i) == "-webkit-debug") { 979 dictionary[ "WEBKIT" ] = "debug"; 980 } else if (configCmdLine.at(i) == "-no-declarative") { 928 981 dictionary[ "DECLARATIVE" ] = "no"; 929 } else if ( configCmdLine.at(i) == "-declarative") {982 } else if) { 930 983 dictionary[ "DECLARATIVE" ] = "yes"; 931 } else if( configCmdLine.at(i) == "-no-plugin-manifests" ) { 984 } else if (configCmdLine.at(i) == "-no-declarative-debug") { 985 dictionary[ "DECLARATIVE_DEBUG" ] = "no"; 986 } else if (configCmdLine.at(i) == "-declarative-debug") { 987 dictionary[ "DECLARATIVE_DEBUG" ] = "yes"; 988 } else if (configCmdLine.at(i) == "-no-plugin-manifests") { 932 989 dictionary[ "PLUGIN_MANIFESTS" ] = "no"; 933 } else if ( configCmdLine.at(i) == "-plugin-manifests") {990 } else if) { 934 991 dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; 935 992 } … … 941 998 } 942 999 943 else if ( configCmdLine.at(i) == "-internal")1000 else if) 944 1001 dictionary[ "QMAKE_INTERNAL" ] = "yes"; 945 1002 946 else if ( configCmdLine.at(i) == "-no-qmake")1003 else if) 947 1004 dictionary[ "BUILD_QMAKE" ] = "no"; 948 else if ( configCmdLine.at(i) == "-qmake")1005 else if) 949 1006 dictionary[ "BUILD_QMAKE" ] = "yes"; 950 1007 951 else if ( configCmdLine.at(i) == "-dont-process")1008 else if) 952 1009 dictionary[ "NOPROCESS" ] = "yes"; 953 else if ( configCmdLine.at(i) == "-process")1010 else if) 954 1011 dictionary[ "NOPROCESS" ] = "no"; 955 1012 956 else if ( configCmdLine.at(i) == "-no-qmake-deps")1013 else if) 957 1014 dictionary[ "DEPENDENCIES" ] = "no"; 958 else if ( configCmdLine.at(i) == "-qmake-deps")1015 else if) 959 1016 dictionary[ "DEPENDENCIES" ] = "yes"; 960 1017 961 1018 962 else if ( configCmdLine.at(i) == "-qtnamespace") {1019 else if) { 963 1020 ++i; 964 if (i==argCount)1021 ifargCount) 965 1022 break; 966 qmakeDefines += "QT_NAMESPACE="+configCmdLine.at(i);967 } else if ( configCmdLine.at(i) == "-qtlibinfix") {1023 configCmdLine.at(i); 1024 } else if) { 968 1025 ++i; 969 if (i==argCount)1026 ifargCount) 970 1027 break; 971 1028 dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i); … … 973 1030 dictionary[ "QT_INSTALL_PLUGINS" ] = 974 1031 QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]); 1032 1033 975 1034 } 976 } else if ( configCmdLine.at(i) == "-D") {1035 } else if) { 977 1036 ++i; 978 if (i ==argCount)1037 if (iargCount) 979 1038 break; 980 1039 qmakeDefines += configCmdLine.at(i); 981 } else if ( configCmdLine.at(i) == "-I") {1040 } else if) { 982 1041 ++i; 983 if (i ==argCount)1042 if (iargCount) 984 1043 break; 985 1044 qmakeIncludes += configCmdLine.at(i); 986 } else if ( configCmdLine.at(i) == "-L") {1045 } else if) { 987 1046 ++i; 988 if (i ==argCount)1047 if (iargCount) 989 1048 break; 990 1049 QFileInfo check(configCmdLine.at(i)); … … 995 1054 } 996 1055 qmakeLibs += QString("-L" + configCmdLine.at(i)); 997 } else if ( configCmdLine.at(i) == "-l") {1056 } else if) { 998 1057 ++i; 999 if (i ==argCount)1058 if (iargCount) 1000 1059 break; 1001 1060 qmakeLibs += QString("-l" + configCmdLine.at(i)); 1002 1061 } else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS=")) { 1003 1062 opensslLibs = configCmdLine.at(i); 1004 } 1005 1006 else if( ( configCmdLine.at(i) == "-override-version" ) || ( configCmdLine.at(i) == "-version-override" ) ){ 1063 } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) { 1064 psqlLibs = configCmdLine.at(i); 1065 } else if (configCmdLine.at(i).startsWith("SYBASE=")) { 1066 sybase = configCmdLine.at(i); 1067 } else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) { 1068 sybaseLibs = configCmdLine.at(i); 1069 } 1070 1071 else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){ 1007 1072 ++i; 1008 if (i ==argCount)1073 if (iargCount) 1009 1074 break; 1010 1075 dictionary[ "VERSION" ] = configCmdLine.at(i); 1011 1076 } 1012 1077 1013 else if ( configCmdLine.at(i) == "-saveconfig") {1078 else if) { 1014 1079 ++i; 1015 if (i ==argCount)1080 if (iargCount) 1016 1081 break; 1017 1082 dictionary[ "CUSTOMCONFIG" ] = "_" + configCmdLine.at(i); … … 1024 1089 else if (configCmdLine.at(i) == "-nomake") { 1025 1090 ++i; 1026 if (i ==argCount)1091 if (iargCount) 1027 1092 break; 1028 1093 disabledBuildParts += configCmdLine.at(i); … … 1030 1095 1031 1096 // Directories ---------------------------------------------- 1032 else if ( configCmdLine.at(i) == "-prefix") {1097 else if) { 1033 1098 ++i; 1034 if (i==argCount)1099 ifargCount) 1035 1100 break; 1036 1101 dictionary[ "QT_INSTALL_PREFIX" ] = configCmdLine.at(i); 1037 1102 } 1038 1103 1039 else if ( configCmdLine.at(i) == "-bindir") {1104 else if) { 1040 1105 ++i; 1041 if (i==argCount)1106 ifargCount) 1042 1107 break; 1043 1108 dictionary[ "QT_INSTALL_BINS" ] = configCmdLine.at(i); 1044 1109 } 1045 1110 1046 else if ( configCmdLine.at(i) == "-libdir") {1111 else if) { 1047 1112 ++i; 1048 if (i==argCount)1113 ifargCount) 1049 1114 break; 1050 1115 dictionary[ "QT_INSTALL_LIBS" ] = configCmdLine.at(i); 1051 1116 } 1052 1117 1053 else if ( configCmdLine.at(i) == "-docdir") {1118 else if) { 1054 1119 ++i; 1055 if (i==argCount)1120 ifargCount) 1056 1121 break; 1057 1122 dictionary[ "QT_INSTALL_DOCS" ] = configCmdLine.at(i); 1058 1123 } 1059 1124 1060 else if ( configCmdLine.at(i) == "-headerdir") {1125 else if) { 1061 1126 ++i; 1062 if (i==argCount)1127 ifargCount) 1063 1128 break; 1064 1129 dictionary[ "QT_INSTALL_HEADERS" ] = configCmdLine.at(i); 1065 1130 } 1066 1131 1067 else if ( configCmdLine.at(i) == "-plugindir") {1132 else if) { 1068 1133 ++i; 1069 if (i==argCount)1134 ifargCount) 1070 1135 break; 1071 1136 dictionary[ "QT_INSTALL_PLUGINS" ] = configCmdLine.at(i); 1072 1137 } 1073 1138 1074 else if ( configCmdLine.at(i) == "-datadir") {1139 else if) { 1075 1140 ++i; 1076 if(i==argCount) 1141 if (i == argCount) 1142 break; 1143 dictionary[ "QT_INSTALL_IMPORTS" ] = configCmdLine.at(i); 1144 } 1145 else if (configCmdLine.at(i) == "-datadir") { 1146 ++i; 1147 if (i == argCount) 1077 1148 break; 1078 1149 dictionary[ "QT_INSTALL_DATA" ] = configCmdLine.at(i); 1079 1150 } 1080 1151 1081 else if ( configCmdLine.at(i) == "-translationdir") {1152 else if) { 1082 1153 ++i; 1083 if (i==argCount)1154 ifargCount) 1084 1155 break; 1085 1156 dictionary[ "QT_INSTALL_TRANSLATIONS" ] = configCmdLine.at(i); 1086 1157 } 1087 1158 1088 else if ( configCmdLine.at(i) == "-examplesdir") {1159 else if) { 1089 1160 ++i; 1090 if (i==argCount)1161 ifargCount) 1091 1162 break; 1092 1163 dictionary[ "QT_INSTALL_EXAMPLES" ] = configCmdLine.at(i); 1093 1164 } 1094 1165 1095 else if ( configCmdLine.at(i) == "-demosdir") {1166 else if) { 1096 1167 ++i; 1097 if (i==argCount)1168 ifargCount) 1098 1169 break; 1099 1170 dictionary[ "QT_INSTALL_DEMOS" ] = configCmdLine.at(i); 1100 1171 } 1101 1172 1102 else if ( configCmdLine.at(i) == "-hostprefix") {1173 else if) { 1103 1174 ++i; 1104 if (i==argCount)1175 ifargCount) 1105 1176 break; 1106 1177 dictionary[ "QT_HOST_PREFIX" ] = configCmdLine.at(i); 1107 1178 } 1108 1179 1109 else if ( configCmdLine.at(i) == "-make") {1180 else if) { 1110 1181 ++i; 1111 if (i==argCount)1182 ifargCount) 1112 1183 break; 1113 1184 dictionary[ "MAKE" ] = configCmdLine.at(i); … … 1121 1192 if (system == QLatin1String("raster") 1122 1193 || system == QLatin1String("opengl") 1123 || system == QLatin1String("openvg")) 1194 || system == QLatin1String("openvg") 1195 || system == QLatin1String("runtime")) 1124 1196 dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i); 1125 1197 } 1126 1198 1127 else if( configCmdLine.at(i).indexOf( QRegExp( "^-(en|dis)able-" ) ) != -1 ) { 1199 else if (configCmdLine.at(i) == "-runtimegraphicssystem") { 1200 ++i; 1201 if (i == argCount) 1202 break; 1203 dictionary["RUNTIME_SYSTEM"] = configCmdLine.at(i); 1204 } 1205 1206 else if (configCmdLine.at(i).indexOf(QRegExp("^-(en|dis)able-")) != -1) { 1128 1207 // Scan to see if any specific modules and drivers are enabled or disabled 1129 for ( QStringList::Iterator module = modules.begin(); module != modules.end(); ++module) {1130 if ( configCmdLine.at(i) == QString( "-enable-" ) + (*module)) {1208 for) { 1209 if) { 1131 1210 enabledModules += (*module); 1132 1211 break; 1133 1212 } 1134 else if ( configCmdLine.at(i) == QString( "-disable-" ) + (*module)) {1213 else if) { 1135 1214 disabledModules += (*module); 1136 1215 break; … … 1166 1245 cout << "See the README file for a list of supported operating systems and compilers." << endl; 1167 1246 } else { 1168 if( dictionary[ "QMAKESPEC" ].endsWith( "-icc" ) || 1169 dictionary[ "QMAKESPEC" ].endsWith( "-msvc" ) || 1170 dictionary[ "QMAKESPEC" ].endsWith( "-msvc.net" ) || 1171 dictionary[ "QMAKESPEC" ].endsWith( "-msvc2002" ) || 1172 dictionary[ "QMAKESPEC" ].endsWith( "-msvc2003" ) || 1173 dictionary[ "QMAKESPEC" ].endsWith( "-msvc2005" ) || 1174 dictionary[ "QMAKESPEC" ].endsWith( "-msvc2008" )) { 1175 if ( dictionary[ "MAKE" ].isEmpty() ) dictionary[ "MAKE" ] = "nmake"; 1247 if (dictionary[ "QMAKESPEC" ].endsWith("-icc") || 1248 dictionary[ "QMAKESPEC" ].endsWith("-msvc") || 1249 dictionary[ "QMAKESPEC" ].endsWith("-msvc.net") || 1250 dictionary[ "QMAKESPEC" ].endsWith("-msvc2002") || 1251 dictionary[ "QMAKESPEC" ].endsWith("-msvc2003") || 1252 dictionary[ "QMAKESPEC" ].endsWith("-msvc2005") || 1253 dictionary[ "QMAKESPEC" ].endsWith("-msvc2008") || 1254 dictionary[ "QMAKESPEC" ].endsWith("-msvc2010")) { 1255 if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; 1176 1256 dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; 1177 } else if ( dictionary[ "QMAKESPEC" ] == QString( "win32-g++" )) {1178 if ( dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "mingw32-make";1257 } else if () { 1258 if () dictionary[ "MAKE" ] = "mingw32-make"; 1179 1259 if (Environment::detectExecutable("sh.exe")) { 1180 1260 dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++-sh"; … … 1183 1263 } 1184 1264 } else { 1185 if ( dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "make";1265 if () dictionary[ "MAKE" ] = "make"; 1186 1266 dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; 1187 1267 } … … 1239 1319 1240 1320 #if !defined(EVAL) 1241 for ( QStringList::Iterator dis = disabledModules.begin(); dis != disabledModules.end(); ++dis) {1242 modules.removeAll( (*dis));1243 } 1244 for ( QStringList::Iterator ena = enabledModules.begin(); ena != enabledModules.end(); ++ena) {1245 if ( modules.indexOf( (*ena) ) == -1)1321 for) { 1322 modules.removeAll(); 1323 } 1324 for) { 1325 if) 1246 1326 modules += (*ena); 1247 1327 } 1248 1328 qtConfig += modules; 1249 1329 1250 for ( QStringList::Iterator it = disabledModules.begin(); it != disabledModules.end(); ++it)1330 for) 1251 1331 qtConfig.removeAll(*it); 1252 1332 1253 if ( ( dictionary[ "REDO" ] != "yes" ) && ( dictionary[ "HELP" ] != "yes" ))1333 if) 1254 1334 saveCmdLine(); 1255 1335 #endif … … 1271 1351 1272 1352 QStringList::Iterator it; 1273 for ( it = stringList.begin(); it != stringList.end(); ++it)1353 for) 1274 1354 allConfigs << it->remove("qconfig-").remove(".h"); 1275 1355 allConfigs << "full"; … … 1292 1372 // If the internal configurations failed, try others. 1293 1373 QStringList::Iterator config; 1294 for ( config = allConfigs.begin(); config != allConfigs.end(); ++config) {1295 if ( (*config) == dictionary[ "QCONFIG" ])1374 for) { 1375 if) 1296 1376 break; 1297 1377 } 1298 if ( config == allConfigs.end()) {1378 if) { 1299 1379 dictionary[ "HELP" ] = "yes"; 1300 1380 cout << "No such configuration \"" << qPrintable(dictionary[ "QCONFIG" ]) << "\"" << endl ; … … 1449 1529 dictionary[ "QT_INSTALL_PREFIX" ] = ""; 1450 1530 1451 } else if (dictionary[ "XQMAKESPEC" ].startsWith("symbian")) {1531 } else if(dictionary[ "XQMAKESPEC" ].startsWith("symbian")) { 1452 1532 dictionary[ "ACCESSIBILITY" ] = "no"; 1453 1533 dictionary[ "STYLE_WINDOWSXP" ] = "no"; … … 1464 1544 dictionary[ "OPENGL" ] = "no"; 1465 1545 dictionary[ "OPENSSL" ] = "yes"; 1546 1547 1548 1549 1466 1550 dictionary[ "STL" ] = "yes"; 1467 1551 dictionary[ "EXCEPTIONS" ] = "yes"; … … 1489 1573 dictionary[ "QT_INSTALL_PREFIX" ] = ""; 1490 1574 dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; 1575 1491 1576 dictionary[ "QT_INSTALL_TRANSLATIONS" ] = "\\resource\\qt\\translations"; 1492 1577 dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; … … 1497 1582 disabledBuildParts << "docs" << "translations"; 1498 1583 1499 } else if (dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong.1584 } else if(dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. 1500 1585 //TODO 1501 1586 dictionary[ "STYLE_WINDOWSXP" ] = "no"; … … 1517 1602 1518 1603 dictionary["DECORATIONS"] = "default windows styled"; 1519 dictionary[ "QMAKEADDITIONALARGS" ] = "-unix";1520 1604 } 1521 1605 } … … 1524 1608 { 1525 1609 QDir d; 1526 for ( QStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it) {1610 for) { 1527 1611 // Remove any leading or trailing ", this is commonly used in the environment 1528 1612 // variables 1529 1613 QString path = (*it); 1530 if ( path.startsWith( "\"" ))1531 path = path.right( path.length() - 1);1532 if ( path.endsWith( "\"" ))1533 path = path.left( path.length() - 1);1534 if ( d.exists(path + QDir::separator() + fileName)) {1614 if () 1615 path = path.right(); 1616 if () 1617 path = path.left(); 1618 if) { 1535 1619 return (path); 1536 1620 } … … 1539 1623 } 1540 1624 1541 QString Configure::locateFile( const QString &fileName)1625 QString Configure::locateFile() 1542 1626 { 1543 1627 QString file = fileName.toLower(); … … 1550 1634 if (file.endsWith(".h")) 1551 1635 paths = QString::fromLocal8Bit(getenv("INCLUDE")).split(splitReg, QString::SkipEmptyParts); 1552 else if ( file.endsWith( ".lib" ))1636 else if () 1553 1637 paths = QString::fromLocal8Bit(getenv("LIB")).split(splitReg, QString::SkipEmptyParts); 1554 1638 else … … 1562 1646 bool Configure::displayHelp() 1563 1647 { 1564 if ( dictionary[ "HELP" ] == "yes") {1648 if) { 1565 1649 desc("Usage: configure [-buildkey <key>]\n" 1566 1650 // desc("Usage: configure [-prefix dir] [-bindir <dir>] [-libdir <dir>]\n" 1567 1651 // "[-docdir <dir>] [-headerdir <dir>] [-plugindir <dir>]\n" 1568 // "[- datadir <dir>] [-translationdir <dir>]\n"1652 // "[-datadir <dir>] [-translationdir <dir>]\n" 1569 1653 // "[-examplesdir <dir>] [-demosdir <dir>][-buildkey <key>]\n" 1570 1654 "[-release] [-debug] [-debug-and-release] [-shared] [-static]\n" … … 1589 1673 "[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n" 1590 1674 "[-no-script] [-script] [-no-scripttools] [-scripttools]\n" 1591 "[-no-webkit] [-webkit] [- graphicssystem raster|opengl|openvg]\n\n", 0, 7);1675 "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7); 1592 1676 1593 1677 desc("Installation options:\n\n"); … … 1606 1690 desc( "-headerdir <dir>", "Headers will be installed to dir\n(default PREFIX/include)"); 1607 1691 desc( "-plugindir <dir>", "Plugins will be installed to dir\n(default PREFIX/plugins)"); 1692 1608 1693 desc( "-datadir <dir>", "Data used by Qt programs will be installed to dir\n(default PREFIX)"); 1609 1694 desc( "-translationdir <dir>","Translations of Qt programs will be installed to dir\n(default PREFIX/translations)\n"); … … 1670 1755 desc("QT3SUPPORT", "no","-no-qt3support", "Disables the Qt 3 support functionality.\n"); 1671 1756 desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n"); 1757 1758 1759 1760 1761 1672 1762 1673 1763 desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n"); … … 1691 1781 desc( "-graphicssystem <sys>", "Specify which graphicssystem should be used.\n" 1692 1782 "Available values for <sys>:"); 1693 desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' '); 1694 desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' '); 1695 desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!", ' '); 1696 1783 desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' '); 1784 desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' '); 1785 desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!\n", ' '); 1697 1786 1698 1787 desc( "-help, -h, -?", "Display this information.\n"); … … 1705 1794 desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n"); 1706 1795 1707 desc("GIF", "no", "-no-gif", "Do not compile the plugin forGIF reading support.");1708 desc("GIF", "auto", "-qt-gif", "Compile the plugin for GIF reading support.\nSee also src/plugins/imageformats/gif/qgifhandler.h\n");1709 1710 desc("LIBPNG", "no", "-no-libpng", "Do not compile inPNG support.");1796 desc("GIF", "no", "-no-gif", "Do not compile GIF reading support."); 1797 desc("GIF", "auto", "-qt-gif", "Compile .h\n"); 1798 1799 desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support."); 1711 1800 desc("LIBPNG", "qt", "-qt-libpng", "Use the libpng bundled with Qt."); 1712 1801 desc("LIBPNG", "system","-system-libpng", "Use libpng from the operating system.\nSee http://www.libpng.org/pub/png\n"); 1713 1802 1714 desc("LIBMNG", "no", "-no-libmng", "Do not compile inMNG support.");1803 desc("LIBMNG", "no", "-no-libmng", "Do not compile MNG support."); 1715 1804 desc("LIBMNG", "qt", "-qt-libmng", "Use the libmng bundled with Qt."); 1716 1805 desc("LIBMNG", "system","-system-libmng", "Use libmng from the operating system.\nSee See http://www.libmng.com\n"); 1717 1806 1718 desc("LIBTIFF", "no", "-no-libtiff", "Do not compile the plugin forTIFF support.");1807 desc("LIBTIFF", "no", "-no-libtiff", "Do not compile TIFF support."); 1719 1808 desc("LIBTIFF", "qt", "-qt-libtiff", "Use the libtiff bundled with Qt."); 1720 1809 desc("LIBTIFF", "system","-system-libtiff", "Use libtiff from the operating system.\nSee http://www.libtiff.org\n"); 1721 1810 1722 desc("LIBJPEG", "no", "-no-libjpeg", "Do not compile the plugin forJPEG support.");1811 desc("LIBJPEG", "no", "-no-libjpeg", "Do not compile JPEG support."); 1723 1812 desc("LIBJPEG", "qt", "-qt-libjpeg", "Use the libjpeg bundled with Qt."); 1724 1813 desc("LIBJPEG", "system","-system-libjpeg", "Use libjpeg from the operating system.\nSee http://www.ijg.org\n"); … … 1773 1862 desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module"); 1774 1863 desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)"); 1864 1775 1865 desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module."); 1776 1866 desc("SCRIPT", "yes", "-script", "Build the QtScript module."); … … 1779 1869 desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module"); 1780 1870 desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module"); 1871 1872 1781 1873 1782 1874 desc( "-arch <arch>", "Specify an architecture.\n" … … 1803 1895 desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7."); 1804 1896 desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7."); 1897 1898 1805 1899 1806 1900 /* We do not support -qconfig on Windows yet … … 1826 1920 desc("CETEST", "yes", "-cetest", "Compile Windows CE remote test application"); 1827 1921 desc( "-signature <file>", "Use file for signing the target project"); 1828 desc("OPENGL_ES_CM", "no", "-opengl-es-cm", "Enable support for OpenGL ES Common"); 1829 desc("OPENGL_ES_CL", "no", "-opengl-es-cl", "Enable support for OpenGL ES Common Lite"); 1830 desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0"); 1922 1831 1923 desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE"); 1832 1924 … … 1854 1946 QStringList pathList = paths.split(splitReg, QString::SkipEmptyParts); 1855 1947 QDir d; 1856 for ( QStringList::ConstIterator it = pathList.begin(); it != pathList.end(); ++it) {1948 for) { 1857 1949 // Remove any leading or trailing ", this is commonly used in the environment 1858 1950 // variables 1859 1951 QString path = (*it); 1860 if ( path.startsWith( '\"' ))1861 path = path.right( path.length() - 1);1862 if ( path.endsWith( '\"' ))1863 path = path.left( path.length() - 1);1864 if ( d.exists( path + QDir::separator() + fileName ))1952 if () 1953 path = path.right(); 1954 if () 1955 path = path.left(); 1956 if) 1865 1957 return path; 1866 1958 } … … 1868 1960 } 1869 1961 1870 bool Configure::findFile( const QString &fileName)1962 bool Configure::findFile() 1871 1963 { 1872 1964 const QString file = fileName.toLower(); 1873 1965 const QString pathEnvVar = QString::fromLocal8Bit(getenv("PATH")); 1874 1966 const QString mingwPath = dictionary["QMAKESPEC"].endsWith("-g++") ? 1875 findFileInPaths(" mingw32-g++.exe", pathEnvVar) : QString();1967 findFileInPaths("g++.exe", pathEnvVar) : QString(); 1876 1968 1877 1969 QString paths; 1878 1970 if (file.endsWith(".h")) { 1879 if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull()) 1880 return true; 1971 if (!mingwPath.isNull()) { 1972 if (!findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull()) 1973 return true; 1974 //now let's try the additional compiler path 1975 QDir mingwLibDir = mingwPath + QLatin1String("/../lib/gcc/mingw32"); 1976 foreach(const QFileInfo &version, mingwLibDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) { 1977 if (!findFileInPaths(file, version.absoluteFilePath() + QLatin1String("/include")).isNull()) 1978 return true; 1979 } 1980 } 1881 1981 paths = QString::fromLocal8Bit(getenv("INCLUDE")); 1882 } else if ( file.endsWith( ".lib" ) || file.endsWith( ".a" )) {1982 } else if () { 1883 1983 if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../lib")).isNull()) 1884 1984 return true; 1885 1985 paths = QString::fromLocal8Bit(getenv("LIB")); 1886 1986 } else { … … 1905 2005 return "system"; 1906 2006 1907 // We want PNG built-in2007 // in 1908 2008 if (option == "PNG") 1909 return "qt"; 1910 1911 // The JPEG image library can only be a plugin 1912 if (option == "JPEG" 1913 || option == "MNG" || option == "TIFF") 1914 return "plugin"; 1915 1916 // GIF off by default 1917 if (option == "GIF") { 1918 if (dictionary["SHARED"] == "yes") 2009 return "yes"; 2010 2011 // These database drivers and image formats can be built-in or plugins. 2012 // Prefer plugins when Qt is shared. 2013 if (dictionary[ "SHARED" ] == "yes") { 2014 if (option == "SQL_MYSQL" 2015 || option == "SQL_MYSQL" 2016 || option == "SQL_ODBC" 2017 || option == "SQL_OCI" 2018 || option == "SQL_PSQL" 2019 || option == "SQL_TDS" 2020 || option == "SQL_DB2" 2021 || option == "SQL_SQLITE" 2022 || option == "SQL_SQLITE2" 2023 || option == "SQL_IBASE" 2024 || option == "JPEG" 2025 || option == "MNG" 2026 || option == "TIFF" 2027 || option == "GIF") 1919 2028 return "plugin"; 1920 else1921 return "yes";1922 2029 } 1923 2030 … … 1929 2036 return "no"; 1930 2037 1931 if (option == "SQL_MYSQL"1932 || option == "SQL_MYSQL"1933 || option == "SQL_ODBC"1934 || option == "SQL_OCI"1935 || option == "SQL_PSQL"1936 || option == "SQL_TDS"1937 || option == "SQL_DB2"1938 || option == "SQL_SQLITE"1939 || option == "SQL_SQLITE2"1940 || option == "SQL_IBASE")1941 return "plugin";1942 1943 2038 if (option == "SYNCQT" 1944 2039 && (!QFile::exists(sourcePath + "/bin/syncqt") || … … 1957 2052 bool available = false; 1958 2053 if (part == "STYLE_WINDOWSXP") 1959 available = (findFile("uxtheme.h"));2054 available = ); 1960 2055 1961 2056 else if (part == "ZLIB") … … 1989 2084 else if (part == "SQL_SQLITE_LIB") { 1990 2085 if (dictionary[ "SQL_SQLITE_LIB" ] == "system") { 1991 2086 // Symbian has multiple .lib/.dll files we need to find 1992 2087 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { 1993 1994 1995 1996 1997 1998 1999 2088 available = true; // There is sqlite_symbian plugin which exports the necessary stuff 2089 dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3"; 2090 } else { 2091 available = findFile("sqlite3.h") && findFile("sqlite3.lib"); 2092 if (available) 2093 dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; 2094 } 2000 2095 } else 2001 2096 available = true; … … 2008 2103 else if (part == "OPENGL_ES_CM") 2009 2104 available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); 2010 else if (part == "OPENGL_ES_CL")2011 available = (dictionary[ "ARCHITECTURE" ] == "windowsce");2012 2105 else if (part == "OPENGL_ES_2") 2013 2106 available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); … … 2015 2108 available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); 2016 2109 else if (part == "SSE2") 2017 available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-g++");2018 else if (part == "3DNOW" 2019 available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h") && (dictionary.value("QMAKESPEC") != "win32-g++");2110 available = (dictionary.value("QMAKESPEC") != "win32-msvc"); 2111 else if (part == "3DNOW") 2112 available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h"); 2020 2113 else if (part == "MMX" || part == "SSE") 2021 available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-g++");2114 available = (dictionary.value("QMAKESPEC") != "win32-msvc"); 2022 2115 else if (part == "OPENSSL") 2023 2116 available = findFile("openssl\\ssl.h"); … … 2048 2141 && dictionary.value("EXCEPTIONS") == "yes"; 2049 2142 } else if (part == "PHONON") { 2050 available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h") 2051 && (findFile("strmiids.lib") || findFile("libstrmiids.a")) 2052 && (findFile("dmoguids.lib") || findFile("libdmoguids.a")) 2053 && (findFile("msdmo.lib") || findFile("libmsdmo.a")) 2054 && findFile("d3d9.h"); 2055 2056 if (!available) { 2057 cout << "All the required DirectShow/Direct3D files couldn't be found." << endl 2058 << "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl 2059 << "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl; 2060 if (!findFile("vmr9.h")) cout << "vmr9.h not found" << endl; 2061 if (!findFile("dshow.h")) cout << "dshow.h not found" << endl; 2062 if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl; 2063 if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl; 2064 if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl; 2065 if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl; 2066 } 2067 } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS") { 2143 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { 2144 available = true; 2145 } else { 2146 available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h") 2147 && (findFile("strmiids.lib") || findFile("libstrmiids.a")) 2148 && (findFile("dmoguids.lib") || findFile("libdmoguids.a")) 2149 && (findFile("msdmo.lib") || findFile("libmsdmo.a")) 2150 && findFile("d3d9.h"); 2151 2152 if (!available) { 2153 cout << "All the required DirectShow/Direct3D files couldn't be found." << endl 2154 << "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl 2155 << "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl; 2156 if (!findFile("vmr9.h")) cout << "vmr9.h not found" << endl; 2157 if (!findFile("dshow.h")) cout << "dshow.h not found" << endl; 2158 if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl; 2159 if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl; 2160 if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl; 2161 if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl; 2162 } 2163 } 2164 } else if (part == "WMSDK") { 2165 available = findFile("wmsdk.h"); 2166 } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "DECLARATIVE") { 2068 2167 available = true; 2069 2168 } else if (part == "WEBKIT") { 2070 available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++"); 2071 } else if (part == "DECLARATIVE") { 2072 available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h"); 2169 available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-msvc2010") || (dictionary.value("QMAKESPEC") == "win32-g++"); 2170 if (dictionary[ "SHARED" ] == "no") { 2171 cout << endl << "WARNING: Using static linking will disable the WebKit module." << endl 2172 << endl; 2173 available = false; 2174 } 2073 2175 } else if (part == "AUDIO_BACKEND") { 2074 2176 available = true; … … 2095 2197 available = (paths.size() == 0); 2096 2198 if (!available) { 2097 if (epocRoot.is Null() || epocRoot == "")2199 if (epocRoot.is) 2098 2200 epocRoot = "<empty string>"; 2099 2201 cout << endl … … 2196 2298 dictionary["SCRIPT"] = checkAvailability("SCRIPT") ? "yes" : "no"; 2197 2299 if (dictionary["SCRIPTTOOLS"] == "auto") 2198 dictionary["SCRIPTTOOLS"] = checkAvailability("SCRIPTTOOLS")? "yes" : "no";2300 dictionary["SCRIPTTOOLS"] = ? "yes" : "no"; 2199 2301 if (dictionary["XMLPATTERNS"] == "auto") 2200 2302 dictionary["XMLPATTERNS"] = checkAvailability("XMLPATTERNS") ? "yes" : "no"; … … 2204 2306 dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no"; 2205 2307 if (dictionary["DECLARATIVE"] == "auto") 2206 dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no"; 2308 dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; 2309 if (dictionary["DECLARATIVE_DEBUG"] == "auto") 2310 dictionary["DECLARATIVE_DEBUG"] = dictionary["DECLARATIVE"] == "yes" ? "yes" : "no"; 2207 2311 if (dictionary["AUDIO_BACKEND"] == "auto") 2208 2312 dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; 2313 2314 2209 2315 2210 2316 // Qt/WinCE remote test application … … 2229 2335 << "Configure will therefore continue with the SQLite3 lib bundled with Qt." << endl 2230 2336 << "(Press any key to continue..)"; 2231 if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)2337 if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) 2232 2338 exit(0); // Exit cleanly for Ctrl+C 2233 2339 … … 2240 2346 << "Oracle driver, as the current build will most likely fail." << endl; 2241 2347 cout << "(Press any key to continue..)"; 2242 if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)2348 if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) 2243 2349 exit(0); // Exit cleanly for Ctrl+C 2244 2350 } … … 2247 2353 << "win32-msvc2002 or win32-msvc2003 instead." << endl; 2248 2354 cout << "(Press any key to continue..)"; 2249 if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)2355 if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) 2250 2356 exit(0); // Exit cleanly for Ctrl+C 2251 2357 } 2252 if (0 != dictionary["ARM_FPU_TYPE"].size()) 2253 { 2254 QStringList l= QStringList() 2255 << "softvfp" 2256 << "softvfp+vfpv2" 2257 << "vfpv2"; 2258 if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) 2259 cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; 2260 } 2358 if (0 != dictionary["ARM_FPU_TYPE"].size()) { 2359 QStringList l= QStringList() 2360 << "softvfp" 2361 << "softvfp+vfpv2" 2362 << "vfpv2"; 2363 if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) 2364 cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; 2365 } 2366 if (dictionary["DECLARATIVE"] == "yes" && dictionary["SCRIPT"] == "no") { 2367 cout << "WARNING: To be able to compile QtDeclarative we need to also compile the" << endl 2368 << "QtScript module. If you continue, we will turn on the QtScript module." << endl 2369 << "(Press any key to continue..)"; 2370 if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) 2371 exit(0); // Exit cleanly for Ctrl+C 2372 2373 dictionary["SCRIPT"] = "yes"; 2374 } 2261 2375 2262 2376 return true; … … 2331 2445 "#else\n" 2332 2446 // Debug builds 2333 "# if (defined(_DEBUG) || defined(DEBUG))\n"2447 "# if )\n" 2334 2448 "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" 2335 2449 + build64Key.arg("debug") + "\"\n" … … 2354 2468 // Generate variables for output 2355 2469 // Build key ---------------------------------------------------- 2356 if ( dictionary.contains("BUILD_KEY")) {2470 if () { 2357 2471 qmakeVars += dictionary.value("BUILD_KEY"); 2358 2472 } … … 2360 2474 QString build = dictionary[ "BUILD" ]; 2361 2475 bool buildAll = (dictionary[ "BUILDALL" ] == "yes"); 2362 if ( 2476 if (build == "debug") { 2363 2477 if (buildAll) 2364 2478 qtConfig += "release"; … … 2371 2485 2372 2486 // Compression -------------------------------------------------- 2373 if ( dictionary[ "ZLIB" ] == "qt")2487 if) 2374 2488 qtConfig += "zlib"; 2375 else if ( dictionary[ "ZLIB" ] == "system")2489 else if) 2376 2490 qtConfig += "system-zlib"; 2377 2491 2378 2492 // Image formates ----------------------------------------------- 2379 if ( dictionary[ "GIF" ] == "no")2493 if) 2380 2494 qtConfig += "no-gif"; 2381 else if ( dictionary[ "GIF" ] == "yes")2495 else if) 2382 2496 qtConfig += "gif"; 2383 else if( dictionary[ "GIF" ] == "plugin" ) 2384 qmakeFormatPlugins += "gif"; 2385 2386 if( dictionary[ "TIFF" ] == "no" ) 2387 qtConfig += "no-tiff"; 2388 else if( dictionary[ "TIFF" ] == "plugin" ) 2389 qmakeFormatPlugins += "tiff"; 2390 if( dictionary[ "LIBTIFF" ] == "system" ) 2497 2498 if (dictionary[ "TIFF" ] == "no") 2499 qtConfig += "no-tiff"; 2500 else if (dictionary[ "TIFF" ] == "yes") 2501 qtConfig += "tiff"; 2502 if (dictionary[ "LIBTIFF" ] == "system") 2391 2503 qtConfig += "system-tiff"; 2392 2504 2393 if ( dictionary[ "JPEG" ] == "no")2505 if) 2394 2506 qtConfig += "no-jpeg"; 2395 else if ( dictionary[ "JPEG" ] == "plugin")2396 q makeFormatPlugins+= "jpeg";2397 if ( dictionary[ "LIBJPEG" ] == "system")2507 else if) 2508 q += "jpeg"; 2509 if) 2398 2510 qtConfig += "system-jpeg"; 2399 2511 2400 if ( dictionary[ "PNG" ] == "no")2512 if) 2401 2513 qtConfig += "no-png"; 2402 else if ( dictionary[ "PNG" ] == "qt")2514 else if) 2403 2515 qtConfig += "png"; 2404 if ( dictionary[ "LIBPNG" ] == "system")2516 if) 2405 2517 qtConfig += "system-png"; 2406 2518 2407 if ( dictionary[ "MNG" ] == "no")2519 if) 2408 2520 qtConfig += "no-mng"; 2409 else if ( dictionary[ "MNG" ] == "qt")2521 else if) 2410 2522 qtConfig += "mng"; 2411 if ( dictionary[ "LIBMNG" ] == "system")2523 if) 2412 2524 qtConfig += "system-mng"; 2413 2525 2414 2526 // Text rendering -------------------------------------------------- 2415 if ( dictionary[ "FREETYPE" ] == "yes")2527 if) 2416 2528 qtConfig += "freetype"; 2417 2529 2418 2530 // Styles ------------------------------------------------------- 2419 if ( dictionary[ "STYLE_WINDOWS" ] == "yes")2531 if () 2420 2532 qmakeStyles += "windows"; 2421 2533 2422 if ( dictionary[ "STYLE_PLASTIQUE" ] == "yes")2534 if () 2423 2535 qmakeStyles += "plastique"; 2424 2536 2425 if ( dictionary[ "STYLE_CLEANLOOKS" ] == "yes")2537 if () 2426 2538 qmakeStyles += "cleanlooks"; 2427 2539 2428 if ( dictionary[ "STYLE_WINDOWSXP" ] == "yes")2540 if () 2429 2541 qmakeStyles += "windowsxp"; 2430 2542 2431 if ( dictionary[ "STYLE_WINDOWSVISTA" ] == "yes")2543 if () 2432 2544 qmakeStyles += "windowsvista"; 2433 2545 2434 if ( dictionary[ "STYLE_MOTIF" ] == "yes")2546 if () 2435 2547 qmakeStyles += "motif"; 2436 2548 2437 if ( dictionary[ "STYLE_SGI" ] == "yes")2549 if () 2438 2550 qmakeStyles += "sgi"; 2439 2551 2440 if ( dictionary[ "STYLE_WINDOWSCE" ] == "yes")2552 if () 2441 2553 qmakeStyles += "windowsce"; 2442 2554 2443 if ( dictionary[ "STYLE_WINDOWSMOBILE" ] == "yes")2555 if () 2444 2556 qmakeStyles += "windowsmobile"; 2445 2557 2446 if ( dictionary[ "STYLE_CDE" ] == "yes")2558 if () 2447 2559 qmakeStyles += "cde"; 2448 2560 2449 if ( dictionary[ "STYLE_S60" ] == "yes")2561 if () 2450 2562 qmakeStyles += "s60"; 2451 2563 2452 2564 // Databases ---------------------------------------------------- 2453 if ( dictionary[ "SQL_MYSQL" ] == "yes")2565 if () 2454 2566 qmakeSql += "mysql"; 2455 else if ( dictionary[ "SQL_MYSQL" ] == "plugin")2567 else if () 2456 2568 qmakeSqlPlugins += "mysql"; 2457 2569 2458 if ( dictionary[ "SQL_ODBC" ] == "yes")2570 if () 2459 2571 qmakeSql += "odbc"; 2460 else if ( dictionary[ "SQL_ODBC" ] == "plugin")2572 else if () 2461 2573 qmakeSqlPlugins += "odbc"; 2462 2574 2463 if ( dictionary[ "SQL_OCI" ] == "yes")2575 if () 2464 2576 qmakeSql += "oci"; 2465 else if ( dictionary[ "SQL_OCI" ] == "plugin")2577 else if () 2466 2578 qmakeSqlPlugins += "oci"; 2467 2579 2468 if ( dictionary[ "SQL_PSQL" ] == "yes")2580 if () 2469 2581 qmakeSql += "psql"; 2470 else if ( dictionary[ "SQL_PSQL" ] == "plugin")2582 else if () 2471 2583 qmakeSqlPlugins += "psql"; 2472 2584 2473 if ( dictionary[ "SQL_TDS" ] == "yes")2585 if () 2474 2586 qmakeSql += "tds"; 2475 else if ( dictionary[ "SQL_TDS" ] == "plugin")2587 else if () 2476 2588 qmakeSqlPlugins += "tds"; 2477 2589 2478 if ( dictionary[ "SQL_DB2" ] == "yes")2590 if () 2479 2591 qmakeSql += "db2"; 2480 else if ( dictionary[ "SQL_DB2" ] == "plugin")2592 else if () 2481 2593 qmakeSqlPlugins += "db2"; 2482 2594 2483 if ( dictionary[ "SQL_SQLITE" ] == "yes")2595 if () 2484 2596 qmakeSql += "sqlite"; 2485 else if ( dictionary[ "SQL_SQLITE" ] == "plugin")2597 else if () 2486 2598 qmakeSqlPlugins += "sqlite"; 2487 2599 2488 if ( dictionary[ "SQL_SQLITE_LIB" ] == "system")2600 if () 2489 2601 qmakeConfig += "system-sqlite"; 2490 2602 2491 if ( dictionary[ "SQL_SQLITE2" ] == "yes")2603 if () 2492 2604 qmakeSql += "sqlite2"; 2493 else if ( dictionary[ "SQL_SQLITE2" ] == "plugin")2605 else if () 2494 2606 qmakeSqlPlugins += "sqlite2"; 2495 2607 2496 if ( dictionary[ "SQL_IBASE" ] == "yes")2608 if () 2497 2609 qmakeSql += "ibase"; 2498 else if ( dictionary[ "SQL_IBASE" ] == "plugin")2610 else if () 2499 2611 qmakeSqlPlugins += "ibase"; 2500 2612 2501 2613 // Other options ------------------------------------------------ 2502 if ( dictionary[ "BUILDALL" ] == "yes") {2614 if) { 2503 2615 qmakeConfig += "build_all"; 2504 2616 } … … 2506 2618 dictionary[ "QMAKE_OUTDIR" ] = dictionary[ "BUILD" ]; 2507 2619 2508 if ( dictionary[ "SHARED" ] == "yes") {2620 if () { 2509 2621 QString version = dictionary[ "VERSION" ]; 2510 2622 if (!version.isEmpty()) { … … 2517 2629 } 2518 2630 2519 if ( dictionary[ "ACCESSIBILITY" ] == "yes")2631 if) 2520 2632 qtConfig += "accessibility"; 2521 2633 2522 if ( !qmakeLibs.isEmpty())2523 qmakeVars += "LIBS += " + qmakeLibs.join( " ");2524 2525 if ( !dictionary["QT_LFLAGS_SQLITE"].isEmpty())2526 qmakeVars += "QT_LFLAGS_SQLITE += " + dictionary["QT_LFLAGS_SQLITE"];2634 if) 2635 qmakeVars += "LIBS += " + ); 2636 2637 if) 2638 qmakeVars += "QT_LFLAGS_SQLITE += " + ; 2527 2639 2528 2640 if (dictionary[ "QT3SUPPORT" ] == "yes") … … 2532 2644 qtConfig += "opengl"; 2533 2645 2534 if ( dictionary["OPENGL_ES_CM"] == "yes") {2646 if () { 2535 2647 qtConfig += "opengles1"; 2536 2648 qtConfig += "egl"; 2537 2649 } 2538 2650 2539 if ( dictionary["OPENGL_ES_2"] == "yes") {2651 if () { 2540 2652 qtConfig += "opengles2"; 2541 2653 qtConfig += "egl"; 2542 2654 } 2543 2655 2544 if ( dictionary["OPENGL_ES_CL"] == "yes" ) { 2545 qtConfig += "opengles1cl"; 2546 qtConfig += "egl"; 2547 } 2548 2549 if ( dictionary["OPENVG"] == "yes" ) { 2656 if (dictionary["OPENVG"] == "yes") { 2550 2657 qtConfig += "openvg"; 2551 2658 qtConfig += "egl"; 2552 2659 } 2553 2660 2554 if ( dictionary["S60"] == "yes") {2661 if () { 2555 2662 qtConfig += "s60"; 2556 2663 } 2557 2664 2558 if ( dictionary["DIRECTSHOW"] == "yes")2665 if () 2559 2666 qtConfig += "directshow"; 2560 2667 … … 2604 2711 } 2605 2712 2606 if (dictionary["WEBKIT"] == "yes") 2607 qtConfig += "webkit"; 2608 2609 if (dictionary["DECLARATIVE"] == "yes") 2713 QString dst = buildPath + "/mkspecs/modules/qt_webkit_version.pri"; 2714 QFile::remove(dst); 2715 if (dictionary["WEBKIT"] != "no") { 2716 // This include takes care of adding "webkit" to QT_CONFIG. 2717 QString src = sourcePath + "/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri"; 2718 QFile::copy(src, dst); 2719 if (dictionary["WEBKIT"] == "debug") 2720 qtConfig += "webkit-debug"; 2721 } 2722 2723 if (dictionary["DECLARATIVE"] == "yes") { 2724 if (dictionary[ "SCRIPT" ] == "no") { 2725 cout << "QtDeclarative was requested, but it can't be built due to QtScript being " 2726 "disabled." << endl; 2727 dictionary[ "DONE" ] = "error"; 2728 } 2610 2729 qtConfig += "declarative"; 2611 2612 if( dictionary[ "NATIVE_GESTURES" ] == "yes" ) 2730 } 2731 2732 if (dictionary[ "NATIVE_GESTURES" ] == "yes") 2613 2733 qtConfig += "native-gestures"; 2614 2734 … … 2626 2746 QString set_config = dictionary["QCONFIG"]; 2627 2747 if (possible_configs.contains(set_config)) { 2628 foreach (QStringcfg, possible_configs) {2748 foreachcfg, possible_configs) { 2629 2749 qtConfig += (cfg + "-config"); 2630 2750 if (cfg == set_config) … … 2633 2753 } 2634 2754 2635 if (dictionary.contains("XQMAKESPEC") && ( dictionary["QMAKESPEC"] != dictionary["XQMAKESPEC"] ))2755 if (dictionary.contains("XQMAKESPEC") && () 2636 2756 qmakeConfig += "cross_compile"; 2637 2757 … … 2641 2761 // if prefix is empty (WINCE), make all of them empty, if they aren't set 2642 2762 bool qipempty = false; 2643 if (dictionary[ "QT_INSTALL_PREFIX" ].isEmpty())2763 if(dictionary[ "QT_INSTALL_PREFIX" ].isEmpty()) 2644 2764 qipempty = true; 2645 2765 2646 if( !dictionary[ "QT_INSTALL_DOCS" ].size() ) 2647 dictionary[ "QT_INSTALL_DOCS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/doc" ); 2648 if( !dictionary[ "QT_INSTALL_HEADERS" ].size() ) 2649 dictionary[ "QT_INSTALL_HEADERS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/include" ); 2650 if( !dictionary[ "QT_INSTALL_LIBS" ].size() ) 2651 dictionary[ "QT_INSTALL_LIBS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/lib" ); 2652 if( !dictionary[ "QT_INSTALL_BINS" ].size() ) 2653 dictionary[ "QT_INSTALL_BINS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/bin" ); 2654 if( !dictionary[ "QT_INSTALL_PLUGINS" ].size() ) 2655 dictionary[ "QT_INSTALL_PLUGINS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/plugins" ); 2656 if( !dictionary[ "QT_INSTALL_DATA" ].size() ) 2657 dictionary[ "QT_INSTALL_DATA" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] ); 2658 if( !dictionary[ "QT_INSTALL_TRANSLATIONS" ].size() ) 2659 dictionary[ "QT_INSTALL_TRANSLATIONS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/translations" ); 2660 if( !dictionary[ "QT_INSTALL_EXAMPLES" ].size() ) 2661 dictionary[ "QT_INSTALL_EXAMPLES" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/examples"); 2662 if( !dictionary[ "QT_INSTALL_DEMOS" ].size() ) 2663 dictionary[ "QT_INSTALL_DEMOS" ] = qipempty ? "" : fixSeparators( dictionary[ "QT_INSTALL_PREFIX" ] + "/demos" ); 2664 2665 if(dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux")) 2766 if (!dictionary[ "QT_INSTALL_DOCS" ].size()) 2767 dictionary[ "QT_INSTALL_DOCS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/doc"); 2768 if (!dictionary[ "QT_INSTALL_HEADERS" ].size()) 2769 dictionary[ "QT_INSTALL_HEADERS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/include"); 2770 if (!dictionary[ "QT_INSTALL_LIBS" ].size()) 2771 dictionary[ "QT_INSTALL_LIBS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/lib"); 2772 if (!dictionary[ "QT_INSTALL_BINS" ].size()) 2773 dictionary[ "QT_INSTALL_BINS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/bin"); 2774 if (!dictionary[ "QT_INSTALL_PLUGINS" ].size()) 2775 dictionary[ "QT_INSTALL_PLUGINS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/plugins"); 2776 if (!dictionary[ "QT_INSTALL_IMPORTS" ].size()) 2777 dictionary[ "QT_INSTALL_IMPORTS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/imports"); 2778 if (!dictionary[ "QT_INSTALL_DATA" ].size()) 2779 dictionary[ "QT_INSTALL_DATA" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ]); 2780 if (!dictionary[ "QT_INSTALL_TRANSLATIONS" ].size()) 2781 dictionary[ "QT_INSTALL_TRANSLATIONS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/translations"); 2782 if (!dictionary[ "QT_INSTALL_EXAMPLES" ].size()) 2783 dictionary[ "QT_INSTALL_EXAMPLES" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/examples"); 2784 if (!dictionary[ "QT_INSTALL_DEMOS" ].size()) 2785 dictionary[ "QT_INSTALL_DEMOS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/demos"); 2786 2787 if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux")) 2666 2788 dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ]; 2667 2789 2668 qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators( "tmp/obj/" + dictionary[ "QMAKE_OUTDIR" ]);2669 qmakeVars += QString("MOC_DIR = ") + fixSeparators( "tmp/moc/" + dictionary[ "QMAKE_OUTDIR" ]);2670 qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"] );2790 qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators(); 2791 qmakeVars += QString("MOC_DIR = ") + fixSeparators(); 2792 qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"]); 2671 2793 2672 2794 if (!qmakeDefines.isEmpty()) 2673 qmakeVars += QString("DEFINES += ") + qmakeDefines.join( " ");2795 qmakeVars += QString("DEFINES += ") + qmakeDefines.join(); 2674 2796 if (!qmakeIncludes.isEmpty()) 2675 qmakeVars += QString("INCLUDEPATH += ") + qmakeIncludes.join( " ");2797 qmakeVars += QString("INCLUDEPATH += ") + ); 2676 2798 if (!opensslLibs.isEmpty()) 2677 2799 qmakeVars += opensslLibs; 2678 2800 else if (dictionary[ "OPENSSL" ] == "linked") { 2679 if(dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("symbian"))2801 ) 2680 2802 qmakeVars += QString("OPENSSL_LIBS = -llibssl -llibcrypto"); 2681 2803 else 2682 2804 qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); 2683 2805 } 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2684 2819 if (!qmakeSql.isEmpty()) 2685 qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " ");2820 qmakeVars += QString("sql-drivers += ") + qmakeSql.join(); 2686 2821 if (!qmakeSqlPlugins.isEmpty()) 2687 qmakeVars += QString("sql-plugins += ") + qmakeSqlPlugins.join( " ");2822 qmakeVars += QString("sql-plugins += ") + qmakeSqlPlugins.join(); 2688 2823 if (!qmakeStyles.isEmpty()) 2689 qmakeVars += QString("styles += ") + qmakeStyles.join( " ");2824 qmakeVars += QString("styles += ") + qmakeStyles.join(); 2690 2825 if (!qmakeStylePlugins.isEmpty()) 2691 qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join( " " ); 2692 if (!qmakeFormatPlugins.isEmpty()) 2693 qmakeVars += QString("imageformat-plugins += ") + qmakeFormatPlugins.join( " " ); 2826 qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(" "); 2694 2827 2695 2828 if (dictionary["QMAKESPEC"].endsWith("-g++")) { … … 2703 2836 } 2704 2837 2705 if ( !dictionary[ "QMAKESPEC" ].length()) {2838 if) { 2706 2839 cout << "Configure could not detect your compiler. QMAKESPEC must either" << endl 2707 2840 << "be defined as an environment variable, or specified as an" << endl … … 2710 2843 2711 2844 QStringList winPlatforms; 2712 QDir mkspecsDir( sourcePath + "/mkspecs");2845 QDir mkspecsDir(); 2713 2846 const QFileInfoList &specsList = mkspecsDir.entryInfoList(); 2714 for (int i = 0; i < specsList.size(); ++i) {2847 for(int i = 0; i < specsList.size(); ++i) { 2715 2848 const QFileInfo &fi = specsList.at(i); 2716 if ( fi.fileName().left( 5 ) == "win32") {2849 if) { 2717 2850 winPlatforms += fi.fileName(); 2718 2851 } 2719 2852 } 2720 cout << "Available platforms are: " << qPrintable(winPlatforms.join( ", ")) << endl;2853 cout << "Available platforms are: " << qPrintable(winPlatforms.join()) << endl; 2721 2854 dictionary[ "DONE" ] = "error"; 2722 2855 } … … 2727 2860 { 2728 2861 // Generate .qmake.cache 2729 QFile cacheFile( buildPath + "/.qmake.cache");2730 if ( cacheFile.open( QFile::WriteOnly | QFile::Text )) { // Truncates any existing file.2731 QTextStream cacheStream( &cacheFile);2732 for ( QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) {2862 QFile cacheFile(); 2863 if) { // Truncates any existing file. 2864 QTextStream cacheStream(); 2865 for) { 2733 2866 cacheStream << (*var) << endl; 2734 2867 } 2735 cacheStream << "CONFIG += " << qmakeConfig.join( " " ) << " incrementalcreate_prl link_prl depend_includepath QTDIR_build" << endl;2868 cacheStream << "CONFIG += " << qmakeConfig.join( create_prl link_prl depend_includepath QTDIR_build" << endl; 2736 2869 2737 2870 QStringList buildParts; 2738 2871 buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations"; 2739 foreach (QStringitem, disabledBuildParts) {2872 foreachitem, disabledBuildParts) { 2740 2873 buildParts.removeAll(item); 2741 2874 } 2742 cacheStream << "QT_BUILD_PARTS = " << buildParts.join( " ") << endl;2875 cacheStream << "QT_BUILD_PARTS = " << buildParts.join() << endl; 2743 2876 2744 2877 QString targetSpec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; 2745 2878 QString mkspec_path = fixSeparators(sourcePath + "/mkspecs/" + targetSpec); 2746 if (QFile::exists(mkspec_path))2747 cacheStream << "QMAKESPEC = " << mkspec_path<< endl;2879 if(QFile::exists(mkspec_path)) 2880 cacheStream << "QMAKESPEC = " << << endl; 2748 2881 else 2749 cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec ) << endl;2750 cacheStream << "ARCH = " << fixSeparators(dictionary[ "ARCHITECTURE" ])<< endl;2751 cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ] ) << endl;2752 cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ] ) << endl;2882 cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec) << endl; 2883 cacheStream << "ARCH = " << << endl; 2884 cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ]) << endl; 2885 cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ]) << endl; 2753 2886 2754 2887 if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE") … … 2756 2889 2757 2890 //so that we can build without an install first (which would be impossible) 2758 cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe" ) << endl;2759 cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe" ) << endl;2760 cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe" ) << endl;2761 cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe" ) << endl;2762 cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe" ) << endl;2763 cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include" ) << endl;2764 cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib" ) << endl;2891 cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe") << endl; 2892 cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe") << endl; 2893 cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe") << endl; 2894 cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe") << endl; 2895 cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe") << endl; 2896 cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include") << endl; 2897 cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib") << endl; 2765 2898 if (dictionary["CETEST"] == "yes") { 2766 cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ] ) << endl;2767 cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ] ) << endl;2899 cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ]) << endl; 2900 cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ]) << endl; 2768 2901 } 2769 2902 2770 2903 // embedded 2771 if (!dictionary["KBD_DRIVERS"].isEmpty())2904 if!dictionary["KBD_DRIVERS"].isEmpty()) 2772 2905 cacheStream << "kbd-drivers += "<< dictionary["KBD_DRIVERS"]<<endl; 2773 if (!dictionary["GFX_DRIVERS"].isEmpty())2906 if!dictionary["GFX_DRIVERS"].isEmpty()) 2774 2907 cacheStream << "gfx-drivers += "<< dictionary["GFX_DRIVERS"]<<endl; 2775 if (!dictionary["MOUSE_DRIVERS"].isEmpty())2908 if!dictionary["MOUSE_DRIVERS"].isEmpty()) 2776 2909 cacheStream << "mouse-drivers += "<< dictionary["MOUSE_DRIVERS"]<<endl; 2777 if (!dictionary["DECORATIONS"].isEmpty())2910 if!dictionary["DECORATIONS"].isEmpty()) 2778 2911 cacheStream << "decorations += "<<dictionary["DECORATIONS"]<<endl; 2779 2912 2780 if ( !dictionary["QMAKE_RPATHDIR"].isEmpty())2913 if) 2781 2914 cacheStream << "QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"]; 2782 2915 … … 2784 2917 cacheFile.close(); 2785 2918 } 2786 QFile configFile( dictionary[ "QT_BUILD_TREE" ] + "/mkspecs/qconfig.pri");2787 if ( configFile.open( QFile::WriteOnly | QFile::Text )) { // Truncates any existing file.2788 QTextStream configStream( &configFile);2919 QFile configFile(); 2920 if) { // Truncates any existing file. 2921 QTextStream configStream(); 2789 2922 configStream << "CONFIG+= "; 2790 2923 configStream << dictionary[ "BUILD" ]; 2791 if ( dictionary[ "SHARED" ] == "yes")2924 if) 2792 2925 configStream << " shared"; 2793 2926 else 2794 2927 configStream << " static"; 2795 2928 2796 if ( dictionary[ "LTCG" ] == "yes")2929 if) 2797 2930 configStream << " ltcg"; 2798 if( dictionary[ "STL" ] == "yes" ) 2931 if (dictionary[ "MSVC_MP" ] == "yes") 2932 configStream << " msvc_mp"; 2933 if (dictionary[ "STL" ] == "yes") 2799 2934 configStream << " stl"; 2800 if ( dictionary[ "EXCEPTIONS" ] == "yes")2935 if () 2801 2936 configStream << " exceptions"; 2802 if ( dictionary[ "EXCEPTIONS" ] == "no")2937 if () 2803 2938 configStream << " exceptions_off"; 2804 if ( dictionary[ "RTTI" ] == "yes")2939 if () 2805 2940 configStream << " rtti"; 2806 if ( dictionary[ "MMX" ] == "yes")2941 if () 2807 2942 configStream << " mmx"; 2808 if ( dictionary[ "3DNOW" ] == "yes")2943 if () 2809 2944 configStream << " 3dnow"; 2810 if ( dictionary[ "SSE" ] == "yes")2945 if () 2811 2946 configStream << " sse"; 2812 if ( dictionary[ "SSE2" ] == "yes")2947 if () 2813 2948 configStream << " sse2"; 2814 if ( dictionary[ "IWMMXT" ] == "yes")2949 if () 2815 2950 configStream << " iwmmxt"; 2816 if ( dictionary["INCREDIBUILD_XGE"] == "yes")2951 if () 2817 2952 configStream << " incredibuild_xge"; 2818 if ( dictionary["PLUGIN_MANIFESTS"] == "no")2953 if () 2819 2954 configStream << " no_plugin_manifest"; 2820 2955 2821 if ( dictionary.contains("SYMBIAN_DEFFILES")) {2822 if (dictionary["SYMBIAN_DEFFILES"] == "yes") {2956 if () { 2957 if) { 2823 2958 configStream << " def_files"; 2824 } else if ( dictionary["SYMBIAN_DEFFILES"] == "no") {2959 } else if () { 2825 2960 configStream << " def_files_disabled"; 2826 2961 } … … 2841 2976 2842 2977 configStream << "#Qt for Windows CE c-runtime deployment" << endl 2843 << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ] ) << endl;2844 2845 if (dictionary["CE_SIGNATURE"] != QLatin1String("no"))2978 << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ]) << endl; 2979 2980 if(dictionary["CE_SIGNATURE"] != QLatin1String("no")) 2846 2981 configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl; 2847 2982 2848 if (!dictionary["QMAKE_RPATHDIR"].isEmpty())2983 if(!dictionary["QMAKE_RPATHDIR"].isEmpty()) 2849 2984 configStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl; 2850 2985 … … 2853 2988 2854 2989 configStream << "#Qt for Symbian FPU settings" << endl; 2855 if (!dictionary["ARM_FPU_TYPE"].isEmpty()) {2990 if(!dictionary["ARM_FPU_TYPE"].isEmpty()) { 2856 2991 configStream<<"MMP_RULES += \"ARMFPU "<< dictionary["ARM_FPU_TYPE"]<< "\""; 2992 2993 2994 2857 2995 } 2858 2996 … … 2870 3008 def.replace(QRegExp("="), " "); 2871 3009 2872 if (def.startsWith("QT_NO_")) {3010 if(def.startsWith("QT_NO_")) { 2873 3011 defNeg = defD; 2874 3012 defNeg.replace("QT_NO_", "QT_"); 2875 } else if (def.startsWith("QT_")) {3013 } else if(def.startsWith("QT_")) { 2876 3014 defNeg = defD; 2877 3015 defNeg.replace("QT_", "QT_NO_"); … … 2899 3037 { 2900 3038 QDir(buildPath).mkpath("src/corelib/global"); 2901 QString outName( buildPath + "/src/corelib/global/qconfig.h");3039 QString outName(); 2902 3040 QTemporaryFile tmpFile; 2903 3041 QTextStream tmpStream; 2904 3042 2905 if (tmpFile.open()) {3043 if(tmpFile.open()) { 2906 3044 tmpStream.setDevice(&tmpFile); 2907 3045 2908 if ( dictionary[ "QCONFIG" ] == "full") {3046 if) { 2909 3047 tmpStream << "/* Everything */" << endl; 2910 3048 } else { 2911 QString configName( "qconfig-" + dictionary[ "QCONFIG" ] + ".h");3049 QString configName(); 2912 3050 tmpStream << "/* Copied from " << configName << "*/" << endl; 2913 3051 tmpStream << "#ifndef QT_BOOTSTRAPPED" << endl; 2914 QFile inFile( sourcePath + "/src/corelib/global/" + configName);2915 if ( inFile.open( QFile::ReadOnly )) {3052 QFile inFile(); 3053 if) { 2916 3054 QByteArray buffer = inFile.readAll(); 2917 tmpFile.write( buffer.constData(), buffer.size());3055 tmpFile.write(); 2918 3056 inFile.close(); 2919 3057 } … … 2922 3060 tmpStream << endl; 2923 3061 2924 if ( dictionary[ "SHARED" ] == "yes") {3062 if) { 2925 3063 tmpStream << "#ifndef QT_DLL" << endl; 2926 3064 tmpStream << "#define QT_DLL" << endl; … … 2948 3086 tmpStream << "#define Q_BIG_ENDIAN 4321" << endl; 2949 3087 tmpStream << "#define Q_LITTLE_ENDIAN 1234" << endl; 2950 if ( QSysInfo::ByteOrder == QSysInfo::BigEndian)3088 if () 2951 3089 tmpStream << "#define Q_BYTE_ORDER Q_BIG_ENDIAN" << endl; 2952 3090 else … … 2955 3093 tmpStream << endl << "// Compile time features" << endl; 2956 3094 tmpStream << "#define QT_ARCH_" << dictionary["ARCHITECTURE"].toUpper() << endl; 3095 3096 3097 2957 3098 QStringList qconfigList; 2958 if (dictionary["STL"] == "no") qconfigList += "QT_NO_STL";2959 if (dictionary["STYLE_WINDOWS"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWS";2960 if (dictionary["STYLE_PLASTIQUE"] != "yes") qconfigList += "QT_NO_STYLE_PLASTIQUE";2961 if (dictionary["STYLE_CLEANLOOKS"] != "yes") qconfigList += "QT_NO_STYLE_CLEANLOOKS";2962 if (dictionary["STYLE_WINDOWSXP"] != "yes" && dictionary["STYLE_WINDOWSVISTA"] != "yes")3099 if(dictionary["STL"] == "no") qconfigList += "QT_NO_STL"; 3100 if(dictionary["STYLE_WINDOWS"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWS"; 3101 if(dictionary["STYLE_PLASTIQUE"] != "yes") qconfigList += "QT_NO_STYLE_PLASTIQUE"; 3102 if(dictionary["STYLE_CLEANLOOKS"] != "yes") qconfigList += "QT_NO_STYLE_CLEANLOOKS"; 3103 if(dictionary["STYLE_WINDOWSXP"] != "yes" && dictionary["STYLE_WINDOWSVISTA"] != "yes") 2963 3104 qconfigList += "QT_NO_STYLE_WINDOWSXP"; 2964 if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA";2965 if (dictionary["STYLE_MOTIF"] != "yes") qconfigList += "QT_NO_STYLE_MOTIF";2966 if (dictionary["STYLE_CDE"] != "yes") qconfigList += "QT_NO_STYLE_CDE";2967 if (dictionary["STYLE_S60"] != "yes") qconfigList += "QT_NO_STYLE_S60";2968 if (dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE";2969 if (dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE";2970 if (dictionary["STYLE_GTK"] != "yes") qconfigList += "QT_NO_STYLE_GTK";2971 2972 if (dictionary["GIF"] == "yes") qconfigList += "QT_BUILTIN_GIF_READER=1";2973 if (dictionary["PNG"] == "no")qconfigList += "QT_NO_IMAGEFORMAT_PNG";2974 if (dictionary["MNG"] == "no")qconfigList += "QT_NO_IMAGEFORMAT_MNG";2975 if (dictionary["JPEG"] == "no")qconfigList += "QT_NO_IMAGEFORMAT_JPEG";2976 if (dictionary["TIFF"] == "no")qconfigList += "QT_NO_IMAGEFORMAT_TIFF";2977 if (dictionary["ZLIB"] == "no") {3105 if(dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; 3106 if(dictionary["STYLE_MOTIF"] != "yes") qconfigList += "QT_NO_STYLE_MOTIF"; 3107 if(dictionary["STYLE_CDE"] != "yes") qconfigList += "QT_NO_STYLE_CDE"; 3108 if(dictionary["STYLE_S60"] != "yes") qconfigList += "QT_NO_STYLE_S60"; 3109 if(dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE"; 3110 if(dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE"; 3111 if(dictionary["STYLE_GTK"] != "yes") qconfigList += "QT_NO_STYLE_GTK"; 3112 3113 if(dictionary["GIF"] == "yes") qconfigList += "QT_BUILTIN_GIF_READER=1"; 3114 if qconfigList += "QT_NO_IMAGEFORMAT_PNG"; 3115 if qconfigList += "QT_NO_IMAGEFORMAT_MNG"; 3116 if qconfigList += "QT_NO_IMAGEFORMAT_JPEG"; 3117 if qconfigList += "QT_NO_IMAGEFORMAT_TIFF"; 3118 if(dictionary["ZLIB"] == "no") { 2978 3119 qconfigList += "QT_NO_ZLIB"; 2979 3120 qconfigList += "QT_NO_COMPRESS"; 2980 3121 } 2981 3122 2982 if(dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; 2983 if(dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS"; 2984 if(dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; 2985 if(dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG"; 2986 if(dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; 2987 if(dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; 2988 if(dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS"; 2989 if(dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; 2990 if(dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; 2991 if(dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; 2992 if(dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; 2993 if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; 2994 if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; 2995 if(dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT"; 2996 if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS"; 2997 if(dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE"; 2998 if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60"; 2999 if(dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES"; 3000 3001 if(dictionary["OPENGL_ES_CM"] == "yes" || 3002 dictionary["OPENGL_ES_CL"] == "yes" || 3123 if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; 3124 if (dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS"; 3125 if (dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; 3126 if (dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG"; 3127 if (dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; 3128 if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; 3129 if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS"; 3130 if (dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; 3131 if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; 3132 if (dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; 3133 if (dictionary["DECLARATIVE_DEBUG"] == "no") qconfigList += "QDECLARATIVE_NO_DEBUG_PROTOCOL"; 3134 if (dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; 3135 if (dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; 3136 if (dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; 3137 if (dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT"; 3138 if (dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS"; 3139 if (dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE"; 3140 if (dictionary["S60"] == "no") qconfigList += "QT_NO_S60"; 3141 if (dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES"; 3142 3143 if (dictionary["OPENGL_ES_CM"] == "no" && 3144 dictionary["OPENGL_ES_2"] == "no" && 3145 dictionary["OPENVG"] == "no") qconfigList += "QT_NO_EGL"; 3146 3147 if (dictionary["OPENGL_ES_CM"] == "yes" || 3003 3148 dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES"; 3004 3149 3005 if(dictionary["OPENGL_ES_CM"] == "yes") qconfigList += "QT_OPENGL_ES_1"; 3006 if(dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES_2"; 3007 if(dictionary["OPENGL_ES_CL"] == "yes") qconfigList += "QT_OPENGL_ES_1_CL"; 3008 3009 if(dictionary["SQL_MYSQL"] == "yes") qconfigList += "QT_SQL_MYSQL"; 3010 if(dictionary["SQL_ODBC"] == "yes") qconfigList += "QT_SQL_ODBC"; 3011 if(dictionary["SQL_OCI"] == "yes") qconfigList += "QT_SQL_OCI"; 3012 if(dictionary["SQL_PSQL"] == "yes") qconfigList += "QT_SQL_PSQL"; 3013 if(dictionary["SQL_TDS"] == "yes") qconfigList += "QT_SQL_TDS"; 3014 if(dictionary["SQL_DB2"] == "yes") qconfigList += "QT_SQL_DB2"; 3015 if(dictionary["SQL_SQLITE"] == "yes") qconfigList += "QT_SQL_SQLITE"; 3016 if(dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2"; 3017 if(dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE"; 3018 3019 if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG"; 3020 if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL"; 3021 if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER"; 3150 if (dictionary["OPENGL_ES_CM"] == "yes") qconfigList += "QT_OPENGL_ES_1"; 3151 if (dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES_2"; 3152 if (dictionary["SQL_MYSQL"] == "yes") qconfigList += "QT_SQL_MYSQL"; 3153 if (dictionary["SQL_ODBC"] == "yes") qconfigList += "QT_SQL_ODBC"; 3154 if (dictionary["SQL_OCI"] == "yes") qconfigList += "QT_SQL_OCI"; 3155 if (dictionary["SQL_PSQL"] == "yes") qconfigList += "QT_SQL_PSQL"; 3156 if (dictionary["SQL_TDS"] == "yes") qconfigList += "QT_SQL_TDS"; 3157 if (dictionary["SQL_DB2"] == "yes") qconfigList += "QT_SQL_DB2"; 3158 if (dictionary["SQL_SQLITE"] == "yes") qconfigList += "QT_SQL_SQLITE"; 3159 if (dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2"; 3160 if (dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE"; 3161 3162 if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG"; 3163 if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL"; 3164 if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER"; 3165 if (dictionary["GRAPHICS_SYSTEM"] == "runtime") qconfigList += "QT_GRAPHICSSYSTEM_RUNTIME"; 3022 3166 3023 3167 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { … … 3036 3180 tmpStream << addDefine(qconfigList.at(i)); 3037 3181 3038 if (dictionary["EMBEDDED"] == "yes")3182 if(dictionary["EMBEDDED"] == "yes") 3039 3183 { 3040 3184 // Check for keyboard, mouse, gfx. … … 3042 3186 QStringList allKbdDrivers; 3043 3187 allKbdDrivers<<"tty"<<"usb"<<"sl5000"<<"yopy"<<"vr41xx"<<"qvfb"<<"um"; 3044 foreach (QStringkbd, allKbdDrivers) {3045 if (!kbdDrivers.contains(kbd))3188 foreachkbd, allKbdDrivers) { 3189 if!kbdDrivers.contains(kbd)) 3046 3190 tmpStream<<"#define QT_NO_QWS_KBD_"<<kbd.toUpper()<<endl; 3047 3191 } … … 3050 3194 QStringList allMouseDrivers; 3051 3195 allMouseDrivers << "pc"<<"bus"<<"linuxtp"<<"yopy"<<"vr41xx"<<"tslib"<<"qvfb"; 3052 foreach (QStringmouse, allMouseDrivers) {3053 if ( !mouseDrivers.contains(mouse))3196 foreachmouse, allMouseDrivers) { 3197 if) 3054 3198 tmpStream<<"#define QT_NO_QWS_MOUSE_"<<mouse.toUpper()<<endl; 3055 3199 } … … 3058 3202 QStringList allGfxDrivers; 3059 3203 allGfxDrivers<<"linuxfb"<<"transformed"<<"qvfb"<<"vnc"<<"multiscreen"<<"ahi"; 3060 foreach (QStringgfx, allGfxDrivers) {3061 if (!gfxDrivers.contains(gfx))3204 foreachgfx, allGfxDrivers) { 3205 if!gfxDrivers.contains(gfx)) 3062 3206 tmpStream<<"#define QT_NO_QWS_"<<gfx.toUpper()<<endl; 3063 3207 } … … 3066 3210 3067 3211 QStringList depths = dictionary[ "QT_QWS_DEPTH" ].split(" "); 3068 foreach (QStringdepth, depths)3212 foreachdepth, depths) 3069 3213 tmpStream<<"#define QT_QWS_DEPTH_"+depth<<endl; 3070 3214 } 3071 3215 3072 if (dictionary[ "QT_CUPS" ] == "no")3216 ifdictionary[ "QT_CUPS" ] == "no") 3073 3217 tmpStream<<"#define QT_NO_CUPS"<<endl; 3074 3218 3075 if (dictionary[ "QT_ICONV" ] == "no")3219 ifdictionary[ "QT_ICONV" ] == "no") 3076 3220 tmpStream<<"#define QT_NO_ICONV"<<endl; 3077 3221 3078 if (dictionary[ "QT_GLIB" ] == "no")3222 if(dictionary[ "QT_GLIB" ] == "no") 3079 3223 tmpStream<<"#define QT_NO_GLIB"<<endl; 3080 3224 3081 if (dictionary[ "QT_LPR" ] == "no")3225 if(dictionary[ "QT_LPR" ] == "no") 3082 3226 tmpStream<<"#define QT_NO_LPR"<<endl; 3083 3227 3084 if (dictionary[ "QT_INOTIFY" ] == "no")3228 if) 3085 3229 tmpStream<<"#define QT_NO_INOTIFY"<<endl; 3086 3230 3087 if (dictionary[ "QT_SXE" ] == "no")3231 if(dictionary[ "QT_SXE" ] == "no") 3088 3232 tmpStream<<"#define QT_NO_SXE"<<endl; 3089 3233 … … 3096 3240 tmpFile.copy(outName); 3097 3241 tmpFile.close(); 3098 3099 if(!QFile::exists(buildPath + "/include/QtCore/qconfig.h")) {3100 if (!writeToFile("#include \"../../src/corelib/global/qconfig.h\"\n",3101 buildPath + "/include/QtCore/qconfig.h")3102 || !writeToFile("#include \"../../src/corelib/global/qconfig.h\"\n",3103 buildPath + "/include/Qt/qconfig.h")) {3104 dictionary["DONE"] = "error";3105 return;3106 }3107 }3108 3242 } 3109 3243 … … 3121 3255 QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"]; 3122 3256 QString pltSpec = sourcePath + "/mkspecs/" + spec; 3123 if (!Environment::cpdir(pltSpec, defSpec)) { 3257 QString includeSpec = buildPath + "/mkspecs/" + spec; 3258 if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) { 3124 3259 cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl; 3125 3260 dictionary["DONE"] = "error"; 3126 3261 return; 3127 }3128 3129 outName = defSpec + "/qmake.conf";3130 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL );3131 QFile qmakeConfFile(outName);3132 if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) {3133 QTextStream qmakeConfStream;3134 qmakeConfStream.setDevice(&qmakeConfFile);3135 qmakeConfStream << endl << "QMAKESPEC_ORIGINAL=" << pltSpec << endl;3136 qmakeConfStream.flush();3137 qmakeConfFile.close();3138 3262 } 3139 3263 … … 3152 3276 << "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl 3153 3277 << endl; 3154 if (!dictionary[ "QT_HOST_PREFIX" ].isNull())3278 if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) 3155 3279 tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl; 3156 tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << QString(dictionary["QT_INSTALL_PREFIX"]).replace( "\\", "\\\\" ) << "\";" << endl 3157 << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << QString(dictionary["QT_INSTALL_DOCS"]).replace( "\\", "\\\\" ) << "\";" << endl 3158 << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << QString(dictionary["QT_INSTALL_HEADERS"]).replace( "\\", "\\\\" ) << "\";" << endl 3159 << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << QString(dictionary["QT_INSTALL_LIBS"]).replace( "\\", "\\\\" ) << "\";" << endl 3160 << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << QString(dictionary["QT_INSTALL_BINS"]).replace( "\\", "\\\\" ) << "\";" << endl 3161 << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << QString(dictionary["QT_INSTALL_PLUGINS"]).replace( "\\", "\\\\" ) << "\";" << endl 3162 << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << QString(dictionary["QT_INSTALL_DATA"]).replace( "\\", "\\\\" ) << "\";" << endl 3163 << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << QString(dictionary["QT_INSTALL_TRANSLATIONS"]).replace( "\\", "\\\\" ) << "\";" << endl 3164 << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << QString(dictionary["QT_INSTALL_EXAMPLES"]).replace( "\\", "\\\\" ) << "\";" << endl 3165 << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << QString(dictionary["QT_INSTALL_DEMOS"]).replace( "\\", "\\\\" ) << "\";" << endl 3166 //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << QString(dictionary["QT_INSTALL_SETTINGS"]).replace( "\\", "\\\\" ) << "\";" << endl 3280 tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary["QT_INSTALL_PREFIX"]) << "\";" << endl 3281 << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << escapeSeparators(dictionary["QT_INSTALL_DOCS"]) << "\";" << endl 3282 << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << escapeSeparators(dictionary["QT_INSTALL_HEADERS"]) << "\";" << endl 3283 << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << escapeSeparators(dictionary["QT_INSTALL_LIBS"]) << "\";" << endl 3284 << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << escapeSeparators(dictionary["QT_INSTALL_BINS"]) << "\";" << endl 3285 << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << escapeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << "\";" << endl 3286 << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << escapeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << "\";" << endl 3287 << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << escapeSeparators(dictionary["QT_INSTALL_DATA"]) << "\";" << endl 3288 << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\";" << endl 3289 << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\";" << endl 3290 << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << escapeSeparators(dictionary["QT_INSTALL_DEMOS"]) << "\";" << endl 3291 //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl 3167 3292 ; 3168 if (!dictionary[ "QT_HOST_PREFIX" ].isNull()) {3293 if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) { 3169 3294 tmpStream << "#else" << endl 3170 << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << QString(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) << "\";" << endl 3171 << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc").replace( "\\", "\\\\" ) <<"\";" << endl 3172 << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include").replace( "\\", "\\\\" ) <<"\";" << endl 3173 << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib").replace( "\\", "\\\\" ) <<"\";" << endl 3174 << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin").replace( "\\", "\\\\" ) <<"\";" << endl 3175 << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins").replace( "\\", "\\\\" ) <<"\";" << endl 3176 << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) <<"\";" << endl 3177 << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations").replace( "\\", "\\\\" ) <<"\";" << endl 3178 << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example").replace( "\\", "\\\\" ) <<"\";" << endl 3179 << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos").replace( "\\", "\\\\" ) <<"\";" << endl 3295 << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary[ "QT_HOST_PREFIX" ]) << "\";" << endl 3296 << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc", true) <<"\";" << endl 3297 << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include", true) <<"\";" << endl 3298 << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib", true) <<"\";" << endl 3299 << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin", true) <<"\";" << endl 3300 << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins", true) <<"\";" << endl 3301 << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports", true) <<"\";" << endl 3302 << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\";" << endl 3303 << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\";" << endl 3304 << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\";" << endl 3305 << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos", true) <<"\";" << endl 3180 3306 << "#endif //QT_BOOTSTRAPPED" << endl; 3181 3307 } 3182 tmpStream << "/* strlen( \"qt_lcnsxxxx\" 3308 tmpStream << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl 3183 3309 << "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;" << endl 3184 3310 << "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;" << endl … … 3189 3315 << "#define QT_CONFIGURE_BINARIES_PATH qt_configure_binaries_path_str + 12;" << endl 3190 3316 << "#define QT_CONFIGURE_PLUGINS_PATH qt_configure_plugins_path_str + 12;" << endl 3317 3191 3318 << "#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;" << endl 3192 3319 << "#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;" << endl … … 3200 3327 3201 3328 // Replace old qconfig.cpp with new one 3202 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL 3203 QFile::remove( outName);3329 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); 3330 QFile::remove(); 3204 3331 tmpFile2.copy(outName); 3205 3332 tmpFile2.close(); … … 3210 3337 tmpStream.setDevice(&tmpFile3); 3211 3338 tmpStream << "/* Evaluation license key */" << endl 3212 << "static const char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl;3339 << "static const char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl; 3213 3340 3214 3341 tmpStream.flush(); … … 3216 3343 3217 3344 outName = buildPath + "/src/corelib/global/qconfig_eval.cpp"; 3218 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL 3219 QFile::remove( outName);3345 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); 3346 QFile::remove(); 3220 3347 3221 3348 if (dictionary["EDITION"] == "Evaluation" || qmakeDefines.contains("QT_EVAL")) … … 3261 3388 3262 3389 cout << "Configuration:" << endl; 3263 cout << " " << qmakeConfig.join( "\r\n ") << endl;3390 cout << " " << qmakeConfig.join() << endl; 3264 3391 cout << "Qt Configuration:" << endl; 3265 cout << " " << qtConfig.join( "\r\n ") << endl;3392 cout << " " << qtConfig.join() << endl; 3266 3393 cout << endl; 3267 3394 … … 3290 3417 cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl; 3291 3418 cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; 3292 cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; 3419 { 3420 QString webkit = dictionary[ "WEBKIT" ]; 3421 if (webkit == "debug") 3422 webkit = "yes (debug)"; 3423 cout << "WebKit support.............." << webkit << endl; 3424 } 3293 3425 cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; 3426 3294 3427 cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; 3295 3428 cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; … … 3335 3468 cout << "Libraries installed to......" << dictionary[ "QT_INSTALL_LIBS" ] << endl; 3336 3469 cout << "Plugins installed to........" << dictionary[ "QT_INSTALL_PLUGINS" ] << endl; 3470 3337 3471 cout << "Binaries installed to......." << dictionary[ "QT_INSTALL_BINS" ] << endl; 3338 3472 cout << "Docs installed to..........." << dictionary[ "QT_INSTALL_DOCS" ] << endl; … … 3354 3488 if (dictionary.contains("SYMBIAN_DEFFILES")) { 3355 3489 cout << "Symbian DEF files enabled..." << dictionary[ "SYMBIAN_DEFFILES" ] << endl; 3356 if (dictionary["SYMBIAN_DEFFILES"] == "no") {3490 if(dictionary["SYMBIAN_DEFFILES"] == "no") { 3357 3491 cout << "WARNING: Disabling DEF files will mean that Qt is NOT binary compatible with previous versions." << endl; 3358 3492 cout << " This feature is only intended for use during development, NEVER for release builds." << endl; … … 3360 3494 } 3361 3495 3362 if (dictionary["ASSISTANT_WEBKIT"] == "yes")3496 if(dictionary["ASSISTANT_WEBKIT"] == "yes") 3363 3497 cout << "Using WebKit as html rendering engine in Qt Assistant." << endl; 3364 3498 3365 if (checkAvailability("INCREDIBUILD_XGE"))3499 if(checkAvailability("INCREDIBUILD_XGE")) 3366 3500 cout << "Using IncrediBuild XGE......" << dictionary["INCREDIBUILD_XGE"] << endl; 3367 if ( !qmakeDefines.isEmpty()) {3501 if) { 3368 3502 cout << "Defines....................."; 3369 for ( QStringList::Iterator defs = qmakeDefines.begin(); defs != qmakeDefines.end(); ++defs)3503 for) 3370 3504 cout << (*defs) << " "; 3371 3505 cout << endl; 3372 3506 } 3373 if ( !qmakeIncludes.isEmpty()) {3507 if) { 3374 3508 cout << "Include paths..............."; 3375 for ( QStringList::Iterator incs = qmakeIncludes.begin(); incs != qmakeIncludes.end(); ++incs)3509 for) 3376 3510 cout << (*incs) << " "; 3377 3511 cout << endl; 3378 3512 } 3379 if ( !qmakeLibs.isEmpty()) {3513 if) { 3380 3514 cout << "Additional libraries........"; 3381 for ( QStringList::Iterator libs = qmakeLibs.begin(); libs != qmakeLibs.end(); ++libs)3515 for) 3382 3516 cout << (*libs) << " "; 3383 3517 cout << endl; 3384 3518 } 3385 if ( dictionary[ "QMAKE_INTERNAL" ] == "yes") {3519 if) { 3386 3520 cout << "Using internal configuration." << endl; 3387 3521 } 3388 if ( dictionary[ "SHARED" ] == "no") {3522 if) { 3389 3523 cout << "WARNING: Using static linking will disable the use of plugins." << endl; 3390 3524 cout << " Make sure you compile ALL needed modules into the library." << endl; 3391 3525 } 3392 if ( dictionary[ "OPENSSL" ] == "linked" && opensslLibs.isEmpty()) {3526 if) { 3393 3527 cout << "NOTE: When linking against OpenSSL, you can override the default" << endl; 3394 3528 cout << "library names through OPENSSL_LIBS." << endl; 3395 3529 cout << "For example:" << endl; 3396 cout << " configure -openssl-linked OPENSSL_LIBS= '-lssleay32 -llibeay32'" << endl;3397 } 3398 if ( dictionary[ "ZLIB_FORCED" ] == "yes") {3530 cout << " configure -openssl-linked OPENSSL_LIBS=" << endl; 3531 } 3532 if) { 3399 3533 QString which_zlib = "supplied"; 3400 if (dictionary[ "ZLIB" ] == "system")3534 ifdictionary[ "ZLIB" ] == "system") 3401 3535 which_zlib = "system"; 3402 3536 … … 3427 3561 void Configure::buildQmake() 3428 3562 { 3429 if ( dictionary[ "BUILD_QMAKE" ] == "yes") {3563 if) { 3430 3564 QStringList args; 3431 3565 3432 3566 // Build qmake 3433 3567 QString pwd = QDir::currentPath(); 3434 QDir::setCurrent(buildPath + "/qmake" 3568 QDir::setCurrent(buildPath + "/qmake"); 3435 3569 3436 3570 QString makefile = "Makefile"; 3437 3571 { 3438 3572 QFile out(makefile); 3439 if (out.open(QFile::WriteOnly | QFile::Text)) {3573 if(out.open(QFile::WriteOnly | QFile::Text)) { 3440 3574 QTextStream stream(&out); 3441 3575 stream << "#AutoGenerated by configure.exe" << endl … … 3450 3584 3451 3585 QFile in(sourcePath + "/qmake/" + dictionary["QMAKEMAKEFILE"]); 3452 if (in.open(QFile::ReadOnly | QFile::Text)) {3586 if(in.open(QFile::ReadOnly | QFile::Text)) { 3453 3587 QString d = in.readAll(); 3454 3588 //### need replaces (like configure.sh)? --Sam … … 3465 3599 3466 3600 cout << "Creating qmake..." << endl; 3467 int exitCode = 0;3468 if ( exitCode = Environment::execute(args, QStringList(), QStringList())) {3601 int exitCode = ; 3602 if) { 3469 3603 args.clear(); 3470 3604 args += dictionary[ "MAKE" ]; … … 3472 3606 args += makefile; 3473 3607 args += "clean"; 3474 if( exitCode = Environment::execute(args, QStringList(), QStringList())) { 3608 exitCode = Environment::execute(args, QStringList(), QStringList()); 3609 if (exitCode) { 3475 3610 cout << "Cleaning qmake failed, return code " << exitCode << endl << endl; 3476 3611 dictionary[ "DONE" ] = "error"; … … 3480 3615 args += "-f"; 3481 3616 args += makefile; 3482 if (exitCode = Environment::execute(args, QStringList(), QStringList())) { 3617 exitCode = Environment::execute(args, QStringList(), QStringList()); 3618 if (exitCode) { 3483 3619 cout << "Building qmake failed, return code " << exitCode << endl << endl; 3484 3620 dictionary[ "DONE" ] = "error"; … … 3486 3622 } 3487 3623 } 3488 QDir::setCurrent( pwd);3624 QDir::setCurrent(); 3489 3625 } 3490 3626 } … … 3505 3641 << "tools/linguist/lrelease"; 3506 3642 3507 if (dictionary["XQMAKESPEC"].startsWith("wince"))3643 if(dictionary["XQMAKESPEC"].startsWith("wince")) 3508 3644 hostToolsDirs << "tools/checksdk"; 3509 3645 … … 3519 3655 QStringList args; 3520 3656 args << QDir::toNativeSeparators(buildPath + "/bin/qmake"); 3521 args << "-spec" << dictionary["QMAKESPEC"] << "-r"; 3657 // override .qmake.cache because we are not cross-building these. 3658 // we need a full path so that a build with -prefix will still find it. 3659 args << "-spec" << QDir::toNativeSeparators(buildPath + "/mkspecs/" + dictionary["QMAKESPEC"]); 3660 args << "-r"; 3522 3661 args << "-o" << QDir::toNativeSeparators(toolBuildPath + "/Makefile"); 3523 3662 3524 3663 QDir().mkpath(toolBuildPath); 3525 3664 QDir::setCurrent(toolSourcePath); 3526 int exitCode = 0;3527 if (exitCode = Environment::execute(args, QStringList(), QStringList())) {3665 int exitCode = ; 3666 if (exitCode) { 3528 3667 cout << "qmake failed, return code " << exitCode << endl << endl; 3529 3668 dictionary["DONE"] = "error"; … … 3535 3674 args += dictionary["MAKE"]; 3536 3675 QDir::setCurrent(toolBuildPath); 3537 if (exitCode = Environment::execute(args, QStringList(), QStringList())) { 3676 exitCode = Environment::execute(args, QStringList(), QStringList()); 3677 if (exitCode) { 3538 3678 args.clear(); 3539 3679 args += dictionary["MAKE"]; 3540 3680 args += "clean"; 3541 if(exitCode = Environment::execute(args, QStringList(), QStringList())) { 3681 exitCode = Environment::execute(args, QStringList(), QStringList()); 3682 if (exitCode) { 3542 3683 cout << "Cleaning " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl; 3543 3684 dictionary["DONE"] = "error"; … … 3546 3687 args.clear(); 3547 3688 args += dictionary["MAKE"]; 3548 if (exitCode = Environment::execute(args, QStringList(), QStringList())) { 3689 exitCode = Environment::execute(args, QStringList(), QStringList()); 3690 if (exitCode) { 3549 3691 cout << "Building " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl; 3550 3692 dictionary["DONE"] = "error"; … … 3557 3699 } 3558 3700 3559 void Configure::findProjects( const QString& dirName)3560 { 3561 if ( dictionary[ "NOPROCESS" ] == "no") {3562 QDir dir( dirName);3701 void Configure::findProjects() 3702 { 3703 if) { 3704 QDir dir(); 3563 3705 QString entryName; 3564 3706 int makeListNumber; … … 3566 3708 const QFileInfoList &list = dir.entryInfoList(QStringList(QLatin1String("*.pro")), 3567 3709 QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot); 3568 for (int i = 0; i < list.size(); ++i) {3710 for(int i = 0; i < list.size(); ++i) { 3569 3711 const QFileInfo &fi = list.at(i); 3570 if (fi.fileName() != "qmake.pro") {3712 if(fi.fileName() != "qmake.pro") { 3571 3713 entryName = dirName + "/" + fi.fileName(); 3572 if (fi.isDir()) {3573 findProjects( entryName);3714 if(fi.isDir()) { 3715 findProjects(); 3574 3716 } else { 3575 qmakeTemplate = projectType( fi.absoluteFilePath());3576 switch ( qmakeTemplate) {3717 qmakeTemplate = projectType(); 3718 switch () { 3577 3719 case Lib: 3578 3720 case Subdirs: … … 3601 3743 dir.prepend("/src"); 3602 3744 makeList[inList].append(new MakeItem(sourcePath + dir, 3603 item + ".pro", buildPath + dir + "/Makefile", Lib ));3604 if ( dictionary[ "DSPFILES" ] == "yes") {3605 makeList[inList].append( 3606 item + ".pro", buildPath + dir + "/" + item + ".dsp", Lib ));3607 } 3608 if ( dictionary[ "VCPFILES" ] == "yes") {3609 makeList[inList].append( 3610 item + ".pro", buildPath + dir + "/" + item + ".vcp", Lib ));3611 } 3612 if ( dictionary[ "VCPROJFILES" ] == "yes") {3613 makeList[inList].append( 3614 item + ".pro", buildPath + dir + "/" + item + ".vcproj", Lib ));3745 item + ".pro", buildPath + dir + "/Makefile", Lib); 3746 if) { 3747 makeList[inList].append(new MakeItem(sourcePath + dir, 3748 item + ".pro", buildPath + dir + "/" + item + ".dsp", Lib); 3749 } 3750 if) { 3751 makeList[inList].append(new MakeItem(sourcePath + dir, 3752 item + ".pro", buildPath + dir + "/" + item + ".vcp", Lib); 3753 } 3754 if) { 3755 makeList[inList].append(new MakeItem(sourcePath + dir, 3756 item + ".pro", buildPath + dir + "/" + item + ".vcproj", Lib); 3615 3757 } 3616 3758 } … … 3618 3760 void Configure::generateMakefiles() 3619 3761 { 3620 if ( dictionary[ "NOPROCESS" ] == "no") {3762 if) { 3621 3763 #if !defined(EVAL) 3622 3764 cout << "Creating makefiles in src..." << endl; … … 3624 3766 3625 3767 QString spec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; 3626 if ( spec != "win32-msvc")3768 if) 3627 3769 dictionary[ "DSPFILES" ] = "no"; 3628 3770 3629 if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince")))3771 ifspec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince"))) 3630 3772 dictionary[ "VCPROJFILES" ] = "no"; 3631 3773 … … 3642 3784 QStringList args; 3643 3785 3644 args << fixSeparators( buildPath + "/bin/qmake");3786 args << fixSeparators(); 3645 3787 3646 3788 if (doDsp) { 3647 if ( dictionary[ "DEPENDENCIES" ] == "no")3789 if) 3648 3790 args << "-nodepend"; 3649 3791 args << "-tp" << "vc"; … … 3654 3796 generate = false; // Now Makefiles will be done 3655 3797 } 3656 args << "-spec"; 3657 args << spec; 3798 // don't pass -spec - .qmake.cache has it already 3658 3799 args << "-r"; 3659 3800 args << (sourcePath + "/projects.pro"); 3660 3801 args << "-o"; 3661 3802 args << buildPath; 3662 if (!dictionary[ "QMAKEADDITIONALARGS" ].isEmpty())3803 if(!dictionary[ "QMAKEADDITIONALARGS" ].isEmpty()) 3663 3804 args << dictionary[ "QMAKEADDITIONALARGS" ]; 3664 3805 3665 QDir::setCurrent( fixSeparators( dirPath ));3666 if ( int exitCode = Environment::execute(args, QStringList(), QStringList())) {3806 QDir::setCurrent(); 3807 if) { 3667 3808 cout << "Qmake failed, return code " << exitCode << endl << endl; 3668 3809 dictionary[ "DONE" ] = "error"; … … 3671 3812 } else { 3672 3813 findProjects(sourcePath); 3673 for ( i=0; i<3; i++) {3674 for ( 3814 for () { 3815 for (int j=0; j<makeList[i].size(); ++j) { 3675 3816 MakeItem *it=makeList[i][j]; 3676 QString dirPath = fixSeparators( it->directory + "/");3817 QString dirPath = fixSeparators(); 3677 3818 QString projectName = it->proFile; 3678 3819 QString makefileName = buildPath + "/" + dirPath + it->target; … … 3685 3826 QStringList args; 3686 3827 3687 args << fixSeparators( buildPath + "/bin/qmake");3828 args << fixSeparators(); 3688 3829 args << sourcePath + "/" + dirPath + projectName; 3689 3830 args << dictionary[ "QMAKE_ALL_ARGS" ]; … … 3694 3835 args << "-spec"; 3695 3836 args << spec; 3696 if (!dictionary[ "QMAKEADDITIONALARGS" ].isEmpty())3837 if(!dictionary[ "QMAKEADDITIONALARGS" ].isEmpty()) 3697 3838 args << dictionary[ "QMAKEADDITIONALARGS" ]; 3698 3839 3699 QDir::setCurrent( fixSeparators( dirPath ));3840 QDir::setCurrent(); 3700 3841 3701 3842 QFile file(makefileName); … … 3715 3856 } 3716 3857 } 3717 QDir::setCurrent( pwd);3858 QDir::setCurrent(); 3718 3859 } else { 3719 3860 cout << "Processing of project files have been disabled." << endl; … … 3729 3870 cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl; 3730 3871 cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; 3731 } else if (dictionary.value("QMAKESPEC").startsWith("wince")) {3872 } else if(dictionary.value("QMAKESPEC").startsWith("wince")) { 3732 3873 // we are cross compiling for Windows CE 3733 3874 cout << endl << endl << "Qt is now configured for building. To start the build run:" << endl … … 3741 3882 } 3742 3883 3743 Configure::ProjectType Configure::projectType( const QString& proFileName)3744 { 3745 QFile proFile( proFileName);3746 if ( proFile.open( QFile::ReadOnly )) {3884 Configure::ProjectType Configure::projectType() 3885 { 3886 QFile proFile(); 3887 if) { 3747 3888 QString buffer = proFile.readLine(1024); 3748 3889 while (!buffer.isEmpty()) { 3749 QStringList segments = buffer.split(QRegExp( "\\s"));3890 QStringList segments = buffer.split(QRegExp()); 3750 3891 QStringList::Iterator it = segments.begin(); 3751 3892 3752 if (segments.size() >= 3) {3893 if(segments.size() >= 3) { 3753 3894 QString keyword = (*it++); 3754 3895 QString operation = (*it++); 3755 3896 QString value = (*it++); 3756 3897 3757 if ( keyword == "TEMPLATE") {3758 if ( value == "lib")3898 if) { 3899 if) 3759 3900 return Lib; 3760 else if ( value == "subdirs")3901 else if) 3761 3902 return Subdirs; 3762 3903 } … … 3844 3985 } 3845 3986 QStringList licenseContent = QString(file.readAll()).split('\n'); 3846 while (i < licenseContent.size()) {3987 while(i < licenseContent.size()) { 3847 3988 cout << licenseContent.at(i) << endl; 3848 3989 if (++i % screenHeight == 0) { 3849 3990 cout << "(Press any key for more..)"; 3850 if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)3991 if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) 3851 3992 exit(0); // Exit cleanly for Ctrl+C 3852 3993 cout << "\r"; // Overwrite text above … … 3930 4071 void Configure::reloadCmdLine() 3931 4072 { 3932 if ( dictionary[ "REDO" ] == "yes") {3933 QFile inFile( buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache");3934 if ( inFile.open( QFile::ReadOnly )) {3935 QTextStream inStream( &inFile);4073 if) { 4074 QFile inFile(); 4075 if) { 4076 QTextStream inStream(); 3936 4077 QString buffer; 3937 4078 inStream >> buffer; 3938 while ( buffer.length()) {4079 while) { 3939 4080 configCmdLine += buffer; 3940 4081 inStream >> buffer; … … 3947 4088 void Configure::saveCmdLine() 3948 4089 { 3949 if ( dictionary[ "REDO" ] != "yes") {3950 QFile outFile( buildPath + "/configure" + dictionary[ "CUSTOMCONFIG" ] + ".cache");3951 if ( outFile.open( QFile::WriteOnly | QFile::Text )) {3952 QTextStream outStream( &outFile);3953 for ( QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) {4090 if) { 4091 QFile outFile(); 4092 if) { 4093 QTextStream outStream(); 4094 for) { 3954 4095 outStream << (*it) << " " << endl; 3955 4096 } … … 3975 4116 { 3976 4117 QFile file1(fn1), file2(fn2); 3977 if (!file1.open(QFile::ReadOnly) || !file2.open(QFile::ReadOnly))4118 if(!file1.open(QFile::ReadOnly) || !file2.open(QFile::ReadOnly)) 3978 4119 return true; 3979 4120 const int chunk = 2048; 3980 4121 int used1 = 0, used2 = 0; 3981 4122 char b1[chunk], b2[chunk]; 3982 while (!file1.atEnd() && !file2.atEnd()) {3983 if (!used1)4123 while(!file1.atEnd() && !file2.atEnd()) { 4124 if(!used1) 3984 4125 used1 = file1.read(b1, chunk); 3985 if (!used2)4126 if(!used2) 3986 4127 used2 = file2.read(b2, chunk); 3987 if (used1 > 0 && used2 > 0) {4128 if(used1 > 0 && used2 > 0) { 3988 4129 const int cmp = qMin(used1, used2); 3989 if (memcmp(b1, b2, cmp))4130 if(memcmp(b1, b2, cmp)) 3990 4131 return true; 3991 if ((used1 -= cmp))4132 if((used1 -= cmp)) 3992 4133 memcpy(b1, b1+cmp, used1); 3993 if ((used2 -= cmp))4134 if((used2 -= cmp)) 3994 4135 memcpy(b2, b2+cmp, used2); 3995 4136 }
Note:
See TracChangeset
for help on using the changeset viewer.