Installation
Relevant source files
The following files were used as context for generating this wiki page:The installation process for SOFL (Steam Online Fix Launcher) is multifaceted, catering to end-users, package maintainers, and developers. Users can install the application via pre-built packages for major Linux distributions. The project also includes a comprehensive set of scripts for building these packages from the source. Additionally, SOFL features an in-app installer for adding games from RAR archives directly into the library.
Sources: README.md, packaging/README.md, sofl/dialogs/install_dialog.py
End-User Installation
SOFL provides several methods for end-users to install the application on their Linux systems. The recommended method is Flatpak, but packages for Debian/Ubuntu and Arch Linux are also available.
Sources: README.md:83-86, packaging/README.md:6-9
Flatpak (Recommended)
Flatpak is the preferred installation method as it provides a sandboxed environment with all necessary dependencies included. It can be installed with a single command that downloads the latest release from GitHub and installs it for the current user.
Installation Command:
# Install from Latest Release
curl -L https://github.com/badkiko/steam-online-fix-launcher/releases/latest/download/org.badkiko.sofl.flatpak -o /tmp/sofl.flatpak && flatpak install --user -y /tmp/sofl.flatpak && rm /tmp/sofl.flatpak
Sources: README.md:84-86
The Flatpak package is defined by org.badkiko.sofl.yml. It requests specific sandbox permissions to function correctly, including access to the network, notifications, and certain parts of the filesystem like xdg-data/Steam.
Flatpak Sandbox Permissions (finish-args):
finish-args:
# X11 + Wayland
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
# ...
# Filesystem access
- --filesystem=xdg-documents
- --filesystem=xdg-data/Steam:ro
# ...
# Network access
- --share=network
Sources: packaging/flatpak/org.badkiko.sofl.yml:5-24
Debian/Ubuntu (.deb)
For Debian-based systems, a .deb package is provided. It can be installed using dpkg, and any missing dependencies can be resolved with apt.
sudo dpkg -i sofl_VERSION_all.deb
sudo apt install -f # Install dependencies if needed
The build script packaging/debian/build.sh handles the creation of this package, including setting up postinst and prerm scripts to update the desktop database and icon caches.
Sources: packaging/README.md:104-106, packaging/debian/build.sh
Arch Linux
Arch Linux users can build and install the package using makepkg with the provided PKGBUILD file.
makepkg -si
The build process is managed by packaging/arch/build.sh, which prepares the source tarball and invokes makepkg.
Sources: packaging/README.md:111-114, packaging/arch/build.sh
Package Build Process
The repository contains a suite of scripts for building packages for all supported platforms. This process is automated for releases via GitHub Actions.
Sources: packaging/README.md:13-15, scripts/build_all.sh
Build Orchestration
The main script scripts/build_all.sh orchestrates the entire build process. It determines the version, updates package metadata files, and then calls the specific build script for each requested package type (Flatpak, deb, Arch).
The following diagram illustrates the flow of the build_all.sh script.
Sources: scripts/build_all.sh
Build Scripts Summary
Each package format has a dedicated build script within the packaging/ directory.
| Package Format | Build Script | Key Dependencies | Description |
|---|---|---|---|
| Flatpak | packaging/flatpak/build.sh | flatpak-builder | Builds a .flatpak bundle using the manifest file. Supports stable, dev, and fast build modes. |
| Debian | packaging/debian/build.sh | dpkg-deb, meson | Compiles the app with Meson and packages it into a .deb file, including post-install/pre-remove scripts. |
| Arch Linux | packaging/arch/build.sh | makepkg | Creates a source tarball and uses makepkg with a PKGBUILD to create a .pkg.tar.zst package. |
Sources: packaging/flatpak/build.sh, packaging/debian/build.sh, packaging/arch/build.sh
Flatpak Build Logic
The Flatpak build script (packaging/flatpak/build.sh) has logic to handle different build scenarios, such as development builds (.Devel) and faster builds for quick iteration by skipping dependency checks.
This diagram shows the conditional logic within the Flatpak build script.
Sources: packaging/flatpak/build.sh:10-40, 137-160
In-App Game Installation
SOFL includes a feature to install games directly from .rar archives, specifically targeting "Online-Fix" releases. This process is handled through the InstallDialog.
Sources: sofl/main.py:313-317, sofl/dialogs/install_dialog.py
Installation Flow
The user initiates the process by clicking the "Install Game" action, which opens the InstallDialog. The dialog guides the user through selecting a .rar file, verifying it, extracting its contents, and adding the new game to the library.
The following sequence diagram details the interaction:
Key Components
SOFLApplication: The main application class that registers and handles theinstall_gameaction.
Sources: sofl/main.py:313-317InstallDialog: A GTK dialog that provides the UI for the installation process. It handles file selection, validation, and orchestrates the installation task.
Sources: sofl/dialogs/install_dialog.py:47-50OnlineFixInstaller: A class responsible for the core logic of extracting the game from the archive.
Sources: sofl/dialogs/install_dialog.py:73, 252-256ArchiveVerifier: A utility class used byInstallDialogto check if the selected.rarfile is a valid Online-Fix archive by testing the password.
Sources: sofl/dialogs/install_dialog.py:61, 179-181
Developer Setup
For developers, a local installation can be set up for development and testing using the dev.sh script. This script automates the process of configuring Meson, building the project, and installing it into a local directory (.local/) within the project root.
The smart command is the recommended way to run it, as it intelligently checks if setup, build, or install steps are needed before running the application.
# Smart full cycle (recommended)
./scripts/dev.sh smart
This script sets up the necessary environment variables (GSETTINGS_SCHEMA_DIR, XDG_DATA_DIRS, PYTHONPATH) so the application can find its resources and modules when run from the local build.
Sources: scripts/dev.sh:15-32, 203-224