Skip to content

Conversation

@quexeky
Copy link
Contributor

@quexeky quexeky commented Aug 18, 2025

Fixes #121

Signed-off-by: quexeky <git@quexeky.dev>
@quexeky quexeky linked an issue Aug 18, 2025 that may be closed by this pull request
@DecDuck
Copy link
Member

DecDuck commented Aug 18, 2025

This doesn't seem necessary. Lutris sets this in their Flatpak config:

  - --env=PATH=/app/bin:/usr/bin:/app/utils/bin:/usr/lib/extensions/vulkan/MangoHud/bin/:/app/jre/bin/:/usr/lib/extensions/vulkan/gamescope/bin

@quexeky
Copy link
Contributor Author

quexeky commented Aug 18, 2025

I've got that in the flatpak but it still doesn't find it though is the thing

@quexeky
Copy link
Contributor Author

quexeky commented Aug 18, 2025

This is the flatpak config that I'm using:

id: org.droposs.app

runtime: org.gnome.Platform
runtime-version: '48'
sdk: org.gnome.Sdk

command: drop-app
finish-args:
  - --share=ipc
  - --share=network
  - --socket=x11
  - --socket=wayland
  - --socket=pulseaudio
  - --device=all
  - --share=network
  - --allow=multiarch
  - --allow=devel
  - --talk-name=org.gnome.Mutter.DisplayConfig
  - --talk-name=org.freedesktop.ScreenSaver
  - --system-talk-name=org.freedesktop.UDisks2
  - --filesystem=home
  - --filesystem=/run/media
  # For Steam Deck HDR support
  - --env=LD_LIBRARY_PATH=/usr/lib/extensions/vulkan/gamescope/lib
  - --filesystem=xdg-run/gamescope-0:ro
  # For Debian
  - --filesystem=/media
  - --filesystem=~/.var/app/com.valvesoftware.Steam:ro
  - --filesystem=~/.config/MangoHud:ro
  - --env=PATH=/app/bin:/usr/bin:/app/utils/bin:/usr/lib/extensions/vulkan/MangoHud/bin/:/app/jre/bin/:/usr/lib/extensions/vulkan/gamescope/bin
  - --env=GST_PLUGIN_SYSTEM_PATH=/app/lib32/gstreamer-1.0:/app/lib/gstreamer-1.0:/usr/lib/i386-linux-gnu/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0
  # System tray icon
  - --talk-name=org.kde.StatusNotifierWatcher
  - --talk-name=org.freedesktop.Flatpak
  # Disable access to xdg-data/flatpak as it's causing a finish-args-unnecessary-xdg-data-access error.
  # Flatpak talk API might be enough but this might break features like Steam games detection.
  # - --filesystem=xdg-data/flatpak:ro
  # Needed for appimages
  - --env=APPIMAGE_EXTRACT_AND_RUN=1
  # See: https://github.com/flathub/net.lutris.Lutris/pull/368#issuecomment-1751381312
  - --env=WEBKIT_DISABLE_DMABUF_RENDERER=1
  # --- umu ---
  # Install the umu runtime at $HOST_XDG_DATA_HOME
  # See: https://github.com/Open-Wine-Components/umu-launcher/pull/229
  - --filesystem=xdg-data/umu:create
  # Pressure Vessel
  # See: https://github.com/flathub/com.valvesoftware.Steam/commit/0538256facdb0837c33232bc65a9195a8a5bc750
  - --env=XDG_DATA_DIRS=/app/share:/usr/lib/extensions/vulkan/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share:/usr/lib/pressure-vessel/overrides/share
  - --allow=per-app-dev-shm
modules:
  - shared-modules/libappindicator/libappindicator-gtk3-12.10.json
  - name: main
    buildsystem: simple

    sources:
      # If you use GitHub releases, you can target an existing remote file
      - type: file
        url: https://github.com/Drop-OSS/drop-app/releases/download/v0.3.1-appimage/Drop.Desktop.Client_0.3.1-appimage_amd64.deb
        sha256: 841cb3a1851d7761f70bc7bcf4738de28f27406ff633f85ddb60a60801047a32 # This is required if you are using a remote source
        only-arches: [x86_64] 
      - type: file
        path: flatpak.metainfo.xml
    build-commands:
      - set -e
      - ls

      # Extract the deb package
      - mkdir deb-extract
      - ar -x *.deb --output deb-extract
      - tar -C deb-extract -xf deb-extract/data.tar.gz

      # Copy binary
      - ls deb-extract
      - ls deb-extract/usr
      - ls deb-extract/usr/bin
      - 'install -Dm755 deb-extract/usr/bin/drop-app /app/bin/drop-app'

      # Copy desktop file + ensure the right icon is set
      - cat deb-extract/usr/share/applications/Drop\ Desktop\ Client.desktop
      - sed -i 's/^Icon=.*/Icon=org.droposs.app/' deb-extract/usr/share/applications/Drop\ Desktop\ Client.desktop

      # Copy icons
      - install -Dm644 deb-extract/usr/share/icons/hicolor/128x128/apps/drop-app.png /app/share/icons/hicolor/128x128/apps/org.droposs.app.png
      - install -Dm644 deb-extract/usr/share/icons/hicolor/32x32/apps/drop-app.png /app/share/icons/hicolor/32x32/apps/org.droposs.app.png
      - install -Dm644 deb-extract/usr/share/icons/hicolor/256x256@2/apps/drop-app.png /app/share/icons/hicolor/256x256@2/apps/org.droposs.app.png
      
      - install -Dm644 deb-extract/usr/share/applications/Drop\ Desktop\ Client.desktop /app/share/applications/org.droposs.app.desktop

      - install -Dm644 flatpak.metainfo.xml /app/share/metainfo/org.droposs.app.metainfo.xml

(Installed with flatpak run --command=flathub-build org.flatpak.Builder --install org.droposs.app.yml)

@DecDuck
Copy link
Member

DecDuck commented Aug 18, 2025

Yeah our options are to either run Drop without the sandboxing or bundle umu-launcher with it. We can't invoke executables outside of the sandbox.

@quexeky quexeky merged commit 8069616 into develop Aug 19, 2025
2 checks passed
@quexeky quexeky deleted the 121-dynamically-find-umu-executable branch August 19, 2025 00:52
DecDuck pushed a commit that referenced this pull request Aug 28, 2025
Signed-off-by: quexeky <git@quexeky.dev>
DecDuck pushed a commit that referenced this pull request Aug 28, 2025
Signed-off-by: quexeky <git@quexeky.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamically find umu executable

3 participants