From eecfe398d7a7660e220f6ec8607d5ec4cb8b1199 Mon Sep 17 00:00:00 2001 From: Timothy Hofland Date: Wed, 11 Mar 2026 22:16:39 +0100 Subject: [PATCH] fix: patch ofxPiMapper VideoSource.h to use std::unique_ptr for C++20 compatibility --- scripts/setup.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 7aacfe0..64a6d2b 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -249,13 +249,20 @@ if [ -f src/Osc/OscControl.cpp ]; then echo "Applying highlight surface OSC listener modification..." if ! grep -q "ofxPiMapper/surface/highlight" src/Osc/OscControl.cpp; then sed -i '/if (m.getAddress() == "\/ofxPiMapper\/surface\/select"){/i \ - if (m.getAddress() == "/ofxPiMapper/surface/highlight"){ \ - int surfaceIndex = m.getArgAsInt32(0); \ - mapper->getSurfaceManager()->selectSurface(surfaceIndex); \ - return; \ - }' src/Osc/OscControl.cpp + if (m.getAddress() == "/ofxPiMapper/surface/highlight"){ \ + int surfaceIndex = m.getArgAsInt32(0); \ + mapper->getSurfaceManager()->selectSurface(surfaceIndex); \ + return; \ + }' src/Osc/OscControl.cpp + fi + fi + + # Patch for unique_ptr namespace issue in VideoSource.h + if [ -f src/Sources/VideoSource.h ]; then + echo "Applying std:: namespace patch to VideoSource.h..." + sed -i 's/unique_ptr/std::unique_ptr/g' src/Sources/VideoSource.h + fi fi -fi # Build Example (Clean call - let OF detect platform, but ignore Trixie compiler strictness) cd "$REAL_HOME/openFrameworks/addons/ofxPiMapper/example_basic"