-
-
Notifications
You must be signed in to change notification settings - Fork 59
/
win_builds.sh
63 lines (52 loc) · 1.51 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
build64(){
cmake -Bbuild -G"Visual Studio 15 2017 Win64"
#cmake -Bbuild -G"Visual Studio 16 2019 Win64"
cmake --build build --config Release -j4
}
build32(){
cmake -Bbuild32 -G"Visual Studio 15 2017"
cmake --build build32 --config Release -j4
}
# exit on failure
set -e
# clean up old builds
rm -Rf build/
rm -Rf build32/
rm -Rf bin/*Win64*
rm -Rf bin/*Win32*
# 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 &
build32 &
wait
# copy builds to bin
mkdir -p bin/Win64
mkdir -p bin/Win32
declare -a plugins=("NeuralPi")
for plugin in "${plugins[@]}"; do
cp -R build/${plugin}_artefacts/Release/Standalone/${plugin}.exe bin/Win64/${plugin}.exe
cp -R build/${plugin}_artefacts/Release/VST3/${plugin}.vst3 bin/Win64/${plugin}.vst3
cp -R build32/${plugin}_artefacts/Release/Standalone/${plugin}.exe bin/Win32/${plugin}.exe
cp -R build32/${plugin}_artefacts/Release/VST3/${plugin}.vst3 bin/Win32/${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 "NeuralPi-Win64-${VERSION}.zip"
rm -f "NeuralPi-Win32-${VERSION}.zip"
tar -a -c -f "NeuralPi-Win64-${VERSION}.zip" Win64
tar -a -c -f "NeuralPi-Win32-${VERSION}.zip" Win32
)
# create installer
echo "Creating installer..."
(
cd installers/windows
bash build_win_installer.sh
)