Setup
* sudo apt update && sudo apt install flatpak flatpak-builder
* flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Creating a yaml file (example)
app-id: org.vrui.Vrui # needs to be unique especially if put in public repo
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: VruiSoundTest # Just a placeholder for now, you can change this to any Vrui binary
modules:
- name: vrui
buildsystem: simple
build-commands:
# 1. Create the config file for the Flatpak environment (disabling PulseAudio explicitly)
- echo "SYSTEM_HAVE_PULSEAUDIO = 0" > BuildRoot/SystemConfiguration.mk
- echo "VRUI_INSTALL_ROOT = /app" >> BuildRoot/SystemConfiguration.mk
- echo "SYSTEM_HAVE_DC1394 = 0" >> BuildRoot/SystemConfiguration.mk
# 2. Run the build
- make
# 3. Install (Vrui's makefile usually handles installation if configured, or we copy manually)
- make install
sources:
- type: dir
path: . # This assumes you run the builder from the vrui source root
Common Commands
flatpak list # List installed apps
flatpak search <name> # Search Flathub
flatpak install <app> # Install app
flatpak run <app> # Run app (usually don't need this, desktop launchers work)
flatpak update # Update everything
flatpak uninstall <app> # Remove app
flatpak override # Change permissions. Example: allow musescore to access /tmp: flatpak override --user org.musescore.MuseScore --filesystem=/tmp
flatpak info <app> # Show details about installed app
flatpak remote-ls flathub # List everything available on Flathub
flatpak repair # Fix broken installations