Skip to content

Commit a1991c2

Browse files
tucktuckg00seclaude
andcommitted
v0.10.10: fix AU cold open failure on older macOS (issue #13)
Set CMAKE_OSX_DEPLOYMENT_TARGET=10.13 in CMakeLists.txt and CI workflow so AU/VST3 binaries load on macOS High Sierra+. Add ad-hoc codesigning for macOS CI builds. Replace std::bit_cast with portable FloatBits union for older libc++ compatibility. Guard file I/O in editor for sandboxed AU environments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 85b8feb commit a1991c2

4 files changed

Lines changed: 32 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,17 @@ jobs:
8484
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_ENV
8585

8686
- name: Configure
87-
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
87+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
8888

8989
- name: Build
9090
run: cmake --build build --config Release
9191

92+
- name: Codesign
93+
run: |
94+
codesign --force --deep --sign - build/Intersect_artefacts/Release/AU/INTERSECT.component
95+
codesign --force --deep --sign - build/Intersect_artefacts/Release/VST3/INTERSECT.vst3
96+
codesign --force --deep --sign - build/Intersect_artefacts/Release/Standalone/INTERSECT.app
97+
9298
- name: Package
9399
run: |
94100
mkdir staging
@@ -114,11 +120,17 @@ jobs:
114120
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_ENV
115121

116122
- name: Configure
117-
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
123+
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
118124

119125
- name: Build
120126
run: cmake --build build --config Release
121127

128+
- name: Codesign
129+
run: |
130+
codesign --force --deep --sign - build/Intersect_artefacts/Release/AU/INTERSECT.component
131+
codesign --force --deep --sign - build/Intersect_artefacts/Release/VST3/INTERSECT.vst3
132+
codesign --force --deep --sign - build/Intersect_artefacts/Release/Standalone/INTERSECT.app
133+
122134
- name: Package
123135
run: |
124136
mkdir staging

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
cmake_minimum_required(VERSION 3.22)
2+
3+
if(APPLE)
4+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum macOS version")
5+
endif()
6+
27
set(INTERSECT_VERSION "" CACHE STRING "Plugin version (injected by CI, or auto-detected from git tag)")
38
if(INTERSECT_VERSION STREQUAL "")
49
find_package(Git QUIET)

src/PluginEditor.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ void IntersectEditor::timerCallback()
334334
void IntersectEditor::ensureDefaultThemes()
335335
{
336336
auto dir = getThemesDir();
337-
dir.createDirectory();
337+
if (! dir.createDirectory())
338+
return; // sandboxed or read-only — fall back to in-memory defaults
338339

339340
auto darkFile = dir.getChildFile ("dark.intersectstyle");
340341
auto darkText = ThemeData::darkTheme().toThemeFile();
@@ -403,7 +404,8 @@ void IntersectEditor::applyTheme (const juce::String& themeName)
403404
void IntersectEditor::saveUserSettings (float scale, const juce::String& themeName)
404405
{
405406
auto file = getUserSettingsFile();
406-
file.getParentDirectory().createDirectory();
407+
if (! file.getParentDirectory().createDirectory())
408+
return; // sandboxed or read-only — skip silently
407409
juce::String content;
408410
content << "uiScale: " << juce::String (scale, 2) << "\n";
409411
content << "theme: " << themeName << "\n";

src/PluginProcessor.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include "Constants.h"
44
#include "audio/GrainEngine.h"
55
#include "audio/AudioAnalysis.h"
6-
#include <bit>
76
#include <cmath>
7+
#include <cstring>
88
#include <functional>
99
#include <memory>
1010

@@ -186,16 +186,22 @@ constexpr float kMidiEditZoomClampMax = 16384.0f;
186186
constexpr double kMidiEditZoomStepsPerOctave = 6.0;
187187
constexpr double kMidiEditGestureIdleSeconds = 0.3;
188188

189+
union FloatBits { float f; uint32_t u; };
190+
189191
uint64_t packPendingSliceParamPayload (int field, float value)
190192
{
193+
FloatBits fb;
194+
fb.f = value;
191195
return (uint64_t) (uint32_t) field << 32
192-
| (uint64_t) std::bit_cast<uint32_t> (value);
196+
| (uint64_t) fb.u;
193197
}
194198

195199
void unpackPendingSliceParamPayload (uint64_t payload, int& field, float& value)
196200
{
197201
field = (int) (payload >> 32);
198-
value = std::bit_cast<float> ((uint32_t) (payload & 0xFFFFFFFFu));
202+
FloatBits fb;
203+
fb.u = (uint32_t) (payload & 0xFFFFFFFFu);
204+
value = fb.f;
199205
}
200206

201207
PreviewStretchParams makePreviewStretchParams (const GlobalParamSnapshot& globals,

0 commit comments

Comments
 (0)