From 257b79e16ba62dfaf320fa6a2f5b10f00e0f0095 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 18 Jul 2021 23:16:59 +0100 Subject: [PATCH] Add script to package macOS plugins as pkg --- utils/package-osx-bundles.sh | 47 ++++++++++++++++++++++++++++ utils/plugin.pkg/package.xml.in | 18 +++++++++++ utils/plugin.pkg/welcome.txt.in | 3 ++ utils/plugin.vst/Contents/Info.plist | 2 +- 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100755 utils/package-osx-bundles.sh create mode 100644 utils/plugin.pkg/package.xml.in create mode 100644 utils/plugin.pkg/welcome.txt.in diff --git a/utils/package-osx-bundles.sh b/utils/package-osx-bundles.sh new file mode 100755 index 00000000..a2f76bbe --- /dev/null +++ b/utils/package-osx-bundles.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +if [ -d bin ]; then + cd bin +else + echo "Please run this script from the root folder" + exit +fi + +NAME="$(basename $(git rev-parse --show-toplevel))" +SNAME="$(echo ${NAME} | tr -d ' ' | tr '/' '-')" + +rm -rf lv2 +rm -rf vst2 + +mkdir lv2 vst2 +mv *.lv2 lv2/ +mv *.vst vst2/ + +pkgbuild \ + --identifier "studio.kx.distrho.plugins.${SNAME}.lv2bundles" \ + --install-location "/Library/Audio/Plug-Ins/LV2/" \ + --root "${PWD}/lv2/" \ + ../dpf-${sname}-lv2bundles.pkg + +pkgbuild \ + --identifier "studio.kx.distrho.plugins.${SNAME}.vst2bundles" \ + --install-location "/Library/Audio/Plug-Ins/VST/" \ + --root "${PWD}/vst2/" \ + ../dpf-${sname}-vst2bundles.pkg + +cd .. + +sed -e "s|@name@|${NAME}|" utils/plugin.pkg/welcome.txt.in > build/welcome.txt +sed -e "s|@builddir@|${PWD}/build|" \ + -e "s|@lv2bundleref@|dpf-${sname}-lv2bundles.pkg|" \ + -e "s|@vst2bundleref@|dpf-${sname}-vst2bundles.pkg|" \ + -e "s|@sname@|${SNAME}|g" \ + utils/plugin.pkg/package.xml.in > build/package.xml + +productbuild \ + --distribution build/package.xml \ + --identifier "studio.kx.distrho.plugins.${SNAME}" \ + --package-path "${PWD}" \ + ${SNAME}-macOS.pkg diff --git a/utils/plugin.pkg/package.xml.in b/utils/plugin.pkg/package.xml.in new file mode 100644 index 00000000..73e9099e --- /dev/null +++ b/utils/plugin.pkg/package.xml.in @@ -0,0 +1,18 @@ + + + DPF-based audio plugins + + + + + + @lv2bundleref@ + + + @vst2bundleref@ + + + + + + diff --git a/utils/plugin.pkg/welcome.txt.in b/utils/plugin.pkg/welcome.txt.in new file mode 100644 index 00000000..c9e91a6f --- /dev/null +++ b/utils/plugin.pkg/welcome.txt.in @@ -0,0 +1,3 @@ +@name@ + +This is an audio plugin installer based on DPF. diff --git a/utils/plugin.vst/Contents/Info.plist b/utils/plugin.vst/Contents/Info.plist index df723b55..6eef795f 100644 --- a/utils/plugin.vst/Contents/Info.plist +++ b/utils/plugin.vst/Contents/Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.sf.distrho.X-PROJECTNAME-X + studio.kx.distrho.X-PROJECTNAME-X CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType