-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
win_builds.sh
49 lines (39 loc) · 1010 Bytes
/
win_builds.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
42
43
44
45
46
47
48
49
#!/bin/bash
build64(){
#cmake -Bbuild -G"Visual Studio 15 2017 Win64"
cmake -Bbuild -G"Visual Studio 16 2019" -A x64
cmake --build build --config Release -j4
}
# exit on failure
set -e
# clean up old builds
rm -Rf build/
rm -Rf bin/*Win64*
# set up VST and ASIO paths
sed -i -e "9s/#//" CMakeLists.txt
sed -i -e "10s/#//" CMakeLists.txt
sed -i -e '16s/#//' CMakeLists.txt
# cmake new builds
build64 &
wait
# copy builds to bin
mkdir -p bin/Win64
declare -a plugins=("Chameleon")
for plugin in "${plugins[@]}"; do
cp -R build/${plugin}_artefacts/Release/VST3/${plugin}.vst3 bin/Win64/${plugin}.vst3
done
# reset CMakeLists.txt
#git restore CMakeLists.txt
# zip builds
VERSION=$(cut -f 2 -d '=' <<< "$(grep 'CMAKE_PROJECT_VERSION:STATIC' build/CMakeCache.txt)")
(
cd bin
rm -f "Chameleon-Win64-${VERSION}.zip"
tar -a -c -f "Chameleon-Win64-${VERSION}.zip" Win64
)
# create installer
echo "Creating installer..."
(
cd installers/windows
bash build_win_installer.sh
)