diff options
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0c172e8..19cef9a 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -437,6 +437,7 @@ void Configure::parseCmdLine() { int argCount = configCmdLine.size(); int i = 0; + const QStringList imageFormats = QStringList() << "gif" << "png" << "mng" << "jpeg" << "tiff"; #if !defined(EVAL) if (argCount < 1) // skip rest if no arguments @@ -829,6 +830,17 @@ void Configure::parseCmdLine() dictionary[ "SQL_IBASE" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-ibase") dictionary[ "SQL_IBASE" ] = "no"; + + // Image formats -------------------------------------------- + else if (configCmdLine.at(i).startsWith("-qt-imageformat-") && + imageFormats.contains(configCmdLine.at(i).section('-', 3))) + dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "yes"; + else if (configCmdLine.at(i).startsWith("-plugin-imageformat-") && + imageFormats.contains(configCmdLine.at(i).section('-', 3))) + dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "plugin"; + else if (configCmdLine.at(i).startsWith("-no-imageformat-") && + imageFormats.contains(configCmdLine.at(i).section('-', 3))) + dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no"; #endif // IDE project generation ----------------------------------- else if (configCmdLine.at(i) == "-no-dsp") @@ -1029,6 +1041,8 @@ void Configure::parseCmdLine() QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]); dictionary[ "QT_INSTALL_IMPORTS" ] = QString("\\resource\\qt%1\\imports").arg(dictionary[ "QT_LIBINFIX" ]); + dictionary[ "QT_INSTALL_TRANSLATIONS" ] = + QString("\\resource\\qt%1\\translations").arg(dictionary[ "QT_LIBINFIX" ]); } } else if (configCmdLine.at(i) == "-D") { ++i; @@ -3251,8 +3265,7 @@ void Configure::generateConfigfiles() } // Copy configured mkspec to default directory, but remove the old one first, if there is any - QString mkspecsPath = buildPath + "/mkspecs"; - QString defSpec = mkspecsPath + "/default"; + QString defSpec = buildPath + "/mkspecs/default"; QFileInfo defSpecInfo(defSpec); if (defSpecInfo.exists()) { if (!Environment::rmdir(defSpec)) { @@ -3262,30 +3275,13 @@ void Configure::generateConfigfiles() } } - QDir mkspecsDir(mkspecsPath); - if (!mkspecsDir.mkdir("default")) { - cout << "Couldn't create default mkspec dir!" << endl; - dictionary["DONE"] = "error"; - return; - } - QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"]; QString pltSpec = sourcePath + "/mkspecs/" + spec; - outName = defSpec + "/qmake.conf"; - QFile qmakeConfFile(outName); - if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) { - QTextStream qmakeConfStream; - qmakeConfStream.setDevice(&qmakeConfFile); - // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the - // primary use of this variable by qmake to identify the original mkspec, the - // variable is also used for few special cases where the absolute path is required. - // Conversely, the include of the original qmake.conf must be done using relative path, - // as some Qt binary deployments are done in a manner that doesn't allow for patching - // the paths at the installation time. - qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl; - qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl; - qmakeConfStream.flush(); - qmakeConfFile.close(); + QString includeSpec = buildPath + "/mkspecs/" + spec; + if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) { + cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl; + dictionary["DONE"] = "error"; + return; } // Generate the new qconfig.cpp file @@ -3449,8 +3445,12 @@ void Configure::displayConfig() webkit = "yes (debug)"; cout << "WebKit support.............." << webkit << endl; } - cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; - cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; + { + QString declarative = dictionary[ "DECLARATIVE" ]; + cout << "Declarative support........." << declarative << endl; + if (declarative == "yes") + cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; + } cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl; @@ -3581,7 +3581,11 @@ void Configure::generateHeaders() QStringList env; env += QString("QTDIR=" + sourcePath); env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH")); - Environment::execute(args, env, QStringList()); + int retc = Environment::execute(args, env, QStringList()); + if (retc) { + cout << "syncqt failed, return code " << retc << endl << endl; + dictionary["DONE"] = "error"; + } } } |