diff options
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configure.pro | 5 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 204 |
2 files changed, 187 insertions, 22 deletions
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index 1ce9a1b..b82104e 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -6,7 +6,10 @@ CONFIG -= moc qt DEFINES = QT_NODLL QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_STL QT_NO_COMPRESS QT_BUILD_QMAKE QT_NO_THREAD QT_NO_QOBJECT _CRT_SECURE_NO_DEPRECATE -win32 : LIBS += -lole32 -ladvapi32 +win32 : !win32-mwc : LIBS += -lole32 -ladvapi32 +win32-mwc { + LIBS += -ladvapi32.lib -luuid.lib +} win32-msvc.net | win32-msvc2* : QMAKE_CXXFLAGS += /EHsc win32-g++ : LIBS += -luuid diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 91344c8..2c20d51 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -310,6 +310,7 @@ Configure::Configure( int& argc, char** argv ) dictionary[ "LIBJPEG" ] = "auto"; dictionary[ "LIBPNG" ] = "auto"; dictionary[ "LIBMNG" ] = "auto"; + dictionary[ "FREETYPE" ] = "no"; dictionary[ "QT3SUPPORT" ] = "yes"; dictionary[ "ACCESSIBILITY" ] = "yes"; @@ -328,6 +329,7 @@ Configure::Configure( int& argc, char** argv ) dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; dictionary[ "STYLE_MOTIF" ] = "yes"; dictionary[ "STYLE_CDE" ] = "yes"; + dictionary[ "STYLE_S60" ] = "no"; dictionary[ "STYLE_GTK" ] = "no"; dictionary[ "SQL_MYSQL" ] = "no"; @@ -587,6 +589,13 @@ void Configure::parseCmdLine() dictionary[ "MNG" ] = "qt"; dictionary[ "LIBMNG" ] = "system"; } + + // Text Rendering -------------------------------------------- + else if( configCmdLine.at(i) == "-no-freetype" ) + dictionary[ "FREETYPE" ] = "no"; + else if( configCmdLine.at(i) == "-qt-freetype" ) + dictionary[ "FREETYPE" ] = "yes"; + // CE- C runtime -------------------------------------------- else if( configCmdLine.at(i) == "-crt" ) { ++i; @@ -666,6 +675,11 @@ void Configure::parseCmdLine() else if( configCmdLine.at(i) == "-no-style-cde" ) dictionary[ "STYLE_CDE" ] = "no"; + else if( configCmdLine.at(i) == "-qt-style-s60" ) + dictionary[ "STYLE_S60" ] = "yes"; + else if( configCmdLine.at(i) == "-no-style-s60" ) + dictionary[ "STYLE_S60" ] = "no"; + // Qt 3 Support --------------------------------------------- else if( configCmdLine.at(i) == "-no-qt3support" ) dictionary[ "QT3SUPPORT" ] = "no"; @@ -776,6 +790,13 @@ void Configure::parseCmdLine() dictionary[ "INCREDIBUILD_XGE" ] = "yes"; #if !defined(EVAL) // Others --------------------------------------------------- + else if (configCmdLine.at(i) == "-fpu" ) + { + ++i; + if(i==argCount) + break; + dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i); + } else if (configCmdLine.at(i) == "-fast" ) dictionary[ "FAST" ] = "yes"; else if (configCmdLine.at(i) == "-no-fast" ) @@ -1102,12 +1123,29 @@ void Configure::parseCmdLine() } else { dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++"; } + } else if ( dictionary[ "QMAKESPEC" ] == QString( "win32-mwc" ) ) { + dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-mwc"; + dictionary[ "MAKE" ] = "make"; } else { if ( dictionary[ "MAKE" ].isEmpty() ) dictionary[ "MAKE" ] = "make"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; } } + // Tell the user how to proceed building Qt after configure finished its job + dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"]; + if (dictionary.contains("XQMAKESPEC")) { + if (dictionary["XQMAKESPEC"].startsWith("symbian")) { + dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"] + QString(" debug-winscw|debug-armv5|release-armv5"); + } else if (dictionary["XQMAKESPEC"].startsWith("wince")) { + dictionary["QTBUILDINSTRUCTION"] = + QString("setcepaths.bat ") + dictionary["XQMAKESPEC"] + QString(" && ") + dictionary["MAKE"]; + } + } + + // Tell the user how to confclean before the next configure + dictionary["CONFCLEANINSTRUCTION"] = dictionary["MAKE"] + QString(" confclean"); + // Ensure that -spec (XQMAKESPEC) exists in the mkspecs folder as well if (dictionary.contains("XQMAKESPEC") && !mkspecs.contains(dictionary["XQMAKESPEC"], Qt::CaseInsensitive)) { @@ -1161,9 +1199,9 @@ void Configure::parseCmdLine() #if !defined(EVAL) void Configure::validateArgs() { - QStringList configs; // Validate the specified config + // Get all possible configurations from the file system. QDir dir; QStringList filters; filters << "qconfig-*.h"; @@ -1177,9 +1215,24 @@ void Configure::validateArgs() allConfigs << it->remove("qconfig-").remove(".h"); allConfigs << "full"; + // Try internal configurations first. + QStringList possible_configs = QStringList() + << "minimal" + << "small" + << "medium" + << "large" + << "full"; + int index = possible_configs.indexOf(dictionary["QCONFIG"]); + if (index >= 0) { + for (int c = 0; c <= index; c++) { + qmakeConfig += possible_configs[c] + "-config"; + } + return; + } + + // If the internal configurations failed, try others. QStringList::Iterator config; for( config = allConfigs.begin(); config != allConfigs.end(); ++config ) { - configs += (*config) + "-config"; if( (*config) == dictionary[ "QCONFIG" ] ) break; } @@ -1188,7 +1241,7 @@ void Configure::validateArgs() cout << "No such configuration \"" << qPrintable(dictionary[ "QCONFIG" ]) << "\"" << endl ; } else - qmakeConfig += configs; + qmakeConfig += (*config) + "-config"; } #endif @@ -1309,6 +1362,8 @@ void Configure::applySpecSpecifics() dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes"; dictionary[ "STYLE_MOTIF" ] = "no"; dictionary[ "STYLE_CDE" ] = "no"; + dictionary[ "STYLE_S60" ] = "no"; + dictionary[ "FREETYPE" ] = "no"; dictionary[ "QT3SUPPORT" ] = "no"; dictionary[ "OPENGL" ] = "no"; dictionary[ "OPENSSL" ] = "no"; @@ -1335,6 +1390,46 @@ void Configure::applySpecSpecifics() dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; dictionary[ "QT_INSTALL_PREFIX" ] = ""; + } else if(dictionary[ "XQMAKESPEC" ].startsWith("symbian")) { + dictionary[ "ACCESSIBILITY" ] = "no"; + dictionary[ "STYLE_WINDOWSXP" ] = "no"; + dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; + dictionary[ "STYLE_PLASTIQUE" ] = "no"; + dictionary[ "STYLE_CLEANLOOKS" ] = "no"; + dictionary[ "STYLE_WINDOWSCE" ] = "no"; + dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; + dictionary[ "STYLE_MOTIF" ] = "no"; + dictionary[ "STYLE_CDE" ] = "no"; + dictionary[ "STYLE_S60" ] = "yes"; + dictionary[ "FREETYPE" ] = "no"; + dictionary[ "QT3SUPPORT" ] = "no"; + dictionary[ "OPENGL" ] = "no"; + dictionary[ "OPENSSL" ] = "no"; + dictionary[ "STL" ] = "no"; + dictionary[ "EXCEPTIONS" ] = "no"; + dictionary[ "RTTI" ] = "no"; + dictionary[ "ARCHITECTURE" ] = "symbian"; + dictionary[ "3DNOW" ] = "no"; + dictionary[ "SSE" ] = "no"; + dictionary[ "SSE2" ] = "no"; + dictionary[ "MMX" ] = "no"; + dictionary[ "IWMMXT" ] = "no"; + dictionary[ "CE_CRT" ] = "no"; + dictionary[ "DIRECT3D" ] = "no"; + dictionary[ "WEBKIT" ] = "no"; + dictionary[ "ASSISTANT_WEBKIT" ] = "no"; + dictionary[ "PHONON" ] = "yes"; + dictionary[ "XMLPATTERNS" ] = "no"; + dictionary[ "QT_GLIB" ] = "no"; + // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested) + // iconv_open seems to return -1 always, so something is probably missing from the platform. + dictionary[ "QT_ICONV" ] = "no"; + dictionary[ "SCRIPTTOOLS" ] = "no"; + dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; + dictionary[ "QT_INSTALL_PREFIX" ] = ""; + dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; + dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; + } else if(dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. //TODO dictionary[ "STYLE_WINDOWSXP" ] = "no"; @@ -1608,6 +1703,7 @@ bool Configure::displayHelp() "Available values for <arch>:"); desc("ARCHITECTURE","windows", "", " windows", ' '); desc("ARCHITECTURE","windowsce", "", " windowsce", ' '); + desc("ARCHITECTURE","symbian", "", " symbian", ' '); desc("ARCHITECTURE","boundschecker", "", " boundschecker", ' '); desc("ARCHITECTURE","generic", "", " generic\n", ' '); @@ -1622,7 +1718,8 @@ bool Configure::displayHelp() desc("STYLE_MOTIF", "yes", "", " motif", ' '); desc("STYLE_CDE", "yes", "", " cde", ' '); desc("STYLE_WINDOWSCE", "yes", "", " windowsce", ' '); - desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile\n", ' '); + desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile", ' '); + desc("STYLE_S60" , "yes", "", " s60\n", ' '); /* We do not support -qconfig on Windows yet @@ -1651,6 +1748,11 @@ bool Configure::displayHelp() desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0"); desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE"); + // Qt\Symbian only options go below here ----------------------------------------------------------------------------- + desc("Qt for S60 only:\n\n"); + desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support."); + desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt.\n"); + desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2\n"); return true; } return false; @@ -1784,12 +1886,21 @@ bool Configure::checkAvailability(const QString &part) else if (part == "SQL_DB2") available = findFile("sqlcli.h") && findFile("sqlcli1.h") && findFile("db2cli.lib"); else if (part == "SQL_SQLITE") + if (dictionary["XQMAKESPEC"].startsWith("symbian")) + available = false; // In Symbian we only support system sqlite option + else available = true; // Built in, we have a fork else if (part == "SQL_SQLITE_LIB") { if (dictionary[ "SQL_SQLITE_LIB" ] == "system") { - available = findFile("sqlite3.h") && findFile("sqlite3.lib"); - if (available) - dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; + // Symbian has multiple .lib/.dll files we need to find + if (dictionary["XQMAKESPEC"].startsWith("symbian")) { + available = true; // There is sqlite_symbian plugin which exports the necessary stuff + dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3"; + } else { + available = findFile("sqlite3.h") && findFile("sqlite3.lib"); + if (available) + dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; + } } else available = true; } else if (part == "SQL_SQLITE2") @@ -2017,6 +2128,15 @@ bool Configure::verifyConfiguration() if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) exit(0); // Exit cleanly for Ctrl+C } + if (0 != dictionary["ARM_FPU_TYPE"].size()) + { + QStringList l= QStringList() + << "softvfp" + << "softvfp+vfpv2" + << "vfpv2"; + if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) + cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; + } return true; } @@ -2166,6 +2286,10 @@ void Configure::generateOutputVars() if( dictionary[ "LIBMNG" ] == "system" ) qtConfig += "system-mng"; + // Text rendering -------------------------------------------------- + if( dictionary[ "FREETYPE" ] == "yes" ) + qtConfig += "freetype"; + // Styles ------------------------------------------------------- if ( dictionary[ "STYLE_WINDOWS" ] == "yes" ) qmakeStyles += "windows"; @@ -2197,6 +2321,9 @@ void Configure::generateOutputVars() if ( dictionary[ "STYLE_CDE" ] == "yes" ) qmakeStyles += "cde"; + if ( dictionary[ "STYLE_S60" ] == "yes" ) + qmakeStyles += "s60"; + // Databases ---------------------------------------------------- if ( dictionary[ "SQL_MYSQL" ] == "yes" ) qmakeSql += "mysql"; @@ -2350,6 +2477,9 @@ void Configure::generateOutputVars() } } + if (dictionary.contains("XQMAKESPEC") && ( dictionary["QMAKESPEC"] != dictionary["XQMAKESPEC"] ) ) + qmakeConfig += "cross_compile"; + // Directories and settings for .qmake.cache -------------------- // if QT_INSTALL_* have not been specified on commandline, define them now from QT_INSTALL_PREFIX @@ -2390,8 +2520,12 @@ void Configure::generateOutputVars() qmakeVars += QString("INCLUDEPATH += ") + qmakeIncludes.join( " " ); if (!opensslLibs.isEmpty()) qmakeVars += opensslLibs; - else if (dictionary[ "OPENSSL" ] == "linked") - qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); + else if (dictionary[ "OPENSSL" ] == "linked") { + if(dictionary[ "XQMAKESPEC" ].startsWith("symbian") ) + qmakeVars += QString("OPENSSL_LIBS = -llibssl -llibcrypto"); + else + qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); + } if (!qmakeSql.isEmpty()) qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " " ); if (!qmakeSqlPlugins.isEmpty()) @@ -2550,7 +2684,12 @@ void Configure::generateCachefile() configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl; if(!dictionary["QMAKE_RPATHDIR"].isEmpty()) - configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"]; + configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"] <<endl; + + if(!dictionary["ARM_FPU_TYPE"].isEmpty()) + { + configStream<<"QMAKE_CXXFLAGS.ARMCC += --fpu "<< dictionary["ARM_FPU_TYPE"]; + } configStream.flush(); configFile.close(); @@ -2591,6 +2730,18 @@ QString Configure::addDefine(QString def) } #if !defined(EVAL) +// ### This should be removed once Qt for S60 is out. +static void applyTemporarySymbianFlags(QStringList &qconfigList) +{ + qconfigList += "QT_NO_CONCURRENT"; + qconfigList += "QT_NO_QFUTURE"; + // This is removed because it uses UNIX signals which are not implemented yet + qconfigList += "QT_NO_CRASHHANDLER"; + qconfigList += "QT_NO_PRINTER"; + qconfigList += "QT_NO_CURSOR"; + qconfigList += "QT_NO_SYSTEMTRAYICON"; +} + void Configure::generateConfigfiles() { QDir(buildPath).mkpath("src/corelib/global"); @@ -2660,6 +2811,7 @@ void Configure::generateConfigfiles() if(dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; if(dictionary["STYLE_MOTIF"] != "yes") qconfigList += "QT_NO_STYLE_MOTIF"; if(dictionary["STYLE_CDE"] != "yes") qconfigList += "QT_NO_STYLE_CDE"; + if(dictionary["STYLE_S60"] != "yes") qconfigList += "QT_NO_STYLE_S60"; if(dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE"; if(dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE"; if(dictionary["STYLE_GTK"] != "yes") qconfigList += "QT_NO_STYLE_GTK"; @@ -2674,7 +2826,6 @@ void Configure::generateConfigfiles() qconfigList += "QT_NO_COMPRESS"; } - if(dictionary["QT3SUPPORT"] == "no") qconfigList += "QT_NO_QT3SUPPORT"; if(dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; if(dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS"; if(dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; @@ -2708,6 +2859,10 @@ void Configure::generateConfigfiles() if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL"; if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER"; + // ### This block should be removed once Qt for S60 is out. + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { + applyTemporarySymbianFlags(qconfigList); + } qconfigList.sort(); for (int i = 0; i < qconfigList.count(); ++i) @@ -2955,7 +3110,8 @@ void Configure::displayConfig() cout << " TIFF support............" << dictionary[ "TIFF" ] << endl; cout << " JPEG support............" << dictionary[ "JPEG" ] << endl; cout << " PNG support............." << dictionary[ "PNG" ] << endl; - cout << " MNG support............." << dictionary[ "MNG" ] << endl << endl; + cout << " MNG support............." << dictionary[ "MNG" ] << endl; + cout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl; cout << "Styles:" << endl; cout << " Windows................." << dictionary[ "STYLE_WINDOWS" ] << endl; @@ -2966,7 +3122,8 @@ void Configure::displayConfig() cout << " Motif..................." << dictionary[ "STYLE_MOTIF" ] << endl; cout << " CDE....................." << dictionary[ "STYLE_CDE" ] << endl; cout << " Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl; - cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl << endl; + cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl; + cout << " S60....................." << dictionary[ "STYLE_S60" ] << endl << endl; cout << "Sql Drivers:" << endl; cout << " ODBC...................." << dictionary[ "SQL_ODBC" ] << endl; @@ -3140,8 +3297,10 @@ void Configure::buildHostTools() << "src/tools/bootstrap" << "src/tools/moc" << "src/tools/rcc" - << "src/tools/uic" - << "tools/checksdk"; + << "src/tools/uic"; + + if(dictionary["XQMAKESPEC"].startsWith("wince")) + hostToolsDirs << "tools/checksdk"; if (dictionary[ "CETEST" ] == "yes") hostToolsDirs << "tools/qtestlib/wince/cetest"; @@ -3361,9 +3520,8 @@ void Configure::generateMakefiles() void Configure::showSummary() { - QString make = dictionary[ "MAKE" ]; - cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl; - cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; + cout << endl << endl << "Qt is now configured for building. Just run '" << qPrintable(dictionary["QTBUILDINSTRUCTION"]) << "'." << endl + << "To reconfigure, run '" << qPrintable(dictionary["CONFCLEANINSTRUCTION"]) << "' and configure." << endl; } Configure::ProjectType Configure::projectType( const QString& proFileName ) @@ -3479,9 +3637,13 @@ bool Configure::showLicense(QString orgLicenseFile) void Configure::readLicense() { - dictionary[ "PLATFORM NAME" ] = (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") - && (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) - ? "Qt for Windows CE" : "Qt for Windows"; + if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") && + (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) + dictionary["PLATFORM NAME"] = "Qt for Windows CE"; + else if (dictionary.value("XQMAKESPEC").startsWith("symbian")) + dictionary["PLATFORM NAME"] = "Qt for S60"; + else + dictionary["PLATFORM NAME"] = "Qt for Windows"; bool openSource = false; if (dictionary["BUILDNOKIA"] == "yes" || dictionary["BUILDTYPE"] == "commercial") { openSource = false; |