diff --git a/admin/mac/Info.plist b/admin/mac/Info.plist index 9acc67a0c..f4fd83c88 100644 --- a/admin/mac/Info.plist +++ b/admin/mac/Info.plist @@ -13,9 +13,9 @@ CFBundlePackageType APPL CFBundleVersion - 0.0.2.0 + TOMAHAWK_VERSION CFBundleShortVersionString - 0.0.2 + TOMAHAWK_VERSION CFBundleSignature tomahawk CFBundleIconFile diff --git a/src/CMakeLists.osx.txt b/src/CMakeLists.osx.txt index 6d3ded108..0488b2f71 100644 --- a/src/CMakeLists.osx.txt +++ b/src/CMakeLists.osx.txt @@ -35,15 +35,18 @@ if (APPLE) # Use two different sparkle update tracks for debug and release # We have to change the URL in the Info.plist file :-/ - IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" ) - FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist) - STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this - "http://download.tomahawk-player.org/sparkle-debug" #replace with debug url + FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist) + STRING( REPLACE "TOMAHAWK_VERSION" + ${VERSION} edited_plist # save in this variable "${plist}" # from the contents of this var ) - FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" ) - ELSE() # Just copy the release one - FILE( COPY ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist DESTINATION ${CMAKE_BINARY_DIR} ) + IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" ) + STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this + "http://download.tomahawk-player.org/sparkle-debug" #replace with debug url + edited_plist # save in this variable + "${edited_plist}" # from the contents of this var + ) ENDIF() + FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" ) endif (APPLE)