fix: run internal OF dependency installer and clean up make command to avoid makefile syntax errors

This commit is contained in:
Timothy Hofland
2026-03-11 10:56:45 +01:00
parent 3048cd371b
commit ae29a8b20f

View File

@ -218,6 +218,15 @@ if [ ! -d "openFrameworks" ]; then
# Use a wildcard to handle the different folder names (aarch64 vs armv6l)
sudo -u "$REAL_USER" mv of_v0.12.1_linux*_release openFrameworks
sudo -u "$REAL_USER" rm "$OF_FILE"
# Crucial: Install dependencies from inside the downloaded archive
echo "Installing OpenFrameworks dependencies (this matches your release)..."
if [ -d "openFrameworks/scripts/linux/debian" ]; then
cd openFrameworks/scripts/linux/debian
./install_dependencies.sh -y
./install_codecs.sh
cd ../../../
fi
else
echo "OpenFrameworks already present. Skipping download."
fi
@ -230,7 +239,6 @@ cd "$REAL_HOME/openFrameworks/addons"
cd "$REAL_HOME/openFrameworks/addons/ofxPiMapper"
if [ -f src/Osc/OscControl.cpp ]; then
echo "Applying highlight surface OSC listener modification..."
# Only add if not already present
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"){ \
@ -241,10 +249,10 @@ if [ -f src/Osc/OscControl.cpp ]; then
fi
fi
# Build Example (Explicitly force ARM64 platform variables)
# Build Example (Clean call - let OF detect platform)
cd "$REAL_HOME/openFrameworks/addons/ofxPiMapper/example_basic"
echo "Starting compilation (forcing ARM64 platform)..."
sudo -u "$REAL_USER" make -j1 PLATFORM_OS=Linux PLATFORM_ARCH=arm64 PLATFORM_VARIANT=raspberrypi
echo "Starting compilation..."
sudo -u "$REAL_USER" make -j1
cp bin/example_basic /usr/local/bin/ofxPiMapper
chmod +x /usr/local/bin/ofxPiMapper