[GH-ISSUE #272] [SUGGESTION] Build as Flatpak #37

Closed
opened 2026-02-27 21:04:16 +03:00 by kerem · 24 comments
Owner

Originally created by @Captn138 on GitHub (Jul 9, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/272

Building as a Flatpak would be great for Linux users.
Also, it would normalize the behavior on lal devices and facilitate installation on steam deck.

Originally created by @Captn138 on GitHub (Jul 9, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/272 Building as a Flatpak would be great for Linux users. Also, it would normalize the behavior on lal devices and facilitate installation on steam deck.
kerem 2026-02-27 21:04:16 +03:00
Author
Owner

@Caua77 commented on GitHub (Aug 17, 2024):

Most emulators are already in flathub, so it will be very welcome to his entrance too.

<!-- gh-comment-id:2295015100 --> @Caua77 commented on GitHub (Aug 17, 2024): Most emulators are already in flathub, so it will be very welcome to his entrance too.
Author
Owner

@Hermiten commented on GitHub (Sep 4, 2024):

Any news about this ? Maybe someone can work on it ?

<!-- gh-comment-id:2328169924 --> @Hermiten commented on GitHub (Sep 4, 2024): Any news about this ? Maybe someone can work on it ?
Author
Owner

@deadmeu commented on GitHub (Sep 15, 2024):

I've been working on a manifest for a bit but can't quite get it working. Maybe someone else can finish it off:

app-id: com.shadps4.Emulator
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: shadps4
finish-args:
  - --share=network
  - --socket=pulseaudio
  - --socket=wayland
  - --socket=x11
  - --device=dri
  - --filesystem=home

modules:
  - name: libevdev
    buildsystem: meson
    config-opts:
      - -Dtests=disabled
      - -Ddocumentation=disabled
    # cleanup:
    #   - /bin
    #   - /include
    #   - /lib/pkgconfig
    #   - /share
    sources:
      - type: archive
        url: https://www.freedesktop.org/software/libevdev/libevdev-1.13.3.tar.xz
        sha256: abf1aace86208eebdd5d3550ffded4c8d73bb405b796d51c389c9d0604cbcfbf
        x-checker-data:
          type: anitya
          project-id: 20540
          stable-only: true
          url-template: https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz

  - name: shadPS4
    buildsystem: cmake
    builddir: true
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      # - -DENABLE_QT_GUI=ON
    build-options:
      env:
        CMAKE_C_COMPILER: clang
        CMAKE_CXX_COMPILER: clang++
    sources:
      # - type: git
      #   url: https://github.com/shadps4-emu/shadPS4.git
      #   branch: main
      - type: dir
        path: .
<!-- gh-comment-id:2351481613 --> @deadmeu commented on GitHub (Sep 15, 2024): I've been working on a manifest for a bit but can't quite get it working. Maybe someone else can finish it off: ```yml app-id: com.shadps4.Emulator runtime: org.freedesktop.Platform runtime-version: '23.08' sdk: org.freedesktop.Sdk command: shadps4 finish-args: - --share=network - --socket=pulseaudio - --socket=wayland - --socket=x11 - --device=dri - --filesystem=home modules: - name: libevdev buildsystem: meson config-opts: - -Dtests=disabled - -Ddocumentation=disabled # cleanup: # - /bin # - /include # - /lib/pkgconfig # - /share sources: - type: archive url: https://www.freedesktop.org/software/libevdev/libevdev-1.13.3.tar.xz sha256: abf1aace86208eebdd5d3550ffded4c8d73bb405b796d51c389c9d0604cbcfbf x-checker-data: type: anitya project-id: 20540 stable-only: true url-template: https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz - name: shadPS4 buildsystem: cmake builddir: true config-opts: - -DCMAKE_BUILD_TYPE=Release # - -DENABLE_QT_GUI=ON build-options: env: CMAKE_C_COMPILER: clang CMAKE_CXX_COMPILER: clang++ sources: # - type: git # url: https://github.com/shadps4-emu/shadPS4.git # branch: main - type: dir path: . ```
Author
Owner

@ghost commented on GitHub (Oct 27, 2024):

I've been working on a manifest for a bit but can't quite get it working. Maybe someone else can finish it off:

app-id: com.shadps4.Emulator
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: shadps4
finish-args:
  - --share=network
  - --socket=pulseaudio
  - --socket=wayland
  - --socket=x11
  - --device=dri
  - --filesystem=home

modules:
  - name: libevdev
    buildsystem: meson
    config-opts:
      - -Dtests=disabled
      - -Ddocumentation=disabled
    # cleanup:
    #   - /bin
    #   - /include
    #   - /lib/pkgconfig
    #   - /share
    sources:
      - type: archive
        url: https://www.freedesktop.org/software/libevdev/libevdev-1.13.3.tar.xz
        sha256: abf1aace86208eebdd5d3550ffded4c8d73bb405b796d51c389c9d0604cbcfbf
        x-checker-data:
          type: anitya
          project-id: 20540
          stable-only: true
          url-template: https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz

  - name: shadPS4
    buildsystem: cmake
    builddir: true
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      # - -DENABLE_QT_GUI=ON
    build-options:
      env:
        CMAKE_C_COMPILER: clang
        CMAKE_CXX_COMPILER: clang++
    sources:
      # - type: git
      #   url: https://github.com/shadps4-emu/shadPS4.git
      #   branch: main
      - type: dir
        path: .

Thanks for your effort. @deadmeu any updates?
A Flatpak would be awesome! A somewhat consistent experience across Distributions.
But I'm already happy that so many platforms are supported and we have an AppImage!

<!-- gh-comment-id:2440197934 --> @ghost commented on GitHub (Oct 27, 2024): > I've been working on a manifest for a bit but can't quite get it working. Maybe someone else can finish it off: > > ```yaml > app-id: com.shadps4.Emulator > runtime: org.freedesktop.Platform > runtime-version: '23.08' > sdk: org.freedesktop.Sdk > command: shadps4 > finish-args: > - --share=network > - --socket=pulseaudio > - --socket=wayland > - --socket=x11 > - --device=dri > - --filesystem=home > > modules: > - name: libevdev > buildsystem: meson > config-opts: > - -Dtests=disabled > - -Ddocumentation=disabled > # cleanup: > # - /bin > # - /include > # - /lib/pkgconfig > # - /share > sources: > - type: archive > url: https://www.freedesktop.org/software/libevdev/libevdev-1.13.3.tar.xz > sha256: abf1aace86208eebdd5d3550ffded4c8d73bb405b796d51c389c9d0604cbcfbf > x-checker-data: > type: anitya > project-id: 20540 > stable-only: true > url-template: https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz > > - name: shadPS4 > buildsystem: cmake > builddir: true > config-opts: > - -DCMAKE_BUILD_TYPE=Release > # - -DENABLE_QT_GUI=ON > build-options: > env: > CMAKE_C_COMPILER: clang > CMAKE_CXX_COMPILER: clang++ > sources: > # - type: git > # url: https://github.com/shadps4-emu/shadPS4.git > # branch: main > - type: dir > path: . > ``` Thanks for your effort. @deadmeu any updates? A Flatpak would be awesome! A somewhat consistent experience across Distributions. But I'm already happy that so many platforms are supported and we have an AppImage!
Author
Owner

@jardon commented on GitHub (Nov 2, 2024):

ill pick this up. i just put that manifest in as a draft PR and will see what i can do with it.

@deadmeu ill happily put you as a co-author, but your email is private :)

<!-- gh-comment-id:2452991801 --> @jardon commented on GitHub (Nov 2, 2024): ill pick this up. i just put that manifest in as a draft PR and will see what i can do with it. @deadmeu ill happily put you as a co-author, but your email is private :)
Author
Owner

@fpiesche commented on GitHub (Nov 6, 2024):

I should point out that in order for shadps4 to be submitted to Flathub, it'll need to be tooled slightly differently. I've put together a Flatpak build in a web-based repository with automatic updates for new tagged releases here that could be easily shifted over to Flathub.

This also included putting together a metainfo.xml file and doing an svg redraw of the icon that I'd be happy to contribute over here :)

Would be happy to put my head together with @jardon to get a submission to Flathub off the ground (I've done a whole bunch of those over the past few months). I've got a whole bunch of comm channels I'm available on, give me a shout if you want to work together on this! :)

<!-- gh-comment-id:2458454255 --> @fpiesche commented on GitHub (Nov 6, 2024): I should point out that in order for shadps4 to be submitted to Flathub, it'll need to be tooled *slightly* differently. I've [put together a Flatpak build](https://github.com/fpiesche/flatpak-builds/blob/main/apps/net.shadps4.shadps4/net.shadps4.shadps4.yml) in a web-based repository with automatic updates for new tagged releases here that could be easily shifted over to Flathub. This also included putting together a `metainfo.xml` file and doing an svg redraw of the icon that I'd be happy to contribute over here :) Would be happy to put my head together with @jardon to get a submission to Flathub off the ground (I've done a whole bunch of those over the past few months). I've got a whole bunch of comm channels I'm available on, give me a shout if you want to work together on this! :)
Author
Owner

@jardon commented on GitHub (Nov 6, 2024):

I'd be happy to collaborate on that. I only refrained from setting up flathub because I think that should be set up as a verified publisher by someone actually on the team.

<!-- gh-comment-id:2458513248 --> @jardon commented on GitHub (Nov 6, 2024): I'd be happy to collaborate on that. I only refrained from setting up flathub because I think that should be set up as a verified publisher by someone actually on the team.
Author
Owner

@fpiesche commented on GitHub (Nov 6, 2024):

The verification can be done via the website if needs be, but yes - someone on the team would need to approve us submitting shadps4 to Flathub at the least as part of Flathub's submission guidelines; and ideally they'd get set as the owner of the repo that'll be set up in the flathub org.

The main advantage, as a user, of a proper release on Flathub or another web repository (which can be self-hosted), is that updates to the builds there will automatically roll out to users too. The x-checker-data bits in the manifest configure Flathub's infrastructure to hourly monitor the sources set up with them for updates, and flathub's workflows will automatically create PRs. So, for example, if this repo here creates a new tag matching v?.?.?, Flathub will create a PR to update hte Manifest to use that tag and create a test build; once the PR is merged (eg. after someone's checked the test build is okay) the test build will automatically get rolled out to Flathub's live repo. On most Linux desktop environments, this will then trigger an update notification.

<!-- gh-comment-id:2458526572 --> @fpiesche commented on GitHub (Nov 6, 2024): The verification can be done via the website if needs be, but yes - someone on the team would need to approve us submitting shadps4 to Flathub at the least as part of Flathub's submission guidelines; and ideally they'd get set as the owner of the repo that'll be set up in the `flathub` org. The main advantage, as a user, of a proper release on Flathub or another web repository (which can be self-hosted), is that updates to the builds there will automatically roll out to users too. The `x-checker-data` bits in the manifest configure Flathub's infrastructure to hourly monitor the sources set up with them for updates, and flathub's workflows will automatically create PRs. So, for example, if this repo here creates a new tag matching `v?.?.?`, Flathub will create a PR to update hte Manifest to use that tag and create a test build; once the PR is merged (eg. after someone's checked the test build is okay) the test build will automatically get rolled out to Flathub's live repo. On most Linux desktop environments, this will then trigger an update notification.
Author
Owner

@jardon commented on GitHub (Nov 6, 2024):

that all sounds good to me.

my only concern is we need to work to improve the update mechanism with a flathub-delivered package. or at least disable that option if it is installed via flathub. my PR hopefully addresses when it is installed via flatpak bundle, but not from a remote.

maybe a simple environment variable can be set when the flaptak is run that disables the built-in update mechanism?

<!-- gh-comment-id:2458531204 --> @jardon commented on GitHub (Nov 6, 2024): that all sounds good to me. my only concern is we need to work to improve the update mechanism with a flathub-delivered package. or at least disable that option if it is installed via flathub. my PR hopefully addresses when it is installed via flatpak bundle, but not from a remote. maybe a simple environment variable can be set when the flaptak is run that disables the built-in update mechanism?
Author
Owner

@ngoquang2708 commented on GitHub (Nov 6, 2024):

We can set a cmake build variable in the flatpak manifest, then use that in the GUI code.

<!-- gh-comment-id:2458625596 --> @ngoquang2708 commented on GitHub (Nov 6, 2024): We can set a cmake build variable in the flatpak manifest, then use that in the GUI code.
Author
Owner

@jardon commented on GitHub (Nov 6, 2024):

@fpiesche we've created this repo to house the flathub-related packaging.

can you work on setting up a PR here with all the required pieces?

<!-- gh-comment-id:2459769347 --> @jardon commented on GitHub (Nov 6, 2024): @fpiesche we've created this [repo](https://github.com/shadps4-emu/shadPS4-flatpak) to house the flathub-related packaging. can you work on setting up a PR here with all the required pieces?
Author
Owner

@jardon commented on GitHub (Nov 6, 2024):

we also likely need this to land. for packaged builds, the built-in update system doesnt/cant work. having an option to disable the built-in updater is helpful for packages that are managed externally.

<!-- gh-comment-id:2459774631 --> @jardon commented on GitHub (Nov 6, 2024): we also likely need [this](https://github.com/shadps4-emu/shadPS4/pull/1490) to land. for packaged builds, the built-in update system doesnt/cant work. having an option to disable the built-in updater is helpful for packages that are managed externally.
Author
Owner

@ghost commented on GitHub (Dec 2, 2024):

Hello my open source heroes! I just saw that the Dolphin Emu Devs also worked on a Flatpak, this reminded me of this open issue. I don't want to sound pushy, I'm just curious, if this is even a goal in the long run for the Emulator.

I feel like an a...hole for asking this, because I don't even know how to build a Flatpak.

<!-- gh-comment-id:2511583545 --> @ghost commented on GitHub (Dec 2, 2024): Hello my open source heroes! I just saw that the Dolphin Emu Devs also worked on a Flatpak, this reminded me of this open issue. I don't want to sound pushy, I'm just curious, if this is even a goal in the long run for the Emulator. I feel like an a...hole for asking this, because I don't even know how to build a Flatpak.
Author
Owner

@ngoquang2708 commented on GitHub (Dec 2, 2024):

https://github.com/shadps4-emu/shadPS4-flatpak/pull/1

<!-- gh-comment-id:2511587373 --> @ngoquang2708 commented on GitHub (Dec 2, 2024): https://github.com/shadps4-emu/shadPS4-flatpak/pull/1
Author
Owner

@Hermiten commented on GitHub (Dec 14, 2024):

Done

<!-- gh-comment-id:2543092424 --> @Hermiten commented on GitHub (Dec 14, 2024): Done
Author
Owner

@Twig6943 commented on GitHub (Dec 29, 2024):

Guys please have a look at https://github.com/shadps4-emu/shadPS4-flatpak/issues/4

<!-- gh-comment-id:2564813365 --> @Twig6943 commented on GitHub (Dec 29, 2024): Guys please have a look at https://github.com/shadps4-emu/shadPS4-flatpak/issues/4
Author
Owner

@Hermiten commented on GitHub (Dec 29, 2024):

@ngoquang2708 ?

<!-- gh-comment-id:2564839891 --> @Hermiten commented on GitHub (Dec 29, 2024): @ngoquang2708 ?
Author
Owner

@ngoquang2708 commented on GitHub (Dec 30, 2024):

I think @fpiesche has more experiences on on this than I do.

<!-- gh-comment-id:2565037989 --> @ngoquang2708 commented on GitHub (Dec 30, 2024): I think @fpiesche has more experiences on on this than I do.
Author
Owner

@lpww commented on GitHub (Jan 14, 2025):

shadPS4 is now on flathub! Thanks to everyone who worked on this! https://flathub.org/apps/net.shadps4.shadPS4

<!-- gh-comment-id:2590219580 --> @lpww commented on GitHub (Jan 14, 2025): shadPS4 is now on flathub! Thanks to everyone who worked on this! https://flathub.org/apps/net.shadps4.shadPS4
Author
Owner

@ghost commented on GitHub (Jan 14, 2025):

Thank you! Btw, is it possible to switch to the pre release builds when using the Flatpak?

<!-- gh-comment-id:2591105997 --> @ghost commented on GitHub (Jan 14, 2025): Thank you! Btw, is it possible to switch to the pre release builds when using the Flatpak?
Author
Owner

@Twig6943 commented on GitHub (Jan 14, 2025):

Thank you! Btw, is it possible to switch to the pre release builds when using the Flatpak?

a pkg should be submitted to flathub-beta repo for that

<!-- gh-comment-id:2591119536 --> @Twig6943 commented on GitHub (Jan 14, 2025): > Thank you! Btw, is it possible to switch to the pre release builds when using the Flatpak? a pkg should be submitted to flathub-beta repo for that
Author
Owner

@Captn138 commented on GitHub (Jan 16, 2025):

awesome, i'm gonna try it soon (of course with bloodborne)

<!-- gh-comment-id:2595168351 --> @Captn138 commented on GitHub (Jan 16, 2025): awesome, i'm gonna try it soon (of course with bloodborne)
Author
Owner

@jardon commented on GitHub (Jan 19, 2025):

Thank you! Btw, is it possible to switch to the pre release builds when using the Flatpak?

a pkg should be submitted to flathub-beta repo for that

This unfortunately is not possible at this time. The prereleases track main and nightly releases are not allowed in flathub even in the beta channels. There have been talks of having a more formal beta once shad becomes more stable, but until then, we are only going to be able to ship the latest "stable" release per policy. :/

<!-- gh-comment-id:2600873778 --> @jardon commented on GitHub (Jan 19, 2025): > > Thank you! Btw, is it possible to switch to the pre release builds when using the Flatpak? > > a pkg should be submitted to flathub-beta repo for that This unfortunately is not possible at this time. The prereleases track main and nightly releases are not allowed in flathub even in the beta channels. There have been talks of having a more formal beta once shad becomes more stable, but until then, we are only going to be able to ship the latest "stable" release per policy. :/
Author
Owner

@Twig6943 commented on GitHub (Jan 19, 2025):

People can just use the am pkg for the nightly I guess

Image

<!-- gh-comment-id:2600880425 --> @Twig6943 commented on GitHub (Jan 19, 2025): People can just use the [am](github.com/ivan-hc/am) pkg for the nightly I guess ![Image](https://github.com/user-attachments/assets/16590d1e-47ed-4b81-b58b-71640eab663f)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#37
No description provided.