Building from source
This page outlines procedures for compiling SpMp from its source code. For installing from pre-compiled packages, see Installation.
Requirements
All platforms:
Linux (for packaging AppImage):
- appimagetool (must be accessible on PATH as
appimagetool
)- AUR: appimagetool-bin
- desktop-file-utils (Arch, Ubuntu)
- appstream (Arch, Ubuntu)
Downloading source code
From a command-line terminal:
Clone the SpMp Git repository and its submodules
git clone https://github.com/toasterofbread/spmp --recurse-submodules
Enter the cloned directory
cd spmp
Compiling
Running Gradle commands (in root directory)
./gradlew <command name>
gradlew.bat <command name>
Android
Gradle command: androidApp:packageRelease
(Debug: androidApp:packageDebug
)
To build separate APKs for each CPU architecture instead of a single universal APK, add the argument -PenableApkSplit
to the Gradle command.
Compiled APK(s) will be stored in androidApp/build/outputs/apk/
.
Linux
Gradle command: desktopApp:packageReleaseAppImage
(Debug: desktopApp:packageAppImage
)
The AppImage will be packaged into desktopApp/build/
.
Windows
Gradle command: desktopApp:packageReleaseExe
(Debug: desktopApp:packageExe
)
The installer executable will be packaged into desktopApp/build/compose/binaries/
.
BackendException: Backend Internal error: Exception during IR lowering
. This can be safely ignored, just try the build again.Packaging with SpMs
Prerequisites
Before starting, follow the instructions for compiling SpMs up to (but not including) running the final Gradle command. However, instead of cloning the SpMs repository, perform the steps within the spmp-server submodule directory within the SpMp source code.
Packaging
To include an spmp-server executable in a desktop SpMp package (this is the default for releases of SpMp), append the Gradle build command with WithServer
. For example, to build a release AppImage packaged with the server, run the task desktopApp:packageReleaseAppImageWithServer
.