From c4524db613bae465a87896cea0c998cba9d374e1 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 14:38:26 +0900 Subject: [PATCH 1/8] Applying flathub dev bbhtt's suggestions --- net.retrodeck.retrodeck.yml | 140 ++++++++++++++---------------------- 1 file changed, 54 insertions(+), 86 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 26bb737b..5952960c 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -52,9 +52,6 @@ cleanup: - /src - '*.a' - '*.la' - # XMLSTARLET - - /lib/debug - - /share/runtime modules: @@ -332,10 +329,8 @@ modules: - name: retrodeck-es-de buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r files/* "${FLATPAK_DEST}" - - chmod +x "${FLATPAK_DEST}/bin/"* + - install -Dm755 "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" + - install -Dm755 "files/"* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKESDEURLPLACEHOLDER @@ -344,8 +339,7 @@ modules: - name: RetroDECK Theme buildsystem: simple build-commands: - - mkdir -p ${FLATPAK_DEST}/share/es-de/themes/retrodeck/ - - mv -f * ${FLATPAK_DEST}/share/es-de/themes/retrodeck/ + - install -Dm755 * ${FLATPAK_DEST}/share/es-de/themes/retrodeck/ sources: - type: git url: https://github.com/RetroDECK/RetroDECK-theme @@ -361,13 +355,11 @@ modules: - name: retroarch buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/share/libretro/" - - cp -r ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/* "${FLATPAK_DEST}/share/libretro/" + - install -Dm755 ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/* "${FLATPAK_DEST}/share/libretro/" - chmod +x ./*.AppImage - ./*.AppImage --appimage-extract - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r squashfs-root/usr/* "${FLATPAK_DEST}" + - install -Dm755 "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" + - install -Dm755 squashfs-root/usr/* "/usr" sources: - type: archive url: https://buildbot.libretro.com/nightly/linux/x86_64/RetroArch.7z @@ -379,9 +371,8 @@ modules: # retroarch-cores-nightly must be earlier than retroarch-cores as it will overwrite this cores with the stable ones - name: retroarch-cores-nightly buildsystem: simple - build-commands: - - mkdir -p ${FLATPAK_DEST}/share/libretro/cores/ - - cp -r ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/cores/* ${FLATPAK_DEST}/share/libretro/cores/ + build-commands: + - install -Dm755 ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/cores/* ${FLATPAK_DEST}/share/libretro/cores/ sources: - type: archive url: https://buildbot.libretro.com/nightly/linux/x86_64/RetroArch_cores.7z @@ -389,9 +380,8 @@ modules: - name: retroarch-cores buildsystem: simple - build-commands: - - mkdir -p ${FLATPAK_DEST}/share/libretro/cores/ - - cp -rf ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/cores/* ${FLATPAK_DEST}/share/libretro/cores/ + build-commands: + - install -Dm755 ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/cores/* ${FLATPAK_DEST}/share/libretro/cores/ sources: - type: archive url: https://buildbot.libretro.com/stable/1.17.0/linux/x86_64/RetroArch_cores.7z @@ -400,7 +390,7 @@ modules: - name: retroarch-sameduck-core buildsystem: simple build-commands: - - cp -f sameduck_libretro.so ${FLATPAK_DEST}/share/libretro/cores/sameduck_libretro.so + - install -Dm755 sameduck_libretro.so ${FLATPAK_DEST}/share/libretro/cores/sameduck_libretro.so sources: - type: archive url: https://buildbot.libretro.com/nightly/linux/x86_64/latest/sameduck_libretro.so.zip @@ -409,8 +399,7 @@ modules: - name: ppsspp-bios buildsystem: simple build-commands: - - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/PPSSPP - - cp -r assets/* ${FLATPAK_DEST}/retrodeck/extras/PPSSPP/ + - install -Dm755 assets/* ${FLATPAK_DEST}/retrodeck/extras/PPSSPP/ sources: - type: archive url: https://github.com/hrydgard/ppsspp/archive/refs/heads/master.zip @@ -419,9 +408,8 @@ modules: - name: msx-bios buildsystem: simple build-commands: - - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/MSX - - cp -r Databases ${FLATPAK_DEST}/retrodeck/extras/MSX/Databases - - cp -r Machines ${FLATPAK_DEST}/retrodeck/extras/MSX/Machines + - install -Dm755 Databases ${FLATPAK_DEST}/retrodeck/extras/MSX/Databases + - install -Dm755 Machines ${FLATPAK_DEST}/retrodeck/extras/MSX/Machines sources: - type: archive url: http://bluemsx.msxblue.com/rel_download/blueMSXv282full.zip @@ -431,8 +419,7 @@ modules: - name: amiga-bios buildsystem: simple build-commands: - - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/Amiga - - cp -r Linux/x86-64/capsimg.so ${FLATPAK_DEST}/retrodeck/extras/Amiga/capsimg.so + - install -Dm755 Linux/x86-64/capsimg.so ${FLATPAK_DEST}/retrodeck/extras/Amiga/capsimg.so sources: - type: archive url: https://github.com/rsn8887/capsimg/releases/download/1.1/Capsimg_for_Retroarch.zip @@ -446,10 +433,7 @@ modules: - name: retrodeck-ppsspp buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r files/* "${FLATPAK_DEST}" - - chmod +x "${FLATPAK_DEST}/bin/"* + - install -Dm755 files/* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKPPSSPPURL @@ -467,9 +451,8 @@ modules: - chmod +x *.AppImage - ./*.AppImage --appimage-extract #- rm -f /app/lib/libselinux.so.1 # TODO this rfile is breaking the build, we need it? Error: cp: /app/lib/libselinux.so.1: no version information available (required by cp) - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r squashfs-root/usr/* "${FLATPAK_DEST}" + - install -Dm755 "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" + - install -Dm755 squashfs-root/usr/* "/usr" sources: - type: file url: https://github.com/PCSX2/pcsx2/releases/download/v2.0.3/pcsx2-v2.0.3-linux-appimage-x64-Qt.AppImage @@ -484,11 +467,9 @@ modules: - name: retrodeck-dolphin buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - rm -rf "files/lib/debug" - - mv "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r files/* "${FLATPAK_DEST}" - - chmod +x "${FLATPAK_DEST}/bin/"* + - install -Dm755 "files/lib/"* "/usr/local/lib" + - rm -rf "files/lib" + - install -Dm755 files/* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKDOLPHINURLPLACEHOLDER @@ -502,11 +483,10 @@ modules: - name: retrodeck-primehack buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - rm -rf "files/lib/debug" "files/lib/pkgconfig" # TODO: we need them? - - mv "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r files/* "${FLATPAK_DEST}" - - chmod +x "${FLATPAK_DEST}/bin/"* + - rm -rf "files/lib/pkgconfig" # TODO: we need them? + - install -Dm755 "files/lib/"* "/usr/local/lib" + - rm -rf "files/lib" + - install -Dm755 files/* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKPRIMEHACKURLPLACEHOLDER @@ -522,10 +502,9 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r squashfs-root/usr/bin* "${FLATPAK_DEST}/bin" - - cp -r squashfs-root/usr/share* "${FLATPAK_DEST}/share" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - install -Dm755 squashfs-root/usr/bin* "${FLATPAK_DEST}/bin" + - install -Dm755 squashfs-root/usr/share* "${FLATPAK_DEST}/share" #TODO: - cp -r squashfs-root/usr/optional* # maybe already included in flatpak runtime #TODO: - cp -r squashfs-root/usr/plugins* # maybe already included in qt #TODO: Do we need this wrapper? squashfs-root/apprun-hooks/linuxdeploy-plugin-qt-hook.sh @@ -543,7 +522,7 @@ modules: buildsystem: simple build-commands: - chmod +x melonDS - - cp -r melonDS "${FLATPAK_DEST}/bin" + - install -Dm755 melonDS "${FLATPAK_DEST}/bin" sources: - type: archive url: https://github.com/melonDS-emu/melonDS/releases/download/0.9.5/melonDS_0.9.5_linux_x64.zip @@ -559,9 +538,9 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r squashfs-root/usr/* "${FLATPAK_DEST}" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - rm -rf "squashfs-root/usr/lib" + - install -Dm755 squashfs-root/usr/* "/usr" sources: - type: file url: https://github.com/stenzek/duckstation/releases/download/v0.1-6937/DuckStation-x64.AppImage @@ -577,10 +556,10 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - rm -rf "squashfs-root/usr/lib/girepository-1.0" # causes issues, I think we already have this - - mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r squashfs-root/usr/* "${FLATPAK_DEST}" + #- rm -rf "squashfs-root/usr/lib/girepository-1.0" # causes issues, I think we already have this + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - rm -rf "squashfs-root/usr/lib" + - install -Dm755 squashfs-root/usr/* "/usr" #TODO: do we need this wrapper? squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh sources: - type: file @@ -595,8 +574,8 @@ modules: buildsystem: simple build-commands: # Copying the user icon - - mkdir -p ${FLATPAK_DEST}/retrodeck - - cp retrodeck.png ${FLATPAK_DEST}/retrodeck + - install -Dm755 retrodeck.png ${FLATPAK_DEST}/retrodeck + - mkdir -p "${FLATPAK_DEST}/share/Vita3K" - unzip "ubuntu-latest.zip" -d "${FLATPAK_DEST}/share/Vita3K" - chmod +x "${FLATPAK_DEST}/share/Vita3K/Vita3K" - rm -f "${FLATPAK_DEST}/share/Vita3K/update-vita3k.sh" @@ -617,11 +596,10 @@ modules: - name: retrodeck-solarus buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - rm -rf "files/lib/debug" "files/lib/pkgconfig" # TODO: we need them? - - mv "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r files/* "${FLATPAK_DEST}" - - chmod +x "${FLATPAK_DEST}/bin/"* + - rm -rf "files/lib/pkgconfig" # TODO: we need them? + - install -Dm755 "files/lib/"* "/usr/local/lib" + - rm -rf "files/lib" + - install -Dm755 files/* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKSOLARUSURLPLACEHOLDER @@ -636,13 +614,11 @@ modules: - name: retrodeck-gzdoom buildsystem: simple build-commands: - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - rm -rf files/lib/cmake - - rm -rf files/lib/debug - - rm -rf files/lib/pkgconfig - - mv "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r files/* "${FLATPAK_DEST}" - - chmod +x "${FLATPAK_DEST}/bin/"* + - rm -rf "files/lib/cmake" + - rm -rf "files/lib/pkgconfig" + - install -Dm755 "files/lib/"* "/usr/local/lib" + - rm -rf "files/lib" + - install -Dm755 files/* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKGZDOOMSURLPLACEHOLDER @@ -669,10 +645,7 @@ modules: - name: Ryujinx-with-symlink-fix buildsystem: simple build-commands: - - | - mkdir -p ${FLATPAK_DEST} - mv * ${FLATPAK_DEST} - chmod +x ${FLATPAK_DEST}/bin/* + - install -Dm755 ${FLATPAK_DEST} sources: - type: archive url: https://gitlab.com/-/project/59825450/uploads/8519a04d7a3f5b5949f14b6ad25a4185/ryujinx-Release-1.1.0+81fd228-linux_x64.zip @@ -688,9 +661,9 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - mkdir -p "${FLATPAK_DEST}/usr/local/lib" - - mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" - - cp -r squashfs-root/usr/* "${FLATPAK_DEST}/" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - rm -rf "squashfs-root/usr/lib" + - install -Dm755 squashfs-root/usr/* "${FLATPAK_DEST}/" sources: - type: file url: https://github.com/xemu-project/xemu/releases/download/v0.7.129/xemu-v0.7.129-x86_64.AppImage @@ -699,8 +672,7 @@ modules: - name: xemu-dummy-hdd buildsystem: simple build-commands: - - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/XEMU - - mv -f "xbox_hdd.qcow2" "${FLATPAK_DEST}/retrodeck/extras/XEMU/xbox_hdd.qcow2" + - install -Dm755 "xbox_hdd.qcow2" "${FLATPAK_DEST}/retrodeck/extras/XEMU/" sources: - type: archive url: https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip @@ -714,7 +686,7 @@ modules: buildsystem: simple build-commands: - rm -f files/manifest.json - - cp -rn files/* ${FLATPAK_DEST} + - install -Dm755 "files/"* "${FLATPAK_DEST}" sources: - type: archive url: RETRODECKMAMEURLPLACEHOLDER @@ -740,10 +712,7 @@ modules: - cp -f res/splash.svg ${FLATPAK_DEST}/retrodeck/graphics/splash.svg - cp -f res/splash.svg ${FLATPAK_DEST}/retrodeck/graphics/splash-orig.svg - cp -rf res/extra_splashes/ ${FLATPAK_DEST}/retrodeck/graphics - - | # TODO: DEBUG - cp -f res/icon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg - ls -lah ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg - ls -lah ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps + - cp -f res/icon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg - cp -f res/icon-configurator.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.configurator.svg - mv -f -t ${FLATPAK_DEST}/retrodeck res/binding_icons @@ -763,7 +732,6 @@ modules: # Desktop entries - cp net.retrodeck.retrodeck.desktop ${FLATPAK_DEST}/share/applications/net.retrodeck.retrodeck.desktop - cp net.retrodeck.retrodeck.Configurator.desktop /app/share/applications/net.retrodeck.retrodeck.Configurator.desktop - - chmod +x net.retrodeck.retrodeck*desktop # Initializing default emulator configs - cp -r emu-configs ${FLATPAK_DEST}/retrodeck/emu-configs/ From b32cf6b7a5dd809ab983fc686184452e584411de Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 14:39:30 +0900 Subject: [PATCH 2/8] Applying flathub dev bbhtt's suggestions - part 2 --- net.retrodeck.retrodeck.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 5952960c..80fcf9de 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -329,7 +329,7 @@ modules: - name: retrodeck-es-de buildsystem: simple build-commands: - - install -Dm755 "files/lib/"* "${FLATPAK_DEST}/usr/local/lib" + - install -Dm755 "files/lib/"* "/usr/local/lib" - install -Dm755 "files/"* "${FLATPAK_DEST}" sources: - type: archive @@ -358,7 +358,7 @@ modules: - install -Dm755 ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/* "${FLATPAK_DEST}/share/libretro/" - chmod +x ./*.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" - install -Dm755 squashfs-root/usr/* "/usr" sources: - type: archive @@ -451,7 +451,7 @@ modules: - chmod +x *.AppImage - ./*.AppImage --appimage-extract #- rm -f /app/lib/libselinux.so.1 # TODO this rfile is breaking the build, we need it? Error: cp: /app/lib/libselinux.so.1: no version information available (required by cp) - - install -Dm755 "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/usr/local/lib" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" - install -Dm755 squashfs-root/usr/* "/usr" sources: - type: file From b163cb54c8d689a72e24e0b6af125e62f55bf4cd Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 14:56:16 +0900 Subject: [PATCH 3/8] Applying flathub dev bbhtt's suggestions - part 3 --- net.retrodeck.retrodeck.yml | 92 +++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 50 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 80fcf9de..571d1ad6 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -329,8 +329,8 @@ modules: - name: retrodeck-es-de buildsystem: simple build-commands: - - install -Dm755 "files/lib/"* "/usr/local/lib" - - install -Dm755 "files/"* "${FLATPAK_DEST}" + - install -Dm755 "files/lib/"* "/usr/local/lib/" + - install -Dm755 "files/"* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKESDEURLPLACEHOLDER @@ -358,8 +358,8 @@ modules: - install -Dm755 ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/* "${FLATPAK_DEST}/share/libretro/" - chmod +x ./*.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" - - install -Dm755 squashfs-root/usr/* "/usr" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 squashfs-root/usr/* "/usr/" sources: - type: archive url: https://buildbot.libretro.com/nightly/linux/x86_64/RetroArch.7z @@ -390,7 +390,7 @@ modules: - name: retroarch-sameduck-core buildsystem: simple build-commands: - - install -Dm755 sameduck_libretro.so ${FLATPAK_DEST}/share/libretro/cores/sameduck_libretro.so + - install -Dm755 sameduck_libretro.so "${FLATPAK_DEST}/share/libretro/cores/" sources: - type: archive url: https://buildbot.libretro.com/nightly/linux/x86_64/latest/sameduck_libretro.so.zip @@ -399,7 +399,7 @@ modules: - name: ppsspp-bios buildsystem: simple build-commands: - - install -Dm755 assets/* ${FLATPAK_DEST}/retrodeck/extras/PPSSPP/ + - install -Dm755 assets/* "${FLATPAK_DEST}/retrodeck/extras/PPSSPP/" sources: - type: archive url: https://github.com/hrydgard/ppsspp/archive/refs/heads/master.zip @@ -408,8 +408,8 @@ modules: - name: msx-bios buildsystem: simple build-commands: - - install -Dm755 Databases ${FLATPAK_DEST}/retrodeck/extras/MSX/Databases - - install -Dm755 Machines ${FLATPAK_DEST}/retrodeck/extras/MSX/Machines + - install -Dm755 Databases "${FLATPAK_DEST}/retrodeck/extras/MSX/Databases/" + - install -Dm755 Machines "${FLATPAK_DEST}/retrodeck/extras/MSX/Machines/" sources: - type: archive url: http://bluemsx.msxblue.com/rel_download/blueMSXv282full.zip @@ -419,7 +419,7 @@ modules: - name: amiga-bios buildsystem: simple build-commands: - - install -Dm755 Linux/x86-64/capsimg.so ${FLATPAK_DEST}/retrodeck/extras/Amiga/capsimg.so + - install -Dm755 Linux/x86-64/capsimg.so "${FLATPAK_DEST}/retrodeck/extras/Amiga/" sources: - type: archive url: https://github.com/rsn8887/capsimg/releases/download/1.1/Capsimg_for_Retroarch.zip @@ -433,7 +433,7 @@ modules: - name: retrodeck-ppsspp buildsystem: simple build-commands: - - install -Dm755 files/* "${FLATPAK_DEST}" + - install -Dm755 files/* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKPPSSPPURL @@ -451,8 +451,8 @@ modules: - chmod +x *.AppImage - ./*.AppImage --appimage-extract #- rm -f /app/lib/libselinux.so.1 # TODO this rfile is breaking the build, we need it? Error: cp: /app/lib/libselinux.so.1: no version information available (required by cp) - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" - - install -Dm755 squashfs-root/usr/* "/usr" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 squashfs-root/usr/* "/usr/" sources: - type: file url: https://github.com/PCSX2/pcsx2/releases/download/v2.0.3/pcsx2-v2.0.3-linux-appimage-x64-Qt.AppImage @@ -467,9 +467,9 @@ modules: - name: retrodeck-dolphin buildsystem: simple build-commands: - - install -Dm755 "files/lib/"* "/usr/local/lib" + - install -Dm755 "files/lib/"* "/usr/local/lib/" - rm -rf "files/lib" - - install -Dm755 files/* "${FLATPAK_DEST}" + - install -Dm755 files/* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKDOLPHINURLPLACEHOLDER @@ -484,9 +484,9 @@ modules: buildsystem: simple build-commands: - rm -rf "files/lib/pkgconfig" # TODO: we need them? - - install -Dm755 "files/lib/"* "/usr/local/lib" + - install -Dm755 "files/lib/"* "/usr/local/lib/" - rm -rf "files/lib" - - install -Dm755 files/* "${FLATPAK_DEST}" + - install -Dm755 files/* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKPRIMEHACKURLPLACEHOLDER @@ -502,9 +502,10 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" - - install -Dm755 squashfs-root/usr/bin* "${FLATPAK_DEST}/bin" - - install -Dm755 squashfs-root/usr/share* "${FLATPAK_DEST}/share" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 squashfs-root/usr/bin* "${FLATPAK_DEST}/bin/" + - install -Dm755 squashfs-root/usr/share* "${FLATPAK_DEST}/share/" + - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg # Needed to avoid a bug #TODO: - cp -r squashfs-root/usr/optional* # maybe already included in flatpak runtime #TODO: - cp -r squashfs-root/usr/plugins* # maybe already included in qt #TODO: Do we need this wrapper? squashfs-root/apprun-hooks/linuxdeploy-plugin-qt-hook.sh @@ -522,7 +523,7 @@ modules: buildsystem: simple build-commands: - chmod +x melonDS - - install -Dm755 melonDS "${FLATPAK_DEST}/bin" + - install -Dm755 melonDS "${FLATPAK_DEST}/bin/" sources: - type: archive url: https://github.com/melonDS-emu/melonDS/releases/download/0.9.5/melonDS_0.9.5_linux_x64.zip @@ -538,9 +539,9 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" - rm -rf "squashfs-root/usr/lib" - - install -Dm755 squashfs-root/usr/* "/usr" + - install -Dm755 squashfs-root/usr/* "/usr/" sources: - type: file url: https://github.com/stenzek/duckstation/releases/download/v0.1-6937/DuckStation-x64.AppImage @@ -557,9 +558,9 @@ modules: - chmod +x *.AppImage - ./*.AppImage --appimage-extract #- rm -rf "squashfs-root/usr/lib/girepository-1.0" # causes issues, I think we already have this - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" - rm -rf "squashfs-root/usr/lib" - - install -Dm755 squashfs-root/usr/* "/usr" + - install -Dm755 squashfs-root/usr/* "/usr/" #TODO: do we need this wrapper? squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh sources: - type: file @@ -574,9 +575,9 @@ modules: buildsystem: simple build-commands: # Copying the user icon - - install -Dm755 retrodeck.png ${FLATPAK_DEST}/retrodeck + - install -Dm755 retrodeck.png "${FLATPAK_DEST}/retrodeck/" - mkdir -p "${FLATPAK_DEST}/share/Vita3K" - - unzip "ubuntu-latest.zip" -d "${FLATPAK_DEST}/share/Vita3K" + - unzip "ubuntu-latest.zip" -d "${FLATPAK_DEST}/share/Vita3K/" - chmod +x "${FLATPAK_DEST}/share/Vita3K/Vita3K" - rm -f "${FLATPAK_DEST}/share/Vita3K/update-vita3k.sh" - ln -s ${FLATPAK_DEST}/share/Vita3K/Vita3K ${FLATPAK_DEST}/bin/Vita3K @@ -597,9 +598,9 @@ modules: buildsystem: simple build-commands: - rm -rf "files/lib/pkgconfig" # TODO: we need them? - - install -Dm755 "files/lib/"* "/usr/local/lib" + - install -Dm755 "files/lib/"* "/usr/local/lib/" - rm -rf "files/lib" - - install -Dm755 files/* "${FLATPAK_DEST}" + - install -Dm755 files/* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKSOLARUSURLPLACEHOLDER @@ -616,9 +617,9 @@ modules: build-commands: - rm -rf "files/lib/cmake" - rm -rf "files/lib/pkgconfig" - - install -Dm755 "files/lib/"* "/usr/local/lib" + - install -Dm755 "files/lib/"* "/usr/local/lib/" - rm -rf "files/lib" - - install -Dm755 files/* "${FLATPAK_DEST}" + - install -Dm755 files/* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKGZDOOMSURLPLACEHOLDER @@ -645,7 +646,7 @@ modules: - name: Ryujinx-with-symlink-fix buildsystem: simple build-commands: - - install -Dm755 ${FLATPAK_DEST} + - install -Dm755 "${FLATPAK_DEST}/" sources: - type: archive url: https://gitlab.com/-/project/59825450/uploads/8519a04d7a3f5b5949f14b6ad25a4185/ryujinx-Release-1.1.0+81fd228-linux_x64.zip @@ -661,7 +662,7 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib" + - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" - rm -rf "squashfs-root/usr/lib" - install -Dm755 squashfs-root/usr/* "${FLATPAK_DEST}/" sources: @@ -686,7 +687,7 @@ modules: buildsystem: simple build-commands: - rm -f files/manifest.json - - install -Dm755 "files/"* "${FLATPAK_DEST}" + - install -Dm755 "files/"* "${FLATPAK_DEST}/" sources: - type: archive url: RETRODECKMAMEURLPLACEHOLDER @@ -704,7 +705,7 @@ modules: - mkdir -p ${FLATPAK_DEST}/retrodeck # These must be put in home folder, managed by retrodeck.sh - - cp es-configs/es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml + - install -Dm644 es-configs/es_settings.xml ${FLATPAK_DEST}/retrodeck/es_settings.xml - mv -f -t ${FLATPAK_DEST}/retrodeck es-configs/rd_prepacks # Logo, res, move graphics directory away from default location so splash can be changed after build @@ -717,21 +718,17 @@ modules: - mv -f -t ${FLATPAK_DEST}/retrodeck res/binding_icons # RetroDECK core script - - cp retrodeck.sh ${FLATPAK_DEST}/bin/retrodeck.sh - - chmod +x ${FLATPAK_DEST}/bin/retrodeck.sh + - install -Dm755 retrodeck.sh "${FLATPAK_DEST}/bin/retrodeck.sh" # Tools - - mkdir -p ${FLATPAK_DEST}/tools - - cp -r tools/** ${FLATPAK_DEST}/tools - - find ${FLATPAK_DEST}/tools -type f \( -name "*.sh" -o -name "*.py" \) -exec chmod +x {} \; + - install -Dm755 "tools/"* ${FLATPAK_DEST}/tools # Function libraries - - mkdir -p ${FLATPAK_DEST}/libexec - - cp -r functions/** "${FLATPAK_DEST}/libexec/" + - install -Dm755 "functions/"* "${FLATPAK_DEST}/libexec/" # Desktop entries - - cp net.retrodeck.retrodeck.desktop ${FLATPAK_DEST}/share/applications/net.retrodeck.retrodeck.desktop - - cp net.retrodeck.retrodeck.Configurator.desktop /app/share/applications/net.retrodeck.retrodeck.Configurator.desktop + - install -Dm644 net.retrodeck.retrodeck.desktop "${FLATPAK_DEST}/share/applications/net.retrodeck.retrodeck.desktop" + - install -Dm644 net.retrodeck.retrodeck.Configurator.desktop "/app/share/applications/net.retrodeck.retrodeck.Configurator.desktop" # Initializing default emulator configs - cp -r emu-configs ${FLATPAK_DEST}/retrodeck/emu-configs/ @@ -740,20 +737,15 @@ modules: - cp ${FLATPAK_DEST}/retrodeck/emu-configs/pico-8/pico8-wrapper.sh ${FLATPAK_DEST}/bin/pico8 - chmod +x ${FLATPAK_DEST}/bin/pico8 - # Needed for ffmpeg (RPCS3) - - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg - # Placing appdata - - mkdir -p ${FLATPAK_DEST}/share/appdata - - cp net.retrodeck.retrodeck.appdata.xml ${FLATPAK_DEST}/share/appdata + - install -Dm644 net.retrodeck.retrodeck.appdata.xml "${FLATPAK_DEST}/share/appdata/" # Creating symlinks for a prettier access - ln -s ${FLATPAK_DEST}/bin/retrodeck.sh ${FLATPAK_DEST}/bin/retrodeck - ln -s ${FLATPAK_DEST}/tools/configurator.sh ${FLATPAK_DEST}/bin/configurator # GZDOOM wrapper - - cp emu-configs/gzdoom/gzdoom.sh ${FLATPAK_DEST}/bin/gzdoom.sh - - chmod +x ${FLATPAK_DEST}/bin/gzdoom.sh + - install -Dm755 emu-configs/gzdoom/gzdoom.sh ${FLATPAK_DEST}/bin/gzdoom.sh sources: - type: git From 30329902dbdd3503b85e0b632312a73cb9c94531 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 15:33:24 +0900 Subject: [PATCH 4/8] FRAMEWORK: moved third party libs into /app/retrodeck/lib --- functions/global.sh | 2 ++ net.retrodeck.retrodeck.yml | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/functions/global.sh b/functions/global.sh index 52db4426..c9329620 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -1,5 +1,7 @@ #!/bin/bash +export LD_LIBRAY_PATH="$LD_LIBRAY_PATH:/app/retrodeck/lib/" + # This file is containing some global function needed for the script such as the config file tools source /app/libexec/050_save_migration.sh diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 571d1ad6..8f8dce6c 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -329,7 +329,7 @@ modules: - name: retrodeck-es-de buildsystem: simple build-commands: - - install -Dm755 "files/lib/"* "/usr/local/lib/" + - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - install -Dm755 "files/"* "${FLATPAK_DEST}/" sources: - type: archive @@ -358,7 +358,7 @@ modules: - install -Dm755 ./RetroArch-Linux-x86_64.AppImage.home/.config/retroarch/* "${FLATPAK_DEST}/share/libretro/" - chmod +x ./*.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 "squashfs-root/usr/lib/"* "/app/retrodeck/lib/" - install -Dm755 squashfs-root/usr/* "/usr/" sources: - type: archive @@ -451,7 +451,7 @@ modules: - chmod +x *.AppImage - ./*.AppImage --appimage-extract #- rm -f /app/lib/libselinux.so.1 # TODO this rfile is breaking the build, we need it? Error: cp: /app/lib/libselinux.so.1: no version information available (required by cp) - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 "squashfs-root/usr/lib/"* "/app/retrodeck/lib/" - install -Dm755 squashfs-root/usr/* "/usr/" sources: - type: file @@ -467,7 +467,7 @@ modules: - name: retrodeck-dolphin buildsystem: simple build-commands: - - install -Dm755 "files/lib/"* "/usr/local/lib/" + - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - rm -rf "files/lib" - install -Dm755 files/* "${FLATPAK_DEST}/" sources: @@ -484,7 +484,7 @@ modules: buildsystem: simple build-commands: - rm -rf "files/lib/pkgconfig" # TODO: we need them? - - install -Dm755 "files/lib/"* "/usr/local/lib/" + - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - rm -rf "files/lib" - install -Dm755 files/* "${FLATPAK_DEST}/" sources: @@ -502,7 +502,7 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 "squashfs-root/usr/lib/"* "/app/retrodeck/lib/" - install -Dm755 squashfs-root/usr/bin* "${FLATPAK_DEST}/bin/" - install -Dm755 squashfs-root/usr/share* "${FLATPAK_DEST}/share/" - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg # Needed to avoid a bug @@ -539,7 +539,7 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 "squashfs-root/usr/lib/"* "/app/retrodeck/lib/" - rm -rf "squashfs-root/usr/lib" - install -Dm755 squashfs-root/usr/* "/usr/" sources: @@ -558,7 +558,7 @@ modules: - chmod +x *.AppImage - ./*.AppImage --appimage-extract #- rm -rf "squashfs-root/usr/lib/girepository-1.0" # causes issues, I think we already have this - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 "squashfs-root/usr/lib/"* "/app/retrodeck/lib/" - rm -rf "squashfs-root/usr/lib" - install -Dm755 squashfs-root/usr/* "/usr/" #TODO: do we need this wrapper? squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh @@ -598,7 +598,7 @@ modules: buildsystem: simple build-commands: - rm -rf "files/lib/pkgconfig" # TODO: we need them? - - install -Dm755 "files/lib/"* "/usr/local/lib/" + - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - rm -rf "files/lib" - install -Dm755 files/* "${FLATPAK_DEST}/" sources: @@ -617,7 +617,7 @@ modules: build-commands: - rm -rf "files/lib/cmake" - rm -rf "files/lib/pkgconfig" - - install -Dm755 "files/lib/"* "/usr/local/lib/" + - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - rm -rf "files/lib" - install -Dm755 files/* "${FLATPAK_DEST}/" sources: @@ -662,7 +662,7 @@ modules: build-commands: - chmod +x *.AppImage - ./*.AppImage --appimage-extract - - install -Dm755 "squashfs-root/usr/lib/"* "/usr/local/lib/" + - install -Dm755 "squashfs-root/usr/lib/"* "/app/retrodeck/lib/" - rm -rf "squashfs-root/usr/lib" - install -Dm755 squashfs-root/usr/* "${FLATPAK_DEST}/" sources: From 563a2ad6345347bce98cda3f47029bec24731259 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 16:18:05 +0900 Subject: [PATCH 5/8] MANIFEST: added retrodeck-pre-build commands --- net.retrodeck.retrodeck.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 8f8dce6c..db03479c 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -91,6 +91,11 @@ modules: url: https://github.com/XargonWan/RetroDECK.git branch: THISBRANCH + - name: retrodeck-pre-build + buildsystem: simple + build-commands: + - mkdir -p "/app/retrodeck/lib/" + - name: xmlstarlet config-opts: - --disable-static-libs From 3ba1a8652af21819617a1f19a7f5b45fe552a388 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 16:20:19 +0900 Subject: [PATCH 6/8] MANIFEST: module renamed --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index db03479c..573a50d2 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -341,7 +341,7 @@ modules: url: RETRODECKESDEURLPLACEHOLDER sha256: RETRODECKESDEPLACEHOLDER - - name: RetroDECK Theme + - name: RetroDECK-theme buildsystem: simple build-commands: - install -Dm755 * ${FLATPAK_DEST}/share/es-de/themes/retrodeck/ From 1fbd415aff55d0f0d23d50dce22e8c673944f7ae Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 16:39:14 +0900 Subject: [PATCH 7/8] ES-DE: re-removed 'files/lib/girepository-1.0' --- net.retrodeck.retrodeck.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 573a50d2..c286ecd7 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -334,6 +334,7 @@ modules: - name: retrodeck-es-de buildsystem: simple build-commands: + - rm -rf "files/lib/girepository-1.0" - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - install -Dm755 "files/"* "${FLATPAK_DEST}/" sources: From 6bc3cb303b4aa610211ed08a5c97c4ed7baa22d9 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 23 Jul 2024 16:45:51 +0900 Subject: [PATCH 8/8] Adding debug --- net.retrodeck.retrodeck.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index c286ecd7..e28792c9 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -335,8 +335,10 @@ modules: buildsystem: simple build-commands: - rm -rf "files/lib/girepository-1.0" - - install -Dm755 "files/lib/"* "/app/retrodeck/lib/" - - install -Dm755 "files/"* "${FLATPAK_DEST}/" + - install -Dm755 "files/lib/" "/app/retrodeck/lib/" + - install -Dm755 "files/" "${FLATPAK_DEST}/" + - ls -lah "files/" # TODO: DEBUG + - ls -lah "${FLATPAK_DEST}/" # TODO: DEBUG sources: - type: archive url: RETRODECKESDEURLPLACEHOLDER