Flatpak
Install Requirements
Section titled “Install Requirements”Flatpak and flatpak-builder
Section titled “Flatpak and flatpak-builder”Install Flatpak
Install flatpak-builder
Requires python 3.7+, pip/pipx
Update Project source
Section titled “Update Project source”Set the branch tag or commit to use for MS in the source section of io.github.foxxmd.multiscrobbler.yml
Generate Sources and Build
Section titled “Generate Sources and Build”Use Setup Script
Section titled “Use Setup Script”A convenience bash script is provided that automates generating offline sources and building the flatpak app for you. This is the recommend method to use.
Located in the project at flatpak/setup.sh, run it from the flatpak directory with this syntax:
./setup.sh -o -b /path/to/flatpak/build/dirArgs:
-o => Delete and overwrite any existing generated sources-b => The absolute path to the directory that should be used for flatpak build/artifacts. If not defined will use `CWD/build`-y => Proceed without confirming settingsManual Setup
Section titled “Manual Setup”If you cannot use setup.sh follow the below to manually generate sources and build the flatpak app:
Instructions
Use flatpak-node-generator to generate sources
Section titled “Use flatpak-node-generator to generate sources”First, make sure node_modules is deleted or empty for both the project and docsite directories.
Then, from MS project root:
flatpak-node-generator npm package-lock.jsonMove generated-sources.json into PROJECT_DIR/flatpak and rename generated-sources.0.json
Then, generate docsite sources:
flatpak-node-generator npm docsite/package-lock.jsonMove generated-sources.json into PROJECT_DIR/flatpak and rename generated-sources.1.json
Build flatpak
Section titled “Build flatpak”In the below command replace /home/yourUser/multi-scrobbler-flatpak with a directory to use for storing flatpak build/artifacts.
flatpak-builder --repo=/home/yourUser/multi-scrobbler-flatpak/repo --state-dir=/home/yourUser/multi-scrobbler-flatpak/state /home/yourUser/multi-scrobbler-flatpak/build io.github.foxxmd.multiscrobbler.yml --force-cleanRun App
Section titled “Run App”If built with --install --user (default when using setup.sh) you can now run MS using the command
flatpak run -u io.github.foxxmd.multiscrobbler