From 6a90db3c067fcc40b783ad0cf422021bdcecb6a1 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Thu, 4 Apr 2024 18:22:56 +0100 Subject: [PATCH] Add io.github.lime3ds.Lime3DS --- .github/ISSUE_TEMPLATE/bug-report.yml | 39 ++++ .github/ISSUE_TEMPLATE/crash-report.yml | 51 +++++ .gitmodules | 3 + README.md | 3 + flathub.json | 3 + io.github.lime3ds.Lime3DS.json | 170 ++++++++++++++ io.github.lime3ds.Lime3DS.metainfo.xml | 37 ++++ io.github.lime3ds.Lime3DS.svg | 281 ++++++++++++++++++++++++ lime3ds-launcher.sh | 25 +++ 9 files changed, 612 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/crash-report.yml create mode 100644 .gitmodules create mode 100644 README.md create mode 100644 flathub.json create mode 100644 io.github.lime3ds.Lime3DS.json create mode 100644 io.github.lime3ds.Lime3DS.metainfo.xml create mode 100644 io.github.lime3ds.Lime3DS.svg create mode 100755 lime3ds-launcher.sh diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..be7cbc6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,39 @@ +name: Bug Report +labels: ["bug"] +description: 'Please use this template if you encountered rendering issues or glitches (not a crash or freeze)' +body: + - type: input + attributes: + label: Lime3DS Version + description: 'The version of Lime3DS you were using when the issue happened (can be found on the title bar)' + - type: textarea + attributes: + label: Description + description: 'Please describe what happened?' + placeholder: | + - Which game is this? + - Does this issue also happen in the AppImage version? + - What were you doing when the issue happened? + validations: + required: true + - type: textarea + attributes: + label: System Information + description: 'If possible, install `inxi`, run `inxi -v3` on your system and paste the output here' + render: 'bash session' + validations: + required: false + - type: textarea + attributes: + label: Logs + description: | + Please attach the Lime3DS log file here (how to obtain it: https://web.archive.org/web/20240229211203/https://community.citra-emu.org/t/how-to-upload-the-log-file/296) #TODO: Update this URL when the Lime3DS website is finished + Please **avoid pasting the log** into this box. Instead, use the __file upload__ function to attach the file. + validations: + required: true + - type: textarea + attributes: + label: Remarks + description: 'Do you have something notable to mention? Anything that will give us more context about this issue?' + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/crash-report.yml b/.github/ISSUE_TEMPLATE/crash-report.yml new file mode 100644 index 0000000..908cdd0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/crash-report.yml @@ -0,0 +1,51 @@ +name: Crash Report +labels: ["bug"] +description: 'Please use this template if you experienced a crash or freeze' +body: + - type: input + attributes: + label: Lime3DS Version + description: 'The version of Lime3DS you were using when this crash happened (can be found on the title bar)' + - type: textarea + attributes: + label: Description + description: 'Please describe what you were doing before and when this crash happened' + validations: + required: true + - type: dropdown + attributes: + label: Reproduction Certainty + description: 'Can you always reproduce this crash? Does this crash happens very often or happens rarely?' + multiple: false + options: + - Always + - Not always, but often + - Sometimes + - Rarely + validations: + required: true + - type: textarea + attributes: + label: System Information + description: 'If possible, install `inxi`, run `inxi -v3` on your system and paste the output here' + render: 'bash session' + validations: + required: false + - type: textarea + attributes: + label: Logs and Backtraces + description: | + If possible, please attach the Lime3DS log file and/or debugger backtrace file here + Please **avoid pasting the log** into this box. Instead, use the __file upload__ function to attach the file. + validations: + required: false + - type: textarea + attributes: + label: Remarks + description: 'Do you have something notable to mention? Anything that will give us more context?' + placeholder: | + - Does this issue also happen in the AppImage version? + - Did you notice any anomalies prior to the crash? + - Does this crash happen in older Flatpak versions? + validations: + required: false diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ea3adf1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "shared-modules"] + path = shared-modules + url = https://github.com/flathub/shared-modules diff --git a/README.md b/README.md new file mode 100644 index 0000000..3411958 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Lime3DS for Flatpak + +This repository contains the manifests required to build Lime3DS on the Flatpak platform diff --git a/flathub.json b/flathub.json new file mode 100644 index 0000000..68245dc --- /dev/null +++ b/flathub.json @@ -0,0 +1,3 @@ +{ + "skip-arches": ["i386","arm"] +} diff --git a/io.github.lime3ds.Lime3DS.json b/io.github.lime3ds.Lime3DS.json new file mode 100644 index 0000000..e28b95d --- /dev/null +++ b/io.github.lime3ds.Lime3DS.json @@ -0,0 +1,170 @@ +{ + "app-id": "io.github.lime3ds.Lime3DS", + "runtime": "org.kde.Platform", + "runtime-version": "6.6", + "sdk": "org.kde.Sdk", + "sdk-extensions": [ + "org.freedesktop.Sdk.Extension.llvm17" + ], + "command": "lime3ds-launcher", + "rename-desktop-file": "lime-qt.desktop", + "rename-icon": "lime", + "build-options": { + "append-path": "/usr/lib/sdk/llvm17/bin", + "prepend-ld-library-path": "/usr/lib/sdk/llvm17/lib", + "cflags": "-Wno-unused-command-line-argument", + "cxxflags": "-Wno-unused-command-line-argument" + }, + "finish-args": [ + "--device=all", + "--socket=x11", + "--socket=pulseaudio", + "--share=network", + "--share=ipc", + "--filesystem=host:ro", + "--filesystem=xdg-run/app/com.discordapp.Discord:ro" + ], + "cleanup": [ + "/include", + "/bin/glslangValidator", + "/bin/glslang", + "/bin/spirv-*", + "/bin/sdl2-config", + "/lib/pkgconfig", + "/lib/cmake", + "/share/doc", + "/share/man", + "/src", + "*.a", + "*.la" + ], + "modules": [ + "shared-modules/libusb/libusb.json", + "shared-modules/SDL2/SDL2-with-libdecor.json", + { + "name": "glslang", + "buildsystem": "cmake-ninja", + "config-opts": [ + "-DCMAKE_BUILD_TYPE=Release" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/KhronosGroup/glslang/archive/14.0.0.tar.gz", + "sha256": "80bbb916a23e94ea9cbfb1acb5d1a44a7e0c9613bcf5b5947c03f2273bdc92b0", + "x-checker-data": { + "type": "anitya", + "stable-only": true, + "project-id": 205796, + "url-template": "https://github.com/KhronosGroup/glslang/archive/$version.tar.gz" + } + }, + { + "type": "archive", + "url": "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.261.1.tar.gz", + "sha256": "ead95c626ad482882a141d1aa0ce47b9453871f72c42c0b28d39c82f60a52008", + "dest": "External/spirv-tools", + "x-checker-data": { + "type": "anitya", + "stable-only": true, + "project-id": 334920, + "url-template": "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-$version.tar.gz" + } + }, + { + "type": "archive", + "url": "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.261.1.tar.gz", + "sha256": "32b4c6ae6a2fa9b56c2c17233c8056da47e331f76e117729925825ea3e77a739", + "dest": "External/spirv-tools/external/spirv-headers", + "x-checker-data": { + "type": "anitya", + "stable-only": true, + "project-id": 334920, + "url-template": "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-$version.tar.gz" + } + } + ] + }, + { + "name": "rapidjson", + "buildsystem": "cmake-ninja", + "config-opts": [ + "-DCMAKE_BUILD_TYPE=Release", + "-DRAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF", + "-DRAPIDJSON_BUILD_DOC=OFF", + "-DRAPIDJSON_BUILD_EXAMPLES=OFF", + "-DRAPIDJSON_BUILD_TESTS=OFF", + "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz", + "sha256": "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e", + "x-checker-data": { + "type": "anitya", + "stable-only": true, + "project-id": 7422, + "url-template": "https://github.com/Tencent/rapidjson/archive/v$version.tar.gz" + } + } + ] + }, + { + "name": "lime", + "buildsystem": "cmake-ninja", + "builddir": true, + "config-opts": [ + "-DCMAKE_BUILD_TYPE=Release", + "-DCMAKE_C_COMPILER=clang", + "-DCMAKE_CXX_COMPILER=clang++", + "-DCMAKE_LINKER=lld", + "-DENABLE_QT_TRANSLATION=ON", + "-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON", + "-DUSE_DISCORD_PRESENCE=ON", + "-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF", + "-DUSE_SYSTEM_SDL2=ON" + ], + "cleanup": [ + "/share/man", + "/share/pixmaps" + ], + "post-install": [ + "install -Dm755 ../lime3ds-launcher.sh /app/bin/lime3ds-launcher", + "install -Dm644 ../io.github.lime3ds.Lime3DS.metainfo.xml /app/share/appdata/io.github.lime3ds.Lime3DS.metainfo.xml", + "desktop-file-install --dir=/app/share/applications ../dist/lime-qt.desktop", + "desktop-file-edit --set-key StartupWMClass --set-value lime-qt --set-key Exec --set-value lime3ds-launcher /app/share/applications/lime-qt.desktop", + "install -Dm644 ../io.github.lime3ds.Lime3DS.svg /app/share/icons/hicolor/scalable/apps/lime.svg", + "install -Dm644 ../dist/icon.png /app/share/icons/hicolor/512x512/apps/lime.png", + "mv /app/share/mime/packages/lime.xml /app/share/mime/packages/io.github.lime3ds.Lime3DS.xml", + "sed 's/lime/io.github.lime3ds.Lime3DS/g' -i /app/share/mime/packages/io.github.lime3ds.Lime3DS.xml" + ], + "sources": [ + { + "type": "archive", + "url": "https://github.com/Lime3DS/Lime3DS/releases/download/2106/lime3ds-unified-source-20240404-5913d83.tar.xz", + "sha256": "08ffe64b858a296b14bf79c02a2840432ff6077022c62f344473506bfe36a9fd", + "x-checker-data": { + "type": "json", + "url": "https://api.github.com/repos/Lime3DS/Lime3DS/releases/latest", + "version-query": ".tag_name", + "url-query": ".assets[] | .browser_download_url | match(\"https://.+lime-unified-source-.+.xz$\") | .string", + "is-main-source": true + } + }, + { + "type": "file", + "path": "io.github.lime3ds.Lime3DS.metainfo.xml" + }, + { + "type": "file", + "path": "io.github.lime3ds.Lime3DS.svg" + }, + { + "type": "file", + "path": "lime3ds-launcher.sh" + } + ] + } + ] +} diff --git a/io.github.lime3ds.Lime3DS.metainfo.xml b/io.github.lime3ds.Lime3DS.metainfo.xml new file mode 100644 index 0000000..1b46183 --- /dev/null +++ b/io.github.lime3ds.Lime3DS.metainfo.xml @@ -0,0 +1,37 @@ + + + io.github.lime3ds.Lime3DS + Lime3DS + A Nintendo 3DS emulator based on Citra + CC0-1.0 + GPL-2.0 + + moderate + + +

Lime3DS is a project which aims to revive and continue work on Citra, a popular open-source Nintendo 3DS emulator which ceased development.

+
+ io.github.lime3ds.Lime3DS.desktop + + lime-qt + lime-qt.desktop + + https://lime3ds.github.io/ + https://github.com/Lime3DS/Lime3DS/issues + https://discord.com/invite/4ZjMpAp3M6 + + https://raw.githubusercontent.com/Lime3DS/lime3ds-flatpak/master/screenshots/01-Super%20Mario%203D%20Land.jpg + https://raw.githubusercontent.com/Lime3DS/lime3ds-flatpak/master/screenshots/02-Mario%20Kart%207.jpg + https://raw.githubusercontent.com/Lime3DS/lime3ds-flatpak/master/screenshots/28-The%20Legend%20of%20Zelda%20Ocarina%20of%20Time%203D.jpg + https://raw.githubusercontent.com/Lime3DS/lime3ds-flatpak/master/screenshots/35-Pok%C3%A9mon%20ORAS.png + + + + + + + Game + Emulator + + Lime3DS Emulator Team +
diff --git a/io.github.lime3ds.Lime3DS.svg b/io.github.lime3ds.Lime3DS.svg new file mode 100644 index 0000000..65e57f9 --- /dev/null +++ b/io.github.lime3ds.Lime3DS.svg @@ -0,0 +1,281 @@ + + + + diff --git a/lime3ds-launcher.sh b/lime3ds-launcher.sh new file mode 100755 index 0000000..b647e48 --- /dev/null +++ b/lime3ds-launcher.sh @@ -0,0 +1,25 @@ +#!/bin/bash -e + +report_error() { + read -r -d '|' MESSAGE <https://github.com/flathub/io.github.lime3ds.Lime3DS/issues. + +When submitting a bug report, please attach your system information and the Lime3DS log file. +You seem to be using ${XDG_SESSION_DESKTOP} ${DESKTOP_SESSION} (${XDG_SESSION_TYPE}): +To obtain Lime3DS log files, please see this guide. # TODO: Update this URL when the Lime3DS website is finished +To obtain your system information, please install inxi and run inxi -v3. | +EOF + zenity --warning --no-wrap --title "That's awkward ..." --text "$MESSAGE" +} + +unset VK_ICD_FILENAMES VK_DRIVER_FILES +# Discord RPC +for i in {0..9}; do + test -S "$XDG_RUNTIME_DIR"/"discord-ipc-$i" || ln -sf {app/com.discordapp.Discord,"$XDG_RUNTIME_DIR"}/"discord-ipc-$i"; +done + + +if ! prlimit --nofile=8192 lime-qt "$@"; then + report_error +fi