From 4efd1d90c2892e6636c572262ec226d41d3f5f0b Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Sat, 27 Aug 2022 10:47:55 -0400 Subject: [PATCH 1/2] macos: Add RPATH to the installed binary to enable dynamic loading of bundled libraries. --- src/qt/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 0cb4560c4..1db01301d 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -309,7 +309,11 @@ if (APPLE AND CMAKE_MACOSX_BUNDLE) install(CODE " include(BundleUtilities) get_filename_component(CMAKE_INSTALL_PREFIX_ABSOLUTE \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX} ABSOLUTE) - fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS}\" \"${DIRS}\")") + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/86Box.app\" \"${QT_PLUGINS}\" \"${DIRS}\") + execute_process( + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath \"@executable_path/../Frameworks/\" + \"\${CMAKE_INSTALL_PREFIX_ABSOLUTE}/${INSTALL_RUNTIME_DIR}/86Box\") + ") endif() if (UNIX AND NOT APPLE AND NOT HAIKU) From 5384eb35bbb42a6aa03cec562a8e4ee1bea41bb3 Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Sat, 27 Aug 2022 11:03:45 -0400 Subject: [PATCH 2/2] macos: Fix the name of the bundled freetype library --- src/printer/prt_escp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index ec07dc95f..013726c06 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -90,7 +90,7 @@ #ifdef _WIN32 # define PATH_FREETYPE_DLL "freetype.dll" #elif defined __APPLE__ -# define PATH_FREETYPE_DLL "libfreetype.dylib" +# define PATH_FREETYPE_DLL "libfreetype.6.dylib" #else # define PATH_FREETYPE_DLL "libfreetype.so.6" #endif