diff --git a/install-scripts/ags.sh b/install-scripts/ags.sh index 74ff0a6..345cd99 100755 --- a/install-scripts/ags.sh +++ b/install-scripts/ags.sh @@ -99,6 +99,23 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then sudo awk '{print} $0 ~ /^import GLib from "gi:\/\/GLib";$/ {print "const __old = GLib.getenv(\"GI_TYPELIB_PATH\");"; print "GLib.setenv(\"GI_TYPELIB_PATH\", \"/usr/local/lib\" + (__old ? \":\" + __old : \"\"), true);"}' "$LAUNCHER" | sudo tee "$LAUNCHER" >/dev/null printf "${OK} AGS launcher patched.\n" + + # Create an env-setting wrapper for AGS to ensure GI typelibs/libs are discoverable + printf "${NOTE} Creating env wrapper /usr/local/bin/ags...\n" + MAIN_JS="/usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags" + if ! sudo test -f "$MAIN_JS"; then + MAIN_JS="/usr/share/com.github.Aylur.ags/com.github.Aylur.ags" + fi + sudo tee /usr/local/bin/ags >/dev/null <