diff --git a/cmake/Dmg.cmake b/cmake/Dmg.cmake index f2276f6a6..d4ed78243 100644 --- a/cmake/Dmg.cmake +++ b/cmake/Dmg.cmake @@ -18,13 +18,13 @@ endif() if(MACDEPLOYQT_EXECUTABLE AND MACOS_VERSION_PACKAGE) add_custom_target(dmg - COMMAND ${MACDEPLOYQT_EXECUTABLE} strawberry.app + COMMAND ${MACDEPLOYQT_EXECUTABLE} strawberry.app -executable=${CMAKE_BINARY_DIR}/strawberry.app/Contents/PlugIns/strawberry-tagreader COMMAND ${CMAKE_SOURCE_DIR}/dist/macos/macdeploy.py strawberry.app COMMAND create-dmg --volname strawberry --background "${CMAKE_SOURCE_DIR}/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon strawberry.app 150 218 --window-size 600 450 strawberry-${STRAWBERRY_VERSION_PACKAGE}-${MACOS_VERSION_PACKAGE}-${CMAKE_HOST_SYSTEM_PROCESSOR}.dmg strawberry.app WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) add_custom_target(dmg2 - COMMAND ${MACDEPLOYQT_EXECUTABLE} strawberry.app + COMMAND ${MACDEPLOYQT_EXECUTABLE} strawberry.app -executable=${CMAKE_BINARY_DIR}/strawberry.app/Contents/PlugIns/strawberry-tagreader COMMAND ${CMAKE_SOURCE_DIR}/dist/macos/macdeploy.py strawberry.app COMMAND create-dmg --skip-jenkins --volname strawberry --background "${CMAKE_SOURCE_DIR}/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon strawberry.app 150 218 --window-size 600 450 strawberry-${STRAWBERRY_VERSION_PACKAGE}-${MACOS_VERSION_PACKAGE}-${CMAKE_HOST_SYSTEM_PROCESSOR}.dmg strawberry.app WORKING_DIRECTORY ${CMAKE_BINARY_DIR} diff --git a/dist/macos/macdeploy.py b/dist/macos/macdeploy.py index 2b1a6fe95..50f8635f8 100755 --- a/dist/macos/macdeploy.py +++ b/dist/macos/macdeploy.py @@ -123,8 +123,7 @@ GIO_MODULES_SEARCH_PATH = ['/usr/local/lib/gio/modules',] INSTALL_NAME_TOOL_APPLE = 'install_name_tool' INSTALL_NAME_TOOL_CROSS = 'x86_64-apple-darwin-%s' % INSTALL_NAME_TOOL_APPLE -INSTALL_NAME_TOOL = INSTALL_NAME_TOOL_CROSS if spawn.find_executable( - INSTALL_NAME_TOOL_CROSS) else INSTALL_NAME_TOOL_APPLE +INSTALL_NAME_TOOL = INSTALL_NAME_TOOL_CROSS if spawn.find_executable(INSTALL_NAME_TOOL_CROSS) else INSTALL_NAME_TOOL_APPLE OTOOL_APPLE = 'otool' OTOOL_CROSS = 'x86_64-apple-darwin-%s' % OTOOL_APPLE @@ -169,6 +168,7 @@ resources_dir = os.path.join(bundle_dir, 'Contents', 'Resources') commands.append(['mkdir', '-p', resources_dir]) plugins_dir = os.path.join(bundle_dir, 'Contents', 'PlugIns') binary = os.path.join(bundle_dir, 'Contents', 'MacOS', bundle_name) +tagreader_binary = os.path.join(plugins_dir, bundle_name + "-tagreader") fixed_libraries = set() fixed_frameworks = set() @@ -479,11 +479,13 @@ def main(): logging.basicConfig(filename='macdeploy.log', level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s') FixBinary(binary) + FixBinary(tagreader_binary) - try: - FixPlugin('strawberry-tagreader', '.') - except: - print('Failed to find blob: %s' % traceback.format_exc()) + # macdeployqt needs to handle strawberry-tagreader for Qt deployment, so we can't use FixPlugin() here. + #try: + # FixPlugin('strawberry-tagreader', '.') + #except: + # print('Failed to find blob: %s' % traceback.format_exc()) for plugin in GSTREAMER_PLUGINS: FixPlugin(FindGstreamerPlugin(plugin), 'gstreamer') diff --git a/ext/strawberry-tagreader/CMakeLists.txt b/ext/strawberry-tagreader/CMakeLists.txt index 6c1c951c2..1fbff1c52 100644 --- a/ext/strawberry-tagreader/CMakeLists.txt +++ b/ext/strawberry-tagreader/CMakeLists.txt @@ -49,4 +49,8 @@ if(APPLE) target_link_libraries(strawberry-tagreader PRIVATE /System/Library/Frameworks/Foundation.framework) endif(APPLE) -install(TARGETS strawberry-tagreader RUNTIME DESTINATION bin) +if(APPLE) + install(TARGETS strawberry-tagreader DESTINATION ${CMAKE_BINARY_DIR}/strawberry.app/Contents/PlugIns) +else() + install(TARGETS strawberry-tagreader RUNTIME DESTINATION bin) +endif()