Added starfighter.sh script (for use in distribution).

This commit is contained in:
Layla Marchant 2020-12-26 17:34:53 -05:00
parent bb5f1eae92
commit bc3513e5d9
No known key found for this signature in database
GPG Key ID: 52FB5C20A8336782
2 changed files with 24 additions and 0 deletions

View File

@ -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.
------------------------------------------------------------------------

13
misc/starfighter.sh Executable file
View File

@ -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 "$@"