Skip to content

Commit

Permalink
feat(kde-neon-6): add core24 support
Browse files Browse the repository at this point in the history
Allows core24 snaps to use the kde-neon and kde-neon-6 extensions.
  • Loading branch information
ScarlettGatelyMoore authored Jan 6, 2025
1 parent 6a2b36b commit db150e4
Show file tree
Hide file tree
Showing 17 changed files with 1,298 additions and 132 deletions.
13 changes: 13 additions & 0 deletions extensions/desktop/command-chain-kde/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/make -f

BIN_DIR := $(DESTDIR)/snap/command-chain
GPU_WRAPPER :=

scripts = hooks-configure-desktop desktop-launch run $(GPU_WRAPPER)

*:
install -D -m755 "$@" "$(BIN_DIR)"/"$@"

install: $(scripts)

.PHONY: $(scripts)
15 changes: 15 additions & 0 deletions extensions/desktop/command-chain-kde/desktop-launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [ "$QT_VERSION" == "6" ]; then

set -- "${SNAP}/kf6/snap/command-chain/desktop-launch6" "$@"
# shellcheck source=/dev/null
source "${SNAP}/snap/command-chain/run"

elif [ "$QT_VERSION" == "5" ]; then

set -- "${SNAP}/kf5/snap/command-chain/desktop-launch" "$@"
# shellcheck source=/dev/null
source "${SNAP}/snap/command-chain/run"

fi
5 changes: 5 additions & 0 deletions extensions/desktop/command-chain-kde/gpu-2404-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -- "${SNAP}/gpu-2404/bin/gpu-2404-provider-wrapper" "$@"
# shellcheck source=/dev/null
source "${SNAP}/snap/command-chain/run"
5 changes: 5 additions & 0 deletions extensions/desktop/command-chain-kde/hooks-configure-desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -- "${SNAP}/kf6/command-chain/hooks-configure-desktop" "$@"
# shellcheck source=/dev/null
source "${SNAP}/snap/command-chain/run"
5 changes: 5 additions & 0 deletions extensions/desktop/command-chain-kde/hooks-configure-fonts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -- "${SNAP}/kf6/command-chain/hooks-configure-fonts" "$@"
# shellcheck source=/dev/null
source "${SNAP}/snap/command-chain/run"
25 changes: 25 additions & 0 deletions extensions/desktop/command-chain-kde/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: run <command>"
exit 1
fi

if [ -z "${SNAP}" ]; then
echo "Not running inside a snap context: SNAP not declared"
exit
fi


if [ ! -f "$1" ]; then
echo "Content snap command-chain for $1 not found: ensure slot is connected"
exit
fi

# emulate "exec $@" using "source"
# have to disable "unused variables" because checkshell doesn't know that $BASH_ARGV0 is $0
# shellcheck disable=SC2034 # Unused variables left for readability
BASH_ARGV0=$1
shift
# shellcheck source=/dev/null
source "$0"
Loading

0 comments on commit db150e4

Please sign in to comment.