-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from GuitarML/v1-3-updates
V1 3 updates
- Loading branch information
Showing
50 changed files
with
3,060 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_test: | ||
if: contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false | ||
name: Test plugin on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # show all errors for each platform (vs. cancel jobs on error) | ||
matrix: | ||
os: [ubuntu-latest, windows-2019, macOS-latest] | ||
|
||
steps: | ||
- name: Install Linux Deps | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt install libasound2-dev libcurl4-openssl-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev libjack-jackd2-dev lv2-dev | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 | ||
- name: Get latest CMake | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Configure | ||
shell: bash | ||
run: cmake -Bbuild | ||
|
||
- name: Build | ||
shell: bash | ||
run: cmake --build build --config Release --parallel 4 | ||
|
||
# Failing validation, fix | ||
#- name: Validate | ||
# if: runner.os == 'Windows' | ||
# run: bash validate.sh | ||
|
||
- name: Upload Linux Artifact GitHub Action | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: linux-assets | ||
path: /home/runner/work/TS-M1N3/TS-M1N3/build/TS-M1N3_artefacts | ||
|
||
- name: Upload Mac Artifact GitHub Action | ||
if: runner.os == 'macOS' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: mac-assets | ||
path: /Users/runner/work/TS-M1N3/TS-M1N3/build/TS-M1N3_artefacts | ||
|
||
- name: Upload Windows Artifact GitHub Action | ||
if: runner.os == 'Windows' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: win-assets | ||
path: D:/a/TS-M1N3/TS-M1N3/build/TS-M1N3_artefacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[submodule "modules/JUCE"] | ||
path = modules/JUCE | ||
url = https://github.com/juce-framework/JUCE.git | ||
[submodule "modules/chowdsp_utils"] | ||
path = modules/chowdsp_utils | ||
url = https://github.com/Chowdhury-DSP/chowdsp_utils | ||
[submodule "modules/libsamplerate"] | ||
path = modules/libsamplerate | ||
url = https://github.com/libsndfile/libsamplerate | ||
[submodule "modules/eigen"] | ||
path = modules/eigen | ||
url = https://gitlab.com/libeigen/eigen.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment target") | ||
project(SmartAmp VERSION 1.3) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
add_subdirectory(modules) | ||
include_directories(modules) | ||
|
||
juce_set_aax_sdk_path(C:/SDKs/AAX_SDK/) | ||
|
||
set(JUCE_FORMATS AU VST3) | ||
|
||
# Build LV2 only on Linux | ||
if(UNIX AND NOT APPLE) | ||
message(STATUS "Building LV2 plugin format") | ||
list(APPEND JUCE_FORMATS LV2) | ||
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(SmartAmp | ||
COMPANY_NAME GuitarML | ||
PLUGIN_MANUFACTURER_CODE GtML | ||
PLUGIN_CODE Npi3 | ||
FORMATS ${JUCE_FORMATS} | ||
ProductName "SmartAmp" | ||
LV2_URI https://github.com/GuitarML/SmartAmp | ||
ICON_BIG resources/logo.png | ||
MICROPHONE_PERMISSION_ENABLED TRUE | ||
) | ||
|
||
# create JUCE header | ||
juce_generate_juce_header(SmartAmp) | ||
|
||
# add sources | ||
add_subdirectory(src) | ||
include_directories(src) | ||
add_subdirectory(resources) | ||
|
||
target_compile_definitions(SmartAmp | ||
PUBLIC | ||
JUCE_DISPLAY_SPLASH_SCREEN=0 | ||
JUCE_REPORT_APP_USAGE=0 | ||
JUCE_WEB_BROWSER=0 | ||
JUCE_USE_CURL=0 | ||
JUCE_VST3_CAN_REPLACE_VST2=0 | ||
JUCE_MODAL_LOOPS_PERMITTED=1 | ||
) | ||
|
||
target_link_libraries(SmartAmp PUBLIC | ||
juce_plugin_modules | ||
) | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#!/bin/bash | ||
|
||
# exit on failure | ||
set -e | ||
|
||
# need to run in sudo mode on Mac | ||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
if [ "$EUID" -ne 0 ]; then | ||
echo "This script must be run in sudo mode! Exiting..." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if [[ "$*" = *debug* ]]; then | ||
echo "Making DEBUG build" | ||
build_config="Debug" | ||
else | ||
echo "Making RELEASE build" | ||
build_config="Release" | ||
fi | ||
|
||
# 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) | ||
TARGET_DIR="Mac" | ||
|
||
else # Windows | ||
echo "Building for WINDOWS" | ||
AAX_PATH=C:/SDKs/AAX_SDK/ | ||
ilok_pass=$(cat /c/SDKs/ilok_pass) | ||
aax_target_dir="/c/Program Files/Common Files/Avid/Audio/Plug-Ins" | ||
TARGET_DIR="Win64" | ||
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 --target SmartAmp_AAX | xcpretty | ||
|
||
else # Windows | ||
cmake -Bbuild-aax -G"Visual Studio 16 2019" -A x64 | ||
cmake --build build-aax --config $build_config --parallel $(nproc) --target SmartAmp_AAX | ||
fi | ||
|
||
# sign with PACE | ||
aax_location=build-aax/SmartAmp_artefacts/$build_config/AAX/SmartAmp.aaxplugin | ||
wcguid="" # Update | ||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
/Applications/PACEAntiPiracy/Eden/Fusion/Current/bin/wraptool sign --verbose \ | ||
--account keyth72 \ | ||
--password "$ilok_pass" \ | ||
--wcguid $wcguid \ | ||
--dsig1-compat off \ | ||
--signid "Developer ID Application: Keith Bloemer" \ | ||
--in $aax_location \ | ||
--out $aax_location | ||
|
||
/Applications/PACEAntiPiracy/Eden/Fusion/Current/bin/wraptool verify --verbose --in $aax_location | ||
|
||
else # Windows | ||
wraptool sign --verbose \ | ||
--account keyth72 \ | ||
--password "$ilok_pass" \ | ||
--wcguid $wcguid \ | ||
--keyfile /c/SDKs/keith_aax_cert.p12 \ | ||
--keypassword "$ilok_pass" \ | ||
--in $aax_location \ | ||
--out $aax_location | ||
|
||
wraptool verify --verbose --in $aax_location/Contents/x64/SmartAmp.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/SmartAmp.aaxplugin" | ||
cp -R "$aax_location" "$aax_target_dir/SmartAmp.aaxplugin" | ||
|
||
if [[ "$*" = *deploy* ]]; then | ||
set +e | ||
|
||
ssh "smartguitarml@gmail.com" "rm -r ~/aax_builds/${TARGET_DIR}/SmartAmp.aaxplugin" | ||
scp -r "$aax_location" "smartguitarml@gmail.com:~/aax_builds/${TARGET_DIR}/" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# This script builds a .deb package for installing the VST3, and LV2 plugins on Linux | ||
|
||
# Set the app name and version here | ||
app_name=SmartAmp | ||
version=1.3 | ||
|
||
|
||
# 1. Create the package directory structure and control file | ||
|
||
mkdir -p $app_name"/DEBIAN" | ||
|
||
printf "Package: $app_name\n\ | ||
Version: $version\n\ | ||
Section: custom\n\ | ||
Priority: optional\n\ | ||
Architecture: all\n\ | ||
Essential: no\n\ | ||
Installed-Size: 16480128\n\ | ||
Maintainer: GuitarML\n\ | ||
Description: GuitarML Plugin Debian Package (VST3, LV2)\n" > $app_name"/DEBIAN/control" | ||
|
||
|
||
# 2. Copy VST3 and LV2 plugins to the package directory (assumes project is already built) | ||
|
||
mkdir -p $app_name/usr/local/lib/vst3/ | ||
echo "Copying ../../build/"$app_name"_artefacts/Release/VST3/"$app_name".vst3" | ||
cp -r "../../build/"$app_name"_artefacts/Release/VST3/"$app_name".vst3" $app_name"/usr/local/lib/vst3/" | ||
|
||
mkdir -p $app_name/usr/local/lib/lv2/ | ||
echo "Copying ../../build/"$app_name"_artefacts/Release/LV2/"$app_name".lv2" | ||
cp -r "../../build/"$app_name"_artefacts/Release/LV2/"$app_name".lv2" $app_name"/usr/local/lib/lv2/" | ||
|
||
|
||
# 3. Build the .deb package and rename | ||
|
||
dpkg-deb --build $app_name | ||
|
||
mv $app_name.deb $app_name-Linux-x64-$version.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This application will install the SmartAmp audio plugin version ##APPVERSION## to your computer. |
Oops, something went wrong.