From 1dfad46f7d8b3ae2dcb1ac3bc4a00f4d424c14ac Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sun, 6 Mar 2016 12:01:59 -0800 Subject: [PATCH] Correct version info for all OSX/iOS builds --- Custom-Info.plist | 4 ++-- QGCCommon.pri | 26 +++++++++++++++++--------- QGCSetup.pri | 6 ++++++ ios/iOS-Info.plist | 4 ++-- ios/iOSForAppStore-Info.plist | 4 ++-- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/Custom-Info.plist b/Custom-Info.plist index 89cae30f6..067aacfb0 100644 --- a/Custom-Info.plist +++ b/Custom-Info.plist @@ -9,9 +9,9 @@ CFBundlePackageType APPL CFBundleVersion - 227 + ### CFBundleShortVersionString - 2.0.0 + #.#.# CFBundleSignature ???? CFBundleExecutable diff --git a/QGCCommon.pri b/QGCCommon.pri index 002d7e30b..3877cb62a 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -88,16 +88,24 @@ MobileBuild { # set the QGC version from git exists ($$PWD/.git) { - GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags) - GIT_HASH = $$system(git rev-parse HEAD) - VERSION = $$replace(GIT_DESCRIBE, "v", "") - VERSION = $$replace(VERSION, "-", ".") - VERSION = $$section(VERSION, ".", 0, 3) - message(QGroundControl version $${GIT_DESCRIBE} hash $${GIT_HASH}) + GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags) + GIT_HASH = $$system(git rev-parse HEAD) + VERSION = $$replace(GIT_DESCRIBE, "v", "") + VERSION = $$replace(VERSION, "-", ".") + VERSION = $$section(VERSION, ".", 0, 3) + MacBuild { + MAC_VERSION = $$section(VERSION, ".", 0, 2) + MAC_BUILD = $$section(VERSION, ".", 3, 3) + message(QGroundControl version $${MAC_VERSION} build $${MAC_BUILD} describe $${GIT_DESCRIBE} hash $${GIT_HASH}) + } else { + message(QGroundControl version $${VERSION} describe $${GIT_DESCRIBE} hash $${GIT_HASH}) + } } else { - GIT_DESCRIBE = None - GIT_HASH = None - VERSION = 0.0.0 # Marker to indicate out-of-tree build + GIT_DESCRIBE = None + GIT_HASH = None + VERSION = 0.0.0 # Marker to indicate out-of-tree build + MAC_VERSION = 0.0.0 + MAC_BUILD = 0 } DEFINES += GIT_TAG=\"\\\"$$GIT_DESCRIBE\\\"\" diff --git a/QGCSetup.pri b/QGCSetup.pri index ac947d9cf..c8e09e840 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -50,6 +50,12 @@ WindowsBuild { # Perform platform specific setup # +iOSBuild | MacBuild { + # Update version info in bundle + QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${MAC_VERSION}\" $$DESTDIR/$${TARGET}.app/Contents/Info.plist + QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $${MAC_BUILD}\" $$DESTDIR/$${TARGET}.app/Contents/Info.plist +} + MacBuild { # Copy non-standard frameworks into app package QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/ diff --git a/ios/iOS-Info.plist b/ios/iOS-Info.plist index c53044cc1..82db8a4b9 100644 --- a/ios/iOS-Info.plist +++ b/ios/iOS-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + #.#.# CFBundleSignature ???? CFBundleVersion - 1.0 + ### LSRequiresIPhoneOS NOTE diff --git a/ios/iOSForAppStore-Info.plist b/ios/iOSForAppStore-Info.plist index fa6a00820..0312e0bbf 100644 --- a/ios/iOSForAppStore-Info.plist +++ b/ios/iOSForAppStore-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + #.#.# CFBundleSignature ???? CFBundleVersion - 1.0 + ### LSRequiresIPhoneOS NOTE -- 2.22.0