Files
smoovplay/scripts/linux/install-desktop-entry.sh

51 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# Adds "SmoovPlay (capture card)" to the application menu for this checkout (~/.local/share/applications).
# bash scripts/linux/install-desktop-entry.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../.." && pwd)"
APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
mkdir -p "$APPS"
chmod +x "$ROOT/scripts/linux/smoovplay-capture.sh" "$ROOT/scripts/linux/smoovplay-desktop.sh" "$ROOT/scripts/linux/smoovplay-remoteplay.sh"
cat >"$APPS/smoovplay-capture.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=SmoovPlay (capture card)
GenericName=Console frame generation
Comment=Play the capture card's console at 60-120 fps with AI frame generation and upscaling
Exec=$ROOT/scripts/linux/smoovplay-capture.sh
Icon=$ROOT/installer/icon/smoovplay-256.png
Terminal=false
Categories=Game;
Keywords=smoovplay;ps5;capture;frame generation;
StartupNotify=false
EOF
cat >"$APPS/smoovplay-desktop.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=SmoovPlay (desktop, 120 fps)
GenericName=Console frame generation
Comment=Windowed on the main 240 Hz monitor: 1080p at 120 fps
Exec=$ROOT/scripts/linux/smoovplay-desktop.sh
Icon=$ROOT/installer/icon/smoovplay-256.png
Terminal=false
Categories=Game;
Keywords=smoovplay;ps5;capture;frame generation;
StartupNotify=false
EOF
cat >"$APPS/smoovplay-remoteplay.desktop" <<EOF
[Desktop Entry]
Type=Application
Name=SmoovPlay (PS5 Remote Play)
GenericName=Console frame generation
Comment=PS5 Remote Play, no capture card: cleaner picture, fullscreen 120 fps on the main monitor
Exec=$ROOT/scripts/linux/smoovplay-remoteplay.sh
Icon=$ROOT/installer/icon/smoovplay-256.png
Terminal=false
Categories=Game;
Keywords=smoovplay;ps5;remote play;frame generation;
StartupNotify=false
EOF
command -v desktop-file-validate >/dev/null && desktop-file-validate "$APPS/smoovplay-capture.desktop" "$APPS/smoovplay-desktop.desktop" "$APPS/smoovplay-remoteplay.desktop"
command -v update-desktop-database >/dev/null && update-desktop-database "$APPS" 2>/dev/null || true
echo "installed $APPS/smoovplay-capture.desktop"