Changeset 561 for trunk/tools/configure/configureapp.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/tools/configure/configureapp.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the tools applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 117 117 118 118 // Get the path to the executable 119 QFileInfo sourcePathInfo; 120 QT_WA({ 121 unsigned short module_name[256]; 122 GetModuleFileNameW(0, reinterpret_cast<wchar_t *>(module_name), sizeof(module_name)); 123 sourcePathInfo = QString::fromUtf16(module_name); 124 }, { 125 char module_name[256]; 126 GetModuleFileNameA(0, module_name, sizeof(module_name)); 127 sourcePathInfo = QString::fromLocal8Bit(module_name); 128 }); 119 wchar_t module_name[MAX_PATH]; 120 GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t)); 121 QFileInfo sourcePathInfo = QString::fromWCharArray(module_name); 129 122 sourcePath = sourcePathInfo.absolutePath(); 130 123 sourceDir = sourcePathInfo.dir(); … … 249 242 dictionary[ "CETEST" ] = "auto"; 250 243 dictionary[ "CE_SIGNATURE" ] = "no"; 251 dictionary[ "SCRIPTTOOLS" ] = "yes"; 244 dictionary[ "SCRIPT" ] = "auto"; 245 dictionary[ "SCRIPTTOOLS" ] = "auto"; 252 246 dictionary[ "XMLPATTERNS" ] = "auto"; 253 247 dictionary[ "PHONON" ] = "auto"; 254 248 dictionary[ "PHONON_BACKEND" ] = "yes"; 249 dictionary[ "MULTIMEDIA" ] = "yes"; 250 dictionary[ "AUDIO_BACKEND" ] = "yes"; 255 251 dictionary[ "DIRECTSHOW" ] = "no"; 256 252 dictionary[ "WEBKIT" ] = "auto"; 253 dictionary[ "DECLARATIVE" ] = "auto"; 257 254 dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; 258 255 … … 311 308 dictionary[ "LIBPNG" ] = "auto"; 312 309 dictionary[ "LIBMNG" ] = "auto"; 310 dictionary[ "FREETYPE" ] = "no"; 313 311 314 312 dictionary[ "QT3SUPPORT" ] = "yes"; 315 313 dictionary[ "ACCESSIBILITY" ] = "yes"; 316 314 dictionary[ "OPENGL" ] = "yes"; 317 dictionary[ " DIRECT3D" ] = "auto";315 dictionary[ "OPENVG" ] = "no"; 318 316 dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded 319 317 dictionary[ "OPENSSL" ] = "auto"; 320 318 dictionary[ "DBUS" ] = "auto"; 319 dictionary[ "S60" ] = "yes"; 321 320 322 321 dictionary[ "STYLE_WINDOWS" ] = "yes"; … … 329 328 dictionary[ "STYLE_MOTIF" ] = "yes"; 330 329 dictionary[ "STYLE_CDE" ] = "yes"; 330 dictionary[ "STYLE_S60" ] = "no"; 331 331 dictionary[ "STYLE_GTK" ] = "no"; 332 332 … … 352 352 353 353 dictionary[ "INCREDIBUILD_XGE" ] = "auto"; 354 dictionary[ "LTCG" ] = "no"; 355 dictionary[ "NATIVE_GESTURES" ] = "yes"; 354 356 } 355 357 … … 436 438 437 439 for( ; i<configCmdLine.size(); ++i ) { 438 bool continueElse = false;440 bool continueElse[] = {false, false}; 439 441 if( configCmdLine.at(i) == "-help" 440 442 || configCmdLine.at(i) == "-h" … … 475 477 dictionary[ "BUILDDEV" ] = "yes"; 476 478 else if( configCmdLine.at(i) == "-nokia-developer" ) { 479 cout << "Detected -nokia-developer option" << endl; 480 cout << "Nokia employees and agents are allowed to use this software under" << endl; 481 cout << "the authority of Nokia Corporation and/or its subsidiary(-ies)" << endl; 477 482 dictionary[ "BUILDNOKIA" ] = "yes"; 478 483 dictionary[ "BUILDDEV" ] = "yes"; … … 484 489 else if( configCmdLine.at(i) == "-commercial" ) { 485 490 dictionary[ "BUILDTYPE" ] = "commercial"; 491 } 492 else if( configCmdLine.at(i) == "-ltcg" ) { 493 dictionary[ "LTCG" ] = "yes"; 494 } 495 else if( configCmdLine.at(i) == "-no-ltcg" ) { 496 dictionary[ "LTCG" ] = "no"; 486 497 } 487 498 #endif … … 578 589 dictionary[ "LIBMNG" ] = "system"; 579 590 } 591 592 // Text Rendering -------------------------------------------- 593 else if( configCmdLine.at(i) == "-no-freetype" ) 594 dictionary[ "FREETYPE" ] = "no"; 595 else if( configCmdLine.at(i) == "-qt-freetype" ) 596 dictionary[ "FREETYPE" ] = "yes"; 597 580 598 // CE- C runtime -------------------------------------------- 581 599 else if( configCmdLine.at(i) == "-crt" ) { … … 596 614 else if (configCmdLine.at(i) == "-no-cetest") { 597 615 dictionary[ "CETEST" ] = "no"; 616 dictionary[ "CETEST_REQUESTED" ] = "no"; 598 617 } else if (configCmdLine.at(i) == "-cetest") { 599 618 // although specified to use it, we stay at "auto" state 600 619 // this is because checkAvailability() adds variables 601 // we need for crosscompilation 620 // we need for crosscompilation; but remember if we asked 621 // for it. 622 dictionary[ "CETEST_REQUESTED" ] = "yes"; 602 623 } 603 624 // Qt/CE - signing tool ------------------------------------- … … 657 678 dictionary[ "STYLE_CDE" ] = "no"; 658 679 680 else if( configCmdLine.at(i) == "-qt-style-s60" ) 681 dictionary[ "STYLE_S60" ] = "yes"; 682 else if( configCmdLine.at(i) == "-no-style-s60" ) 683 dictionary[ "STYLE_S60" ] = "no"; 684 659 685 // Qt 3 Support --------------------------------------------- 660 686 else if( configCmdLine.at(i) == "-no-qt3support" ) … … 663 689 // Work around compiler nesting limitation 664 690 else 665 continueElse = true;666 if (!continueElse ) {691 continueElse[1] = true; 692 if (!continueElse[1]) { 667 693 } 668 694 … … 676 702 dictionary[ "OPENGL" ] = "yes"; 677 703 dictionary[ "OPENGL_ES_CL" ] = "yes"; 678 } 704 } else if ( configCmdLine.at(i) == "-opengl-es-2" ) { 705 dictionary[ "OPENGL" ] = "yes"; 706 dictionary[ "OPENGL_ES_2" ] = "yes"; 707 } 708 709 // OpenVG Support ------------------------------------------- 710 else if( configCmdLine.at(i) == "-openvg" ) { 711 dictionary[ "OPENVG" ] = "yes"; 712 } else if( configCmdLine.at(i) == "-no-openvg" ) { 713 dictionary[ "OPENVG" ] = "no"; 714 } 715 679 716 // Databases ------------------------------------------------ 680 717 else if( configCmdLine.at(i) == "-qt-sql-mysql" ) … … 762 799 else if( configCmdLine.at(i) == "-incredibuild-xge" ) 763 800 dictionary[ "INCREDIBUILD_XGE" ] = "yes"; 801 else if( configCmdLine.at(i) == "-native-gestures" ) 802 dictionary[ "NATIVE_GESTURES" ] = "yes"; 803 else if( configCmdLine.at(i) == "-no-native-gestures" ) 804 dictionary[ "NATIVE_GESTURES" ] = "no"; 764 805 #if !defined(EVAL) 765 806 // Others --------------------------------------------------- 807 else if (configCmdLine.at(i) == "-fpu" ) 808 { 809 ++i; 810 if(i==argCount) 811 break; 812 dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i); 813 } 814 815 // S60 Support ------------------------------------------- 816 else if( configCmdLine.at(i) == "-s60" ) 817 dictionary[ "S60" ] = "yes"; 818 else if( configCmdLine.at(i) == "-no-s60" ) 819 dictionary[ "S60" ] = "no"; 820 766 821 else if (configCmdLine.at(i) == "-fast" ) 767 822 dictionary[ "FAST" ] = "yes"; … … 812 867 dictionary[ "IWMMXT" ] = "yes"; 813 868 814 else if (configCmdLine.at(i) == "-no-direct3d") { 815 dictionary["DIRECT3D"] = "no"; 816 }else if (configCmdLine.at(i) == "-direct3d") { 817 dictionary["DIRECT3D"] = "auto"; // have to pass auto detection to enable Direct3D 818 } else if( configCmdLine.at(i) == "-no-openssl" ) { 869 else if( configCmdLine.at(i) == "-no-openssl" ) { 819 870 dictionary[ "OPENSSL"] = "no"; 820 871 } else if( configCmdLine.at(i) == "-openssl" ) { … … 832 883 } else if( configCmdLine.at(i) == "-dbus-linked" ) { 833 884 dictionary[ "DBUS" ] = "linked"; 885 } else if( configCmdLine.at(i) == "-no-script" ) { 886 dictionary[ "SCRIPT" ] = "no"; 887 } else if( configCmdLine.at(i) == "-script" ) { 888 dictionary[ "SCRIPT" ] = "yes"; 834 889 } else if( configCmdLine.at(i) == "-no-scripttools" ) { 835 890 dictionary[ "SCRIPTTOOLS" ] = "no"; … … 840 895 } else if( configCmdLine.at(i) == "-xmlpatterns" ) { 841 896 dictionary[ "XMLPATTERNS" ] = "yes"; 897 } else if( configCmdLine.at(i) == "-no-multimedia" ) { 898 dictionary[ "MULTIMEDIA" ] = "no"; 899 } else if( configCmdLine.at(i) == "-multimedia" ) { 900 dictionary[ "MULTIMEDIA" ] = "yes"; 901 } else if( configCmdLine.at(i) == "-audio-backend" ) { 902 dictionary[ "AUDIO_BACKEND" ] = "yes"; 903 } else if( configCmdLine.at(i) == "-no-audio-backend" ) { 904 dictionary[ "AUDIO_BACKEND" ] = "no"; 842 905 } else if( configCmdLine.at(i) == "-no-phonon" ) { 843 906 dictionary[ "PHONON" ] = "no"; … … 854 917 } else if( configCmdLine.at(i) == "-webkit" ) { 855 918 dictionary[ "WEBKIT" ] = "yes"; 919 } else if( configCmdLine.at(i) == "-no-declarative" ) { 920 dictionary[ "DECLARATIVE" ] = "no"; 921 } else if( configCmdLine.at(i) == "-declarative" ) { 922 dictionary[ "DECLARATIVE" ] = "yes"; 856 923 } else if( configCmdLine.at(i) == "-no-plugin-manifests" ) { 857 924 dictionary[ "PLUGIN_MANIFESTS" ] = "no"; 858 925 } else if( configCmdLine.at(i) == "-plugin-manifests" ) { 859 926 dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; 927 } 928 929 // Work around compiler nesting limitation 930 else 931 continueElse[0] = true; 932 if (!continueElse[0]) { 860 933 } 861 934 … … 884 957 break; 885 958 qmakeDefines += "QT_NAMESPACE="+configCmdLine.at(i); 959 } else if( configCmdLine.at(i) == "-qtlibinfix" ) { 960 ++i; 961 if(i==argCount) 962 break; 963 dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i); 886 964 } else if( configCmdLine.at(i) == "-D" ) { 887 965 ++i; … … 1029 1107 break; 1030 1108 QString system = configCmdLine.at(i); 1031 if (system == QLatin1String("raster") || system == QLatin1String("opengl")) 1109 if (system == QLatin1String("raster") 1110 || system == QLatin1String("opengl") 1111 || system == QLatin1String("openvg")) 1032 1112 dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i); 1033 1113 } … … 1096 1176 } 1097 1177 1178 // Tell the user how to proceed building Qt after configure finished its job 1179 dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"]; 1180 if (dictionary.contains("XQMAKESPEC")) { 1181 if (dictionary["XQMAKESPEC"].startsWith("symbian")) { 1182 dictionary["QTBUILDINSTRUCTION"] = QString("make debug-winscw|debug-armv5|release-armv5"); 1183 } else if (dictionary["XQMAKESPEC"].startsWith("wince")) { 1184 dictionary["QTBUILDINSTRUCTION"] = 1185 QString("setcepaths.bat ") + dictionary["XQMAKESPEC"] + QString(" && ") + dictionary["MAKE"]; 1186 } 1187 } 1188 1189 // Tell the user how to confclean before the next configure 1190 dictionary["CONFCLEANINSTRUCTION"] = dictionary["MAKE"] + QString(" confclean"); 1191 1098 1192 // Ensure that -spec (XQMAKESPEC) exists in the mkspecs folder as well 1099 1193 if (dictionary.contains("XQMAKESPEC") && … … 1127 1221 useUnixSeparators = (dictionary["QMAKESPEC"] == "win32-g++"); 1128 1222 1223 // Allow tests for private classes to be compiled against internal builds 1224 if (dictionary["BUILDDEV"] == "yes") 1225 qtConfig += "private_tests"; 1226 1129 1227 1130 1228 #if !defined(EVAL) … … 1149 1247 void Configure::validateArgs() 1150 1248 { 1151 QStringList configs;1152 1249 // Validate the specified config 1153 1250 1251 // Get all possible configurations from the file system. 1154 1252 QDir dir; 1155 1253 QStringList filters; … … 1165 1263 allConfigs << "full"; 1166 1264 1265 // Try internal configurations first. 1266 QStringList possible_configs = QStringList() 1267 << "minimal" 1268 << "small" 1269 << "medium" 1270 << "large" 1271 << "full"; 1272 int index = possible_configs.indexOf(dictionary["QCONFIG"]); 1273 if (index >= 0) { 1274 for (int c = 0; c <= index; c++) { 1275 qmakeConfig += possible_configs[c] + "-config"; 1276 } 1277 return; 1278 } 1279 1280 // If the internal configurations failed, try others. 1167 1281 QStringList::Iterator config; 1168 1282 for( config = allConfigs.begin(); config != allConfigs.end(); ++config ) { 1169 configs += (*config) + "-config";1170 1283 if( (*config) == dictionary[ "QCONFIG" ] ) 1171 1284 break; … … 1176 1289 } 1177 1290 else 1178 qmakeConfig += configs;1291 qmakeConfig += (*config) + "-config"; 1179 1292 } 1180 1293 #endif … … 1297 1410 dictionary[ "STYLE_MOTIF" ] = "no"; 1298 1411 dictionary[ "STYLE_CDE" ] = "no"; 1412 dictionary[ "STYLE_S60" ] = "no"; 1413 dictionary[ "FREETYPE" ] = "no"; 1299 1414 dictionary[ "QT3SUPPORT" ] = "no"; 1300 1415 dictionary[ "OPENGL" ] = "no"; … … 1310 1425 dictionary[ "IWMMXT" ] = "no"; 1311 1426 dictionary[ "CE_CRT" ] = "yes"; 1312 dictionary[ "DIRECT3D" ] = "no";1313 1427 dictionary[ "WEBKIT" ] = "no"; 1314 1428 dictionary[ "PHONON" ] = "yes"; … … 1322 1436 dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; 1323 1437 dictionary[ "QT_INSTALL_PREFIX" ] = ""; 1438 1439 } else if(dictionary[ "XQMAKESPEC" ].startsWith("symbian")) { 1440 dictionary[ "ACCESSIBILITY" ] = "no"; 1441 dictionary[ "STYLE_WINDOWSXP" ] = "no"; 1442 dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; 1443 dictionary[ "STYLE_PLASTIQUE" ] = "no"; 1444 dictionary[ "STYLE_CLEANLOOKS" ] = "no"; 1445 dictionary[ "STYLE_WINDOWSCE" ] = "no"; 1446 dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; 1447 dictionary[ "STYLE_MOTIF" ] = "no"; 1448 dictionary[ "STYLE_CDE" ] = "no"; 1449 dictionary[ "STYLE_S60" ] = "yes"; 1450 dictionary[ "FREETYPE" ] = "no"; 1451 dictionary[ "QT3SUPPORT" ] = "no"; 1452 dictionary[ "OPENGL" ] = "no"; 1453 dictionary[ "OPENSSL" ] = "yes"; 1454 dictionary[ "STL" ] = "yes"; 1455 dictionary[ "EXCEPTIONS" ] = "yes"; 1456 dictionary[ "RTTI" ] = "yes"; 1457 dictionary[ "ARCHITECTURE" ] = "symbian"; 1458 dictionary[ "3DNOW" ] = "no"; 1459 dictionary[ "SSE" ] = "no"; 1460 dictionary[ "SSE2" ] = "no"; 1461 dictionary[ "MMX" ] = "no"; 1462 dictionary[ "IWMMXT" ] = "no"; 1463 dictionary[ "CE_CRT" ] = "no"; 1464 dictionary[ "DIRECT3D" ] = "no"; 1465 dictionary[ "WEBKIT" ] = "yes"; 1466 dictionary[ "ASSISTANT_WEBKIT" ] = "no"; 1467 dictionary[ "PHONON" ] = "yes"; 1468 dictionary[ "XMLPATTERNS" ] = "yes"; 1469 dictionary[ "QT_GLIB" ] = "no"; 1470 dictionary[ "S60" ] = "yes"; 1471 // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested) 1472 // iconv_open seems to return -1 always, so something is probably missing from the platform. 1473 dictionary[ "QT_ICONV" ] = "no"; 1474 dictionary[ "SCRIPTTOOLS" ] = "no"; 1475 dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; 1476 dictionary[ "QT_INSTALL_PREFIX" ] = ""; 1477 dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; 1478 dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; 1479 dictionary[ "SQL_SQLITE" ] = "yes"; 1480 dictionary[ "SQL_SQLITE_LIB" ] = "system"; 1481 1482 // Disable building docs and translations for now 1483 disabledBuildParts << "docs" << "translations"; 1324 1484 1325 1485 } else if(dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. … … 1409 1569 "[-no-libmng] [-qt-libmng] [-system-libmng] [-no-qt3support] [-mmx]\n" 1410 1570 "[-no-mmx] [-3dnow] [-no-3dnow] [-sse] [-no-sse] [-sse2] [-no-sse2]\n" 1411 "[-no-iwmmxt] [-iwmmxt] [- direct3d] [-openssl] [-openssl-linked]\n"1571 "[-no-iwmmxt] [-iwmmxt] [-openssl] [-openssl-linked]\n" 1412 1572 "[-no-openssl] [-no-dbus] [-dbus] [-dbus-linked] [-platform <spec>]\n" 1413 "[-qtnamespace <namespace>] [- no-phonon] [-phonon]\n"1414 "[- no-phonon-backend] [-phonon-backend]\n"1415 "[-no- webkit] [-webkit]\n"1416 "[-no-script tools] [-scripttools]\n"1417 "[- graphicssystem raster|opengl]\n\n", 0, 7);1573 "[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n" 1574 "[-phonon] [-no-phonon-backend] [-phonon-backend]\n" 1575 "[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n" 1576 "[-no-script] [-script] [-no-scripttools] [-scripttools]\n" 1577 "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7); 1418 1578 1419 1579 desc("Installation options:\n\n"); … … 1459 1619 desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries."); 1460 1620 desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n"); 1621 1622 desc("LTCG", "yes", "-ltcg", "Use Link Time Code Generation. (Release builds only)"); 1623 desc("LTCG", "no", "-no-ltcg", "Do not use Link Time Code Generation.\n"); 1461 1624 1462 1625 desc("FAST", "no", "-no-fast", "Configure Qt normally by generating Makefiles for all project files."); … … 1494 1657 desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n"); 1495 1658 1659 desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n"); 1660 desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality"); 1661 desc( "", "Requires EGL support, typically supplied by an OpenGL", false, ' '); 1662 desc( "", "or other graphics implementation\n", false, ' '); 1663 1496 1664 #endif 1497 1665 desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); … … 1500 1668 1501 1669 #if !defined(EVAL) 1502 desc( "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}\n"); 1670 desc( "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}"); 1671 desc( "-qtlibinfix <infix>", "Renames all Qt* libs to Qt*<infix>\n"); 1503 1672 desc( "-D <define>", "Add an explicit define to the preprocessor."); 1504 1673 desc( "-I <includepath>", "Add an explicit include path."); … … 1509 1678 "Available values for <sys>:"); 1510 1679 desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' '); 1511 desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL accelleration, experimental!", ' '); 1680 desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' '); 1681 desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!", ' '); 1512 1682 1513 1683 … … 1573 1743 desc("SSE2", "no", "-no-sse2", "Do not compile with use of SSE2 instructions"); 1574 1744 desc("SSE2", "yes", "-sse2", "Compile with use of SSE2 instructions"); 1575 desc("DIRECT3D", "yes", "-direct3d", "Compile in Direct3D support (experimental - see INSTALL for more info)");1576 1745 desc("OPENSSL", "no", "-no-openssl", "Do not compile in OpenSSL support"); 1577 1746 desc("OPENSSL", "yes", "-openssl", "Compile in run-time OpenSSL support"); … … 1584 1753 desc("PHONON_BACKEND","no", "-no-phonon-backend","Do not compile the platform-specific Phonon backend-plugin"); 1585 1754 desc("PHONON_BACKEND","yes","-phonon-backend", "Compile in the platform-specific Phonon backend-plugin"); 1755 desc("MULTIMEDIA", "no", "-no-multimedia", "Do not compile the multimedia module"); 1756 desc("MULTIMEDIA", "yes","-multimedia", "Compile in multimedia module"); 1757 desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into QtMultimedia"); 1758 desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia"); 1586 1759 desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module"); 1587 1760 desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)"); 1761 desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module."); 1762 desc("SCRIPT", "yes", "-script", "Build the QtScript module."); 1588 1763 desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module."); 1589 1764 desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module."); 1765 desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module"); 1766 desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module"); 1590 1767 1591 1768 desc( "-arch <arch>", "Specify an architecture.\n" … … 1593 1770 desc("ARCHITECTURE","windows", "", " windows", ' '); 1594 1771 desc("ARCHITECTURE","windowsce", "", " windowsce", ' '); 1772 desc("ARCHITECTURE","symbian", "", " symbian", ' '); 1595 1773 desc("ARCHITECTURE","boundschecker", "", " boundschecker", ' '); 1596 1774 desc("ARCHITECTURE","generic", "", " generic\n", ' '); … … 1607 1785 desc("STYLE_CDE", "yes", "", " cde", ' '); 1608 1786 desc("STYLE_WINDOWSCE", "yes", "", " windowsce", ' '); 1609 desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile\n", ' '); 1787 desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile", ' '); 1788 desc("STYLE_S60" , "yes", "", " s60\n", ' '); 1789 desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7."); 1790 desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7."); 1610 1791 1611 1792 /* We do not support -qconfig on Windows yet … … 1633 1814 desc("OPENGL_ES_CM", "no", "-opengl-es-cm", "Enable support for OpenGL ES Common"); 1634 1815 desc("OPENGL_ES_CL", "no", "-opengl-es-cl", "Enable support for OpenGL ES Common Lite"); 1816 desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0"); 1635 1817 desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE"); 1636 1818 1819 // Qt\Symbian only options go below here ----------------------------------------------------------------------------- 1820 desc("Qt for Symbian OS only:\n\n"); 1821 desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support."); 1822 desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt."); 1823 desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2"); 1824 desc("S60", "no", "-no-s60", "Do not compile in S60 support."); 1825 desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework\n"); 1637 1826 return true; 1638 1827 } … … 1640 1829 } 1641 1830 1642 bool Configure::findFileInPaths(const QString &fileName, const QStringList &paths) 1643 { 1644 QDir d; 1645 for( QStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it ) { 1646 // Remove any leading or trailing ", this is commonly used in the environment 1647 // variables 1648 QString path = (*it); 1649 if ( path.startsWith( "\"" ) ) 1650 path = path.right( path.length() - 1 ); 1651 if ( path.endsWith( "\"" ) ) 1652 path = path.left( path.length() - 1 ); 1653 if( d.exists( path + QDir::separator() + fileName ) ) 1654 return true; 1655 } 1656 return false; 1657 } 1658 1659 bool Configure::findFile( const QString &fileName ) 1660 { 1661 QString file = fileName.toLower(); 1662 QStringList paths; 1831 QString Configure::findFileInPaths(const QString &fileName, const QString &paths) 1832 { 1663 1833 #if defined(Q_OS_WIN32) 1664 1834 QRegExp splitReg("[;,]"); … … 1666 1836 QRegExp splitReg("[:]"); 1667 1837 #endif 1668 if (file.endsWith(".h")) 1669 paths = QString::fromLocal8Bit(getenv("INCLUDE")).split(splitReg, QString::SkipEmptyParts); 1670 else if ( file.endsWith( ".lib" ) ) 1671 paths = QString::fromLocal8Bit(getenv("LIB")).split(splitReg, QString::SkipEmptyParts); 1672 else 1673 paths = QString::fromLocal8Bit(getenv("PATH")).split(splitReg, QString::SkipEmptyParts); 1674 return findFileInPaths(file, paths); 1838 QStringList pathList = paths.split(splitReg, QString::SkipEmptyParts); 1839 QDir d; 1840 for( QStringList::ConstIterator it = pathList.begin(); it != pathList.end(); ++it ) { 1841 // Remove any leading or trailing ", this is commonly used in the environment 1842 // variables 1843 QString path = (*it); 1844 if ( path.startsWith( '\"' ) ) 1845 path = path.right( path.length() - 1 ); 1846 if ( path.endsWith( '\"' ) ) 1847 path = path.left( path.length() - 1 ); 1848 if( d.exists( path + QDir::separator() + fileName ) ) 1849 return path; 1850 } 1851 return QString(); 1852 } 1853 1854 bool Configure::findFile( const QString &fileName ) 1855 { 1856 const QString file = fileName.toLower(); 1857 const QString pathEnvVar = QString::fromLocal8Bit(getenv("PATH")); 1858 const QString mingwPath = dictionary["QMAKESPEC"].endsWith("-g++") ? 1859 findFileInPaths("mingw32-g++.exe", pathEnvVar) : QString(); 1860 1861 QString paths; 1862 if (file.endsWith(".h")) { 1863 if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull()) 1864 return true; 1865 paths = QString::fromLocal8Bit(getenv("INCLUDE")); 1866 } else if ( file.endsWith( ".lib" ) || file.endsWith( ".a" ) ) { 1867 if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../lib")).isNull()) 1868 return true; 1869 paths = QString::fromLocal8Bit(getenv("LIB")); 1870 } else { 1871 paths = pathEnvVar; 1872 } 1873 return !findFileInPaths(file, paths).isNull(); 1675 1874 } 1676 1875 … … 1742 1941 bool available = false; 1743 1942 if (part == "STYLE_WINDOWSXP") 1744 available = ( dictionary.value("QMAKESPEC") == "win32-g++" ||findFile("uxtheme.h"));1943 available = (findFile("uxtheme.h")); 1745 1944 1746 1945 else if (part == "ZLIB") … … 1768 1967 available = findFile("sqlcli.h") && findFile("sqlcli1.h") && findFile("db2cli.lib"); 1769 1968 else if (part == "SQL_SQLITE") 1969 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) 1970 available = false; // In Symbian we only support system sqlite option 1971 else 1770 1972 available = true; // Built in, we have a fork 1771 1973 else if (part == "SQL_SQLITE_LIB") { 1772 1974 if (dictionary[ "SQL_SQLITE_LIB" ] == "system") { 1773 available = findFile("sqlite3.h") && findFile("sqlite3.lib"); 1774 if (available) 1775 dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; 1975 // Symbian has multiple .lib/.dll files we need to find 1976 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { 1977 available = true; // There is sqlite_symbian plugin which exports the necessary stuff 1978 dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3"; 1979 } else { 1980 available = findFile("sqlite3.h") && findFile("sqlite3.lib"); 1981 if (available) 1982 dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; 1983 } 1776 1984 } else 1777 1985 available = true; … … 1785 1993 available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); 1786 1994 else if (part == "OPENGL_ES_CL") 1995 available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); 1996 else if (part == "OPENGL_ES_2") 1787 1997 available = (dictionary[ "ARCHITECTURE" ] == "windowsce"); 1788 1998 else if (part == "DIRECTSHOW") … … 1806 2016 dictionary[ "QT_CE_RAPI_LIB" ] += QLatin1String("\"") + rapiLib + QLatin1String("\""); 1807 2017 } 2018 else if (dictionary[ "CETEST_REQUESTED" ] == "yes") { 2019 cout << "cetest could not be enabled: rapi.h and rapi.lib could not be found." << endl; 2020 cout << "Make sure the environment is set up for compiling with ActiveSync." << endl; 2021 dictionary[ "DONE" ] = "error"; 2022 } 1808 2023 } 1809 2024 else if (part == "INCREDIBUILD_XGE") … … 1816 2031 && dictionary.value("QMAKESPEC") != "win32-msvc2002" 1817 2032 && dictionary.value("EXCEPTIONS") == "yes"; 1818 } else if (part == "DIRECT3D") {1819 QString sdk_dir(QString::fromLocal8Bit(getenv("DXSDK_DIR")));1820 QDir dir;1821 bool has_d3d = false;1822 1823 if (!sdk_dir.isEmpty() && dir.exists(sdk_dir))1824 has_d3d = true;1825 1826 if (has_d3d && !QFile::exists(sdk_dir + QLatin1String("\\include\\d3d9.h"))) {1827 cout << "No Direct3D version 9 SDK found." << endl;1828 has_d3d = false;1829 }1830 1831 // find the first dxguid.lib in the current LIB paths, if it is NOT1832 // the D3D SDK one, we're most likely in trouble..1833 if (has_d3d) {1834 has_d3d = false;1835 QString env_lib(QString::fromLocal8Bit(getenv("LIB")));1836 QStringList lib_paths = env_lib.split(';');1837 for (int i=0; i<lib_paths.size(); ++i) {1838 QString lib_path = lib_paths.at(i);1839 if (QFile::exists(lib_path + QLatin1String("\\dxguid.lib")))1840 {1841 if (lib_path.startsWith(sdk_dir)) {1842 has_d3d = true;1843 } else {1844 cout << "Your D3D/Platform SDK library paths seem to appear in the wrong order." << endl;1845 }1846 break;1847 }1848 }1849 }1850 1851 available = has_d3d;1852 if (!has_d3d) {1853 cout << "Setting Direct3D to NO, since the proper Direct3D SDK was not detected." << endl1854 << "Make sure you have the Direct3D SDK installed, and that you have run" << endl1855 << "the <path to SDK>\\Utilities\\Bin\\dx_setenv.cmd script." << endl1856 << "The D3D SDK library path *needs* to appear before the Platform SDK library" << endl1857 << "path in your LIB environment variable." << endl;1858 }1859 2033 } else if (part == "PHONON") { 1860 available = findFile("vmr9.h") && findFile("dshow.h") && findFile("strmiids.lib") && 1861 findFile("dmoguids.lib") && findFile("msdmo.lib") && findFile("d3d9.h"); 2034 available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h") 2035 && (findFile("strmiids.lib") || findFile("libstrmiids.a")) 2036 && (findFile("dmoguids.lib") || findFile("libdmoguids.a")) 2037 && (findFile("msdmo.lib") || findFile("libmsdmo.a")) 2038 && findFile("d3d9.h"); 1862 2039 1863 2040 if (!available) { 1864 2041 cout << "All the required DirectShow/Direct3D files couldn't be found." << endl 1865 << "Make sure you have either the platform SDK AND the DirectX SDK or the Windows SDK installed." << endl 1866 << "If you have the DirectX SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl; 1867 } 2042 << "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl 2043 << "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl; 2044 if (!findFile("vmr9.h")) cout << "vmr9.h not found" << endl; 2045 if (!findFile("dshow.h")) cout << "dshow.h not found" << endl; 2046 if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl; 2047 if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl; 2048 if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl; 2049 if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl; 2050 } 2051 } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS") { 2052 available = true; 1868 2053 } else if (part == "WEBKIT") { 1869 2054 available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++"); 1870 } else if (part == " SCRIPTTOOLS") {1871 available = true;2055 } else if (part == "DECLARATIVE") { 2056 available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h"); 1872 2057 } 1873 2058 … … 1946 2131 if (dictionary["DBUS"] == "auto") 1947 2132 dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no"; 2133 if (dictionary["SCRIPT"] == "auto") 2134 dictionary["SCRIPT"] = checkAvailability("SCRIPT") ? "yes" : "no"; 1948 2135 if (dictionary["SCRIPTTOOLS"] == "auto") 1949 2136 dictionary["SCRIPTTOOLS"] = checkAvailability("SCRIPTTOOLS") ? "yes" : "no"; 1950 2137 if (dictionary["XMLPATTERNS"] == "auto") 1951 2138 dictionary["XMLPATTERNS"] = checkAvailability("XMLPATTERNS") ? "yes" : "no"; 1952 if (dictionary["DIRECT3D"] == "auto")1953 dictionary["DIRECT3D"] = checkAvailability("DIRECT3D") ? "yes" : "no";1954 2139 if (dictionary["PHONON"] == "auto") 1955 2140 dictionary["PHONON"] = checkAvailability("PHONON") ? "yes" : "no"; 1956 2141 if (dictionary["WEBKIT"] == "auto") 1957 2142 dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no"; 2143 if (dictionary["DECLARATIVE"] == "auto") 2144 dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no"; 1958 2145 1959 2146 // Qt/WinCE remote test application … … 1999 2186 exit(0); // Exit cleanly for Ctrl+C 2000 2187 } 2188 if (0 != dictionary["ARM_FPU_TYPE"].size()) 2189 { 2190 QStringList l= QStringList() 2191 << "softvfp" 2192 << "softvfp+vfpv2" 2193 << "vfpv2"; 2194 if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) 2195 cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; 2196 } 2001 2197 2002 2198 return true; … … 2021 2217 dll staticlib 2022 2218 2023 internal2024 2219 nocrosscompiler 2025 2220 GNUmake … … 2047 2242 if (!dictionary["QCONFIG"].isEmpty()) 2048 2243 build_options += dictionary["QCONFIG"] + "-config "; 2049 if (dictionary["STL"] == "no")2050 build_options += "no-stl";2051 2244 build_options.sort(); 2052 2245 … … 2148 2341 qtConfig += "system-mng"; 2149 2342 2343 // Text rendering -------------------------------------------------- 2344 if( dictionary[ "FREETYPE" ] == "yes" ) 2345 qtConfig += "freetype"; 2346 2150 2347 // Styles ------------------------------------------------------- 2151 2348 if ( dictionary[ "STYLE_WINDOWS" ] == "yes" ) … … 2178 2375 if ( dictionary[ "STYLE_CDE" ] == "yes" ) 2179 2376 qmakeStyles += "cde"; 2377 2378 if ( dictionary[ "STYLE_S60" ] == "yes" ) 2379 qmakeStyles += "s60"; 2180 2380 2181 2381 // Databases ---------------------------------------------------- … … 2263 2463 if ( dictionary["OPENGL_ES_CM"] == "yes" ) { 2264 2464 qtConfig += "opengles1"; 2465 qtConfig += "egl"; 2466 } 2467 2468 if ( dictionary["OPENGL_ES_2"] == "yes" ) { 2469 qtConfig += "opengles2"; 2470 qtConfig += "egl"; 2265 2471 } 2266 2472 2267 2473 if ( dictionary["OPENGL_ES_CL"] == "yes" ) { 2268 2474 qtConfig += "opengles1cl"; 2475 qtConfig += "egl"; 2476 } 2477 2478 if ( dictionary["OPENVG"] == "yes" ) { 2479 qtConfig += "openvg"; 2480 qtConfig += "egl"; 2481 } 2482 2483 if ( dictionary["S60"] == "yes" ) { 2484 qtConfig += "s60"; 2269 2485 } 2270 2486 2271 2487 if ( dictionary["DIRECTSHOW"] == "yes" ) 2272 2488 qtConfig += "directshow"; 2273 2274 if (dictionary[ "DIRECT3D" ] == "yes")2275 qtConfig += "direct3d";2276 2489 2277 2490 if (dictionary[ "OPENSSL" ] == "yes") … … 2293 2506 qtConfig += "cetest"; 2294 2507 2295 if (dictionary[ "SCRIPTTOOLS" ] == "yes") 2508 if (dictionary[ "SCRIPT" ] == "yes") 2509 qtConfig += "script"; 2510 2511 if (dictionary[ "SCRIPTTOOLS" ] == "yes") { 2512 if (dictionary[ "SCRIPT" ] == "no") { 2513 cout << "QtScriptTools was requested, but it can't be built due to QtScript being " 2514 "disabled." << endl; 2515 dictionary[ "DONE" ] = "error"; 2516 } 2296 2517 qtConfig += "scripttools"; 2518 } 2297 2519 2298 2520 if (dictionary[ "XMLPATTERNS" ] == "yes") … … 2305 2527 } 2306 2528 2529 if (dictionary["MULTIMEDIA"] == "yes") 2530 qtConfig += "multimedia"; 2531 2307 2532 if (dictionary["WEBKIT"] == "yes") 2308 2533 qtConfig += "webkit"; 2534 2535 if (dictionary["DECLARATIVE"] == "yes") 2536 qtConfig += "declarative"; 2537 2538 if( dictionary[ "NATIVE_GESTURES" ] == "yes" ) 2539 qtConfig += "native-gestures"; 2309 2540 2310 2541 // We currently have no switch for QtSvg, so add it unconditionally. … … 2327 2558 } 2328 2559 } 2560 2561 if (dictionary.contains("XQMAKESPEC") && ( dictionary["QMAKESPEC"] != dictionary["XQMAKESPEC"] ) ) 2562 qmakeConfig += "cross_compile"; 2329 2563 2330 2564 // Directories and settings for .qmake.cache -------------------- … … 2368 2602 if (!opensslLibs.isEmpty()) 2369 2603 qmakeVars += opensslLibs; 2370 else if (dictionary[ "OPENSSL" ] == "linked") 2371 qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); 2604 else if (dictionary[ "OPENSSL" ] == "linked") { 2605 if(dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("symbian") ) 2606 qmakeVars += QString("OPENSSL_LIBS = -llibssl -llibcrypto"); 2607 else 2608 qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); 2609 } 2372 2610 if (!qmakeSql.isEmpty()) 2373 2611 qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " " ); … … 2482 2720 configStream << " static"; 2483 2721 2722 if( dictionary[ "LTCG" ] == "yes" ) 2723 configStream << " ltcg"; 2484 2724 if( dictionary[ "STL" ] == "yes" ) 2485 2725 configStream << " stl"; … … 2526 2766 2527 2767 if(!dictionary["QMAKE_RPATHDIR"].isEmpty()) 2528 configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"]; 2768 configStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl; 2769 2770 if (!dictionary["QT_LIBINFIX"].isEmpty()) 2771 configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl; 2772 2773 if(!dictionary["ARM_FPU_TYPE"].isEmpty()) { 2774 configStream<<"QMAKE_CXXFLAGS.ARMCC += --fpu "<< dictionary["ARM_FPU_TYPE"]; 2775 } 2529 2776 2530 2777 configStream.flush(); … … 2636 2883 if(dictionary["STYLE_MOTIF"] != "yes") qconfigList += "QT_NO_STYLE_MOTIF"; 2637 2884 if(dictionary["STYLE_CDE"] != "yes") qconfigList += "QT_NO_STYLE_CDE"; 2885 if(dictionary["STYLE_S60"] != "yes") qconfigList += "QT_NO_STYLE_S60"; 2638 2886 if(dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE"; 2639 2887 if(dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE"; … … 2650 2898 } 2651 2899 2652 if(dictionary["QT3SUPPORT"] == "no") qconfigList += "QT_NO_QT3SUPPORT";2653 2900 if(dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; 2654 2901 if(dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS"; 2655 2902 if(dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; 2656 if(dictionary[" DIRECT3D"] == "no") qconfigList += "QT_NO_DIRECT3D";2903 if(dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG"; 2657 2904 if(dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; 2658 2905 if(dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; … … 2660 2907 if(dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; 2661 2908 if(dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; 2909 if(dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; 2662 2910 if(dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; 2911 if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; 2663 2912 if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; 2913 if(dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT"; 2664 2914 if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS"; 2915 if(dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE"; 2916 if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60"; 2917 if(dictionary["NATIVE_GESTURES"] == "no") qconfigList += "QT_NO_NATIVE_GESTURES"; 2665 2918 2666 2919 if(dictionary["OPENGL_ES_CM"] == "yes" || 2667 dictionary["OPENGL_ES_CL"] == "yes") qconfigList += "QT_OPENGL_ES"; 2920 dictionary["OPENGL_ES_CL"] == "yes" || 2921 dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES"; 2668 2922 2669 2923 if(dictionary["OPENGL_ES_CM"] == "yes") qconfigList += "QT_OPENGL_ES_1"; 2924 if(dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES_2"; 2670 2925 if(dictionary["OPENGL_ES_CL"] == "yes") qconfigList += "QT_OPENGL_ES_1_CL"; 2671 2926 … … 2680 2935 if(dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE"; 2681 2936 2937 if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG"; 2682 2938 if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL"; 2683 2939 if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER"; 2940 2941 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { 2942 // These features are not ported to Symbian (yet) 2943 qconfigList += "QT_NO_CONCURRENT"; 2944 qconfigList += "QT_NO_QFUTURE"; 2945 qconfigList += "QT_NO_CRASHHANDLER"; 2946 qconfigList += "QT_NO_PRINTER"; 2947 qconfigList += "QT_NO_SYSTEMTRAYICON"; 2948 } 2684 2949 2685 2950 qconfigList.sort(); … … 2743 3008 2744 3009 // Replace old qconfig.h with new one 2745 ::SetFileAttributes A(outName.toLocal8Bit(), FILE_ATTRIBUTE_NORMAL);3010 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); 2746 3011 QFile::remove(outName); 2747 3012 tmpFile.copy(outName); … … 2779 3044 2780 3045 outName = defSpec + "/qmake.conf"; 2781 ::SetFileAttributes A(outName.toLocal8Bit(), FILE_ATTRIBUTE_NORMAL );3046 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL ); 2782 3047 QFile qmakeConfFile(outName); 2783 3048 if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) { … … 2798 3063 tmpStream << "/* Licensed */" << endl 2799 3064 << "static const char qt_configure_licensee_str [512 + 12] = \"qt_lcnsuser=" << licenseInfo["LICENSEE"] << "\";" << endl 2800 << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl; 3065 << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl 3066 << endl 3067 << "/* Build date */" << endl 3068 << "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl 3069 << endl; 2801 3070 if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) 2802 3071 tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl; … … 2847 3116 2848 3117 // Replace old qconfig.cpp with new one 2849 ::SetFileAttributes A(outName.toLocal8Bit(), FILE_ATTRIBUTE_NORMAL );3118 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL ); 2850 3119 QFile::remove( outName ); 2851 3120 tmpFile2.copy(outName); 2852 3121 tmpFile2.close(); 3122 } 3123 3124 QTemporaryFile tmpFile3; 3125 if (tmpFile3.open()) { 3126 tmpStream.setDevice(&tmpFile3); 3127 tmpStream << "/* Evaluation license key */" << endl 3128 << "static const char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl; 3129 3130 tmpStream.flush(); 3131 tmpFile3.flush(); 3132 3133 outName = buildPath + "/src/corelib/global/qconfig_eval.cpp"; 3134 ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL ); 3135 QFile::remove( outName ); 3136 3137 if (dictionary["EDITION"] == "Evaluation" || qmakeDefines.contains("QT_EVAL")) 3138 tmpFile3.copy(outName); 3139 tmpFile3.close(); 2853 3140 } 2854 3141 } … … 2902 3189 cout << "Maketool...................." << dictionary[ "MAKE" ] << endl; 2903 3190 cout << "Debug symbols..............." << (dictionary[ "BUILD" ] == "debug" ? "yes" : "no") << endl; 3191 cout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl; 2904 3192 cout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl; 2905 3193 cout << "STL support................." << dictionary[ "STL" ] << endl; … … 2912 3200 cout << "IWMMXT support.............." << dictionary[ "IWMMXT" ] << endl; 2913 3201 cout << "OpenGL support.............." << dictionary[ "OPENGL" ] << endl; 2914 cout << " Direct3D support............" << dictionary[ "DIRECT3D" ] << endl;3202 cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; 2915 3203 cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl; 2916 3204 cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl; 2917 3205 cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl; 2918 3206 cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl; 3207 cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; 2919 3208 cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; 3209 cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; 3210 cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; 2920 3211 cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; 2921 3212 cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl; … … 2928 3219 cout << " JPEG support............" << dictionary[ "JPEG" ] << endl; 2929 3220 cout << " PNG support............." << dictionary[ "PNG" ] << endl; 2930 cout << " MNG support............." << dictionary[ "MNG" ] << endl << endl; 3221 cout << " MNG support............." << dictionary[ "MNG" ] << endl; 3222 cout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl; 2931 3223 2932 3224 cout << "Styles:" << endl; … … 2939 3231 cout << " CDE....................." << dictionary[ "STYLE_CDE" ] << endl; 2940 3232 cout << " Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl; 2941 cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl << endl; 3233 cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl; 3234 cout << " S60....................." << dictionary[ "STYLE_S60" ] << endl << endl; 2942 3235 2943 3236 cout << "Sql Drivers:" << endl; … … 2969 3262 cout << "Cetest support.............." << dictionary[ "CETEST" ] << endl; 2970 3263 cout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl << endl; 3264 } 3265 3266 if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("symbian"))) { 3267 cout << "Support for S60............." << dictionary[ "S60" ] << endl; 2971 3268 } 2972 3269 … … 3104 3401 void Configure::buildHostTools() 3105 3402 { 3403 if (dictionary[ "NOPROCESS" ] == "yes") 3404 dictionary[ "DONE" ] = "yes"; 3405 3106 3406 if (!dictionary.contains("XQMAKESPEC")) 3107 3407 return; … … 3110 3410 QStringList hostToolsDirs; 3111 3411 hostToolsDirs 3112 << "src/tools /bootstrap"3113 << " src/tools/moc"3114 << "src/tools/rcc" 3115 << "src/tools/uic"3116 << "tools/checksdk";3412 << "src/tools" 3413 << "tools/linguist/lrelease"; 3414 3415 if(dictionary["XQMAKESPEC"].startsWith("wince")) 3416 hostToolsDirs << "tools/checksdk"; 3117 3417 3118 3418 if (dictionary[ "CETEST" ] == "yes") … … 3327 3627 cout << "Processing of project files have been disabled." << endl; 3328 3628 cout << "Only use this option if you really know what you're doing." << endl << endl; 3329 dictionary[ "DONE" ] = "yes";3330 3629 return; 3331 3630 } … … 3335 3634 { 3336 3635 QString make = dictionary[ "MAKE" ]; 3337 cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl; 3338 cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; 3636 if (!dictionary.contains("XQMAKESPEC")) { 3637 cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl; 3638 cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; 3639 } else if(dictionary.value("QMAKESPEC").startsWith("wince")) { 3640 // we are cross compiling for Windows CE 3641 cout << endl << endl << "Qt is now configured for building. To start the build run:" << endl 3642 << "\tsetcepaths " << dictionary.value("XQMAKESPEC") << endl 3643 << "\t" << qPrintable(make) << endl 3644 << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; 3645 } else { // Compiling for Symbian OS 3646 cout << endl << endl << "Qt is now configured for building. To start the build run:" << qPrintable(dictionary["QTBUILDINSTRUCTION"]) << "." << endl 3647 << "To reconfigure, run '" << qPrintable(dictionary["CONFCLEANINSTRUCTION"]) << "' and configure." << endl; 3648 } 3339 3649 } 3340 3650 … … 3378 3688 } 3379 3689 3690 bool haveGpl3 = false; 3380 3691 QString licenseFile = orgLicenseFile; 3381 3692 QString theLicense; 3382 3693 if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") { 3383 theLicense = "GNU General Public License (GPL) version 3 \nor the GNU Lesser General Public License (LGPL) version 2.1"; 3694 haveGpl3 = QFile::exists(orgLicenseFile + "/LICENSE.GPL3"); 3695 theLicense = "GNU Lesser General Public License (LGPL) version 2.1"; 3696 if (haveGpl3) 3697 theLicense += "\nor the GNU General Public License (GPL) version 3"; 3384 3698 } else { 3385 3699 // the first line of the license file tells us which license it is … … 3398 3712 << endl; 3399 3713 if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") { 3400 cout << "Type '3' to view the GNU General Public License version 3 (GPLv3)." << endl; 3714 if (haveGpl3) 3715 cout << "Type '3' to view the GNU General Public License version 3 (GPLv3)." << endl; 3401 3716 cout << "Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1)." << endl; 3402 3717 } else { … … 3452 3767 void Configure::readLicense() 3453 3768 { 3454 dictionary[ "PLATFORM NAME" ] = (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") 3455 && (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) 3456 ? "Qt for Windows CE" : "Qt for Windows"; 3769 if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") && 3770 (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) 3771 dictionary["PLATFORM NAME"] = "Qt for Windows CE"; 3772 else if (dictionary.value("XQMAKESPEC").startsWith("symbian")) 3773 dictionary["PLATFORM NAME"] = "Qt for Symbian"; 3774 else 3775 dictionary["PLATFORM NAME"] = "Qt for Windows"; 3776 dictionary["LICENSE FILE"] = sourcePath; 3777 3457 3778 bool openSource = false; 3779 bool hasOpenSource = QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL"); 3458 3780 if (dictionary["BUILDNOKIA"] == "yes" || dictionary["BUILDTYPE"] == "commercial") { 3459 3781 openSource = false; 3460 3782 } else if (dictionary["BUILDTYPE"] == "opensource") { 3461 3783 openSource = true; 3462 } else {3784 } else if (hasOpenSource) { // No Open Source? Just display the commercial license right away 3463 3785 forever { 3464 3786 char accept = '?'; … … 3478 3800 } 3479 3801 } 3480 if (openSource) { 3481 dictionary["LICENSE FILE"] = sourcePath; 3482 if (QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL")) { 3483 cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl; 3484 licenseInfo["LICENSEE"] = "Open Source"; 3485 dictionary["EDITION"] = "OpenSource"; 3486 dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE"; 3487 cout << endl; 3488 if (!showLicense(dictionary["LICENSE FILE"])) { 3489 cout << "Configuration aborted since license was not accepted"; 3490 dictionary["DONE"] = "error"; 3491 return; 3492 } 3802 if (hasOpenSource && openSource) { 3803 cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl; 3804 licenseInfo["LICENSEE"] = "Open Source"; 3805 dictionary["EDITION"] = "OpenSource"; 3806 dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE"; 3807 cout << endl; 3808 if (!showLicense(dictionary["LICENSE FILE"])) { 3809 cout << "Configuration aborted since license was not accepted"; 3810 dictionary["DONE"] = "error"; 3493 3811 return; 3494 3812 } 3495 #ifndef COMMERCIAL_VERSION 3813 } else if (openSource) { 3814 cout << endl << "Cannot find the GPL license files! Please download the Open Source version of the library." << endl; 3815 dictionary["DONE"] = "error"; 3816 } 3817 #ifdef COMMERCIAL_VERSION 3496 3818 else { 3497 cout << endl << "Cannot find the GPL license files!" << endl;3498 dictionary["DONE"] = "error";3499 }3500 #else3501 } else {3502 3819 Tools::checkLicense(dictionary, licenseInfo, firstLicensePath()); 3503 if (dictionary["DONE"] != "error" ) {3820 if (dictionary["DONE"] != "error" && dictionary["BUILDNOKIA"] != "yes") { 3504 3821 // give the user some feedback, and prompt for license acceptance 3505 3822 cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " " << dictionary["EDITION"] << " Edition."<< endl << endl; … … 3511 3828 } 3512 3829 } 3513 #endif // COMMERCIAL_VERSION 3830 #else // !COMMERCIAL_VERSION 3831 else { 3832 cout << endl << "Cannot build commercial edition from the open source version of the library." << endl; 3833 dictionary["DONE"] = "error"; 3834 } 3835 #endif 3514 3836 } 3515 3837
Note:
See TracChangeset
for help on using the changeset viewer.