Skip to content

Commit 589b95d

Browse files
author
Chris Warren-Smith
committed
SDL: packaging for flatpak
1 parent b5db863 commit 589b95d

5 files changed

Lines changed: 97 additions & 2 deletions

File tree

Makefile.am

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ appImage:
6868
~/apps/linuxdeploy-x86_64.AppImage --appdir=AppDir --executable=./src/platform/fltk/sbasici && \
6969
~/apps/appimagetool-x86_64.AppImage AppDir
7070

71+
#
72+
# flatpak install flathub org.flatpak.Builder
73+
# sudo apt install flatpak-builder
74+
# https://docs.flathub.org/docs/for-app-authors/submission
75+
#
76+
77+
flatpak-build:
78+
flatpak-builder build-dir io.github.smallbasic.json --force-clean
79+
80+
flatpak-test:
81+
flatpak-builder --run build-dir io.github.smallbasic.json sbasicg
82+
83+
flatpak-install:
84+
flatpak-builder --user --install --force-clean build-dir io.github.smallbasic.json
85+
7186
EXTRA_DIST = \
7287
documentation/build_kwp.cpp \
7388
documentation/sbasic_ref.csv \

images/io.github.smallbasic.png

29.3 KB
Loading

src/platform/sdl/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sbasicg_LDADD = -L$(top_srcdir)/src/common -lsb_common @PACKAGE_LIBS@
3838
sbasicg_DEPENDENCIES = $(top_srcdir)/src/common/libsb_common.a
3939

4040
iconsdir = $(datadir)/icons/hicolor/128x128/apps
41-
icons_DATA = ../../../images/sb-desktop-128x128.png
41+
icons_DATA = ../../../images/io.github.smallbasic.png
4242
desktopdir = $(datadir)/applications
4343
desktop_DATA = io.github.smallbasic.desktop
4444

src/platform/sdl/io.github.smallbasic.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Desktop Entry]
22
Name=SmallBASIC
33
Exec=sbasicg
4-
Icon=sb-desktop-128x128
4+
Icon=io.github.smallbasic
55
Terminal=false
66
Type=Application
77
Categories=Development
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"app-id": "io.github.smallbasic",
3+
"runtime": "org.freedesktop.Platform",
4+
"runtime-version": "25.08",
5+
"sdk": "org.freedesktop.Sdk",
6+
"command": "sbasicg",
7+
"build-options": {
8+
"env": {
9+
"MAKEFLAGS": "-j$(nproc) -s"
10+
}
11+
},
12+
"finish-args": [
13+
"--socket=wayland",
14+
"--socket=fallback-x11",
15+
"--socket=pulseaudio",
16+
"--device=dri",
17+
"--share=ipc",
18+
"--env=SBASICPATH=/app/lib/smallbasic/plugins"
19+
],
20+
"modules": [
21+
{
22+
"name": "smallbasic-plugins",
23+
"buildsystem": "simple",
24+
"build-commands": [
25+
"./autogen.sh",
26+
"./configure --prefix=/app",
27+
"make -j$(nproc)",
28+
"mkdir -p ${FLATPAK_DEST}/lib/smallbasic/plugins",
29+
"find . -name '*.so' -exec install -Dm755 {} ${FLATPAK_DEST}/lib/smallbasic/plugins/ \\;"
30+
],
31+
"sources": [
32+
{
33+
"type": "git",
34+
"url": "https://github.com/smallbasic/smallbasic.plugins.git",
35+
"commit": "master"
36+
}
37+
]
38+
}, {
39+
"name": "xxd",
40+
"buildsystem": "simple",
41+
"build-commands": [
42+
"cd src/xxd && make CC=gcc CFLAGS='-O2'",
43+
"install -Dm755 src/xxd/xxd /app/bin/xxd"
44+
],
45+
"sources": [
46+
{
47+
"type": "git",
48+
"url": "https://github.com/vim/vim.git",
49+
"tag": "v9.1.0"
50+
}
51+
]
52+
}, {
53+
"name": "SDL3",
54+
"buildsystem": "cmake-ninja",
55+
"config-opts": [
56+
"-DCMAKE_BUILD_TYPE=Release"
57+
],
58+
"sources": [
59+
{
60+
"type": "git",
61+
"url": "https://github.com/libsdl-org/SDL.git",
62+
"tag": "release-3.2.26"
63+
}
64+
]
65+
}, {
66+
"name": "sbasicg",
67+
"buildsystem": "autotools",
68+
"config-opts": [
69+
"--prefix=/app",
70+
"--enable-sdl"
71+
],
72+
"sources": [
73+
{
74+
"type": "dir",
75+
"path": "."
76+
}
77+
]
78+
}
79+
]
80+
}

0 commit comments

Comments
 (0)