mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
flatpak: Use JSON, add X11 and SDL3 manifests
I have chosen to use JSON and move the script into a file so it is possible to use GNOME Builder to test/run. The reason for the gitignore change is so the ClassiCubeLauncher file is not ignored. Also, ClassiCube using SDL3 launches on GNOME now.
This commit is contained in:
parent
8b05ee6ace
commit
be37a3af8e
3
.gitignore
vendored
3
.gitignore
vendored
@ -95,6 +95,9 @@ fontscache.txt
|
|||||||
# Android source files need to be included
|
# Android source files need to be included
|
||||||
!android/app/src/main/java/com/classicube
|
!android/app/src/main/java/com/classicube
|
||||||
|
|
||||||
|
# Flatpak wrapper which needs to be included
|
||||||
|
!misc/linux/flatpak/ClassiCubeLauncher
|
||||||
|
|
||||||
# CMake files
|
# CMake files
|
||||||
CMakeFiles/
|
CMakeFiles/
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
|
3
misc/linux/flatpak/ClassiCubeLauncher
Normal file
3
misc/linux/flatpak/ClassiCubeLauncher
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
mkdir -p ${XDG_DATA_HOME}/ClassiCube
|
||||||
|
cd ${XDG_DATA_HOME}/ClassiCube && exec ClassiCube $@
|
78
misc/linux/flatpak/net.classicube.flatpak.client.SDL3.json
Normal file
78
misc/linux/flatpak/net.classicube.flatpak.client.SDL3.json
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
"id": "net.classicube.flatpak.client",
|
||||||
|
"runtime": "org.freedesktop.Platform",
|
||||||
|
"runtime-version": "23.08",
|
||||||
|
"sdk": "org.freedesktop.Sdk",
|
||||||
|
"command": "ClassiCubeLauncher",
|
||||||
|
"finish-args": [
|
||||||
|
"--socket=wayland",
|
||||||
|
"--socket=fallback-x11",
|
||||||
|
"--device=dri",
|
||||||
|
"--share=network",
|
||||||
|
"--share=ipc",
|
||||||
|
"--socket=pulseaudio"
|
||||||
|
],
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "SDL3",
|
||||||
|
"buildsystem": "cmake-ninja",
|
||||||
|
"builddir": true,
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/libsdl-org/SDL.git",
|
||||||
|
"branch": "main"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"cleanup": [
|
||||||
|
"/bin/sdl3-config",
|
||||||
|
"/include",
|
||||||
|
"/lib/libSDL3.la",
|
||||||
|
"/lib/libSDL3main.a",
|
||||||
|
"/lib/libSDL3main.la",
|
||||||
|
"/lib/libSDL3_test.a",
|
||||||
|
"/lib/libSDL3_test.la",
|
||||||
|
"/lib/cmake",
|
||||||
|
"/share/aclocal",
|
||||||
|
"/lib/pkgconfig"
|
||||||
|
],
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "libdecor",
|
||||||
|
"buildsystem": "meson",
|
||||||
|
"config-opts": [
|
||||||
|
"-Ddemo=false"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitlab.freedesktop.org/libdecor/libdecor.git"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"cleanup": [
|
||||||
|
"/include",
|
||||||
|
"/lib/pkgconfig"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ClassiCube",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"gcc -fno-math-errno src/*.c -o src/ClassiCube -rdynamic -lpthread -lGL -DCC_WIN_BACKEND=CC_WIN_BACKEND_SDL3 -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -DCC_BUILD_FLATPAK -L /app/lib -lSDL3",
|
||||||
|
"install -Dm755 src/ClassiCube -t ${FLATPAK_DEST}/bin",
|
||||||
|
"install -Dm755 misc/linux/flatpak/ClassiCubeLauncher -t ${FLATPAK_DEST}/bin",
|
||||||
|
"install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.classicube.flatpak.client.svg",
|
||||||
|
"install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.desktop ${FLATPAK_DEST}/share/applications/net.classicube.flatpak.client.desktop",
|
||||||
|
"install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml ${FLATPAK_DEST}/share/metainfo/net.classicube.flatpak.client.metainfo.xml"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ClassiCube/ClassiCube.git"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
34
misc/linux/flatpak/net.classicube.flatpak.client.X11.json
Normal file
34
misc/linux/flatpak/net.classicube.flatpak.client.X11.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"id": "net.classicube.flatpak.client",
|
||||||
|
"runtime": "org.freedesktop.Platform",
|
||||||
|
"runtime-version": "23.08",
|
||||||
|
"sdk": "org.freedesktop.Sdk",
|
||||||
|
"command": "ClassiCubeLauncher",
|
||||||
|
"finish-args": [
|
||||||
|
"--socket=x11",
|
||||||
|
"--device=dri",
|
||||||
|
"--share=network",
|
||||||
|
"--share=ipc",
|
||||||
|
"--socket=pulseaudio"
|
||||||
|
],
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "ClassiCube",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"gcc -fno-math-errno src/*.c -o src/ClassiCube -O1 -DCC_BUILD_FLATPAK -DCC_GFX_BACKEND=CC_GFX_BACKEND_GL2 -rdynamic -lm -lpthread -lX11 -lXi -lGL -ldl",
|
||||||
|
"install -Dm755 src/ClassiCube -t ${FLATPAK_DEST}/bin",
|
||||||
|
"install -Dm755 misc/linux/flatpak/ClassiCubeLauncher -t ${FLATPAK_DEST}/bin",
|
||||||
|
"install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.classicube.flatpak.client.svg",
|
||||||
|
"install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.desktop ${FLATPAK_DEST}/share/applications/net.classicube.flatpak.client.desktop",
|
||||||
|
"install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml ${FLATPAK_DEST}/share/metainfo/net.classicube.flatpak.client.metainfo.xml"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ClassiCube/ClassiCube.git"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -1,29 +0,0 @@
|
|||||||
id: net.classicube.flatpak.client
|
|
||||||
runtime: org.freedesktop.Platform
|
|
||||||
runtime-version: '23.08'
|
|
||||||
sdk: org.freedesktop.Sdk
|
|
||||||
command: ClassiCubeLauncher
|
|
||||||
finish-args:
|
|
||||||
- --socket=x11
|
|
||||||
- --device=dri
|
|
||||||
- --share=network
|
|
||||||
- --share=ipc
|
|
||||||
- --socket=pulseaudio
|
|
||||||
modules:
|
|
||||||
- name: ClassiCube
|
|
||||||
buildsystem: simple
|
|
||||||
build-commands:
|
|
||||||
- gcc -fno-math-errno src/*.c -o src/ClassiCube -O1 -DCC_BUILD_FLATPAK -DCC_BUILD_GLMODERN -rdynamic -lm -lpthread -lX11 -lXi -lGL -ldl
|
|
||||||
- install -Dm755 src/ClassiCube -t ${FLATPAK_DEST}/bin
|
|
||||||
- install -Dm755 ClassiCubeLauncher -t ${FLATPAK_DEST}/bin
|
|
||||||
- install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.classicube.flatpak.client.svg
|
|
||||||
- install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.desktop ${FLATPAK_DEST}/share/applications/net.classicube.flatpak.client.desktop
|
|
||||||
- install -Dm644 misc/linux/flatpak/net.classicube.flatpak.client.metainfo.xml ${FLATPAK_DEST}/share/metainfo/net.classicube.flatpak.client.metainfo.xml
|
|
||||||
sources:
|
|
||||||
- type: dir
|
|
||||||
path: ../../../
|
|
||||||
- type: script
|
|
||||||
dest-filename: ClassiCubeLauncher
|
|
||||||
commands:
|
|
||||||
- mkdir -p ${XDG_DATA_HOME}/ClassiCube
|
|
||||||
- cd ${XDG_DATA_HOME}/ClassiCube && exec /app/bin/ClassiCube "$@"
|
|
Loading…
x
Reference in New Issue
Block a user