-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·72 lines (60 loc) · 1.85 KB
/
setup.sh
File metadata and controls
executable file
·72 lines (60 loc) · 1.85 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
set -e
echo 'Setting up development environment...'
# Check and install dependencies on macOS
if [ "$(uname)" = "Darwin" ]; then
echo 'Checking dependencies for macOS...'
# Check if Homebrew is installed
if ! command -v brew &> /dev/null; then
echo 'Installing Homebrew...'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Check and install cmake
if ! command -v cmake &> /dev/null; then
echo 'Installing cmake...'
brew install cmake
else
echo 'cmake already installed'
fi
# Check and install make (part of Xcode command line tools)
if ! command -v make &> /dev/null; then
echo 'Installing Xcode command line tools...'
xcode-select --install
echo 'Please complete the Xcode command line tools installation and run this script again.'
exit 1
else
echo 'make already installed'
fi
fi
# Download and extract VST3 SDK if not present
if [ ! -d vst3sdk ]; then
echo 'Downloading VST3 SDK...'
curl -L -o vst3sdk.zip https://www.steinberg.net/vst3sdk
unzip -q vst3sdk.zip
if [ -d VST_SDK/vst3sdk ]; then
mv VST_SDK/vst3sdk .
rm -rf VST_SDK
fi
rm -f vst3sdk.zip
echo 'VST3 SDK downloaded and extracted.'
else
echo 'VST3 SDK already exists, skipping download.'
fi
# Set VST3_SDK_DIR environment variable
export VST3_SDK_DIR="$(pwd)/vst3sdk"
# Build native library
echo 'Building native library...'
mkdir -p native/build
cd native/build
cmake ..
make
# Copy library to project root
if [ "$(uname)" = "Darwin" ]; then
cp libdart_vst_host.dylib ../../
elif [ "$(uname)" = "Linux" ]; then
cp libdart_vst_host.so ../../
else
cp libdart_vst_host.dll ../../
fi
cd ../..
echo 'Setup complete! Native library built and ready for development.'