Mercurial > hg > pub > prymula > com
comparison DPF-Prymula-audioplugins/dpf/utils/package-osx-bundles.sh @ 3:84e66ea83026
DPF-Prymula-audioplugins-0.231015-2
author | prymula <prymula76@outlook.com> |
---|---|
date | Mon, 16 Oct 2023 21:53:34 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:cf2cb71d31dd | 3:84e66ea83026 |
---|---|
1 #!/bin/bash | |
2 | |
3 set -e | |
4 | |
5 if [ -d bin ]; then | |
6 cd bin | |
7 else | |
8 echo "Please run this script from the root folder" | |
9 exit | |
10 fi | |
11 | |
12 NAME="$(basename $(git rev-parse --show-toplevel))" | |
13 SNAME="$(echo ${NAME} | tr -d ' ' | tr '/' '-')" | |
14 | |
15 rm -rf lv2 | |
16 rm -rf vst2 | |
17 rm -rf vst3 | |
18 rm -rf clap | |
19 | |
20 mkdir lv2 vst2 vst3 clap | |
21 cp -RL *.lv2 lv2/ | |
22 cp -RL *.vst vst2/ | |
23 cp -RL *.vst3 vst3/ | |
24 cp -RL *.clap clap/ | |
25 rm -rf *.lv2 *.vst *.vst3 *.clap | |
26 | |
27 pkgbuild \ | |
28 --identifier "studio.kx.distrho.plugins.${SNAME}.lv2bundles" \ | |
29 --install-location "/Library/Audio/Plug-Ins/LV2/" \ | |
30 --root "${PWD}/lv2/" \ | |
31 ../dpf-${SNAME}-lv2bundles.pkg | |
32 | |
33 pkgbuild \ | |
34 --identifier "studio.kx.distrho.plugins.${SNAME}.vst2bundles" \ | |
35 --install-location "/Library/Audio/Plug-Ins/VST/" \ | |
36 --root "${PWD}/vst2/" \ | |
37 ../dpf-${SNAME}-vst2bundles.pkg | |
38 | |
39 pkgbuild \ | |
40 --identifier "studio.kx.distrho.plugins.${SNAME}.vst3bundles" \ | |
41 --install-location "/Library/Audio/Plug-Ins/VST3/" \ | |
42 --root "${PWD}/vst3/" \ | |
43 ../dpf-${SNAME}-vst3bundles.pkg | |
44 | |
45 pkgbuild \ | |
46 --identifier "studio.kx.distrho.plugins.${SNAME}.clapbundles" \ | |
47 --install-location "/Library/Audio/Plug-Ins/CLAP/" \ | |
48 --root "${PWD}/clap/" \ | |
49 ../dpf-${SNAME}-clapbundles.pkg | |
50 | |
51 cd .. | |
52 | |
53 DPF_UTILS_DIR=$(dirname ${0}) | |
54 | |
55 # can be overridden by environment variables | |
56 WELCOME_TXT=${WELCOME_TXT:=${DPF_UTILS_DIR}/plugin.pkg/welcome.txt.in} | |
57 | |
58 mkdir -p build | |
59 sed -e "s|@name@|${NAME}|" "${WELCOME_TXT}" > build/welcome.txt | |
60 sed -e "s|@builddir@|${PWD}/build|" \ | |
61 -e "s|@lv2bundleref@|dpf-${SNAME}-lv2bundles.pkg|" \ | |
62 -e "s|@vst2bundleref@|dpf-${SNAME}-vst2bundles.pkg|" \ | |
63 -e "s|@vst3bundleref@|dpf-${SNAME}-vst3bundles.pkg|" \ | |
64 -e "s|@clapbundleref@|dpf-${SNAME}-clapbundles.pkg|" \ | |
65 -e "s|@name@|${NAME}|g" \ | |
66 -e "s|@sname@|${SNAME}|g" \ | |
67 ${DPF_UTILS_DIR}/plugin.pkg/package.xml.in > build/package.xml | |
68 | |
69 productbuild \ | |
70 --distribution build/package.xml \ | |
71 --identifier "studio.kx.distrho.${SNAME}" \ | |
72 --package-path "${PWD}" \ | |
73 --version 0 \ | |
74 ${SNAME}-macOS.pkg |