Guest User

Untitled

a guest
Jul 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. diff --git i/qmake/generators/mac/pbuilder_pbx.cpp w/qmake/generators/mac/pbuilder_pbx.cpp
  2. index 80891e682f..614925ff6d 100644
  3. --- i/qmake/generators/mac/pbuilder_pbx.cpp
  4. +++ w/qmake/generators/mac/pbuilder_pbx.cpp
  5. @@ -1879,8 +1879,9 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file, const QString &build) c
  6. QFileInfo fi(fileInfo(file.fileName()));
  7. if(fi.suffix() != "pbxproj" || file.fileName().isEmpty()) {
  8. QString output = file.fileName();
  9. - if(fi.isDir())
  10. - output += QDir::separator();
  11. + if (output.endsWith(QDir::separator()))
  12. + output.chop(1);
  13. + qDebug() << "outut" << output;
  14. if(!output.endsWith(projectSuffix())) {
  15. if(file.fileName().isEmpty() || fi.isDir()) {
  16. if(project->first("TEMPLATE") == "subdirs" || project->isEmpty("QMAKE_ORIG_TARGET"))
  17. @@ -1889,19 +1890,22 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file, const QString &build) c
  18. output += project->first("QMAKE_ORIG_TARGET").toQString();
  19. }
  20. output += projectSuffix() + QDir::separator();
  21. - } else if(output[(int)output.length() - 1] != QDir::separator()) {
  22. + } else {
  23. output += QDir::separator();
  24. }
  25. output += QString("project.pbxproj");
  26. file.setFileName(output);
  27. - bool ret = UnixMakefileGenerator::openOutput(file, build);
  28. - ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1);
  29. - Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2);
  30. - return ret;
  31. + qDebug() << "messed with output" << output;
  32. }
  33.  
  34. - ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir;
  35. - return UnixMakefileGenerator::openOutput(file, build);
  36. + bool ret = UnixMakefileGenerator::openOutput(file, build);
  37. + ((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1);
  38. + Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2);
  39. +
  40. + qDebug() << "ProjectBuilderMakefileGenerator::openOutput resolved (and fixed) output_dir ="
  41. + << Option::output_dir << ", pbx_dir =" << ((ProjectBuilderMakefileGenerator*)this)->pbx_dir
  42. + << "output =" << Option::output;
  43. + return ret;
  44. }
  45.  
  46. int
  47. diff --git i/qmake/main.cpp w/qmake/main.cpp
  48. index 85709dc9bf..10ea94c12c 100644
  49. --- i/qmake/main.cpp
  50. +++ w/qmake/main.cpp
  51. @@ -457,6 +457,7 @@ int runQMake(int argc, char **argv)
  52. Option::output_dir = oldpwd; //for now this is the output dir
  53. if(Option::output.fileName() != "-") {
  54. QFileInfo fi(Option::output);
  55. + qDebug() << "runQMake messing with output filePath =" << fi.filePath() << fi.isDir() << "path=" << fi.path();
  56. QString dir;
  57. if(fi.isDir()) {
  58. dir = fi.filePath();
  59. @@ -465,20 +466,31 @@ int runQMake(int argc, char **argv)
  60. if(!tmp_dir.isEmpty() && QFile::exists(tmp_dir))
  61. dir = tmp_dir;
  62. }
  63. + qDebug() << "\tdir =" << dir;
  64. #ifdef Q_OS_MAC
  65. if (fi.fileName().endsWith(QLatin1String(".pbxproj"))
  66. - && dir.endsWith(QLatin1String(".xcodeproj")))
  67. - dir += QStringLiteral("/..");
  68. + || fi.fileName().endsWith(QLatin1String(".xcodeproj"))) {
  69. + // Logic too complex to resolve here, defer to the (assumed) Xcode generator
  70. + dir = QString();
  71. + qDebug() << "nope!";
  72. + }
  73. #endif
  74. - if(!dir.isNull() && dir != ".")
  75. + if(!dir.isNull() && dir != ".") {
  76. Option::output_dir = dir;
  77. + qDebug() << "new output dir is" << dir;
  78. + }
  79. if (QDir::isRelativePath(Option::output_dir)) {
  80. + qDebug() << "adjusting out filename" << Option::output;
  81. Option::output.setFileName(fi.fileName());
  82. + qDebug() << "\t output -->" << Option::output;
  83. Option::output_dir.prepend(oldpwd + QLatin1Char('/'));
  84. + qDebug() << "\t outut_dir -->" << Option::output_dir;
  85. }
  86. Option::output_dir = QDir::cleanPath(Option::output_dir);
  87. }
  88.  
  89. + qDebug() << "runQMake resolved output_dir=" << Option::output_dir << "and output:" << Option::output;
  90. +
  91. QMakeProperty prop;
  92. if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY ||
  93. Option::qmake_mode == Option::QMAKE_SET_PROPERTY ||
Add Comment
Please, Sign In to add comment