From 795eee2676a7e249d236c9d7da63273047a508a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Lecomte?= Date: Mon, 4 Oct 2021 21:17:48 +0200 Subject: [PATCH 1/2] Update to bionic (18.04) ...since that's what Github uses to run the workflow --- appimage/friture.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appimage/friture.yml b/appimage/friture.yml index 4961ac34..3bde60a9 100644 --- a/appimage/friture.yml +++ b/appimage/friture.yml @@ -4,9 +4,9 @@ app: friture ingredients: - dist: xenial + dist: bionic sources: - - deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe + - deb http://us.archive.ubuntu.com/ubuntu/ bionic main universe packages: - libportaudio2 From 09957fbbcf345b311f0e47623986eba82e381fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Lecomte?= Date: Tue, 15 Mar 2022 17:48:45 +0100 Subject: [PATCH 2/2] feat(Linux): build PortAudio 19.7.0 for the AppImage --- .github/workflows/install-linux.sh | 22 +++++++++++++++++++++- appimage/friture.yml | 12 +++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-linux.sh b/.github/workflows/install-linux.sh index 32078730..93b92a82 100644 --- a/.github/workflows/install-linux.sh +++ b/.github/workflows/install-linux.sh @@ -11,9 +11,29 @@ pip3 install -r requirements.txt python3 setup.py build_ext --inplace sudo apt-get update -sudo apt-get install -y libportaudio2 sudo apt-get install -y desktop-file-utils # for desktop-file-validate, used by pkg2appimage +# when PyInstaller collect libraries, it ignores libraries that are not found on the host. +# Those missing libs prevent proper startup. +# For example, PyQt5 bundles Qt5 libs that depend on libxcb-xinerama.so.0 +# which would not be bundled unless explicitly installed. +sudo apt-get install libxcb-xinerama0 +sudo apt-get install libxkbcommon-x11-0 + +# dependencies to build PortAudio +sudo apt-get install -y libasound-dev +sudo apt-get install -y libjack-dev + +# build PortAudio 19.7.0 from scratch (required for Jack fixes on distributions using PipeWire) +wget https://github.com/PortAudio/portaudio/archive/refs/tags/v19.7.0.tar.gz +tar -xvf v19.7.0.tar.gz +cd portaudio-19.7.0 +./configure --prefix=$PWD/portaudio-install +make +make install +ls -laR portaudio-install +cd .. + pip3 install -U pyinstaller==4.10 pyinstaller friture.spec -y --log-level=DEBUG diff --git a/appimage/friture.yml b/appimage/friture.yml index 3bde60a9..f1391139 100644 --- a/appimage/friture.yml +++ b/appimage/friture.yml @@ -8,10 +8,20 @@ ingredients: sources: - deb http://us.archive.ubuntu.com/ubuntu/ bionic main universe packages: - - libportaudio2 + # portaudio dependencies + # (although we build portaudio from scratch, we still need the dependencies) + - libasound2 + - libc6 + - libjack-jackd2-0 script: - echo $PWD - cp ../../../appimage/friture.desktop . - cp ../../../resources/images-src/window-icon.svg friture.svg - cp -R ../../../dist/friture/* usr/bin/ + - cp -R ../../../portaudio-19.7.0/portaudio-install/lib/libportaudio.so* usr/lib/x86_64-linux-gnu + # adjust LD_LIBRARY_PATH so that ctypes.find_library finds portaudio + - echo '#!/bin/bash + - HERE="$(dirname "$(readlink -f "${0}")")" + - export LD_LIBRARY_PATH="$HERE/usr/lib/x86_64-linux-gnu":$LD_LIBRARY_PATH + - "$HERE/usr/bin/friture" "$@" | cat' > AppRun