diff options
Diffstat (limited to 'qmake/generators')
-rw-r--r-- | qmake/generators/symbian/initprojectdeploy_symbian.cpp | 7 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_abld.cpp | 20 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_sbsv2.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 8 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 2 |
6 files changed, 30 insertions, 11 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index cd51e42..eb45b10 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -59,7 +59,12 @@ static QString fixPathToEpocOS(const QString &src) { QString ret = Option::fixPathToTargetOS(src); - return ret.replace('/', '\\'); + + bool pathHasDriveLetter = false; + if (ret.size() > 1) + pathHasDriveLetter = (ret.at(1) == QLatin1Char(':')); + + return pathHasDriveLetter ? ret.replace('/', '\\') : QDir::toNativeSeparators(ret); } static bool isPlugin(const QFileInfo& info, const QString& devicePath) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 7416cbe..f895109 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -205,8 +205,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool #ifdef Q_OS_WIN32 t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; t << "ABLD = ABLD.BAT" << endl; +#elif defined(Q_OS_MAC) + t << "XCOPY = cp -R -v" << endl; + t << "ABLD = abld" << endl; #else - t << "XCOPY = cp -u -v" << endl; + t << "XCOPY = cp -R -u -v" << endl; t << "ABLD = abld" << endl; #endif t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; @@ -427,7 +430,8 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i t << WINSCW_DEPLOYMENT_TARGET ":" << endl; QString remoteTestPath = epocRoot() - + QLatin1String(isRom ? "epoc32\\data\\z\\private\\" : "epoc32\\winscw\\c\\private\\") + + QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/" + : "epoc32/winscw/c/private/")) + privateDirUid; DeploymentList depList; @@ -439,11 +443,21 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i t << "\t-echo Deploying changed files..." << endl; for (int i = 0; i < depList.size(); ++i) { +#ifdef Q_OS_WIN32 // Xcopy prompts for selecting file or directory if target doesn't exist, // and doesn't provide switch to force file selection. It does provide dir forcing, though, // so strip the last part of the destination. t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl; +#else + QString dirExists = var("QMAKE_CHK_DIR_EXISTS"); + QString mkdir = var("QMAKE_MKDIR"); + QString dir = QFileInfo(depList.at(i).to).dir().path(); + t << "\t-@ " << dirExists << " \"" << dir << "\" || " + << mkdir << " \"" << dir << "\"" << endl; + t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \"" + << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl; +#endif } t << endl; @@ -455,7 +469,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i QStringList cleanList; for (int i = 0; i < depList.size(); ++i) { - cleanList.append(depList.at(i).to); + cleanList.append(QDir::toNativeSeparators(depList.at(i).to)); } generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", ""); diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 32c31ee..d650e08 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -120,7 +120,7 @@ void SymbianSbsv2MakefileGenerator::findInstalledCompilerVersions(const QString && fileInfo(matcher.cap(matcher.captureCount())).exists()) { // First capture (index 0) is the whole match, which is skipped. // Next n captures are version numbers, which are interesting. - // Final capture is the env var value, which we alrady used, so that is skipped, too. + // Final capture is the env var value, which we already used, so that is skipped, too. int capture = 1; int finalCapture = matcher.captureCount() - 1; QString version = versionPrefix; diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index d32b888..0678d86 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -215,7 +215,7 @@ void NmakeMakefileGenerator::init() project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".exp"); } if(project->isActiveConfig("debug")) { - project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb"); + project->values("QMAKE_DISTCLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb"); project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk"); project->values("QMAKE_CLEAN").append("vc*.pdb"); project->values("QMAKE_CLEAN").append("vc*.idb"); diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index c98251b..fbaa6c2 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1553,10 +1553,10 @@ QString VcprojGenerator::fixFilename(QString ofile) const if(slashfind == -1) { ofile = ofile.replace('-', '_'); } else { - int hypenfind = ofile.indexOf('-', slashfind); - while (hypenfind != -1 && slashfind < hypenfind) { - ofile = ofile.replace(hypenfind, 1, '_'); - hypenfind = ofile.indexOf('-', hypenfind + 1); + int hyphenfind = ofile.indexOf('-', slashfind); + while (hyphenfind != -1 && slashfind < hyphenfind) { + ofile = ofile.replace(hyphenfind, 1, '_'); + hyphenfind = ofile.indexOf('-', hyphenfind + 1); } } return ofile; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 58f21cb..ddfe399 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -651,7 +651,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t) t << "DIST = " << varList("DISTFILES") << endl; t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; - // The comment is important to maintain variable compatability with Unix + // The comment is important to maintain variable compatibility with Unix // Makefiles, while not interpreting a trailing-slash as a linebreak t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak" << endl; t << "TARGET = " << escapeFilePath(target) << endl; |