From 0c32fb82d6cf5de396a8c460a76bc50b7aea5000 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sun, 29 Oct 2023 14:02:34 -0400 Subject: [PATCH] OBS Studio: build and package 29.1.3 for Bullseye/Bookworm ARM32 closes https://github.com/Botspot/pi-apps/issues/2075 --- apps/OBS Studio/description | 5 ++-- apps/OBS Studio/install-32 | 51 ++++++++++++++++++++++++++----------- apps/OBS Studio/install-64 | 5 ++-- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/apps/OBS Studio/description b/apps/OBS Studio/description index e991747be8..80d19eb1aa 100644 --- a/apps/OBS Studio/description +++ b/apps/OBS Studio/description @@ -1,10 +1,9 @@ Free and open source software for video recording and live streaming. Available Versions: -ARM64 - Ubuntu Focal/Jammy, Debian Bullseye/Bookworm: 29.1.3 +ARM32/ARM64 - Debian Bullseye/Bookworm: 29.1.3 +ARM64 - Ubuntu Focal/Jammy: 29.1.3 ARM64 - Ubuntu Bionic: 28.1.2 -ARM32 - Debian Bullseye: 27.2.X -ARM32/ARM64 - Debian Buster: 27.2.X To run: Menu -> Sound & Video -> OBS Studio To run in a terminal: obs diff --git a/apps/OBS Studio/install-32 b/apps/OBS Studio/install-32 index e1b1bbf77f..ab7689ae37 100755 --- a/apps/OBS Studio/install-32 +++ b/apps/OBS Studio/install-32 @@ -28,24 +28,45 @@ if package_installed libobs-dev ;then sudo apt purge -y --autoremove libobs-dev fi -# note: bump this version to whatever the version of OBS-Studio we have precompiled debs for -# if the distro version is equal or newer, prefer it to our debs -# perform the package_is_new_enough check after purging obs-studio to prevent accidentally checking our own precompiled deb if it happens to still be installed -if package_is_new_enough obs-studio 27.2.0 ;then - install_packages obs-studio || exit 1 - exit 0 -fi - if [ "$__os_codename" == "bullseye" ]; then + if ! package_available libqt6core6 ; then + #Checking if using armv6 + if [ ! -z "$(cat /proc/cpuinfo | grep ARMv6)" ];then + error "armv6 cpu not supported" + fi + # add debian keyring + rm -f /tmp/debian-archive-keyring.deb + wget -qO /tmp/debian-archive-keyring.deb http://ftp.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1+deb11u1_all.deb + apt_lock_wait + sudo apt install -y /tmp/debian-archive-keyring.deb || error "Failed to install debian-archive-keyring" + rm -f /tmp/debian-archive-keyring.deb + # backports are automatically only used when required https://backports.debian.org/Instructions/ + echo 'deb http://deb.debian.org/debian bullseye-backports main contrib non-free' | sudo tee /etc/apt/sources.list.d/bullseye-backports.list + apt_update + fi #install bullseye version - install_packages http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_armhf.deb http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_armhf.deb https://github.com/ryanfortner/ryanfortner/releases/download/1002/obs-studio_27.2.0-286-gac674e413-bullseye_armhf.deb libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-randr0 libxcb-shm0 libxcb-xfixes0 libxcb-xinerama0 libxcb1 libxcb-xinput-dev libxcb-damage0 libxcb-ewmh2 libxcb-xtest0 libxcb-composite0 libxdamage1 libx264-dev libxcomposite1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 libxshmfence1 pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig "libxcb-util1 | libxcb-util0" || exit 1 + install_packages qt6-qpa-plugins https://github.com/Pi-Apps-Coders/files/releases/download/large-files/obs-studio-29.1.3-1-armhf-bullseye.deb || exit 1 +elif [ "$__os_codename" == "bookworm" ]; then + # install bookworm version + install_packages qt6-qpa-plugins https://github.com/Pi-Apps-Coders/files/releases/download/large-files/obs-studio-29.1.3-1-armhf-bookworm.deb || exit 1 else - #install buster version - install_packages http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_armhf.deb http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_armhf.deb https://github.com/Pi-Apps-Coders/files/releases/download/large-files/obs-studio_27.2.0-beta3-40-g3ce12bc5e_armhf-buster.deb libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-randr0 libxcb-shm0 libxcb-xfixes0 libxcb-xinerama0 libxcb1 libxcb-xinput-dev libxcb-damage0 libxcb-ewmh2 libxcb-xtest0 libxcb-composite0 libxdamage1 libx264-dev libxcomposite1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 libxshmfence1 pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig "libxcb-util1 | libxcb-util0" || exit 1 + # note: bump this version to whatever the version of OBS-Studio we have precompiled debs for + # if the distro version is equal or newer, prefer it to our debs + # perform the package_is_new_enough check after purging obs-studio to prevent accidentally checking our own precompiled deb if it happens to still be installed + if package_is_new_enough obs-studio 29.1.3 ;then + install_packages obs-studio || exit 1 + else + error "User error: You are not using a supported Pi-Apps distribution and OBS Studio from your distribution was too old or not available." + fi fi -#Create workaround wrapper script to override MESA_GL_VERSION -file -bL --mime /usr/bin/obs | grep -q "binary" && sudo mv /usr/bin/obs /usr/bin/obs-exec -echo '#!/bin/bash +# obtain model +get_model &>/dev/null +if [[ "$model" == *"Raspberry Pi"* ]]; then + #Create workaround wrapper script to override MESA_GL_VERSION + file -bL --mime /usr/bin/obs | grep -q "binary" && sudo mv /usr/bin/obs /usr/bin/obs-exec + echo '#!/bin/bash LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libGL.so MESA_GL_VERSION_OVERRIDE=3.3 /usr/bin/obs-exec "$@"' | sudo tee /usr/bin/obs >/dev/null -sudo chmod +x /usr/bin/obs + sudo chmod +x /usr/bin/obs +fi +exit 0 diff --git a/apps/OBS Studio/install-64 b/apps/OBS Studio/install-64 index 8aed391d20..1d552f73fe 100755 --- a/apps/OBS Studio/install-64 +++ b/apps/OBS Studio/install-64 @@ -58,11 +58,10 @@ else # note: bump this version to whatever the version of OBS-Studio we have precompiled debs for # if the distro version is equal or newer, prefer it to our debs # perform the package_is_new_enough check after purging obs-studio to prevent accidentally checking our own precompiled deb if it happens to still be installed - if package_is_new_enough obs-studio 27.2.4 ;then + if package_is_new_enough obs-studio 29.1.3 ;then install_packages obs-studio || exit 1 else - #install buster version - install_packages http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_arm64.deb http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_arm64.deb https://github.com/Pi-Apps-Coders/files/releases/download/large-files/obs-studio_27.2.4_arm64-buster.deb libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libpulse-dev libqt5x11extras5-dev libspeexdsp-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libvlc-dev libx11-dev libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-randr0 libxcb-shm0 libxcb-xfixes0 libxcb-xinerama0 libxcb1 libxcb-xinput-dev libxcb-damage0 libxcb-ewmh2 libxcb-xtest0 libxdamage1 libx264-dev libxcomposite1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 libxshmfence1 pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig "libxcb-util1 | libxcb-util0" || exit 1 + error "User error: You are not using a supported Pi-Apps distribution and OBS Studio from your distribution was too old or not available." fi fi