From 3d267d378115fcae38e96206c97f536b8c379402 Mon Sep 17 00:00:00 2001 From: Soumyadeep Ghosh Date: Thu, 10 Oct 2024 23:30:25 +0530 Subject: [PATCH] extensions: simplifies the platform plug --- extensions/desktop/command-chain/Makefile | 1 + extensions/desktop/command-chain/desktop-launch | 2 +- extensions/desktop/command-chain/hooks-configure-fonts | 2 +- snapcraft/extensions/gnome.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/desktop/command-chain/Makefile b/extensions/desktop/command-chain/Makefile index 4ace2fd0de..1cb401cb19 100644 --- a/extensions/desktop/command-chain/Makefile +++ b/extensions/desktop/command-chain/Makefile @@ -6,6 +6,7 @@ GPU_WRAPPER := scripts = hooks-configure-fonts desktop-launch run $(GPU_WRAPPER) *: + sed -e "s/%PLATFORM_PLUG%/$${PLATFORM_PLUG:?}/" -i desktop-launch hooks-configure-fonts install -D -m755 "$@" "$(BIN_DIR)"/"$@" install: $(scripts) diff --git a/extensions/desktop/command-chain/desktop-launch b/extensions/desktop/command-chain/desktop-launch index f8b3a9cc83..56000017fc 100644 --- a/extensions/desktop/command-chain/desktop-launch +++ b/extensions/desktop/command-chain/desktop-launch @@ -1,5 +1,5 @@ #!/bin/bash -set -- "${SNAP}/gnome-platform/command-chain/desktop-launch" "$@" +set -- "${SNAP}/%PLATFORM_PLUG%/command-chain/desktop-launch" "$@" # shellcheck source=/dev/null source "${SNAP}/snap/command-chain/run" diff --git a/extensions/desktop/command-chain/hooks-configure-fonts b/extensions/desktop/command-chain/hooks-configure-fonts index b6a2f1d3c6..2bcab19d16 100644 --- a/extensions/desktop/command-chain/hooks-configure-fonts +++ b/extensions/desktop/command-chain/hooks-configure-fonts @@ -1,5 +1,5 @@ #!/bin/bash -set -- "${SNAP}/gnome-platform/command-chain/hooks-configure-fonts" "$@" +set -- "${SNAP}/%PLATFORM_PLUG%/command-chain/hooks-configure-fonts" "$@" # shellcheck source=/dev/null source "${SNAP}/snap/command-chain/run" diff --git a/snapcraft/extensions/gnome.py b/snapcraft/extensions/gnome.py index 30e7eeeb23..daffcb8edf 100644 --- a/snapcraft/extensions/gnome.py +++ b/snapcraft/extensions/gnome.py @@ -330,6 +330,7 @@ def get_parts_snippet(self) -> Dict[str, Any]: "source": str(source), "plugin": "make", "build-snaps": [sdk_snap], + "make-parameters": ["PLATFORM_PLUG=gnome-platform"], **gpu_opts, }, }