Rosalie241 / RMG

Rosalie's Mupen GUI
GNU General Public License v3.0
592 stars 52 forks source link

flatpak #5

Closed fastrizwaan closed 3 years ago

fastrizwaan commented 3 years ago

You can test the flatpak, it's just Release/rmg directory inside flatpak.

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
git clone https://github.com/fastrizwaan/Rosalie-s-Mupen-GUI_flatpak
cd Rosalie-s-Mupen-GUI_flatpak/\[flatpak-linux64\]Rosalies_.Mupen_.G.U.I/
./install.sh
./run.sh

I've created a flatpak bundle from compiled binaries of Flatpak runtime sdk. https://github.com/fastrizwaan/Rosalie-s-Mupen-GUI_flatpak

# flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# flatpak install flathub org.kde.Sdk/x86_64/5.15

app-id: io.github.RMG
runtime: org.kde.Platform
runtime-version: '5.15'
sdk: org.kde.Sdk
command: RMG

finish-args:
  - --socket=wayland
  - --socket=fallback-x11
  - --share=ipc
  - --share=network
  - --device=dri
  - --filesystem=host:ro
  - --filesystem=~/.config/RMG:create
  - --device=all

modules:

- name: RMG
  buildsystem: simple
  sources:
  - type: git
    url: https://github.com/Rosalie241/RMG

  build-options:
#--share=network is disliked by flatpak devs, but it allows for internet access to during build process; else multiple git clone not allwed
    build-args:
    - --share=network
  build-commands:
  - ./Source/Script/Build.sh Release 1
  - cp Bin/Release/rmg /app -r

After the above build, just copy the build-dir/files/rmg directory and build flatpak using make_rmg_flatpak-linux64.sh

Rosalie241 commented 3 years ago

this is awesome, thank you!

the only problem I've noticed so far is that I can't select the ROM directory

fastrizwaan commented 3 years ago

this is awesome, thank you!

the only problem I've noticed so far is that I can't select the ROM directory

File-> Choose ROM Directory

works!

Rosalie241 commented 3 years ago

weirdly enough that doesn't work for me

image

when I click on 'open', nothing happens

fastrizwaan commented 3 years ago

Because I'm using Gnome, and you're using KDE. --filesystem=host:ro is full access to entire filesystem

Try

flatpak run --filesystem=host:ro org.flatpakwine64.Rosalies_Mupen_GUI
fastrizwaan commented 3 years ago

There are many things to consider for flatpak, sandbox permissions and filesystem access and dbus access if the app uses it.

https://docs.flatpak.org/en/latest/first-build.html

fastrizwaan commented 3 years ago

this is awesome, thank you!

the only problem I've noticed so far is that I can't select the ROM directory

I guess Qt and KDE runtime needs different permissions, which I don't know. flathub discourse and reddit flatpak will help.

fastrizwaan commented 3 years ago

Dolphin emu also uses Qt, you may refer it for RMG

https://github.com/flathub/org.DolphinEmu.dolphin-emu/blob/master/org.DolphinEmu.dolphin-emu.json

and if you want you can convert json to yaml https://www.json2yaml.com/

fastrizwaan commented 3 years ago

https://docs.flatpak.org/_/downloads/en/latest/pdf/ flatpak documentation pdf 49 pages