From ca06d67a849774cfb95a680ea3c638d60c002c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Wed, 17 Jun 2026 05:16:36 -0400 Subject: [PATCH 1/3] ci: also build in/against ossia score (dev / SDK / JIT) Add a `score` job calling the score-addon.yml reusable workflow alongside the standalone back-end build, so the template is validated as an ossia score add-on too (dev tree + SDK + JIT tracks). release left off: the templates ship no release.sh. Renames the existing standalone job ci -> standalone for clarity. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/builds.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/builds.yaml b/.github/workflows/builds.yaml index 50872f9..9cf9538 100644 --- a/.github/workflows/builds.yaml +++ b/.github/workflows/builds.yaml @@ -11,7 +11,15 @@ concurrency: cancel-in-progress: true jobs: - ci: + # Build in/against ossia score: dev tree, SDK, and JIT artifact tracks. + score: + uses: ossia/actions/.github/workflows/score-addon.yml@master + secrets: inherit + with: + release: false # the templates ship no release.sh + + # Build the same object(s) standalone, one artifact per back-end. + standalone: uses: ossia/actions/.github/workflows/avnd-addon.yml@master secrets: inherit with: From 51b3f84d8b4a4b1848d65ad579ef1213b88d6db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Wed, 17 Jun 2026 08:38:26 -0400 Subject: [PATCH 2/3] fix: integer plugin VERSION + addon NAME distinct from object class In an in-tree score build the bootstrap generator emits a Plugin_QtInterface class named after the addon NAME and bakes in VERSION. NAME equalled the avnd object class, so the generated class redefined it; and VERSION 1.0.0 was emitted as an invalid C++ float literal. Rename NAME (keeping the object CLASS and the standalone project()/artifact name) and use an integer VERSION. Co-Authored-By: Claude Opus 4.7 --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 066d304..a8f8e68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,13 +16,13 @@ if(NOT Avendish_FOUND) find_package(Avendish REQUIRED) endif() -avnd_addon_init(NAME MyProcessor) +avnd_addon_init(NAME MyAudioAddon) # CATEGORY all: every back-end family -- audio plug-ins (VST3 / CLAP / VST2), the object # bindings (Max / Pd / Python / TouchDesigner / Godot) and gstreamer. In a score build # only the ossia process is produced. Back-ends whose SDK is absent are silently skipped. avnd_addon_object( - BASE MyProcessor + BASE MyAudioAddon C_NAME my_processor CLASS MyProcessor CATEGORY all @@ -33,4 +33,4 @@ avnd_addon_object( src/UI.hpp src/Processor.hpp) -avnd_addon_finalize(NAME MyProcessor UUID a0ef0602-d1b2-46b7-9615-2049e1e97774 VERSION 1.0.0) +avnd_addon_finalize(NAME MyAudioAddon UUID a0ef0602-d1b2-46b7-9615-2049e1e97774 VERSION 1) From 2522ae574102170711d1e77d1291c9b053dddb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Wed, 17 Jun 2026 12:52:33 -0400 Subject: [PATCH 3/3] fix: addon-scope static CRT (Windows/Max) + complete ui in the class header - Set CMAKE_MSVC_RUNTIME_LIBRARY at the top of the addon so the object library and every back-end external share the /MT runtime the Max external needs (mixing /MT and /MD trips MSVC LNK2038). - Include UI.hpp from the class header so ::ui is a complete type for the score plugin generator (it includes the class header, not the MAIN_FILE, and needs the full ui to build the process layer). Co-Authored-By: Claude Opus 4.7 --- CMakeLists.txt | 8 ++++++++ src/Model.hpp | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8f8e68..3840d7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,14 @@ cmake_minimum_required(VERSION 3.24 FATAL_ERROR) project(MyProcessor CXX) +# Max/MSP externals link the static CRT (/MT) on Windows, as the official +# max-sdk-base requires. Set it for the whole addon -- before Avendish and the +# object library are created -- so every target shares one runtime; mixing /MT +# and /MD trips MSVC with LNK2038. (CMP0091 is NEW via cmake_minimum_required.) +if(MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() + # Use the Avendish the host already provides (e.g. ossia score); otherwise fetch it. # The same CMakeLists builds this as an ossia/score add-on or as a standalone object. find_package(Avendish QUIET) diff --git a/src/Model.hpp b/src/Model.hpp index 765a201..be70583 100644 --- a/src/Model.hpp +++ b/src/Model.hpp @@ -54,3 +54,8 @@ inline void MyProcessor::operator()(int N) } } } + +// Pull in the UI so MyProcessor::ui is complete wherever this class header is +// included -- the score plugin generator includes the class header, not the +// MAIN_FILE, and needs the full ui type to build the process's layer. +#include "UI.hpp"