From bc3513e5d9662ac38e20ac941185f5f63bac9d9c Mon Sep 17 00:00:00 2001 From: Layla Marchant Date: Sat, 26 Dec 2020 17:34:53 -0500 Subject: [PATCH] Added starfighter.sh script (for use in distribution). --- README.txt | 11 +++++++++++ misc/starfighter.sh | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 misc/starfighter.sh diff --git a/README.txt b/README.txt index 51ca10e..ce4c465 100644 --- a/README.txt +++ b/README.txt @@ -106,6 +106,17 @@ final step (moving the Starfighter binary out from the src directory) is required; in particular, failure to do so under MacOS leads to a failure to load data (images, sounds, fonts) needed by Starfighter. +On Linux and most other POSIX systems, you can instead build a run in +place build with the following commands: + + ./configure SF_RUN_IN_PLACE=1 + make + mv misc/starfighter.sh . + +For Linux, this method is preferred as the binary itself often cannot be +run by double-clicking, and the starfighter.sh script also automatically +sets the current working directory, making it suitable for launchers. + Run "./configure --help" to see all options for compiling. ------------------------------------------------------------------------ diff --git a/misc/starfighter.sh b/misc/starfighter.sh new file mode 100755 index 0000000..4b2a70d --- /dev/null +++ b/misc/starfighter.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# This file has been dedicated to the public domain, to the extent +# possible under applicable law, via CC0. See +# http://creativecommons.org/publicdomain/zero/1.0/ for more +# information. This file is offered as-is, without any warranty. +# +# Script which can be used to easily run Starfighter in-place without +# installing on POSIX systems, but not on MacOS. + +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") +cd $SCRIPTPATH +./src/starfighter "$@" \ No newline at end of file