Files
commandergenius/project/jni/application/openttd/build-pc.sh
2020-04-17 00:52:53 +03:00

28 lines
714 B
Bash
Executable File

#!/bin/sh
LOCAL_PATH=`dirname $0`
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
mkdir -p openttd-pc openttd-pc/baseset
cd openttd-pc
[ -e bin/baseset ] || cp -a ../src/bin ./
[ -e bin/fonts ] || cp -a ../data/fonts bin/
export CFLAGS=-O0
export CXXFLAGS=-O0
[ -e Makefile ] || ../src/configure --enable-debug || exit 1
make -j8 VERBOSE=1 || exit 1
cd bin
if [ -z "$1" ]; then
./openttd -d 2 -m null -g opntitle.sav -r 854x480
elif [ -n "$2" ]; then
valgrind --track-fds=yes --log-file=../../valgrind.log --leak-check=full \
./openttd -d 0 -m null # -g opntitle.sav
else
#valgrind --track-fds=yes --log-file=valgrind.log --leak-check=full \
gdb -ex run --args \
./openttd -d 0 -m null -g opntitle.sav -r 854x480
fi