summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2011-02-14 17:33:27 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2011-03-15 14:58:23 (GMT)
commitfcfd06409768916ef10c7048a87b2328ec5d45f7 (patch)
tree1ed4b329861b1f5384116714a6af3c6140dcbf49 /qmake
parent400f151126e2208882875987943a3c8d919ec7f4 (diff)
downloadQt-fcfd06409768916ef10c7048a87b2328ec5d45f7.zip
Qt-fcfd06409768916ef10c7048a87b2328ec5d45f7.tar.gz
Qt-fcfd06409768916ef10c7048a87b2328ec5d45f7.tar.bz2
qmake/Mac: replace @SHORT_VERSION@ in QMAKE_INFO_PLIST file not only for libs
Task-number: QTBUG-7993 Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp2
-rw-r--r--qmake/generators/unix/unixmake2.cpp18
2 files changed, 15 insertions, 5 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 0ec946e..19667cd 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1272,6 +1272,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
plist_in_text = plist_in_text.replace("@EXECUTABLE@", project->first("QMAKE_ORIG_TARGET"));
} else {
plist_in_text = plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET"));
+ }
+ if (!project->values("VERSION").isEmpty()) {
plist_in_text = plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." +
project->first("VER_MIN"));
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 5ea13f4..212f8bd 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -712,11 +712,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << info_plist_out << ": " << "\n\t";
if(!destdir.isEmpty())
t << mkdir_p_asstring(destdir) << "\n\t";
+ QStringList commonSedArgs;
+ if (!project->values("VERSION").isEmpty())
+ commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" ";
+ commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
+ QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
if(project->first("TEMPLATE") == "app") {
QString icon = fileFixify(var("ICON"));
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
- << "@sed "
- << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
+ << "@sed ";
+ foreach (const QString &arg, commonSedArgs)
+ t << arg;
+ t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
<< "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
@@ -732,9 +739,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
} else {
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
- << "@sed "
- << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
- << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "
+ << "@sed ";
+ foreach (const QString &arg, commonSedArgs)
+ t << arg;
+ t << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
<< "-e \"s,@TYPEINFO@,"
<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "