From 31da5458d6ff7a8b3b735306cf0d0fdd2b5e5588 Mon Sep 17 00:00:00 2001 From: checkroom Date: Mon, 16 Dec 2024 11:56:46 +0000 Subject: [PATCH] Refactoring flatpak to simplify its usage and folder locality --- flatpak/.gitignore | 4 ++++ flatpak/README.md | 2 ++ flatpak/com.karurochari.vs.yml | 41 ++++++++++++++++++++++++++++++++++ flatpak/make.sh | 3 +++ 4 files changed, 50 insertions(+) create mode 100644 flatpak/.gitignore create mode 100644 flatpak/README.md create mode 100644 flatpak/com.karurochari.vs.yml create mode 100755 flatpak/make.sh diff --git a/flatpak/.gitignore b/flatpak/.gitignore new file mode 100644 index 00000000..73df7604 --- /dev/null +++ b/flatpak/.gitignore @@ -0,0 +1,4 @@ +/repo/ +/dist/ +/.flatpak-builder/ +/vs.flatpak \ No newline at end of file diff --git a/flatpak/README.md b/flatpak/README.md new file mode 100644 index 00000000..7405d994 --- /dev/null +++ b/flatpak/README.md @@ -0,0 +1,2 @@ +Flatpak building from this repo is deprecated, and has been moved to a specific one for distribution. +It is preserved for now as it is easier to work from here fixing bugs in flatpak generation & nighlty builds, but it will soon be removed. \ No newline at end of file diff --git a/flatpak/com.karurochari.vs.yml b/flatpak/com.karurochari.vs.yml new file mode 100644 index 00000000..1e4c9523 --- /dev/null +++ b/flatpak/com.karurochari.vs.yml @@ -0,0 +1,41 @@ +id: com.karurochari.vs +runtime: org.freedesktop.Platform +runtime-version: "24.08" +sdk: org.freedesktop.Sdk +sdk-extensions: + - "org.freedesktop.Sdk.Extension.llvm19" + - "org.freedesktop.Sdk.Extension.swift6" +build-options: + append-path: "/usr/lib/sdk/llvm19/bin:/usr/lib/sdk/swift6/bin" + prepend-ld-library-path: "/usr/lib/sdk/llvm19/lib:/usr/lib/sdk/swift6/lib" +command: vs +modules: + - shared-modules/glu/glu-9.json + - name: vs-fltk + buildsystem: meson + config-opts: + #- --prefix=/usr + - --native-file=/run/build/vs-fltk/toolchains/flatpak.ini + - --buildtype=release + - -Dtests=false + sources: + - type: dir + path: .. +finish-args: + # X11 + XShm access + - --share=ipc + - --socket=fallback-x11 + # Wayland access + - --socket=wayland + # GPU acceleration if needed + - --device=dri + # Needs to talk to the network: + - --share=network + # Add support for shared memory + - --device=shm + # Audio + - --socket=pulseaudio + # Home folder + - --filesystem=home/.vs-fltk +#cleanup: +# - '*' diff --git a/flatpak/make.sh b/flatpak/make.sh new file mode 100755 index 00000000..14b119a7 --- /dev/null +++ b/flatpak/make.sh @@ -0,0 +1,3 @@ +#!/bin/bash +flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo dist com.karurochari.vs.yml +flatpak build-bundle repo vs.flatpak org.karurochari.vs \ No newline at end of file