From f90739a520ea51efdf257ac9b9ecae7a4f142597 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Mon, 6 Jul 2020 00:41:34 +0200 Subject: [PATCH] Mac: populate version info in .plist Closes #88 --- CMakeLists.txt | 4 ++-- mac/{Info.plist => Info.plist.in} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename mac/{Info.plist => Info.plist.in} (93%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60c3549..8b1e123 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(HEADERS config.h imagewriter.h networkaccessmanagerfactory.h nan.h drivelist # Add dependencies if (APPLE) set_source_files_properties("icons/rpi-imager.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") - set(DEPENDENCIES mac/macfile.cpp mac/macfile.h mac/Info.plist dependencies/mountutils/src/darwin/functions.cpp + set(DEPENDENCIES mac/macfile.cpp mac/macfile.h dependencies/mountutils/src/darwin/functions.cpp dependencies/drivelist/src/darwin/list.mm dependencies/drivelist/src/darwin/REDiskList.m icons/rpi-imager.icns) enable_language(OBJC C) elseif (UNIX) @@ -208,7 +208,7 @@ elseif(APPLE) find_library(DiskArbitration DiskArbitration) find_library(Security Security) set(EXTRALIBS ${EXTRALIBS} ${CoreFoundation} ${DiskArbitration} ${Security} ${Cocoa}) - set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE YES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist) + set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE YES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/Info.plist.in) find_program(MACDEPLOYQT "macdeployqt" PATHS "${Qt5_DIR}/../../../bin") if (NOT MACDEPLOYQT) diff --git a/mac/Info.plist b/mac/Info.plist.in similarity index 93% rename from mac/Info.plist rename to mac/Info.plist.in index 3f2232e..befcdf7 100644 --- a/mac/Info.plist +++ b/mac/Info.plist.in @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - + @IMAGER_VERSION_STR@ CFBundleSignature ???? CFBundleVersion - + @IMAGER_VERSION_STR@ CSResourcesFileMapped NSHumanReadableCopyright