replace incorrect uses of fixPathToLocalOS() (mostly)
in most cases, it actually means normalizePath() (because the file name is used with qt i/o functions afterwards). this affects QMakeLocalFile::local() as well, so many not immediately obvious places are affected as well. there was also one case of fixPathToTargetOS() falling into this category. this is mostly a no-op, as the qt functions are agnostic to the path separator. in some other cases (in particular in the vcproj generator), it actually means fixPathToTargetOS(). this is mostly a no-op as well, as the two functions are equal except on msys anyway. in the <meta file>FileName() functions, the use of a fixPath*() function is bogus in the first place - fileFixify() already does fixPathToTargetOS(), and this is correct when the file name is used verbatim in a make command (which it is). otherwise it's irrelevant. Change-Id: I26712da8f888c704f8b7f42dbe24c941b6ad031d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
1cacf1e70d
commit
e0962270d7
@ -151,7 +151,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
|
||||
subdir += Option::dir_sep;
|
||||
tmp = subdir + tmp;
|
||||
}
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(tmp, true)));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(tmp)));
|
||||
if(fi.exists()) {
|
||||
if(fi.isDir()) {
|
||||
QString profile = tmp;
|
||||
@ -1076,7 +1076,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if (!project->isEmpty("DESTDIR")) {
|
||||
QString phase_key = keyFor("QMAKE_PBX_TARGET_COPY_PHASE");
|
||||
QString destDir = project->first("DESTDIR").toQString();
|
||||
destDir = fileInfo(Option::fixPathToLocalOS(destDir)).absoluteFilePath();
|
||||
destDir = fileInfo(Option::normalizePath(destDir)).absoluteFilePath();
|
||||
project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
|
||||
t << "\t\t" << phase_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
|
||||
|
@ -75,7 +75,7 @@ bool MakefileGenerator::canExecute(const QStringList &cmdline, int *a) const
|
||||
if(a)
|
||||
*a = argv0;
|
||||
if(argv0 != -1) {
|
||||
const QString c = Option::fixPathToLocalOS(cmdline.at(argv0), true);
|
||||
const QString c = Option::normalizePath(cmdline.at(argv0));
|
||||
if(exists(c))
|
||||
return true;
|
||||
}
|
||||
@ -90,7 +90,7 @@ QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) con
|
||||
|
||||
bool MakefileGenerator::mkdir(const QString &in_path) const
|
||||
{
|
||||
QString path = Option::fixPathToLocalOS(in_path);
|
||||
QString path = Option::normalizePath(in_path);
|
||||
if(QFile::exists(path))
|
||||
return true;
|
||||
|
||||
@ -213,8 +213,8 @@ MakefileGenerator::initOutPaths()
|
||||
QString finp = fileFixify((*input).toQString(), Option::output_dir, Option::output_dir);
|
||||
*input = ProString(finp);
|
||||
QString path = replaceExtraCompilerVariables(tmp_out, finp, QString(), NoShell);
|
||||
path = Option::fixPathToTargetOS(path);
|
||||
int slash = path.lastIndexOf(Option::dir_sep);
|
||||
path = Option::normalizePath(path);
|
||||
int slash = path.lastIndexOf('/');
|
||||
if(slash != -1) {
|
||||
path = path.left(slash);
|
||||
// Make out path only if it does not contain makefile variables
|
||||
@ -230,7 +230,7 @@ MakefileGenerator::initOutPaths()
|
||||
|
||||
if(!v["DESTDIR"].isEmpty()) {
|
||||
QDir d(v["DESTDIR"].first().toQString());
|
||||
if(Option::fixPathToLocalOS(d.absolutePath()) == Option::fixPathToLocalOS(Option::output_dir))
|
||||
if (Option::normalizePath(d.absolutePath()) == Option::normalizePath(Option::output_dir))
|
||||
v.remove("DESTDIR");
|
||||
}
|
||||
}
|
||||
@ -293,8 +293,8 @@ MakefileGenerator::findFilesInVPATH(ProStringList l, uchar flags, const QString
|
||||
}
|
||||
for (ProStringList::Iterator vpath_it = vpath.begin();
|
||||
vpath_it != vpath.end(); ++vpath_it) {
|
||||
QString real_dir = Option::fixPathToLocalOS((*vpath_it).toQString());
|
||||
if(exists(real_dir + QDir::separator() + val)) {
|
||||
QString real_dir = Option::normalizePath((*vpath_it).toQString());
|
||||
if (exists(real_dir + '/' + val)) {
|
||||
ProString dir = (*vpath_it);
|
||||
if(!dir.endsWith(Option::dir_sep))
|
||||
dir += Option::dir_sep;
|
||||
@ -818,7 +818,7 @@ MakefileGenerator::init()
|
||||
if(!project->isEmpty("TRANSLATIONS")) {
|
||||
ProStringList &trf = project->values("TRANSLATIONS");
|
||||
for (ProStringList::Iterator it = trf.begin(); it != trf.end(); ++it)
|
||||
(*it) = Option::fixPathToLocalOS((*it).toQString());
|
||||
(*it) = Option::fixPathToTargetOS((*it).toQString());
|
||||
}
|
||||
|
||||
//fix up the target deps
|
||||
@ -844,9 +844,9 @@ MakefileGenerator::init()
|
||||
if (exists(dep)) {
|
||||
out_deps.append(dep);
|
||||
} else {
|
||||
QString dir, regex = Option::fixPathToLocalOS(dep);
|
||||
if(regex.lastIndexOf(Option::dir_sep) != -1) {
|
||||
dir = regex.left(regex.lastIndexOf(Option::dir_sep) + 1);
|
||||
QString dir, regex = Option::normalizePath(dep);
|
||||
if (regex.lastIndexOf('/') != -1) {
|
||||
dir = regex.left(regex.lastIndexOf('/') + 1);
|
||||
regex.remove(0, dir.length());
|
||||
}
|
||||
QStringList files = QDir(dir).entryList(QStringList(regex));
|
||||
@ -885,7 +885,7 @@ MakefileGenerator::processPrlFile(QString &file)
|
||||
meta_file = tmp;
|
||||
}
|
||||
// meta_file = fileFixify(meta_file);
|
||||
QString real_meta_file = Option::fixPathToLocalOS(meta_file);
|
||||
QString real_meta_file = Option::normalizePath(meta_file);
|
||||
if(!meta_file.isEmpty()) {
|
||||
QString f = fileFixify(real_meta_file, qmake_getpwd(), Option::output_dir);
|
||||
if(QMakeMetaInfo::libExists(f)) {
|
||||
@ -905,7 +905,7 @@ MakefileGenerator::processPrlFile(QString &file)
|
||||
defs.append(def);
|
||||
if(try_replace_file && !libinfo.isEmpty("QMAKE_PRL_TARGET")) {
|
||||
QString dir;
|
||||
int slsh = real_meta_file.lastIndexOf(Option::dir_sep);
|
||||
int slsh = real_meta_file.lastIndexOf('/');
|
||||
if(slsh != -1)
|
||||
dir = real_meta_file.left(slsh+1);
|
||||
file = libinfo.first("QMAKE_PRL_TARGET").toQString();
|
||||
@ -1102,7 +1102,7 @@ MakefileGenerator::prlFileName(bool fixify)
|
||||
if(fixify) {
|
||||
if(!project->isEmpty("DESTDIR"))
|
||||
ret.prepend(project->first("DESTDIR").toQString());
|
||||
ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
|
||||
ret = fileFixify(ret, qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -1294,7 +1294,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
|
||||
uninst.append(rm_dir_contents + " " + escapeFilePath(filePrefixRoot(root, fileFixify(dst_dir + filestr, FileFixifyAbsolute, false))));
|
||||
continue;
|
||||
}
|
||||
QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
|
||||
QString local_dirstr = Option::normalizePath(dirstr);
|
||||
QStringList files = QDir(local_dirstr).entryList(QStringList(filestr),
|
||||
QDir::NoDotAndDotDot | QDir::AllEntries);
|
||||
if (installConfigValues.contains("no_check_exist") && files.isEmpty()) {
|
||||
@ -1504,7 +1504,7 @@ MakefileGenerator::createObjectList(const ProStringList &sources)
|
||||
objdir = project->first("OBJECTS_DIR").toQString();
|
||||
for (ProStringList::ConstIterator it = sources.begin(); it != sources.end(); ++it) {
|
||||
QString sfn = (*it).toQString();
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(sfn)));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(sfn)));
|
||||
QString dir;
|
||||
if (project->isActiveConfig("object_parallel_to_source")) {
|
||||
// The source paths are relative to the output dir, but we need source-relative paths
|
||||
@ -1604,7 +1604,7 @@ MakefileGenerator::replaceExtraCompilerVariables(
|
||||
} else if(var == QLatin1String("QMAKE_FILE_BASE") || var == QLatin1String("QMAKE_FILE_IN_BASE")) {
|
||||
//filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i) {
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(in.at(i))));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(in.at(i))));
|
||||
QString base = fi.completeBaseName();
|
||||
if(base.isNull())
|
||||
base = fi.fileName();
|
||||
@ -1613,7 +1613,7 @@ MakefileGenerator::replaceExtraCompilerVariables(
|
||||
} else if(var == QLatin1String("QMAKE_FILE_EXT")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i) {
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(in.at(i))));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(in.at(i))));
|
||||
QString ext;
|
||||
// Ensure complementarity with QMAKE_FILE_BASE
|
||||
int baseLen = fi.completeBaseName().length();
|
||||
@ -1626,11 +1626,11 @@ MakefileGenerator::replaceExtraCompilerVariables(
|
||||
} else if(var == QLatin1String("QMAKE_FILE_PATH") || var == QLatin1String("QMAKE_FILE_IN_PATH")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i)
|
||||
val += fileInfo(Option::fixPathToLocalOS(in.at(i))).path();
|
||||
val += fileInfo(Option::normalizePath(in.at(i))).path();
|
||||
} else if(var == QLatin1String("QMAKE_FILE_NAME") || var == QLatin1String("QMAKE_FILE_IN")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < in.size(); ++i)
|
||||
val += fileInfo(Option::fixPathToLocalOS(in.at(i))).filePath();
|
||||
val += fileInfo(Option::normalizePath(in.at(i))).filePath();
|
||||
|
||||
}
|
||||
}
|
||||
@ -1642,11 +1642,11 @@ MakefileGenerator::replaceExtraCompilerVariables(
|
||||
} else if(var == QLatin1String("QMAKE_FILE_OUT")) {
|
||||
filePath = true;
|
||||
for(int i = 0; i < out.size(); ++i)
|
||||
val += fileInfo(Option::fixPathToLocalOS(out.at(i))).filePath();
|
||||
val += fileInfo(Option::normalizePath(out.at(i))).filePath();
|
||||
} else if(var == QLatin1String("QMAKE_FILE_OUT_BASE")) {
|
||||
//filePath = true;
|
||||
for(int i = 0; i < out.size(); ++i) {
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(out.at(i))));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(out.at(i))));
|
||||
QString base = fi.completeBaseName();
|
||||
if(base.isNull())
|
||||
base = fi.fileName();
|
||||
@ -1690,7 +1690,7 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil
|
||||
{
|
||||
if(noIO())
|
||||
return false;
|
||||
const QString file = Option::fixPathToLocalOS(file_unfixed);
|
||||
const QString file = Option::normalizePath(file_unfixed);
|
||||
|
||||
const ProStringList &config = project->values(ProKey(comp + ".CONFIG"));
|
||||
if (config.indexOf("moc_verify") != -1) {
|
||||
@ -1953,8 +1953,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
||||
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
||||
dit != depdirs.end(); ++dit) {
|
||||
if (exists((*dit).real() + Option::dir_sep + file)) {
|
||||
localFile = (*dit).local() + Option::dir_sep + file;
|
||||
if (exists((*dit).local() + '/' + file)) {
|
||||
localFile = (*dit).local() + '/' + file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2045,8 +2045,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
|
||||
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
|
||||
dit != depdirs.end(); ++dit) {
|
||||
if (exists((*dit).real() + Option::dir_sep + file)) {
|
||||
localFile = (*dit).local() + Option::dir_sep + file;
|
||||
if (exists((*dit).local() + '/' + file)) {
|
||||
localFile = (*dit).local() + '/' + file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2358,7 +2358,7 @@ MakefileGenerator::findSubDirsSubTargets() const
|
||||
if (!project->isEmpty(dtkey)) {
|
||||
st->depends += project->first(dtkey);
|
||||
} else {
|
||||
QString d = Option::fixPathToLocalOS(subName);
|
||||
QString d = Option::fixPathToTargetOS(subName);
|
||||
const ProKey dfkey(fixedSubDep + ".file");
|
||||
if (!project->isEmpty(dfkey)) {
|
||||
d = project->first(dfkey).toQString();
|
||||
@ -2701,7 +2701,7 @@ MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll)
|
||||
t << escapeDependencyPath(fileFixify(project->cacheFile())) << " ";
|
||||
}
|
||||
if(!specdir().isEmpty()) {
|
||||
if(exists(Option::fixPathToLocalOS(specdir()+QDir::separator()+"qmake.conf")))
|
||||
if (exists(Option::normalizePath(specdir() + "/qmake.conf")))
|
||||
t << escapeDependencyPath(specdir() + Option::dir_sep + "qmake.conf") << " ";
|
||||
}
|
||||
const ProStringList &included = escapeDependencyPaths(project->values("QMAKE_INTERNAL_INCLUDED_FILES"));
|
||||
@ -2856,7 +2856,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
|
||||
out_dir = out_fi.canonicalFilePath();
|
||||
}
|
||||
|
||||
QString qfile(Option::fixPathToLocalOS(ret, true, canon));
|
||||
QString qfile(Option::normalizePath(ret));
|
||||
QFileInfo qfileinfo(fileInfo(qfile));
|
||||
if(out_dir != in_dir || !qfileinfo.isRelative()) {
|
||||
if(qfileinfo.isRelative()) {
|
||||
@ -2985,7 +2985,7 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
}
|
||||
}
|
||||
{ //is it from an EXTRA_TARGET
|
||||
const QString dep_basename = dep.local().section(Option::dir_sep, -1);
|
||||
const QString dep_basename = dep.local().section('/', -1);
|
||||
const ProStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (ProStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) {
|
||||
QString targ = var(ProKey(*it + ".target"));
|
||||
@ -2999,7 +2999,7 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
}
|
||||
}
|
||||
{ //is it from an EXTRA_COMPILER
|
||||
const QString dep_basename = dep.local().section(Option::dir_sep, -1);
|
||||
const QString dep_basename = dep.local().section('/', -1);
|
||||
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
|
||||
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
|
||||
const ProString &tmp_out = project->first(ProKey(*it + ".output"));
|
||||
@ -3129,7 +3129,7 @@ MakefileGenerator::pkgConfigFileName(bool fixify)
|
||||
if(fixify) {
|
||||
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
|
||||
ret.prepend(project->first("DESTDIR").toQString());
|
||||
ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
|
||||
ret = fileFixify(ret, qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ const QString
|
||||
&QMakeLocalFileName::local() const
|
||||
{
|
||||
if(!is_null && local_name.isNull())
|
||||
local_name = Option::fixPathToLocalOS(real_name, true);
|
||||
local_name = Option::normalizePath(real_name);
|
||||
return local_name;
|
||||
}
|
||||
|
||||
|
@ -511,7 +511,7 @@ UnixMakefileGenerator::findLibraries()
|
||||
for (ProStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) {
|
||||
if(dir.isNull()) {
|
||||
for(QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin(); dep_it != libdirs.end(); ++dep_it) {
|
||||
QString pathToLib = ((*dep_it).local() + Option::dir_sep
|
||||
QString pathToLib = ((*dep_it).local() + '/'
|
||||
+ project->first("QMAKE_PREFIX_SHLIB")
|
||||
+ stub + "." + (*extit));
|
||||
if(exists(pathToLib)) {
|
||||
@ -531,7 +531,7 @@ UnixMakefileGenerator::findLibraries()
|
||||
}
|
||||
if(!found && project->isActiveConfig("compile_libtool")) {
|
||||
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
|
||||
if (exists(libdirs[dep_i].local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext)) {
|
||||
if (exists(libdirs[dep_i].local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext)) {
|
||||
(*it) = libdirs[dep_i].real() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + stub + Option::libtool_ext;
|
||||
found = true;
|
||||
break;
|
||||
@ -579,15 +579,15 @@ UnixMakefileGenerator::processPrlFiles()
|
||||
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
|
||||
const QMakeLocalFileName &lfn = libdirs[dep_i];
|
||||
if(!project->isActiveConfig("compile_libtool")) { //give them the .libs..
|
||||
QString la = lfn.local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext;
|
||||
if(exists(la) && QFile::exists(lfn.local() + Option::dir_sep + ".libs")) {
|
||||
QString la = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext;
|
||||
if (exists(la) && QFile::exists(lfn.local() + "/.libs")) {
|
||||
QString dot_libs = lfn.real() + Option::dir_sep + ".libs";
|
||||
l.append("-L" + dot_libs);
|
||||
libdirs.insert(libidx++, QMakeLocalFileName(dot_libs));
|
||||
}
|
||||
}
|
||||
|
||||
QString prl = lfn.local() + Option::dir_sep + project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext;
|
||||
QString prl = lfn.local() + '/' + project->first("QMAKE_PREFIX_SHLIB") + lib + prl_ext;
|
||||
if(processPrlFile(prl)) {
|
||||
if(prl.startsWith(lfn.local()))
|
||||
prl.replace(0, lfn.local().length(), lfn.real());
|
||||
|
@ -805,7 +805,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString info_plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString());
|
||||
if (info_plist.isEmpty())
|
||||
info_plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
|
||||
if (!exists(Option::fixPathToLocalOS(info_plist))) {
|
||||
if (!exists(Option::normalizePath(info_plist))) {
|
||||
warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.",
|
||||
info_plist.toLatin1().constData());
|
||||
break;
|
||||
@ -898,12 +898,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
int pos = name.indexOf('/');
|
||||
if (pos > 0)
|
||||
name = name.mid(0, pos);
|
||||
symlinks[Option::fixPathToLocalOS(path + name)] =
|
||||
symlinks[Option::fixPathToTargetOS(path + name)] =
|
||||
project->first(vkey) + "/Current/" + name;
|
||||
path += version;
|
||||
}
|
||||
path += project->first(pkey).toQString();
|
||||
path = Option::fixPathToLocalOS(path);
|
||||
path = Option::fixPathToTargetOS(path);
|
||||
for(int file = 0; file < files.count(); file++) {
|
||||
QString fn = files.at(file).toQString();
|
||||
QString src = fileFixify(fn, FileFixifyAbsolute);
|
||||
@ -1397,7 +1397,7 @@ UnixMakefileGenerator::libtoolFileName(bool fixify)
|
||||
if(fixify) {
|
||||
if(QDir::isRelativePath(ret) && !project->isEmpty("DESTDIR"))
|
||||
ret.prepend(project->first("DESTDIR").toQString());
|
||||
ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir));
|
||||
ret = fileFixify(ret, qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -91,9 +91,9 @@ bool MingwMakefileGenerator::findLibraries()
|
||||
if (ver > 0)
|
||||
extension += QString::number(ver);
|
||||
extension += suffix;
|
||||
if(QMakeMetaInfo::libExists((*dir_it).local() + Option::dir_sep + steam) ||
|
||||
exists((*dir_it).local() + Option::dir_sep + steam + extension + ".a") ||
|
||||
exists((*dir_it).local() + Option::dir_sep + steam + extension + ".dll.a")) {
|
||||
if (QMakeMetaInfo::libExists((*dir_it).local() + '/' + steam)
|
||||
|| exists((*dir_it).local() + '/' + steam + extension + ".a")
|
||||
|| exists((*dir_it).local() + '/' + steam + extension + ".dll.a")) {
|
||||
out = *it + extension;
|
||||
break;
|
||||
}
|
||||
|
@ -1900,11 +1900,11 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
|
||||
fileAdded = true;
|
||||
|
||||
xmlFilter << tag("CustomBuild")
|
||||
<< attrTag("Include",Option::fixPathToLocalOS(filename))
|
||||
<< attrTag("Include", Option::fixPathToTargetOS(filename))
|
||||
<< attrTagS("Filter", filter.Name);
|
||||
|
||||
xml << tag("CustomBuild")
|
||||
<< attrTag("Include",Option::fixPathToLocalOS(filename));
|
||||
<< attrTag("Include", Option::fixPathToTargetOS(filename));
|
||||
|
||||
if (filter.Name.startsWith("Form Files")
|
||||
|| filter.Name.startsWith("Generated Files")
|
||||
@ -1963,7 +1963,7 @@ bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, Xml
|
||||
void VCXProjectWriter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter,
|
||||
const QString &filePath, const QString &filterName)
|
||||
{
|
||||
const QString nativeFilePath = Option::fixPathToLocalOS(filePath);
|
||||
const QString nativeFilePath = Option::fixPathToTargetOS(filePath);
|
||||
if (filterName.startsWith("Source Files")) {
|
||||
xmlFilter << tag("ClCompile")
|
||||
<< attrTag("Include", nativeFilePath)
|
||||
|
@ -2901,7 +2901,7 @@ void VCProjectWriter::write(XmlOutput &xml, VCFilter &tool)
|
||||
for (int i = 0; i < tool.Files.count(); ++i) {
|
||||
const VCFilterFile &info = tool.Files.at(i);
|
||||
xml << tag(q_File)
|
||||
<< attrS(_RelativePath, Option::fixPathToLocalOS(info.file))
|
||||
<< attrS(_RelativePath, Option::fixPathToTargetOS(info.file))
|
||||
<< data(); // In case no custom builds, to avoid "/>" endings
|
||||
outputFileConfig(tool, xml, tool.Files.at(i).file);
|
||||
xml << closetag(q_File);
|
||||
@ -2960,7 +2960,7 @@ void VCProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, const QSt
|
||||
void VCProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, const VCFilterFile &info, const QString &filtername)
|
||||
{
|
||||
xml << tag(q_File)
|
||||
<< attrS(_RelativePath, Option::fixPathToLocalOS(info.file));
|
||||
<< attrS(_RelativePath, Option::fixPathToTargetOS(info.file));
|
||||
for (int i = 0; i < project.SingleProjects.count(); ++i) {
|
||||
VCFilter filter = project.SingleProjects.at(i).filterByName(filtername);
|
||||
if (filter.Config) // only if the filter is not empty
|
||||
|
@ -324,7 +324,8 @@ QUuid VcprojGenerator::getProjectUUID(const QString &filename)
|
||||
|
||||
// If none, create one based on the MD5 of absolute project path
|
||||
if(uuid.isNull() || !filename.isEmpty()) {
|
||||
QString abspath = Option::fixPathToLocalOS(filename.isEmpty()?project->first("QMAKE_MAKEFILE").toQString():filename);
|
||||
QString abspath = Option::fixPathToTargetOS(
|
||||
filename.isEmpty() ? project->first("QMAKE_MAKEFILE").toQString() : filename);
|
||||
QByteArray digest = QCryptographicHash::hash(abspath.toUtf8(), QCryptographicHash::Sha1);
|
||||
memcpy((unsigned char*)(&uuid), digest.constData(), sizeof(QUuid));
|
||||
validUUID = !uuid.isNull();
|
||||
@ -457,14 +458,14 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
|
||||
while (collectedIt.hasNext()) {
|
||||
QPair<QString, ProStringList> subdir = collectedIt.next();
|
||||
QString profile = subdir.first;
|
||||
QFileInfo fi(fileInfo(Option::fixPathToLocalOS(profile, true)));
|
||||
QFileInfo fi(fileInfo(Option::normalizePath(profile)));
|
||||
if (fi.exists()) {
|
||||
if (fi.isDir()) {
|
||||
if (!profile.endsWith(Option::dir_sep))
|
||||
profile += Option::dir_sep;
|
||||
profile += fi.baseName() + Option::pro_ext;
|
||||
QString profileKey = fi.absoluteFilePath();
|
||||
fi = QFileInfo(fileInfo(Option::fixPathToLocalOS(profile, true)));
|
||||
fi = QFileInfo(fileInfo(Option::normalizePath(profile)));
|
||||
if (!fi.exists())
|
||||
continue;
|
||||
projLookup.insert(profileKey, fi.absoluteFilePath());
|
||||
@ -1344,13 +1345,13 @@ void VcprojGenerator::initDeploymentTool()
|
||||
|| devicePath.at(0) == QLatin1Char('\\')
|
||||
|| devicePath.at(0) == QLatin1Char('%'))) {
|
||||
// create output path
|
||||
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
|
||||
devicePath = Option::fixPathToTargetOS(targetPath + QLatin1Char('\\') + devicePath);
|
||||
}
|
||||
}
|
||||
// foreach d in item.files
|
||||
foreach (const ProString &src, project->values(ProKey(item + ".files"))) {
|
||||
QString itemDevicePath = devicePath;
|
||||
QString source = Option::fixPathToLocalOS(src.toQString());
|
||||
QString source = Option::normalizePath(src.toQString());
|
||||
QString nameFilter;
|
||||
QFileInfo info(source);
|
||||
QString searchPath;
|
||||
@ -1359,7 +1360,7 @@ void VcprojGenerator::initDeploymentTool()
|
||||
itemDevicePath += "\\" + info.fileName();
|
||||
searchPath = info.absoluteFilePath();
|
||||
} else {
|
||||
nameFilter = source.split('\\').last();
|
||||
nameFilter = info.fileName();
|
||||
searchPath = info.absolutePath();
|
||||
}
|
||||
|
||||
@ -1371,10 +1372,10 @@ void VcprojGenerator::initDeploymentTool()
|
||||
while(iterator.hasNext()) {
|
||||
iterator.next();
|
||||
if (conf.WinRT) {
|
||||
QString absoluteItemFilePath = Option::fixPathToLocalOS(QFileInfo(iterator.filePath()).absoluteFilePath());
|
||||
QString absoluteItemFilePath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absoluteFilePath());
|
||||
vcProject.DeploymentFiles.addFile(absoluteItemFilePath);
|
||||
} else {
|
||||
QString absoluteItemPath = Option::fixPathToLocalOS(QFileInfo(iterator.filePath()).absolutePath());
|
||||
QString absoluteItemPath = Option::fixPathToTargetOS(QFileInfo(iterator.filePath()).absolutePath());
|
||||
// Identify if it is just another subdir
|
||||
int diffSize = absoluteItemPath.size() - pathSize;
|
||||
// write out rules
|
||||
|
@ -52,12 +52,12 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator()
|
||||
int
|
||||
Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext)
|
||||
{
|
||||
QString bd = Option::fixPathToLocalOS(d, true);
|
||||
QString bd = Option::normalizePath(d);
|
||||
if(!exists(bd))
|
||||
return -1;
|
||||
|
||||
QMakeMetaInfo libinfo(project);
|
||||
bool libInfoRead = libinfo.readLib(bd + Option::dir_sep + stem);
|
||||
bool libInfoRead = libinfo.readLib(bd + '/' + stem);
|
||||
|
||||
// If the library, for which we're trying to find the highest version
|
||||
// number, is a static library
|
||||
@ -146,8 +146,8 @@ Win32MakefileGenerator::findLibraries()
|
||||
extension += QString::number(ver);
|
||||
extension += suffix;
|
||||
extension += ".lib";
|
||||
if(QMakeMetaInfo::libExists((*it).local() + Option::dir_sep + lib) ||
|
||||
exists((*it).local() + Option::dir_sep + lib + extension)) {
|
||||
if (QMakeMetaInfo::libExists((*it).local() + '/' + lib)
|
||||
|| exists((*it).local() + '/' + lib + extension)) {
|
||||
out = (*it).real() + Option::dir_sep + lib + extension;
|
||||
break;
|
||||
}
|
||||
@ -156,7 +156,7 @@ Win32MakefileGenerator::findLibraries()
|
||||
if(out.isEmpty())
|
||||
out = lib + ".lib";
|
||||
(*it) = out;
|
||||
} else if(!exists(Option::fixPathToLocalOS(opt))) {
|
||||
} else if (!exists(Option::normalizePath(opt))) {
|
||||
QList<QMakeLocalFileName> lib_dirs;
|
||||
QString file = Option::fixPathToTargetOS(opt);
|
||||
int slsh = file.lastIndexOf(Option::dir_sep);
|
||||
@ -223,7 +223,7 @@ Win32MakefileGenerator::processPrlFiles()
|
||||
else
|
||||
tmp = opt;
|
||||
for(QList<QMakeLocalFileName>::Iterator it = libdirs.begin(); it != libdirs.end(); ++it) {
|
||||
QString prl = (*it).local() + Option::dir_sep + tmp;
|
||||
QString prl = (*it).local() + '/' + tmp;
|
||||
if (processPrlFile(prl))
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user