From 3517a3d523d34a2b3dad853a376b4a9611828ea1 Mon Sep 17 00:00:00 2001 From: Colin Kinloch Date: Sat, 21 Dec 2024 17:08:12 +0000 Subject: [PATCH] scripts: Derive script path from meson prefix --- meson.build | 1 + src/Script/Script.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c4924c7afb..00a1cb42bd 100644 --- a/meson.build +++ b/meson.build @@ -68,6 +68,7 @@ endif add_project_arguments( '-DHAVE_PIPEWIRE=@0@'.format(pipewire_dep.found().to_int()), '-DHAVE_OPENVR=@0@'.format(openvr_dep.found().to_int()), + '-DSCRIPT_DIR="@0@"'.format(prefix / data_dir / 'gamescope/scripts'), language: 'cpp', ) diff --git a/src/Script/Script.cpp b/src/Script/Script.cpp index a104ee993b..142371b33e 100644 --- a/src/Script/Script.cpp +++ b/src/Script/Script.cpp @@ -130,7 +130,7 @@ namespace gamescope } else { - RunFolder( "/usr/share/gamescope/scripts", true ); + RunFolder( SCRIPT_DIR, true ); RunFolder( "/etc/gamescope/scripts", true ); }