Skip to content

Commit

Permalink
Feature/juce8 (#3)
Browse files Browse the repository at this point in the history
* testing latest win runner

* changed to 2019 runner

* update git buffer globally

* yml parse fix

* changed compression for git on win

* attempts to prevent the fetch-pack error

* attempting a newer checkout action

* updates to test out building via juce8

* add aax path to internal juce path

* fixed version on workflow

* remove vst2 support entirely

* remove aax sdks from deps

* more cleanup for aax sdk

* attempting private codesigning steps

* fixed path for tool

* testing path fix

* path fix for parsed paths using vars

* using a more literal path

* remove windows based codesigning

* updated action for codesigning on macos

* add debug logs

* remove partial step

* increase log verbosity

* testing with token access

* improved pathing for signing commands

* fixed windows path command

* fixed cmake for case sensitive build systems and updated the makefile

* update ignore

* removed AAX packaging until there is AAX CI codesign from PACE available

* test remove bash for windows

* path changes for windows

* revert to last working win version

* testing new syntax for windows

* combined configure steps

* separate configure steps for arch

* foolish issues with different targets needing different workspace path

* overly verbose build instructions

* windows uses only runner pathing

* fixed installer path on windows

* fix
  • Loading branch information
himwho authored Jul 30, 2024
1 parent 70841f4 commit f4e0db5
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 53 deletions.
88 changes: 64 additions & 24 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,87 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-2016]
os: [macos-latest, windows-2019]

steps:
- uses: actions/checkout@v3
- name: Set up custom git config
if: runner.os == 'Windows'
run: git config --global core.compression 0

- name: Set up custom git config (2)
if: runner.os == 'Windows'
run: git config --global http.postBuffer 524288000

- uses: actions/checkout@v4

- name: Submodule JUCE
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: juce-framework/JUCE
path: JUCE
ref: '7.0.9'
ref: '8.0.0'
fetch-depth: 1

# TODO: Change to allow for windows too after resolving pull errors on github actions
- name: Submodule JUCE_deps
uses: actions/checkout@v3
if: runner.os == 'MacOS'
uses: actions/checkout@v4
with:
repository: Mach1Studios/m1-juce-deps
path: JUCE_deps
ssh-key: ${{ secrets.HIMWHO_SSH_KEY }}
lfs: true

- name: LFS pull submodule
run: git -C JUCE_deps lfs pull
fetch-depth: 1

# TODO: Consolidate this by figuring out how to path to a universal .workspace
- name: Create Build Environment (macos)
if: runner.os == 'MacOS'
run: cmake -E make_directory ${{ github.workspace }}/build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Create Build Environment (windows)
if: runner.os == 'Windows'
run: cmake -E make_directory ${{ runner.workspace }}/build

- name: Configure CMake (macos)
if: runner.os == 'MacOS'
shell: bash
working-directory: ${{runner.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Configure CMake (windows)
if: runner.os == 'Windows'
shell: bash
working-directory: ${{runner.workspace}}/build
working-directory: ${{ runner.workspace }}/build
run: cmake $GITHUB_WORKSPACE -A x64 -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{runner.workspace}}/build
- name: Build (macos)
if: runner.os == 'MacOS'
working-directory: ${{ github.workspace }}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

- name: Build (windows)
if: runner.os == 'Windows'
working-directory: ${{ runner.workspace }}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE

# - name: Codesign (macos)
# if: runner.os == 'MacOS'
# env:
# DIST_DIR: ${{ github.workspace }}/build/M1-Notepad_artefacts/Release
# WRAPTOOL: ${{ github.workspace }}/JUCE_deps/PACEAntiPiracy_MAC/Eden/Fusion/Versions/5/bin/wraptool
# PACE_ID: ${{ secrets.PACE_ID }}
# WRAP_GUID: ${{ secrets.M1_GLOBAL_GUID }}
# APPLE_CODESIGN_ID: ${{ secrets.APPLE_CODESIGN_ID }}
# run: |
# $WRAPTOOL sign --verbose --account $PACE_ID --wcguid $WRAP_GUID --signid $APPLE_CODESIGN_ID --in ${DIST_DIR}/AAX/M1-Notepad.aaxplugin --out ${DIST_DIR}/AAX/M1-Notepad.aaxplugin

- name: Package (macos)
if: runner.os == 'MacOS'
working-directory: ${{runner.workspace}}/build
working-directory: ${{ github.workspace }}/build
shell: bash
env:
DIST_DIR: ${{runner.workspace}}/build/M1-Notepad_artefacts/Release
DIST_DIR: ${{ github.workspace }}/build/M1-Notepad_artefacts/Release
INSTALL_DIR: /Library/Audio/Plug-Ins
AAX_INSTALL_DIR: /Library/Application\ Support/Avid/Audio/Plug-Ins
BUNDLE_ID: ${{ env.BUNDLE_ID }}
Expand All @@ -85,34 +117,42 @@ jobs:
--install-location "${INSTALL_DIR}/Components" ${DIST_DIR}/M1-Notepad.au.pkg
pkgbuild --identifier ${BUNDLE_ID}.vst3 --version ${VERSION} --component ${DIST_DIR}/VST3/M1-Notepad.vst3 \
--install-location "${INSTALL_DIR}/VST3" ${DIST_DIR}/M1-Notepad.vst3.pkg
pkgbuild --identifier ${BUNDLE_ID}.aaxplugin --version ${VERSION} --component ${DIST_DIR}/AAX/M1-Notepad.aaxplugin \
--install-location "${AAX_INSTALL_DIR}" ${DIST_DIR}/M1-Notepad.aaxplugin.pkg
productbuild --synthesize \
--package "${DIST_DIR}/M1-Notepad.au.pkg" \
--package "${DIST_DIR}/M1-Notepad.vst3.pkg" \
--package "${DIST_DIR}/M1-Notepad.aaxplugin.pkg" \
distribution.xml
productbuild --sign "Developer ID Installer" --distribution distribution.xml --package-path ${DIST_DIR} ${DIST_DIR}/M1-Notepad.pkg
# - name: Codesign (windows)
# if: runner.os == 'Windows'
# shell: bash
# env:
# DIST_DIR: ${{ runner.workspace }}\build\M1-Notepad_artefacts\Release
# WRAPTOOL: ${{ runner.workspace }}\JUCE_deps/PACEAntiPiracy_WIN/Eden/Fusion/Versions/5/wraptool.exe
# PACE_ID: ${{ secrets.PACE_ID }}
# WRAP_GUID: ${{ secrets.M1_GLOBAL_GUID }}
# WIN_SIGNTOOL_ID: ${{ secrets.WIN_SIGNTOOL_ID }}
# run: $WRAPTOOL sign --verbose --account $PACE_ID --wcguid $WRAP_GUID --signid $WIN_SIGNTOOL_ID --in ${DIST_DIR}\AAX\M1-Notepad.aaxplugin --out ${DIST_DIR}\AAX\M1-Notepad.aaxplugin --autoinstall on

- name: InnoSetup Installer (windows)
if: runner.os == 'Windows'
working-directory: ${{runner.workspace}}/build
working-directory: ${{ runner.workspace }}/build
run: |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" /DBuildDir="${{runner.workspace}}\build\M1-Notepad_artefacts\Release" "${{runner.workspace}}\M1-Notepad\Resources\InnoSetup.iss"
"%programfiles(x86)%\Inno Setup 6\iscc.exe" /DBuildDir="${{ runner.workspace }}\build\M1-Notepad_artefacts\Release" "${{ runner.workspace }}\M1-Notepad\Resources\InnoSetup.iss"
shell: cmd

- name: 'Upload Artifact (macos)'
if: runner.os == 'MacOS'
uses: actions/upload-artifact@v2
with:
name: M1-Notepad (MacOS)
path: ${{runner.workspace}}/build/M1-Notepad_artefacts/Release/M1-Notepad.pkg
path: ${{ github.workspace }}/build/M1-Notepad_artefacts/Release/M1-Notepad.pkg
if-no-files-found: error

- name: 'Upload Artifact (windows)'
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
name: M1-Notepad (Windows)
path: ${{runner.workspace}}\build\M1-Notepad_artefacts\Release\Output\M1-Notepad_WIN.exe
path: ${{ runner.workspace }}\build\M1-Notepad_artefacts\Release\Output\M1-Notepad_WIN.exe
if-no-files-found: error
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ extras/Projucer/JUCECompileEngine.dylib
.vscode
/build

CMakeUserPresets.json
CMakeUserPresets.json

## Ignoring the makefile variables so they can be locally edited
Makefile.variables
15 changes: 4 additions & 11 deletions CmakeLists.txt → CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ project(M1-Notepad VERSION 1.0.2)
add_subdirectory(JUCE)

if(IS_DIRECTORY ${PROJECT_SOURCE_DIR}/JUCE_deps)
if(APPLE)
set(AAX_PATH "JUCE_deps/aax-sdk-2-5-1")
else()
set(AAX_PATH "JUCE_deps/AAX_SDK_2p3p2")
endif()
set(VST2_PATH "JUCE_deps/VST_SDK_vst2/VST2_SDK")
message("-- JUCE Dependencies Found: ${PROJECT_SOURCE_DIR}/JUCE_deps")
else()
Expand All @@ -16,11 +11,9 @@ endif()

# check which formats we want to build
set(FORMATS "VST3")

if(AAX_PATH)
list(APPEND FORMATS "AAX")
juce_set_aax_sdk_path(${AAX_PATH})
endif()
set(AAX_PATH "JUCE/modules/juce_audio_plugin_client/AAX/SDK")
juce_set_aax_sdk_path(${AAX_PATH})
list(APPEND FORMATS "AAX")

# if (VST2_PATH)
# list(APPEND FORMATS "VST2")
Expand Down Expand Up @@ -64,7 +57,7 @@ juce_generate_juce_header(M1-Notepad)
if (APPLE)
set(COPY_FOLDER ${CMAKE_SOURCE_DIR}/Builds/MacOSX)
elseif(WIN32)
set(COPY_FOLDER ${CMAKE_SOURCE_DIR}/Builds/VisualStudio2015)
set(COPY_FOLDER ${CMAKE_SOURCE_DIR}/Builds/VisualStudio2019)
endif()

foreach(FORMAT ${FORMATS})
Expand Down
2 changes: 1 addition & 1 deletion JUCE
Submodule JUCE updated 2830 files
2 changes: 1 addition & 1 deletion JUCE_deps
46 changes: 36 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Mach1 plugin build and codesign

# local paths are in this file
include ~/m1-globallocal.mk
include ./Makefile.variables

# getting OS type
ifeq ($(OS),Windows_NT)
Expand All @@ -10,15 +10,41 @@ else
detected_OS := $(shell uname)
endif

insstall:
VERSION := $(shell grep VERSION: .github/workflows/workflow.yml | cut -d ':' -f 2 | cut -d ' ' -f 2 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
BUNDLEID := $(shell grep BUNDLE_ID: .github/workflows/workflow.yml | cut -d ':' -f 2 | sed '1p;d' | cut -d ' ' -f 2 )

build:
$(JUCE_CLI) --status "./m1-notepad.jucer"
$(JUCE_CLI) --resave "./m1-notepad.jucer"
xcodebuild -project ./Builds/MacOSX/M1-NotePad.xcodeproj -scheme "M1-NotePad - All" -configuration Release clean
xcodebuild -project ./Builds/MacOSX/M1-NotePad.xcodeproj -scheme "M1-NotePad - All" -configuration Release build
# aax
$(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid $(M1_GLOBAL_GUID) --signid $(APPLE_ID) --in /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --out /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --autoinstall on
configure:
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release

build: configure
cmake --build build --config "Release"

codesign:
$(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid $(M1_GLOBAL_GUID) --signid $(APPLE_ID) --in /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --out /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --autoinstall on
ifeq ($(detected_OS),Darwin)
/usr/bin/codesign --timestamp --force --deep -s "Developer ID Application" build/M1-Notepad_artefacts/Release/AU/M1-Notepad.component -v
/usr/bin/codesign --timestamp --force --deep -s "Developer ID Application" build/M1-Notepad_artefacts/Release/VST3/M1-Notepad.vst3 -v
/usr/bin/codesign --timestamp --force --deep -s "Developer ID Application" build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin -v
$(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid $(WRAP_GUID) --signid $(APPLE_CODESIGN_ID) --in build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin --out build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin
endif

package: get_bundle_id get_version build codesign
ifeq ($(detected_OS),Darwin)
pkgbuild --identifier $(BUNDLE_ID).au --version $(VERSION) --component build/M1-Notepad_artefacts/Release/AU/M1-Notepad.component \
--install-location "/Library/Audio/Plug-Ins/Components" build/M1-Notepad_artefacts/Release/M1-Notepad.au.pkg
pkgbuild --identifier $(BUNDLE_ID).vst3 --version $(VERSION) --component build/M1-Notepad_artefacts/Release/VST3/M1-Notepad.vst3 \
--install-location "/Library/Audio/Plug-Ins/VST3" build/M1-Notepad_artefacts/Release/M1-Notepad.vst3.pkg
pkgbuild --identifier $(BUNDLE_ID).aaxplugin --version $(VERSION) --component build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin \
--install-location "/Library/Application\ Support/Avid/Audio/Plug-Ins" build/M1-Notepad_artefacts/Release/M1-Notepad.aaxplugin.pkg
productbuild --synthesize \
--package "build/M1-Notepad_artefacts/Release/M1-Notepad.au.pkg" \
--package "build/M1-Notepad_artefacts/Release/M1-Notepad.vst3.pkg" \
--package "build/M1-Notepad_artefacts/Release/M1-Notepad.aaxplugin.pkg" \
distribution.xml
productbuild --sign "Developer ID Installer" --distribution distribution.xml --package-path build/M1-Notepad_artefacts/Release build/M1-Notepad_artefacts/Release/M1-Notepad.pkg
endif

get_bundle_id:
echo " -- Using $(BUNDLEID)"

get_version:
echo " -- Building version: $(VERSION)"
24 changes: 24 additions & 0 deletions Makefile.variables
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is used to setup local variables and paths for
# configuring, building and packaging the m1-notepad
# project cross-platform
#
# Please rename and fill in the variables below to be used
# with the Makefile in this directory or
# copy these variables as environment variables as needed
#

WRAPTOOL=
PACE_ID=

APPLE_TEAM_CODE=
APPLE_CODESIGN_ID="Developer ID Application: XXXXX ($(APPLE_TEAM_CODE))"
APPLE_CODESIGN_CODE=
APPLE_CODESIGN_INSTALLER_ID="Developer ID Installer: XXXXX ($(APPLE_TEAM_CODE))"

WIN_INNO_PATH=
WIN_SIGNTOOL_PATH=
WIN_SIGNTOOL_ID=
WIN_SIGNTOOL_PASS=
WIN_CODESIGN_CERT_PATH=

WRAP_GUID=
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ NotePad based plugin for track/session notes, very basic and just passes through
- ~AAX resize function/button?~
- Strikethrough
- List Maker
- Use new webview from JUCE8
- Fix AAX CI building (lack of PACE AAX SIGNING tool for CI but this can be done by reversing [tag:](https://github.com/Mach1Studios/m1-notepad/releases/tag/feature%2Fci-for-aax))
File renamed without changes.
3 changes: 1 addition & 2 deletions Resources/InnoSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ DefaultDirName="{commoncf64}\VST3"
DefaultGroupName=M1-Notepad
OutputBaseFilename=M1-Notepad_WIN
[Files]
Source: "VST3\M1-Notepad.vst3"; DestDir: {app}; Flags: recursesubdirs
Source: "AAX\M1-Notepad.aaxplugin\*"; DestDir: "{commoncf64}\Avid\Audio\Plug-Ins\M1-Notepad.aaxplugin"; Flags: recursesubdirs
Source: "VST3\M1-Notepad.vst3"; DestDir: {app}; Flags: recursesubdirs
File renamed without changes.
6 changes: 3 additions & 3 deletions m1-notepad.jucer
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="fufW0k" name="M1-Notepad" projectType="audioplug" useAppConfig="0"
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginFormats="buildAAX,buildAU,buildVST,buildVST3"
addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" pluginFormats="buildAAX,buildAU,buildVST3"
bundleIdentifier="com.mach1.Notepad" companyCopyright="Mach1"
companyName="Mach1" companyEmail="dylan@mach1.tech" pluginCharacteristicsValue="pluginAAXDisableMultiMono,pluginEditorRequiresKeys,pluginRTASDisableMultiMono"
pluginVST3Category="Tools" pluginRTASCategory="0" pluginAAXCategory="0"
Expand Down Expand Up @@ -41,7 +41,7 @@
<MODULEPATH id="juce_gui_extra" path="../../JUCE/modules"/>
</MODULEPATHS>
</XCODE_MAC>
<VS2017 targetFolder="Builds/VisualStudio2017">
<VS2019 targetFolder="Builds/VisualStudio2019">
<CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug"/>
<CONFIGURATION isDebug="0" name="Release"/>
Expand All @@ -60,7 +60,7 @@
<MODULEPATH id="juce_audio_devices" path="../../juce"/>
<MODULEPATH id="juce_audio_basics" path="../../juce"/>
</MODULEPATHS>
</VS2017>
</VS2019>
</EXPORTFORMATS>
<MODULES>
<MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
Expand Down

0 comments on commit f4e0db5

Please sign in to comment.