From fb36e5d8d7a88d13585dd129ad8b129504eb54fd Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 15 Apr 2024 17:08:37 -0500 Subject: [PATCH] do not alter macOS bundle during packaging thanks emberdex (https://github.com/tildearrow/furnace/pull/1609#issuecomment-2057085220) NOTE: if building for installation in /usr/local or something, be sure to pass -DFORCE_APPLE_BIN=ON to CMake! --- .github/workflows/build.yml | 5 ----- CMakeLists.txt | 10 +++++++++- README.md | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fadc87023..13ca442b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -261,11 +261,6 @@ jobs: rmdir orig rm Furnace-*-Darwin.dmg - if [ -e new/Furnace.app/Contents/Resources/bin/furnace ]; then - rm -v new/Furnace.app/Contents/Resources/bin/furnace - rmdir new/Furnace.app/Contents/Resources/bin - fi - echo "copying extra stuff" cp -v ../LICENSE new/LICENSE.txt cp -v ../res/releaseReadme/stable-mac.txt new/README diff --git a/CMakeLists.txt b/CMakeLists.txt index a60657aeb..146d4afdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,12 @@ option(WITH_DEMOS "Install demo songs" ON) option(WITH_INSTRUMENTS "Install instruments" ON) option(WITH_WAVETABLES "Install wavetables" ON) option(SHOW_OPEN_ASSETS_MENU_ENTRY "Show option to open built-in assets directory (on supported platforms)" OFF) +if (APPLE) + option(FORCE_APPLE_BIN "Force enable binary installation to /bin" OFF) +else() + # not Apple - not needed + set(FORCE_APPLE_BIN OFF) +endif() set(DEPENDENCIES_INCLUDE_DIRS extern/IconFontCppHeaders src/icon) @@ -1161,7 +1167,9 @@ if (NOT ANDROID OR TERMUX) endforeach() install(FILES res/logo.png RENAME furnace.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/1024x1024/apps) else() - install(TARGETS furnace RUNTIME DESTINATION bin) + if (NOT APPLE OR FORCE_APPLE_BIN) + install(TARGETS furnace RUNTIME DESTINATION bin) + endif() endif() set(CPACK_PACKAGE_NAME "Furnace") diff --git a/README.md b/README.md index 63f92f8e3..199e6c117 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,7 @@ Available options: | `WITH_INSTRUMENTS` | `ON` | Install demo instruments on `make install` | | `WITH_WAVETABLES` | `ON` | Install wavetables on `make install` | | `SHOW_OPEN_ASSETS_MENU_ENTRY` | `OFF` | Show option to open built-in assets directory (on supported platforms) | +| `FORCE_APPLE_BIN` | `OFF` | Enable installation of binaries (when doing `make install`) to PREFIX/bin on Apple platforms | (\*) `ON` if system-installed JACK detected, otherwise `OFF`