summaryrefslogtreecommitdiff
blob: ce668c71843a5242bc393c42e46051e09b5d8f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# Get game directory
GAMEDIR="@GAMEDIR@"
LIB=$GAMEDIR/lib
BIN=$GAMEDIR/bin

# Ensure the log directory exists
LOGDIR=~/.capy/SwordAndSworcery
[ -e ~/.capy ] || mkdir ~/.capy
[ -e ~/.capy/SwordAndSworcery ] || mkdir ~/.capy/SwordAndSworcery

# For multi-monitor displays, choose a screen to display on to avoid having
# the game be displayed in the middle across both screens in fullscreen mode
#export SDL_VIDEO_FULLSCREEN_DISPLAY=0

# Modify library paths here
export LD_LIBRARY_PATH="$LIB:$LD_LIBRARY_PATH"

# Run the game and try to log any errors if any
cd "$BIN"
exec ./swordandsworcery $@ 2>&1 | tee -a $LOGDIR/log.txt

exit