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 4961ac34..f1391139 100644 --- a/appimage/friture.yml +++ b/appimage/friture.yml @@ -4,14 +4,24 @@ 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 + # 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