win_builds.sh (1550B)
1 #!/bin/bash 2 3 build64(){ 4 cmake -Bbuild -G"Visual Studio 15 2017 Win64" 5 #cmake -Bbuild -G"Visual Studio 16 2019 Win64" 6 cmake --build build --config Release -j4 7 } 8 9 build32(){ 10 cmake -Bbuild32 -G"Visual Studio 15 2017" 11 cmake --build build32 --config Release -j4 12 } 13 14 # exit on failure 15 set -e 16 17 # clean up old builds 18 rm -Rf build/ 19 rm -Rf build32/ 20 rm -Rf bin/*Win64* 21 rm -Rf bin/*Win32* 22 23 # set up VST and ASIO paths 24 sed -i -e "9s/#//" CMakeLists.txt 25 sed -i -e "10s/#//" CMakeLists.txt 26 sed -i -e '16s/#//' CMakeLists.txt 27 28 # cmake new builds 29 build64 & 30 build32 & 31 wait 32 33 # copy builds to bin 34 mkdir -p bin/Win64 35 mkdir -p bin/Win32 36 declare -a plugins=("NeuralPi") 37 for plugin in "${plugins[@]}"; do 38 cp -R build/${plugin}_artefacts/Release/Standalone/${plugin}.exe bin/Win64/${plugin}.exe 39 cp -R build/${plugin}_artefacts/Release/VST3/${plugin}.vst3 bin/Win64/${plugin}.vst3 40 41 cp -R build32/${plugin}_artefacts/Release/Standalone/${plugin}.exe bin/Win32/${plugin}.exe 42 cp -R build32/${plugin}_artefacts/Release/VST3/${plugin}.vst3 bin/Win32/${plugin}.vst3 43 done 44 45 # reset CMakeLists.txt 46 #git restore CMakeLists.txt 47 48 # zip builds 49 VERSION=$(cut -f 2 -d '=' <<< "$(grep 'CMAKE_PROJECT_VERSION:STATIC' build/CMakeCache.txt)") 50 ( 51 cd bin 52 rm -f "NeuralPi-Win64-${VERSION}.zip" 53 rm -f "NeuralPi-Win32-${VERSION}.zip" 54 tar -a -c -f "NeuralPi-Win64-${VERSION}.zip" Win64 55 tar -a -c -f "NeuralPi-Win32-${VERSION}.zip" Win32 56 ) 57 58 # create installer 59 echo "Creating installer..." 60 ( 61 cd installers/windows 62 bash build_win_installer.sh 63 )