6767 ALTOOL_APPPASS : ${{ secrets.ALTOOL_APPPASS }}
6868 PANNER_FREE_GUID : ${{ secrets.PANNER_FREE_GUID }}
6969 MONITOR_FREE_GUID : ${{ secrets.MONITOR_FREE_GUID }}
70- VST2_PATH : ${{ github.workspace }}/SDKs/VST2_SDK
7170
7271 steps :
7372 - name : Checkout repository
@@ -135,24 +134,48 @@ jobs:
135134 --team-id "$APPLE_TEAM_CODE" \
136135 --password "$ALTOOL_APPPASS"
137136
138- - name : Setup SDKs (VST2, AAX )
137+ - name : Setup SDKs (VST2)
139138 env :
140139 VST2_SDK_URL : ${{ secrets.VST2_SDK_URL }}
141140 run : |
142141 mkdir -p SDKs
143142
144143 # Download VST2 SDK if URL provided
145144 if [ -n "$VST2_SDK_URL" ]; then
145+ echo "Downloading VST2 SDK..."
146146 curl -L "$VST2_SDK_URL" -o SDKs/vst2_sdk.zip
147147 unzip -q SDKs/vst2_sdk.zip -d SDKs/
148- echo "VST2 SDK downloaded"
148+
149+ # Handle different archive structures
150+ if [ -d "SDKs/VST2_SDK" ]; then
151+ echo "VST2 SDK extracted to SDKs/VST2_SDK"
152+ elif [ -d "SDKs/vstsdk2.4" ]; then
153+ mv SDKs/vstsdk2.4 SDKs/VST2_SDK
154+ echo "VST2 SDK extracted and renamed"
155+ elif [ -d "SDKs/pluginterfaces" ]; then
156+ mkdir -p SDKs/VST2_SDK
157+ mv SDKs/pluginterfaces SDKs/VST2_SDK/
158+ echo "VST2 SDK headers extracted"
159+ fi
160+
161+ echo "BUILD_VST2=ON" >> $GITHUB_ENV
162+ echo "VST2 SDK ready"
163+ else
164+ echo "VST2_SDK_URL not provided - VST2 builds will be skipped"
165+ echo "BUILD_VST2=OFF" >> $GITHUB_ENV
149166 fi
150167
151168 - name : Setup Makefile.variables
152169 run : |
153- cat > Makefile.variables << 'EOF'
170+ # Set VST2 path only if SDK exists
171+ VST2_PATH_VALUE=""
172+ if [ "$BUILD_VST2" = "ON" ] && [ -d "${{ github.workspace }}/SDKs/VST2_SDK" ]; then
173+ VST2_PATH_VALUE="${{ github.workspace }}/SDKs/VST2_SDK"
174+ fi
175+
176+ cat > Makefile.variables << EOF
154177 M1SDK_PATH=
155- VST2_PATH=${{ github.workspace }}/SDKs/VST2_SDK
178+ VST2_PATH=$VST2_PATH_VALUE
156179 APPLE_TEAM_CODE=${{ secrets.APPLE_TEAM_CODE }}
157180 APPLE_CODESIGN_ID=${{ secrets.APPLE_CODESIGN_ID }}
158181 APPLE_CODESIGN_CODE=${{ secrets.APPLE_CODESIGN_CODE }}
@@ -163,7 +186,7 @@ jobs:
163186 APPLE_USERNAME=${{ secrets.APPLE_USERNAME }}
164187 ALTOOL_APPPASS=${{ secrets.ALTOOL_APPPASS }}
165188 EOF
166- echo "Makefile.variables created"
189+ echo "Makefile.variables created (VST2: $BUILD_VST2) "
167190
168191 - name : Update version
169192 run : |
@@ -192,16 +215,39 @@ jobs:
192215 - name : Configure and build all components
193216 run : |
194217 echo "Configuring all components..."
195- make configure
218+
219+ # Configure with or without VST2 based on SDK availability
220+ if [ "$BUILD_VST2" = "ON" ]; then
221+ echo "Building with VST2 support"
222+ make configure
223+ else
224+ echo "Building without VST2 (SDK not available)"
225+ # Configure each project manually without VST2
226+ cmake m1-monitor -Bm1-monitor/build -DBUILD_VST3=ON -DBUILD_AAX=ON -DBUILD_AU=ON -DBUILD_VST=OFF -DJUCE_COPY_PLUGIN_AFTER_BUILD=OFF
227+ cmake m1-panner -Bm1-panner/build -DBUILD_VST3=ON -DBUILD_AAX=ON -DBUILD_AU=ON -DBUILD_VST=OFF -DJUCE_COPY_PLUGIN_AFTER_BUILD=OFF
228+ cmake m1-player -Bm1-player/build -G "Xcode" -DLIBVLC_BUILD_FROM_SOURCE=ON -DLIBVLC_STATIC=OFF || true
229+ cmake m1-orientationmanager -Bm1-orientationmanager/build
230+ cmake services/m1-system-helper -Bservices/m1-system-helper/build
231+ fi
232+
233+ # Build VLC if needed (for m1-player)
234+ if [ ! -f "m1-player/build/vlc-install/lib/libvlc.dylib" ]; then
235+ echo "Building VLC from source..."
236+ cd m1-player && ./build_vlc.sh build && cd ..
237+ # Reconfigure m1-player after VLC build
238+ cmake m1-player -Bm1-player/build -G "Xcode" -DLIBVLC_BUILD_FROM_SOURCE=ON -DLIBVLC_STATIC=OFF
239+ fi
196240
197241 echo "Building all components..."
198242 make build
199243
200244 - name : Code sign non-AAX binaries
201245 run : |
202- echo "Code signing VST, VST3, AU, and Apps..."
246+ echo "Code signing VST3, AU, and Apps..."
203247 # Sign everything EXCEPT AAX (requires USB iLok)
204- make codesign-vst || true
248+ if [ "$BUILD_VST2" = "ON" ]; then
249+ make codesign-vst || true
250+ fi
205251 make codesign-vst3
206252 make codesign-au
207253 make codesign-apps
@@ -276,7 +322,6 @@ jobs:
276322 ALTOOL_APPPASS : ${{ secrets.ALTOOL_APPPASS }}
277323 PANNER_FREE_GUID : ${{ secrets.PANNER_FREE_GUID }}
278324 MONITOR_FREE_GUID : ${{ secrets.MONITOR_FREE_GUID }}
279- VST2_PATH : ${{ github.workspace }}/SDKs/VST2_SDK
280325
281326 steps :
282327 - name : Checkout repository
@@ -338,21 +383,43 @@ jobs:
338383 --team-id "$APPLE_TEAM_CODE" \
339384 --password "$ALTOOL_APPPASS"
340385
341- - name : Setup SDKs (VST2, AAX )
386+ - name : Setup SDKs (VST2)
342387 env :
343388 VST2_SDK_URL : ${{ secrets.VST2_SDK_URL }}
344389 run : |
345390 mkdir -p SDKs
391+
346392 if [ -n "$VST2_SDK_URL" ]; then
393+ echo "Downloading VST2 SDK..."
347394 curl -L "$VST2_SDK_URL" -o SDKs/vst2_sdk.zip
348395 unzip -q SDKs/vst2_sdk.zip -d SDKs/
396+
397+ # Handle different archive structures
398+ if [ -d "SDKs/VST2_SDK" ]; then
399+ echo "VST2 SDK extracted"
400+ elif [ -d "SDKs/vstsdk2.4" ]; then
401+ mv SDKs/vstsdk2.4 SDKs/VST2_SDK
402+ elif [ -d "SDKs/pluginterfaces" ]; then
403+ mkdir -p SDKs/VST2_SDK
404+ mv SDKs/pluginterfaces SDKs/VST2_SDK/
405+ fi
406+
407+ echo "BUILD_VST2=ON" >> $GITHUB_ENV
408+ else
409+ echo "VST2_SDK_URL not provided - VST2 builds will be skipped"
410+ echo "BUILD_VST2=OFF" >> $GITHUB_ENV
349411 fi
350412
351413 - name : Setup Makefile.variables
352414 run : |
353- cat > Makefile.variables << 'EOF'
415+ VST2_PATH_VALUE=""
416+ if [ "$BUILD_VST2" = "ON" ] && [ -d "${{ github.workspace }}/SDKs/VST2_SDK" ]; then
417+ VST2_PATH_VALUE="${{ github.workspace }}/SDKs/VST2_SDK"
418+ fi
419+
420+ cat > Makefile.variables << EOF
354421 M1SDK_PATH=
355- VST2_PATH=${{ github.workspace }}/SDKs/VST2_SDK
422+ VST2_PATH=$VST2_PATH_VALUE
356423 APPLE_TEAM_CODE=${{ secrets.APPLE_TEAM_CODE }}
357424 APPLE_CODESIGN_ID=${{ secrets.APPLE_CODESIGN_ID }}
358425 APPLE_CODESIGN_CODE=${{ secrets.APPLE_CODESIGN_CODE }}
@@ -384,13 +451,34 @@ jobs:
384451
385452 - name : Configure and build all components
386453 run : |
387- make configure
454+ # Configure with or without VST2 based on SDK availability
455+ if [ "$BUILD_VST2" = "ON" ]; then
456+ echo "Building with VST2 support"
457+ make configure
458+ else
459+ echo "Building without VST2 (SDK not available)"
460+ cmake m1-monitor -Bm1-monitor/build -DBUILD_VST3=ON -DBUILD_AAX=ON -DBUILD_AU=ON -DBUILD_VST=OFF -DJUCE_COPY_PLUGIN_AFTER_BUILD=OFF
461+ cmake m1-panner -Bm1-panner/build -DBUILD_VST3=ON -DBUILD_AAX=ON -DBUILD_AU=ON -DBUILD_VST=OFF -DJUCE_COPY_PLUGIN_AFTER_BUILD=OFF
462+ cmake m1-player -Bm1-player/build -G "Xcode" -DLIBVLC_BUILD_FROM_SOURCE=ON -DLIBVLC_STATIC=OFF || true
463+ cmake m1-orientationmanager -Bm1-orientationmanager/build
464+ cmake services/m1-system-helper -Bservices/m1-system-helper/build
465+ fi
466+
467+ # Build VLC if needed
468+ if [ ! -f "m1-player/build/vlc-install/lib/libvlc.dylib" ]; then
469+ echo "Building VLC from source..."
470+ cd m1-player && ./build_vlc.sh build && cd ..
471+ cmake m1-player -Bm1-player/build -G "Xcode" -DLIBVLC_BUILD_FROM_SOURCE=ON -DLIBVLC_STATIC=OFF
472+ fi
473+
388474 make build
389475
390476 - name : Code sign non-AAX binaries
391477 run : |
392478 # Sign everything EXCEPT AAX (requires USB iLok)
393- make codesign-vst || true
479+ if [ "$BUILD_VST2" = "ON" ]; then
480+ make codesign-vst || true
481+ fi
394482 make codesign-vst3
395483 make codesign-au
396484 make codesign-apps
@@ -552,8 +640,24 @@ jobs:
552640 New-Item -ItemType Directory -Force -Path SDKs
553641
554642 if ($env:VST2_SDK_URL) {
643+ echo "Downloading VST2 SDK..."
555644 Invoke-WebRequest -Uri $env:VST2_SDK_URL -OutFile SDKs\vst2_sdk.zip
556645 Expand-Archive -Path SDKs\vst2_sdk.zip -DestinationPath SDKs
646+
647+ # Handle different archive structures
648+ if (Test-Path "SDKs\VST2_SDK") {
649+ echo "VST2 SDK extracted"
650+ } elseif (Test-Path "SDKs\vstsdk2.4") {
651+ Rename-Item "SDKs\vstsdk2.4" "SDKs\VST2_SDK"
652+ } elseif (Test-Path "SDKs\pluginterfaces") {
653+ New-Item -ItemType Directory -Force -Path "SDKs\VST2_SDK"
654+ Move-Item "SDKs\pluginterfaces" "SDKs\VST2_SDK\"
655+ }
656+
657+ echo "BUILD_VST2=ON" >> $env:GITHUB_ENV
658+ } else {
659+ echo "VST2_SDK_URL not provided - VST2 builds will be skipped"
660+ echo "BUILD_VST2=OFF" >> $env:GITHUB_ENV
557661 }
558662
559663 - name : Create signing metadata
@@ -569,9 +673,15 @@ jobs:
569673 - name : Setup Makefile.variables
570674 shell : bash
571675 run : |
572- cat > Makefile.variables << 'EOF'
676+ # Set VST2 path only if SDK exists
677+ VST2_PATH_VALUE=""
678+ if [ "$BUILD_VST2" = "ON" ] && [ -d "SDKs/VST2_SDK" ]; then
679+ VST2_PATH_VALUE="${{ github.workspace }}/SDKs/VST2_SDK"
680+ fi
681+
682+ cat > Makefile.variables << EOF
573683 M1SDK_PATH=
574- VST2_PATH=${{ github.workspace }}/SDKs/VST2_SDK
684+ VST2_PATH=$VST2_PATH_VALUE
575685 WIN_INNO_PATH=C:\Program Files (x86)\Inno Setup 6\ISCC.exe
576686 WIN_SIGNTOOL_PATH=C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe
577687 AZURE_DLIB_PATH=${{ github.workspace }}\azure-codesigning\lib\net8.0\any\Azure.CodeSigning.Dlib.dll
@@ -584,6 +694,7 @@ jobs:
584694 MONITOR_FREE_GUID=${{ secrets.MONITOR_FREE_GUID }}
585695 M1_GLOBAL_GUID=${{ secrets.M1_GLOBAL_GUID }}
586696 EOF
697+ echo "Makefile.variables created (VST2: $BUILD_VST2)"
587698
588699 - name : Update version
589700 shell : bash
0 commit comments