Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864759
D4379.id14038.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D4379.id14038.diff
View Options
diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt
--- a/src/qt/CMakeLists.txt
+++ b/src/qt/CMakeLists.txt
@@ -296,12 +296,29 @@
NAME
)
+ set(INFO_PLIST_STRINGS_FILE "Base.lproj/InfoPlist.strings")
+ set(INFO_PLIST_STRINGS_PATH "${CMAKE_CURRENT_BINARY_DIR}/${INFO_PLIST_STRINGS_FILE}")
+ file(WRITE
+ "${INFO_PLIST_STRINGS_PATH}"
+ "{ CFBundleDisplayName = \"${PACKAGE_NAME}\"; CFBundleName = \"${PACKAGE_NAME}\"; }"
+ )
+
+ set(EMPTY_LPROJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/empty.lproj")
+ file(TOUCH "${EMPTY_LPROJ_FILE}")
+
add_executable(BitcoinABC-Qt MACOSX_BUNDLE
bitcoin.cpp
"${BITCOINQT_BUNDLE_ICON}"
+ "${INFO_PLIST_STRINGS_PATH}"
+ "${EMPTY_LPROJ_FILE}"
)
target_link_libraries(BitcoinABC-Qt bitcoin-qt-base)
+ string(JOIN ";" BITCOINQT_BUNDLE_RESOURCES
+ "${BITCOINQT_BUNDLE_ICON}"
+ "${EMPTY_LPROJ_FILE}"
+ )
+
set_target_properties(BitcoinABC-Qt PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/share/qt/Info.plist.cmake.in"
MACOSX_BUNDLE_BUNDLE_NAME "BitcoinABC-Qt"
@@ -311,7 +328,17 @@
MACOSX_BUNDLE_INFO_STRING "${bitcoin-abc_VERSION}, Copyright © 2009-${COPYRIGHT_YEAR} ${COPYRIGHT_HOLDERS_FINAL}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${bitcoin-abc_VERSION}"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${bitcoin-abc_VERSION}"
- RESOURCE "${BITCOINQT_BUNDLE_ICON}"
+ RESOURCE "${BITCOINQT_BUNDLE_RESOURCES}"
+ )
+ # The InfoPlist.strings files should be located in a resource subdirectory.
+ # This is not supported by the RESOURCE property and require the use of the
+ # MACOSX_PACKAGE_LOCATION property instead. The RESOURCE documentation has
+ # an example demonstrating this behavior (see the appres.txt file):
+ # https://cmake.org/cmake/help/latest/prop_tgt/RESOURCE.html
+ set_source_files_properties(
+ "${INFO_PLIST_STRINGS_PATH}"
+ PROPERTIES
+ MACOSX_PACKAGE_LOCATION "Resources/${INFO_PLIST_STRINGS_FILE}"
)
endif()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 22:12 (18 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865518
Default Alt Text
D4379.id14038.diff (1 KB)
Attached To
D4379: [CMAKE] Prepare the application bundle for localization
Event Timeline
Log In to Comment