AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

win_builds.sh (1825B)


      1 #!/bin/sh
      2 
      3 cd Plugin
      4 
      5 build64(){
      6     cmake -Bbuild -G"Visual Studio 16 2019" -A x64
      7     cmake --build build --config Release -j4
      8 }
      9 
     10 build32(){
     11     cmake -Bbuild32 -G"Visual Studio 16 2019" -A Win32
     12     cmake --build build32 --config Release -j4
     13 }
     14 
     15 # exit on failure
     16 set -e
     17 
     18 # clean up old builds
     19 rm -Rf build/
     20 rm -Rf build32/
     21 rm -Rf Bin/*Win64*
     22 rm -Rf Bin/*Win32*
     23 
     24 # set up VST and ASIO paths
     25 sed -i -e "s~# juce_set_vst2_sdk_path.*~juce_set_vst2_sdk_path(C:/SDKs/VST_SDK/VST2_SDK/)~" CMakeLists.txt
     26 # sed -i -e "s~.*ASIO_SDK.*~include_directories(C:/SDKs/ASIO_SDK/common)~" CMakeLists.txt
     27 # sed -i -e 's/# JUCE_ASIO.*/JUCE_ASIO=1/' modules/CMakeLists.txt
     28 
     29 # cmake new builds
     30 build64 &
     31 build32 &
     32 wait
     33 
     34 # copy builds to bin
     35 mkdir -p Bin/Win64
     36 mkdir -p Bin/Win32
     37 plugin="CHOWTapeModel"
     38 
     39 cp -R build/${plugin}_artefacts/Release/Standalone/${plugin}.exe Bin/Win64/${plugin}.exe
     40 cp -R build/${plugin}_artefacts/Release/VST/${plugin}.dll Bin/Win64/${plugin}.dll
     41 cp -R build/${plugin}_artefacts/Release/VST3/${plugin}.vst3 Bin/Win64/${plugin}.vst3
     42 
     43 cp -R build32/${plugin}_artefacts/Release/Standalone/${plugin}.exe Bin/Win32/${plugin}.exe
     44 cp -R build32/${plugin}_artefacts/Release/VST/${plugin}.dll Bin/Win32/${plugin}.dll
     45 cp -R build32/${plugin}_artefacts/Release/VST3/${plugin}.vst3 Bin/Win32/${plugin}.vst3
     46 
     47 # reset CMakeLists.txt
     48 git restore CMakeLists.txt
     49 git restore modules/CMakeLists.txt
     50 
     51 # zip builds
     52 VERSION=$(cut -f 2 -d '=' <<< "$(grep 'CMAKE_PROJECT_VERSION:STATIC' build/CMakeCache.txt)")
     53 (
     54     cd bin
     55     rm -f "CHOWTapeModel-Win64-${VERSION}.zip"
     56     rm -f "CHOWTapeModel-Win32-${VERSION}.zip"
     57     zip -r "CHOWTapeModel-Win64-${VERSION}.zip" Win64
     58     zip -r "CHOWTapeModel-Win32-${VERSION}.zip" Win32
     59 )
     60 
     61 # create installer
     62 echo "Creating installer..."
     63 (
     64     cd Installers/windows
     65     bash build_win_installer.sh
     66 )