From 3758b64916b9abd5742ab224ba131a538abd009c Mon Sep 17 00:00:00 2001 From: leper Date: Sun, 21 Apr 2013 16:47:36 +0000 Subject: [PATCH] Remove hardcoding of path from desktop file and launcher script. Patch by vincent. Fixes #1424. This was SVN commit r13365. --- build/resources/0ad.desktop | 2 +- build/resources/0ad.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/resources/0ad.desktop b/build/resources/0ad.desktop index c2edaa887e..3bb8d00936 100644 --- a/build/resources/0ad.desktop +++ b/build/resources/0ad.desktop @@ -3,7 +3,7 @@ Version=1.0 Name=0 A.D. Comment=A real-time strategy game of ancient warfare Comment[it]=Videogioco strategico in tempo reale di guerre antiche -Exec=/usr/bin/0ad +Exec=0ad Icon=0ad Terminal=false Type=Application diff --git a/build/resources/0ad.sh b/build/resources/0ad.sh index 5be571750e..944f8c364f 100644 --- a/build/resources/0ad.sh +++ b/build/resources/0ad.sh @@ -1,3 +1,9 @@ #!/bin/sh -/usr/bin/pyrogenesis "$@" +pyrogenesis=$(which pyrogenesis 2> /dev/null) +if [ -x "$pyrogenesis" ] ; then + "$pyrogenesis" "$@" +else + echo "Error: pyrogenesis not found in ($PATH)" + exit 1 +fi