Teeworlds: compile server binary for Android

This commit is contained in:
Sergii Pylypenko
2015-07-10 21:04:55 +03:00
parent 2576ae321d
commit 031c0f4b13
4 changed files with 84 additions and 4 deletions

View File

@@ -7,10 +7,10 @@ AppName="TeeWorlds"
AppFullName=com.teeworlds
# Application version code (integer)
AppVersionCode=06320
AppVersionCode=06322
# Application user-visible version name (string)
AppVersionName="0.6.3.20"
AppVersionName="0.6.3.22"
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
@@ -18,7 +18,7 @@ AppVersionName="0.6.3.20"
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by build system
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
AppDataDownloadUrl="Game data|data.zip"
AppDataDownloadUrl="!!Game data|data.zip^!!Server config|:server-config.txt:server-config.txt"
# Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=n

View File

@@ -25,4 +25,32 @@ mkdir -p ../AndroidData
zip -r ../AndroidData/data.zip data *.txt *.cfg >/dev/null
}
for ARCH in armeabi-v7a x86; do
[ -e ../AndroidData/binaries-$ARCH.zip ] && continue
rm -rf teeworlds_srv
mkdir -p objs
# server-sources.txt generated by running bam server_release 2>&1 | tee build.log
# and parsing logs with grep -o ' [^ ]*[.]cp\?p\?' build.log | grep -v /zlib/ > ../server-sources.txt
echo "Building teeworlds_srv for $ARCH"
env BUILD_EXECUTABLE=1 NO_SHARED_LIBS=1 ../../setEnvironment-$ARCH.sh \
sh -c '
OBJS=
for F in `cat ../server-sources.txt`; do
dirname objs/$F.o | xargs mkdir -p
echo $F
OBJS="$OBJS objs/$F.o"
$CXX $CFLAGS -fno-exceptions -fno-rtti -Wall -DCONF_RELEASE -I src -c $F -o objs/$F.o || exit 1
done
echo Linking teeworlds_srv
$CXX $CFLAGS -fno-exceptions -fno-rtti $LDFLAGS -pie -pthread -o teeworlds_srv $OBJS || exit 1
$STRIP --strip-unneeded teeworlds_srv
' || exit 1
cp teeworlds_srv bin-$ARCH/
cd bin-$ARCH
zip ../../AndroidData/binaries-$ARCH.zip *
cd ..
done
cp -f server-config.txt ../AndroidData/
exit 0

View File

@@ -0,0 +1,52 @@
src/engine/shared/network.cpp
src/engine/shared/console.cpp
src/engine/shared/network_client.cpp
src/engine/shared/jobs.cpp
src/engine/shared/ringbuffer.cpp
src/engine/shared/linereader.cpp
src/engine/shared/econ.cpp
src/engine/shared/compression.cpp
src/engine/shared/network_console.cpp
src/engine/shared/datafile.cpp
src/engine/shared/mapchecker.cpp
src/engine/shared/huffman.cpp
src/engine/shared/filecollection.cpp
src/engine/shared/map.cpp
src/engine/shared/network_console_conn.cpp
src/engine/shared/demo.cpp
src/engine/shared/network_server.cpp
src/engine/shared/netban.cpp
src/engine/shared/kernel.cpp
src/engine/shared/engine.cpp
src/engine/shared/memheap.cpp
src/engine/shared/network_conn.cpp
src/engine/shared/masterserver.cpp
src/engine/shared/packer.cpp
src/engine/shared/snapshot.cpp
src/engine/shared/storage.cpp
src/engine/shared/config.cpp
src/base/system.c
src/engine/server/register.cpp
src/engine/server/server.cpp
src/game/localization.cpp
src/game/gamecore.cpp
src/game/layers.cpp
src/game/collision.cpp
src/game/generated/nethash.cpp
src/game/generated/protocol.cpp
src/game/server/player.cpp
src/game/server/eventhandler.cpp
src/game/server/entity.cpp
src/game/server/gamecontroller.cpp
src/game/server/gameworld.cpp
src/game/server/gamemodes/ctf.cpp
src/game/server/gamemodes/dm.cpp
src/game/server/gamemodes/tdm.cpp
src/game/server/gamemodes/mod.cpp
src/game/server/gamecontext.cpp
src/game/server/entities/character.cpp
src/game/server/entities/flag.cpp
src/game/server/entities/laser.cpp
src/game/server/entities/projectile.cpp
src/game/server/entities/pickup.cpp
src/game/generated/server_data.cpp