Skip to content

Update Autosave_1.hip #11

Update Autosave_1.hip

Update Autosave_1.hip #11

name: MacOS (unsigned)
on:
workflow_dispatch:
push:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Source fingerprint (macOS)
shell: bash
run: |
set -euo pipefail
echo "Commit: $GITHUB_SHA"
files=(
"oi grandad/Binaries/Source/Plugin.cpp"
"oi grandad/Binaries/Source/PresetData.cpp"
"oi grandad/Binaries/Source/CopyProtection.cpp"
"oi grandad/AdditionalSourceCode/nodes/factory.cpp"
"oi grandad/AdditionalSourceCode/nodes/RNBO.cpp"
"oi grandad/Binaries/JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp"
"oi grandad/Binaries/JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp"
)
for f in "${files[@]}"; do
if [[ -f "$f" ]]; then
shasum -a 256 "$f"
else
echo "MISSING $f"
fi
done
- name: Ensure VST3 SDK headers exist
shell: bash
run: |
set -euo pipefail
sdk_dir="$GITHUB_WORKSPACE/oi grandad/Binaries/JUCE/modules/juce_audio_processors_headless/format_types/VST3_SDK"
sdk_header="$sdk_dir/pluginterfaces/vst/vsttypes.h"
sdk_speaker="$sdk_dir/pluginterfaces/vst/vstspeaker.h"
headless_sdk_dir="$GITHUB_WORKSPACE/HISE/JUCE/modules/juce_audio_processors_headless/format_types/VST3_SDK"
if [[ ! -f "$sdk_header" || ! -f "$sdk_speaker" ]]; then
echo "ERROR: Expected JUCE bundled VST3 SDK at $sdk_dir but required files were missing."
exit 1
fi
mkdir -p "$(dirname "$headless_sdk_dir")"
rm -rf "$headless_sdk_dir"
ln -s "$sdk_dir" "$headless_sdk_dir"
# Compatibility shim: some JUCE/HISE revisions include sdk .cpp files that are
# not present in older bundled VST3 SDK snapshots (eg base/source/flock.cpp).
# Create empty placeholders for missing translation units so includes resolve.
juce_vst3_headers=""
for candidate in \
"$GITHUB_WORKSPACE/HISE/JUCE/modules/juce_audio_processors/format_types/juce_VST3Headers.h" \
"$GITHUB_WORKSPACE/oi grandad/Binaries/JUCE/modules/juce_audio_processors/format_types/juce_VST3Headers.h"; do
if [[ -f "$candidate" ]]; then
juce_vst3_headers="$candidate"
break
fi
done
if [[ -n "$juce_vst3_headers" ]]; then
while IFS= read -r rel_cpp; do
[[ -z "$rel_cpp" ]] && continue
target="$sdk_dir/$rel_cpp"
if [[ ! -f "$target" ]]; then
echo "Creating VST3 SDK compatibility stub: $rel_cpp"
mkdir -p "$(dirname "$target")"
printf '%s\n' '/* CI compatibility stub for missing VST3 SDK translation unit. */' > "$target"
fi
done < <(sed -n 's/^[[:space:]]*#include[[:space:]]*<\([^>]*\.cpp\)>.*/\1/p' "$juce_vst3_headers" | sort -u)
fi
test -f "$sdk_header"
test -f "$sdk_speaker"
test -f "$headless_sdk_dir/pluginterfaces/vst/vsttypes.h"
test -f "$headless_sdk_dir/pluginterfaces/vst/vstspeaker.h"
- name: Normalize project paths for CI
shell: bash
run: |
set -euo pipefail
pbxproj="oi grandad/Binaries/Builds/MacOSX/oi grandad.xcodeproj/project.pbxproj"
client_utils_cpp="oi grandad/Binaries/JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp"
client_vst3_cpp="oi grandad/Binaries/JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp"
vst_utils_mm="oi grandad/Binaries/JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm"
sdk_dir="$GITHUB_WORKSPACE/oi grandad/Binaries/JUCE/modules/juce_audio_processors_headless/format_types/VST3_SDK"
test -f "$pbxproj"
test -f "$client_utils_cpp"
test -f "$client_vst3_cpp"
test -f "$vst_utils_mm"
HISE_ROOT="$GITHUB_WORKSPACE/HISE" perl -0pi -e '
s#/Users/rick/Documents/GitHub/HISE#$ENV{HISE_ROOT}#g;
s#/JUCE/modules/juce_audio_processors/format_types/VST3_SDK#/JUCE/modules/juce_audio_processors_headless/format_types/VST3_SDK#g;
' "$pbxproj"
# HISE JUCE snapshot compatibility: older wrapper uses IPtr directly in auto* init.
for wrapper in \
"$GITHUB_WORKSPACE/HISE/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp" \
"$GITHUB_WORKSPACE/oi grandad/Binaries/JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp"; do
if [[ -f "$wrapper" ]]; then
perl -0pi -e '
s/if\s*\(\s*auto\*\s+handler\s*=\s*componentHandler\s*\)/if (auto* handler = componentHandler.get())/g;
' "$wrapper"
fi
done
# Ensure FAUST headers exist at the include path expected by HISE/JUCE.
faust_include="$GITHUB_WORKSPACE/HISE/tools/faust/include/faust"
mkdir -p "$faust_include/dsp" "$faust_include/gui"
[[ -f "$GITHUB_WORKSPACE/HISE/hi_faust_types/faust_wrap/dsp/dsp.h" ]] \
&& cp "$GITHUB_WORKSPACE/HISE/hi_faust_types/faust_wrap/dsp/dsp.h" "$faust_include/dsp/dsp.h"
[[ -f "$GITHUB_WORKSPACE/HISE/hi_faust_types/faust_wrap/gui/UI.h" ]] \
&& cp "$GITHUB_WORKSPACE/HISE/hi_faust_types/faust_wrap/gui/UI.h" "$faust_include/gui/UI.h"
[[ -f "$GITHUB_WORKSPACE/HISE/hi_faust_types/faust_wrap/gui/meta.h" ]] \
&& cp "$GITHUB_WORKSPACE/HISE/hi_faust_types/faust_wrap/gui/meta.h" "$faust_include/gui/meta.h"
[[ -f "$GITHUB_WORKSPACE/HISE/hi_faust_lib/faust_wrap/dsp/libfaust.h" ]] \
&& cp "$GITHUB_WORKSPACE/HISE/hi_faust_lib/faust_wrap/dsp/libfaust.h" "$faust_include/dsp/libfaust.h"
cat > "$faust_include/export.h" <<'EOF'
#pragma once
#ifndef FAUST_API
#define FAUST_API
#endif
EOF
perl -0pi -e '
s#(include_juce_audio_plugin_client_VST3\\.cpp \\*/ = \\{isa = PBXBuildFile; fileRef = [A-F0-9]+;)(\\s*\\};)#$1 settings = {COMPILER_FLAGS = "-x objective-c++"; };$2#g;
' "$pbxproj"
printf '%s\n' \
'/* CI patch: compatibility shims for legacy JUCE/HISE VST symbols. */' \
'#include "AppConfig.h"' \
'#if JUCE_MAC' \
'namespace juce {' \
'void initialiseMacVST() {}' \
'void* attachComponentToWindowRefVST (Component*, void* parent, bool) { return parent; }' \
'void detachComponentFromWindowRefVST (Component*, void*, bool) {}' \
'}' \
'#endif' > "$client_utils_cpp"
# Ensure required legacy symbols are present in the VST3 TU that is definitely linked.
if ! grep -q "CI_LEGACY_VST3_SYMBOL_SHIMS" "$client_vst3_cpp"; then
printf '%s\n' \
'' \
'// CI_LEGACY_VST3_SYMBOL_SHIMS' \
'#if JUCE_MAC' \
'namespace juce {' \
'void initialiseMacVST() {}' \
'void* attachComponentToWindowRefVST (Component*, void* parent, bool) { return parent; }' \
'void detachComponentFromWindowRefVST (Component*, void*, bool) {}' \
'}' \
'#endif' >> "$client_vst3_cpp"
fi
printf '%s\n' '#include "AppConfig.h"' > "$vst_utils_mm"
# Legacy VST3 SDK compatibility: older SDKs don't define newer speaker constants
# referenced by recent JUCE VST3 common helpers.
vst3_common=""
for candidate in \
"$GITHUB_WORKSPACE/HISE/JUCE/modules/juce_audio_processors/format_types/juce_VST3Common.h" \
"$GITHUB_WORKSPACE/oi grandad/Binaries/JUCE/modules/juce_audio_processors/format_types/juce_VST3Common.h"; do
if [[ -f "$candidate" ]]; then
vst3_common="$candidate"
break
fi
done
if [[ -n "$vst3_common" ]]; then
if ! grep -q 'kSpeakerACN0' "$sdk_dir/pluginterfaces/vst/vstspeaker.h"; then
perl -0pi -e '
s/^[ \t]*case\s+Steinberg::Vst::kSpeakerACN\d+:\s*return\s+AudioChannelSet::ambisonicACN\d+;\s*\n//mg;
s/^[ \t]*case\s+Steinberg::Vst::kSpeakerB(?:sl|sr|rl|rr):\s*return\s+AudioChannelSet::(?:bottomSideLeft|bottomSideRight|bottomRearLeft|bottomRearRight);\s*\n//mg;
s/return\s+Steinberg::Vst::kSpeakerACN\d+;/return 0;/g;
s/return\s+Steinberg::Vst::kSpeakerB(?:sl|sr|rl|rr);/return 0;/g;
' "$vst3_common"
if grep -Eq 'case[[:space:]]+Steinberg::Vst::kSpeakerACN|return[[:space:]]+Steinberg::Vst::kSpeakerACN|case[[:space:]]+Steinberg::Vst::kSpeakerB(sl|sr|rl|rr)|return[[:space:]]+Steinberg::Vst::kSpeakerB(sl|sr|rl|rr)' "$vst3_common"; then
echo "ERROR: Legacy speaker symbol patch did not fully apply to $vst3_common"
exit 1
fi
fi
fi
- name: Build VST3
shell: bash
run: |
xcodebuild \
-project "oi grandad/Binaries/Builds/MacOSX/oi grandad.xcodeproj" \
-scheme "oi grandad - VST3" \
-configuration Release \
MACOSX_DEPLOYMENT_TARGET=10.13 \
OTHER_CPLUSPLUSFLAGS="-x objective-c++ -DFAUSTMAJORVERSION=2 -DFAUSTMINORVERSION=74 -DFAUSTPATCHVERSION=6" \
CODE_SIGNING_ALLOWED=NO \
build
- name: Build AU
shell: bash
run: |
xcodebuild \
-project "oi grandad/Binaries/Builds/MacOSX/oi grandad.xcodeproj" \
-scheme "oi grandad - AU" \
-configuration Release \
MACOSX_DEPLOYMENT_TARGET=10.13 \
OTHER_CPLUSPLUSFLAGS="-x objective-c++ -DFAUSTMAJORVERSION=2 -DFAUSTMINORVERSION=74 -DFAUSTPATCHVERSION=6" \
CODE_SIGNING_ALLOWED=NO \
build
- name: Package
shell: bash
run: |
set -euo pipefail
mkdir -p dist
find . -type d \( -name "*.vst3" -o -name "*.component" \) -print > bundles.txt
if [ ! -s bundles.txt ]; then
echo "ERROR: No .vst3 or .component bundles found."
exit 1
fi
while IFS= read -r bundle; do
name="$(basename "$bundle")"
ditto -c -k --sequesterRsrc --keepParent "$bundle" "dist/$name.zip"
done < bundles.txt
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mac-au-vst3-unsigned
path: dist/*.zip