diff --git a/Makefile b/Makefile index 5e5cca3568..2fd68b7605 100644 --- a/Makefile +++ b/Makefile @@ -441,10 +441,11 @@ install-man-page: man-page install-linux-scripts: @echo "#!/bin/sh" > openra @echo 'cd "$(gameinstalldir)"' >> openra +# Note: this relies on the non-standard -f flag implemented by gnu readlink ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0)) - @echo 'mono OpenRA.Game.exe "$$@"' >> openra + @echo 'mono OpenRA.Game.exe Engine.LaunchPath="$(readlink -f $0)" "$$@"' >> openra else - @echo 'mono --debug OpenRA.Game.exe "$$@"' >> openra + @echo 'mono --debug OpenRA.Game.exe Engine.LaunchPath="$(readlink -f $0)" "$$@"' >> openra endif @echo 'if [ $$? != 0 -a $$? != 1 ]' >> openra @echo 'then' >> openra diff --git a/launch-game.sh b/launch-game.sh index 72838f4d3f..80ffa4af69 100755 --- a/launch-game.sh +++ b/launch-game.sh @@ -1,6 +1,6 @@ #!/bin/sh -# launch script (executed by Desura) -mono OpenRA.Game.exe "$@" +# Note: this relies on the non-standard -f flag implemented by gnu readlink +mono OpenRA.Game.exe Engine.LaunchPath="$(readlink -f $0)" "$@" if [ $? != 0 -a $? != 1 ] then ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files."