commit 257b79e16ba62dfaf320fa6a2f5b10f00e0f0095
parent e5e7259119f155429f2cb4a27817fa9a69baebbb
Author: falkTX <falktx@falktx.com>
Date: Sun, 18 Jul 2021 23:16:32 +0100
Add script to package macOS plugins as pkg
Diffstat:
4 files changed, 69 insertions(+), 1 deletion(-)
diff --git a/utils/package-osx-bundles.sh 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
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<installer-gui-script minSpecVersion="1">
+ <title>DPF-based audio plugins</title>
+ <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true" />
+ <options customize="always" hostArchitectures="x86_64;arm64" require-scripts="false" rootVolumeOnly="true" />
+ <pkg-ref id="studio.kx.distrho.plugins.@sname@" />
+ <welcome file="@builddir@/welcome.txt" mime-type="text/plain" />
+ <choice id="studio.kx.distrho.plugins.@sname@.lv2" title="LV2" description="Install LV2 plugins" visible="true">
+ <pkg-ref id="studio.kx.distrho.plugins.@sname@.lv2bundles" version="0">@lv2bundleref@</pkg-ref>
+ </choice>
+ <choice id="studio.kx.distrho.plugins.@SNAME@.vst2" title="VST2" description="Install VST2 plugins" visible="true">
+ <pkg-ref id="studio.kx.distrho.plugins.@sname@.vst2bundles" version="0">@vst2bundleref@</pkg-ref>
+ </choice>
+ <choices-outline>
+ <line choice="studio.kx.distrho.plugins.@sname@.lv2"/>
+ <line choice="studio.kx.distrho.plugins.@sname@.vst2"/>
+ </choices-outline>
+</installer-gui-script>
diff --git a/utils/plugin.pkg/welcome.txt.in 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
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>net.sf.distrho.X-PROJECTNAME-X</string>
+ <string>studio.kx.distrho.X-PROJECTNAME-X</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>