Skip to content

Commit

Permalink
Flatpak build support (#112)
Browse files Browse the repository at this point in the history
* Use XDG_CONFIG_HOME

* Migrate from config v0 to v1

* Start work on Flatpak packaging

* add Keywords, StartupNotify and improve the Comment

* Sync w/ upstream flatpak branch

* Fixes for egui transition

* More flatpak fixes

* Fix icon error

* add itch folder to permissions

* Fix main after rebase

Co-authored-by: casept <[email protected]>
Co-authored-by: jrt <[email protected]>
  • Loading branch information
3 people authored May 1, 2022
1 parent 81ddcb6 commit 1350a89
Show file tree
Hide file tree
Showing 9 changed files with 4,795 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ cache.json
config.toml
.thumbnails
thumbnails
.flatpak-builder
flatpak/.flatpak-builder
flatpak/build-dir
flatpak/repo
.flatpak-builder
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "shared-modules"]
path = flatpak/shared-modules
url = https://github.com/flathub/shared-modules
[submodule "flatpak/flatpak-builder-tools"]
path = flatpak/flatpak-builder-tools
url = https://github.com/flatpak/flatpak-builder-tools
4,662 changes: 4,662 additions & 0 deletions flatpak/cargo-lock.json

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions flatpak/dk.philipk.BoilR.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Philip Kristoffersen 2022 <[email protected]> -->
<component type="desktop-application">
<id>dk.philipk.BoilR</id>
<metadata_license>CC0</metadata_license>
<project_license>MIT/APACHE</project_license>
<name>BoilR</name>
<summary>Add non-steam games to your steam library</summary>
<description>
<p>This little tool will show games from other games platforms in your Steam library.
It uses the Steam 3rd party shortcuts feature and does not require you to set up anything.
The goal is that you do not have to leave your Steam library to launch games from other launchers/stores, so that you can find all the games that you have available.
Optionally you can set BoilR up to automatically download artwork from SteamGridDB.</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/PhilipK/BoilR/v.1.2.3/screenshot_1.png</image>
<caption>Main Window</caption>
</screenshot>
</screenshots>
<url type="homepage">https://github.com/PhilipK/BoilR</url>
<!--
Open Age Rating Service
https://hughsie.github.io/oars/index.html
-->
<content_rating type="oars-1.1" />
<releases>
<release version="0.9.19" date="2022-03-27">
<description>
<p>First Flatpak Release of BoilR</p>
</description>
</release>
</releases>
<developer_name>Philip Kristoffersen</developer_name>
<update_contact>[email protected]</update_contact>

<launchable type="desktop-id">dk.philipk.BoilR.desktop</launchable>
</component>
13 changes: 13 additions & 0 deletions flatpak/dk.philipk.BoilR.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Desktop Entry]
Version=1.0
Type=Application

Name=BoilR
Comment=Add non-steam games to your steam library
Categories=Utility;Amusement;
Keywords=Steam;Heroic;Lutris;Itch;Origin;GOG;UPlay;Icons;Images;Non-Steam;Games;

Icon=dk.philipk.BoilR
Exec=boilr
Terminal=false
StartupNotify=true
70 changes: 70 additions & 0 deletions flatpak/dk.philipk.BoilR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
app-id: dk.philipk.BoilR
command: boilr
runtime: org.freedesktop.Platform
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
env:
# To pick up vendored deps
CARGO_HOME: /run/build/boilr/cargo
RUSTFLAGS: "-L /app/lib/"

command: boilr
finish-args:
- --filesystem=xdg-data/Steam:rw
- --filesystem=~/.steam:rw # Steam (Non-flatpak)
- --filesystem=~/.var/app/com.valvesoftware.Steam:rw # Steam (Flatpak)
- --filesystem=xdg-data/lutris:rw # Lutris (non-flatpak)
- --filesystem=~/.var/app/net.lutris.Lutris:rw # Lutris (Flatpak)
- --filesystem=~/Games/Heroic:rw # Heroic (non-flatpak)
- --filesystem=~/.var/app/com.heroicgameslauncher.hgl:rw # Heroic (Flatpak)
- --filesystem=~/.config/itch:rw # Itch

- --share=network
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
- --device=dri

- --env=PATH=/app/bin:/usr/bin

modules:
- shared-modules/glu/glu-9.json

- name: boilr
buildsystem: simple
sources:
- type: dir
path: ../
- cargo-lock.json
build-commands:
- cargo --offline fetch --manifest-path Cargo.toml --verbose
- cargo --offline build --release --verbose
- install -Dm755 ./target/release/boilr -t /app/bin/

- name: boilr-icon
buildsystem: simple
sources:
- type: file
path: ../resources/dk.philipk.BoilR.png
build-commands:
- install -Dm644 dk.philipk.BoilR.png -t /app/share/icons/hicolor/32x32/apps

- name: boilr-desktop
buildsystem: simple
sources:
- type: file
path: dk.philipk.BoilR.desktop
build-commands:
- install -Dm644 dk.philipk.BoilR.desktop -t /app/share/applications/

- name: boilr-appinfo
buildsystem: simple
sources:
- type: file
path: dk.philipk.BoilR.appdata.xml
build-commands:
- install -Dm644 dk.philipk.BoilR.appdata.xml -t /app/share/metainfo/
1 change: 1 addition & 0 deletions flatpak/flatpak-builder-tools
Submodule flatpak-builder-tools added at 6ebf29
1 change: 1 addition & 0 deletions flatpak/shared-modules
Submodule shared-modules added at 56f0ba
Binary file added resources/dk.philipk.BoilR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1350a89

Please sign in to comment.