Simplified the json file and removed the ppsspp.desktop file

Changed command from ppsspp to PPSSPPSDL
removed libzip
Changed the buildsystem to cmake
Added environment variables for CC and CXX for aarch64
Defined config-opts for aarch64
Removed cleanup and build-commands
Added post-install commands
Removed Scripts
This commit is contained in:
samy-k97 2021-06-18 19:13:54 +01:00
parent 94bfe6a5bd
commit d0bf015013
2 changed files with 11 additions and 61 deletions

View file

@ -4,7 +4,7 @@
"runtime": "org.freedesktop.Platform", "runtime": "org.freedesktop.Platform",
"runtime-version": "20.08", "runtime-version": "20.08",
"sdk": "org.freedesktop.Sdk", "sdk": "org.freedesktop.Sdk",
"command": "ppsspp", "command": "PPSSPPSDL",
"finish-args": [ "finish-args": [
"--device=all", "--device=all",
"--filesystem=host:ro", "--filesystem=host:ro",
@ -15,44 +15,23 @@
"modules": [ "modules": [
"shared-modules/glu/glu-9.json", "shared-modules/glu/glu-9.json",
"shared-modules/glew/glew.json", "shared-modules/glew/glew.json",
{
"name": "libzip",
"buildsystem": "cmake-ninja",
"config-opts": ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"],
"cleanup": [
"/bin",
"/include",
"/lib/pkgconfig",
"/share/man"
],
"sources": [
{
"type": "archive",
"url": "https://libzip.org/download/libzip-1.7.3.tar.xz",
"sha256": "a60473ffdb7b4260c08bfa19c2ccea0438edac11193c3afbbb1f17fbcf6c6132"
}
]
},
{ {
"name": "ppsspp", "name": "ppsspp",
"buildsystem": "simple", "buildsystem": "cmake",
"build-options": { "build-options": {
"arch":{ "arch": {
"aarch64": { "aarch64": {
"env": {"EXTRA_OPTS":"-DUSING_GLES2=ON"} "env": {
"CC": "clang",
"CXX": "clang++"
},
"config-opts": ["-DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/raspberry.armv8.cmake"]
} }
} }
}, },
"cleanup": [ "post-install": [
"/share/applications/" "mv ${FLATPAK_DEST}/share/applications/{PPSSPPSDL,${FLATPAK_ID}}.desktop",
], "desktop-file-edit --set-name=PPSSPP ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
"build-commands": [
"cd ffmpeg && ../ffmpeg-build.sh",
"cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${FLATPAK_DEST} ${EXTRA_OPTS} .",
"make -j${FLATPAK_BUILDER_N_JOBS} && make install",
"ln -s ${FLATPAK_DEST}/bin/PPSSPPSDL ${FLATPAK_DEST}/bin/ppsspp",
"install -Dm644 icons/icon-512.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/${FLATPAK_ID}.svg",
"install -Dm644 ppsspp.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
"install -Dm644 appdata.xml ${FLATPAK_DEST}/share/appdata/${FLATPAK_ID}.appdata.xml" "install -Dm644 appdata.xml ${FLATPAK_DEST}/share/appdata/${FLATPAK_ID}.appdata.xml"
], ],
"sources": [ "sources": [
@ -61,26 +40,6 @@
"url": "https://github.com/hrydgard/ppsspp.git", "url": "https://github.com/hrydgard/ppsspp.git",
"tag": "v1.11.3" "tag": "v1.11.3"
}, },
{
"type": "script",
"dest-filename": "ffmpeg-build.sh",
"only-arches": ["aarch64"],
"commands":[
"rm -r linux",
"sed -i 's/GENERAL=/GENERAL_NO=/' linux_arm64.sh",
"./linux_arm64.sh"
]
},
{
"type": "script",
"dest-filename": "ffmpeg-build.sh",
"only-arches": ["x86_64"],
"commands":["rm -r linux", "./linux_x86-64.sh"]
},
{
"type": "file",
"path": "ppsspp.desktop"
},
{ {
"type": "file", "type": "file",
"path": "appdata.xml" "path": "appdata.xml"

View file

@ -1,9 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=PPSSPP
GenericName=PSP Emulator
Comment=PlayStation Portable Simulator Suitable for Playing Portably (PPSSPP)
Exec=ppsspp %f
Icon=org.ppsspp.PPSSPP
Categories=Game