forked from chrisjmendez/elementary-audio-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_plugin.sh
42 lines (31 loc) · 1.34 KB
/
compile_plugin.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh
: '
Goal: Create a Reliable Bash Script that
builds the code from these three domains:
1. Node + NPM for Javascript
2. JUCE for the C++-based Audio Plugin
3. XCode for Audio Unit
'
# Common Working Directory
CWD=$(pwd);
# Final Plug In Directory
DIR_PLUGIN="$CWD/build/";
# JS directory
DIR_JS="$CWD/js/";
: 'Javascript –––––––––––––––––––––––––––––––––––––––––'
cd $DIR_JS;
# Install any JS dependencies using Node Package Manager
npm i;
# Build the main Javascript and store it in /js/build
npm run build;
: 'XCode -----–––––––––––––––––––––––––––––––––––––––––'
cd $DIR_PLUGIN;
# Build the main audio plugin and store it in /build/
cmake -G Xcode -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 ../
cmake --build .
: 'Copy Files --–––––––––––––––––––––––––––––––––––––––––'
# Copy the Plugins to macOS plugin directory
cp $DIR_PLUGIN/FXP_artefacts/Debug/AU/FXP.component $HOME/Library/Audio/Plug-Ins/Components/
cp $DIR_PLUGIN/FXP_artefacts/Debug/VST3/FXP.vst3 $HOME/Library/Audio/Plug-Ins/VST3/
# Open the Folder where the plugins should be installed
open $HOME/Library/Audio/Plug-Ins/