From e48d818b3c47de04975b494097751a13fbade8c4 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 30 Apr 2021 15:46:40 +0200 Subject: [PATCH 1/3] Add install rules for puredata --- cmake/PuredataConfig.cmake | 11 +++++++++++ plugins/puredata/CMakeLists.txt | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/cmake/PuredataConfig.cmake b/cmake/PuredataConfig.cmake index 1fc7f005..11eab2fb 100644 --- a/cmake/PuredataConfig.cmake +++ b/cmake/PuredataConfig.cmake @@ -16,6 +16,17 @@ else() set(PUREDATA_SUFFIX ".pd_linux") endif() +if(APPLE) + set(PDPLUGIN_INSTALL_DIR "$ENV{HOME}/Library/Pd" CACHE STRING + "Install destination for Puredata bundle [default: $ENV{HOME}/Library/Pd]") +elseif(MSVC) + set(PDPLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/Pd/extra" CACHE STRING + "Install destination for Puredata bundle [default: ${CMAKE_INSTALL_PREFIX}/Pd/extra]") +else() + set(PDPLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/pd/extra" CACHE STRING + "Install destination for Puredata bundle [default: ${CMAKE_INSTALL_PREFIX}/lib/pd/extra]") +endif() + if(WIN32) add_library(pdex-implib STATIC IMPORTED) if(MSVC) diff --git a/plugins/puredata/CMakeLists.txt b/plugins/puredata/CMakeLists.txt index 0ad11a25..81176ed6 100644 --- a/plugins/puredata/CMakeLists.txt +++ b/plugins/puredata/CMakeLists.txt @@ -36,6 +36,16 @@ if(MINGW) PROPERTY LINK_FLAGS " -static") endif() +# Copy resources copy_puredata_resources(sfizz_puredata "${CMAKE_CURRENT_SOURCE_DIR}" "${PUREDATA_BINARY_DIR}") + +# Installation +if(NOT MSVC) + install(DIRECTORY "${PUREDATA_BINARY_DIR}" DESTINATION "${PDPLUGIN_INSTALL_DIR}" + COMPONENT "puredata") + bundle_dylibs(puredata + "${PDPLUGIN_INSTALL_DIR}/sfizz/sfizz${PUREDATA_SUFFIX}" + COMPONENT "puredata") +endif() From 0741da428ca08cf81a10e5b3280dfe5dafe933b8 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 30 Apr 2021 15:54:01 +0200 Subject: [PATCH 2/3] Install Puredata in the macOS CI --- scripts/appveyor/after_build.sh | 10 +++++++++- scripts/appveyor/before_build.sh | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/appveyor/after_build.sh b/scripts/appveyor/after_build.sh index fd686383..27718a3f 100755 --- a/scripts/appveyor/after_build.sh +++ b/scripts/appveyor/after_build.sh @@ -31,6 +31,13 @@ else codesign --sign "${CODESIGN_IDENTITY}" --keychain build.keychain --force --verbose \ "${INSTALL_DIR}"/sfizz.lv2/Contents/Frameworks/*.dylib fi + # code-sign Puredata and dylibs + codesign --sign "${CODESIGN_IDENTITY}" --keychain build.keychain --force --verbose \ + "${INSTALL_DIR}"/Puredata/*/*.pd_darwin + if ls "${INSTALL_DIR}"/Puredata/*/*.dylib &> /dev/null; then + codesign --sign "${CODESIGN_IDENTITY}" --keychain build.keychain --force --verbose \ + "${INSTALL_DIR}"/Puredata/*/*.dylib + fi fi # Create the DMG @@ -39,12 +46,13 @@ cat > sfizz-dmg.json << EOF "title": "sfizz", "background": "${APPVEYOR_BUILD_FOLDER}/mac/dmg-back.png", "window": { - "size": { "width": 500, "height": 500 } + "size": { "width": 650, "height": 500 } }, "contents": [ { "x": 100, "y": 50, "type": "file", "path": "${INSTALL_DIR}/sfizz.vst3" }, { "x": 250, "y": 50, "type": "file", "path": "${INSTALL_DIR}/sfizz.component" }, { "x": 400, "y": 50, "type": "file", "path": "${INSTALL_DIR}/sfizz.lv2" }, + { "x": 550, "y": 50, "type": "file", "path": "${INSTALL_DIR}/Puredata" }, { "x": 100, "y": 400, "type": "link", "path": "/Library/Audio/Plug-Ins/VST3" }, { "x": 250, "y": 400, "type": "link", "path": "/Library/Audio/Plug-Ins/Components" }, { "x": 400, "y": 400, "type": "link", "path": "/Library/Audio/Plug-Ins/LV2" } diff --git a/scripts/appveyor/before_build.sh b/scripts/appveyor/before_build.sh index e813e055..479b1018 100644 --- a/scripts/appveyor/before_build.sh +++ b/scripts/appveyor/before_build.sh @@ -15,4 +15,5 @@ cmake -DCMAKE_BUILD_TYPE=Release \ -DLV2PLUGIN_INSTALL_DIR=/ \ -DVSTPLUGIN_INSTALL_DIR=/ \ -DAUPLUGIN_INSTALL_DIR=/ \ + -DPDPLUGIN_INSTALL_DIR=/Puredata \ .. From f0ec0a525598d45a91d6ca4060604c13a66bbd59 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Fri, 30 Apr 2021 16:43:32 +0200 Subject: [PATCH 3/3] Win32 installer script for puredata --- scripts/innosetup.iss.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/innosetup.iss.in b/scripts/innosetup.iss.in index 577376fa..87159e32 100644 --- a/scripts/innosetup.iss.in +++ b/scripts/innosetup.iss.in @@ -46,6 +46,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" Name: "main"; Description: "Shared files"; Types: full custom; Flags: fixed Name: "lv2"; Description: "LV2 plugin"; Types: full custom; Name: "vst3"; Description: "VST3 plugin"; Types: full custom; +Name: "puredata"; Description: "Puredata external"; Types: full custom; [Files] Source: "sfizz.lv2\Contents\Binary\sfizz.dll"; Components: lv2; DestDir: "{commoncf}\LV2\sfizz.lv2\Contents\Binary"; Flags: ignoreversion @@ -61,6 +62,7 @@ Source: "sfizz.vst3\Contents\@VST3_PACKAGE_ARCHITECTURE@-win\sfizz.vst3"; Compon Source: "sfizz.vst3\Contents\Resources\*"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3\Contents\Resources"; Flags: recursesubdirs Source: "sfizz.vst3\Plugin.ico"; Components: vst3; DestDir: "{commoncf}\VST3\sfizz.vst3" Source: "sfizz.vst3\gpl-3.0.txt"; Components: main; DestDir: "{app}" +Source: "pd\*"; Components: puredata; DestDir: "{commoncf}\Pd"; Flags: recursesubdirs ; Note(sfizz): OS older than Windows 10 require UI fonts to be installed system-wide Source: "sfizz.vst3\Contents\Resources\Fonts\sfizz-fluentui-system-r20.ttf"; DestDir: "{fonts}"; FontInstall: "Sfizz Fluent System R20"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4 Source: "sfizz.vst3\Contents\Resources\Fonts\sfizz-fluentui-system-f20.ttf"; DestDir: "{fonts}"; FontInstall: "Sfizz Fluent System F20"; Flags: uninsneveruninstall; OnlyBelowVersion: 6.4