AnalogTapeModel

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

commit b1b4888d949bdb9ca4b2df229670b8404e78a9fe
parent 3a49994ac21205b2556ec318d392df7cba3afc26
Author: jatinchowdhury18 <[email protected]>
Date:   Thu, 11 Nov 2021 22:41:32 +0000

Add support for AAX builds (#228)

* Move scripts to separate directory

* Attempt to get AAX builds working on Mac

* Working AAX builds on Mac

* Working AAX builds on Windows

* Update AAX build script

* Minor tweak to aax build script

Co-authored-by: jatinchowdhury18 <[email protected]>
Diffstat:
M.github/workflows/cmake.yml | 2+-
M.github/workflows/ios.yml | 4++--
MPlugin/CMakeLists.txt | 16+++++++++++++++-
MPlugin/Source/PluginProcessor.cpp | 1-
AScripts/aax_builds.sh | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rios_builds.sh -> Scripts/ios_builds.sh | 0
Rmac_builds.sh -> Scripts/mac_builds.sh | 0
Rvalidate.sh -> Scripts/validate.sh | 0
Rwin_builds.sh -> Scripts/win_builds.sh | 0
9 files changed, 122 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml @@ -62,4 +62,4 @@ jobs: - name: Pluginval if: runner.os == 'Windows' || runner.os == 'MacOS' - run: bash validate.sh + run: bash Scripts/validate.sh diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml @@ -10,7 +10,7 @@ on: - 'Paper/**' - 'Simulations/**' - 'Testing/**' - - '*.sh' + - 'Scripts/**' - '*.md' pull_request: branches: @@ -21,7 +21,7 @@ on: - 'Paper/**' - 'Simulations/**' - 'Testing/**' - - '*.sh' + - 'Scripts/**' - '*.md' workflow_dispatch: diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt @@ -8,6 +8,7 @@ include_directories(modules/RTNeural) # set up plugin project # juce_set_vst2_sdk_path(C:/SDKs/VST_SDK/VST2_SDK/) +# juce_set_aax_sdk_path(NONE) # include_directories(ASIO_SDK) if(IOS) @@ -22,19 +23,32 @@ if(UNIX AND NOT APPLE) list(APPEND JUCE_FORMATS LV2) endif() -# Build VST2 is SDK set +# Build VST2 if SDK target exists if(TARGET juce_vst2_sdk) message(STATUS "Building VST2 plugin format") list(APPEND JUCE_FORMATS VST) endif() +# Build AAX if SDK target exists +if(TARGET juce_aax_sdk) + message(STATUS "Building AAX plugin format") + list(APPEND JUCE_FORMATS AAX) +endif() + juce_add_plugin(CHOWTapeModel COMPANY_NAME chowdsp PLUGIN_MANUFACTURER_CODE Chow PLUGIN_CODE Jdox FORMATS ${JUCE_FORMATS} ProductName "CHOWTapeModel" + + VST2_CATEGORY kPlugCategEffect + VST3_CATEGORIES Fx Distortion + AU_MAIN_TYPE kAudioUnitType_Effect + AAX_CATEGORY AAX_ePlugInCategory_Harmonic + LV2_URI https://github.com/jatinchowdhury18/AnalogTapeModel + ICON_BIG Source/GUI/Assets/logo.png MICROPHONE_PERMISSION_ENABLED TRUE IPHONE_SCREEN_ORIENTATIONS UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight diff --git a/Plugin/Source/PluginProcessor.cpp b/Plugin/Source/PluginProcessor.cpp @@ -374,7 +374,6 @@ void ChowtapeModelAudioProcessor::setStateInformation (const void* data, int siz if (xmlState->hasTagName (vts.state.getType())) vts.replaceState (juce::ValueTree::fromXml (*xmlState)); #else - MessageManagerLock mml; magicState.setStateInformation (data, sizeInBytes, getActiveEditor()); #endif presetManager.presetUpdated(); diff --git a/Scripts/aax_builds.sh b/Scripts/aax_builds.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# exit on failure +set -e + +if [[ "$*" = *debug* ]]; then + echo "Making DEBUG build" + build_config="Debug" +else + echo "Making RELEASE build" + build_config="Release" +fi + +cd Plugin + +# clean up old builds +if [[ $* = *clean* ]]; then + echo "Cleaning previous build..." + rm -rf build-aax/ +fi + +sed_cmakelist() +{ + sed_args="$1" + + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "$sed_args" CMakeLists.txt + else + sed -i -e "$sed_args" CMakeLists.txt + fi +} + +# set up OS-dependent variables +if [[ "$OSTYPE" == "darwin"* ]]; then + echo "Building for MAC" + + AAX_PATH=~/Developer/AAX_SDK/ + ilok_pass=$(more ~/Developer/ilok_pass) + aax_target_dir="/Library/Application Support/Avid/Audio/Plug-Ins" + TEAM_ID=$(more ~/Developer/mac_id) + +else # Windows + echo "Building for WINDOWS" + + AAX_PATH=C:/SDKs/AAX_SDK/ + ilok_pass=$(cat /d/ilok_pass) + aax_target_dir="/c/Program Files/Common Files/Avid/Audio/Plug-Ins" +fi + +# set up build AAX +sed_cmakelist "s~# juce_set_aax_sdk_path.*~juce_set_aax_sdk_path(${AAX_PATH})~" + +# cmake new builds +if [[ "$OSTYPE" == "darwin"* ]]; then + cmake -Bbuild-aax -GXcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="Developer ID Application" \ + -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM="$TEAM_ID" \ + -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE="Manual" \ + -D"CMAKE_OSX_ARCHITECTURES=x86_64" \ + -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \ + -DCMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--timestamp" \ + -DMACOS_RELEASE=ON + + cmake --build build-aax --config $build_config -j12 --target CHOWTapeModel_AAX | xcpretty + +else # Windows + cmake -Bbuild-aax -G"Visual Studio 16 2019" -A x64 + cmake --build build-aax --config $build_config --parallel $(nproc) --target CHOWTapeModel_AAX +fi + +# sign with PACE +aax_location=build-aax/CHOWTapeModel_artefacts/$build_config/AAX/CHOWTapeModel.aaxplugin +wcguid="D3FA57E0-3DA5-11EC-8891-005056920FF7" +if [[ "$OSTYPE" == "darwin"* ]]; then + wraptool sign --verbose \ + --account chowdsp \ + --password "$ilok_pass" \ + --wcguid $wcguid \ + --dsig1-compat off \ + --signid "Developer ID Application: Jatin Chowdhury" \ + --in $aax_location \ + --out $aax_location + + wraptool verify --verbose --in $aax_location + +else # Windows + wraptool sign --verbose \ + --account chowdsp \ + --password "$ilok_pass" \ + --wcguid $wcguid \ + --keyfile /c/Users/jatin/Downloads/jatin_aax_cert.p12 \ + --keypassword "$ilok_pass" \ + --in $aax_location \ + --out $aax_location + + wraptool verify --verbose --in $aax_location/Contents/x64/CHOWTapeModel.aaxplugin +fi + +# reset AAX SDK field... +sed_cmakelist "s~juce_set_aax_sdk_path.*~# juce_set_aax_sdk_path(NONE)~" + +rm -rf "$aax_target_dir/CHOWTapeModel.aaxplugin" +cp -R "$aax_location" "$aax_target_dir/CHOWTapeModel.aaxplugin" + +# scp -r Plugin/build-aax/CHOWTapeModel_artefacts/Release/AAX/CHOWTapeModel.aaxplugin [email protected]:~/aax_builds/[Win64 or Mac]/ diff --git a/ios_builds.sh b/Scripts/ios_builds.sh diff --git a/mac_builds.sh b/Scripts/mac_builds.sh diff --git a/validate.sh b/Scripts/validate.sh diff --git a/win_builds.sh b/Scripts/win_builds.sh