Set version number like major.minor.patch.build on macOS

Qt is supposed to work with these kinds of version numbers but it doesn't seem to actually work for some reason
http://doc.qt.io/qt-5/qmake-variable-reference.html#version.

You should eventually be able to revert this commit (and remove the VERSION line) once there are version numbers set that are just major.minor.patch.
This commit is contained in:
Aaron Raimist 2019-01-02 21:36:17 -06:00
parent 446c9194bf
commit da7fb89c81
2 changed files with 8 additions and 3 deletions

View File

@ -9,9 +9,9 @@
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleShortVersionString</key>
<string>${QMAKE_FULL_VERSION}</string>
<string></string>
<key>CFBundleVersion</key>
<string>${QMAKE_FULL_VERSION}</string>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSMinimumSystemVersion</key>

View File

@ -84,7 +84,12 @@ win32 {
mac {
QMAKE_TARGET_BUNDLE_PREFIX = org.eu.encom.spectral
VERSION = 0.0.$$system(git rev-list --count HEAD)
VERSION = 0.0.0.$$system(git rev-list --count HEAD)
INFO_PLIST_PATH = $$shell_quote($${OUT_PWD}/$${TARGET}.app/Contents/Info.plist)
QMAKE_POST_LINK += /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $${VERSION}\" $${INFO_PLIST_PATH}
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${VERSION}\" $${INFO_PLIST_PATH}
ICON = assets/img/icon.icns
QMAKE_INFO_PLIST = macOS/Info.plist
}