Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(AppImage): build PortAudio 19.7.0 and fix Qt5 dependencies #219

Merged
merged 2 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions appimage/friture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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