diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-11-25 05:34:16 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-11-25 05:34:16 (GMT) |
commit | 444d931b7ca2d8772054d795e0573384342b58dd (patch) | |
tree | 0587d65ad5b8c7e2c80dfac0051174b9248e1e03 /tools/configure/configureapp.cpp | |
parent | 852f4811453cb0b082748f2fcefac5898e603ab0 (diff) | |
parent | 9e353ea7a1fedd020d39e83322286931f536dc16 (diff) | |
download | Qt-444d931b7ca2d8772054d795e0573384342b58dd.zip Qt-444d931b7ca2d8772054d795e0573384342b58dd.tar.gz Qt-444d931b7ca2d8772054d795e0573384342b58dd.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 3808c4e..9443fee 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3227,7 +3227,8 @@ void Configure::generateConfigfiles() } // Copy configured mkspec to default directory, but remove the old one first, if there is any - QString defSpec = buildPath + "/mkspecs/default"; + QString mkspecsPath = buildPath + "/mkspecs"; + QString defSpec = mkspecsPath + "/default"; QFileInfo defSpecInfo(defSpec); if (defSpecInfo.exists()) { if (!Environment::rmdir(defSpec)) { @@ -3237,21 +3238,22 @@ void Configure::generateConfigfiles() } } - QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"]; - QString pltSpec = sourcePath + "/mkspecs/" + spec; - if (!Environment::cpdir(pltSpec, defSpec)) { - cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl; + 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"; - ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL); QFile qmakeConfFile(outName); - if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) { + if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) { QTextStream qmakeConfStream; qmakeConfStream.setDevice(&qmakeConfFile); - qmakeConfStream << endl << "QMAKESPEC_ORIGINAL=" << pltSpec << endl; + qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl; + qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl; qmakeConfStream.flush(); qmakeConfFile.close(); } @@ -3331,7 +3333,7 @@ void Configure::generateConfigfiles() if (tmpFile3.open()) { tmpStream.setDevice(&tmpFile3); tmpStream << "/* Evaluation license key */" << endl - << "static const char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl; + << "static const volatile char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl; tmpStream.flush(); tmpFile3.flush(); |