Added openttd-lowmem project

This commit is contained in:
pelya
2010-11-22 20:01:54 +02:00
parent 06828acaea
commit d50badde25
9 changed files with 63 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
# The application settings for Android libSDL port
AppSettingVersion=15
LibSdlVersion=1.2
AppName="OpenTTD-lowmem"
AppFullName=org.openttd.sdl.lowmem
ScreenOrientation=h
InhibitSuspend=n
AppDataDownloadUrl="Data files - 6 Mb|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-lowmem-2.zip/download^Big GUI add-on - enable it in NewGRF Settings|:data/opengfx+biggui.grf:http://www.tt-forums.net/download/file.php?id=135095"
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
NeedDepthBuffer=n
AppUsesMouse=y
AppNeedsTwoButtonMouse=y
AppNeedsArrowKeys=y
AppNeedsTextInput=y
AppUsesJoystick=n
AppHandlesJoystickSensitivity=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="LALT RETURN KP_PLUS KP_MINUS DELETE"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
MultiABI=n
AppVersionCode=10503
AppVersionName="1.0.5.03"
CompiledLibraries="png lzo2"
CustomBuildScript=y
AppCflags=''
AppLdflags=''
AppSubdirsBuild=''
AppUseCrystaXToolchain=y
AppCmdline='openttd -d 3 -b 8bpp-simple'
ReadmeText='^You may press "Home" now - the data will be downloaded in background'

View File

@@ -0,0 +1,21 @@
#!/bin/sh
LOCAL_PATH=`dirname $0`
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
# Uncomment if your configure expects SDL libraries in form "libSDL_name.so"
#ln -sf libtremor.a $LOCAL_PATH/../../../obj/local/armeabi/libvorbisidec.a
#ln -sf libflac.a $LOCAL_PATH/../../../obj/local/armeabi/libFLAC.a
# OpenTTD build system is uglier than war.
if [ \! -f openttd/objs/lang/english.lng ] ; then
sh -c "cd openttd && ./configure --without-freetype --without-png --without-zlib --without-lzo2 --endian=LE && make lang && make -C objs/release endian_target.h depend"
rm -f openttd/Makefile
fi
if [ \! -f openttd/Makefile ] ; then
../setEnvironment.sh sh -c "cd openttd && ./configure --host=arm-eabi --with-sdl --without-freetype --with-png --with-zlib --with-lzo2=$LOCAL_PATH/../../../obj/local/armeabi/liblzo2.so --prefix-dir='.' --data-dir='' --without-allegro --without-fontconfig --endian=LE"
fi
../setEnvironment.sh sh -c "cd openttd && make -j1 VERBOSE=1 LIBS='-lsdl-1.2 -llzo2 -lpng -lgcc -lz -lc -lstdc++'" && cp -f openttd/objs/release/openttd libapplication.so

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1 @@
../../../../../openttd-1.0.5-lowmem

View File

@@ -0,0 +1 @@
The same as "openttd" package, but with sound and music disabled to save some RAM.

View File

@@ -5,7 +5,7 @@ AppName="OpenTTD"
AppFullName=org.openttd.sdl
ScreenOrientation=h
InhibitSuspend=n
AppDataDownloadUrl="Data files - 20 Mb|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-3.zip/download^Localization files and fonts (7 MB)|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-lang-3.zip/download^MIDI music support (18 Mb)|http://sourceforge.net/projects/libsdl-android/files/timidity.zip/download"
AppDataDownloadUrl="Data files - 20 Mb|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-4.zip/download^Localization files and fonts (7 MB)|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-lang-4.zip/download^MIDI music support (18 Mb)|http://sourceforge.net/projects/libsdl-android/files/timidity.zip/download^Big GUI add-on - enable it in NewGRF Settings|:data/opengfx+biggui.grf:http://www.tt-forums.net/download/file.php?id=135095"
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
NeedDepthBuffer=n
@@ -21,8 +21,8 @@ RedefinedKeys="LALT RETURN KP_PLUS KP_MINUS DELETE"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
MultiABI=n
AppVersionCode=10502
AppVersionName="1.0.4.02"
AppVersionCode=10503
AppVersionName="1.0.5.03"
CompiledLibraries="jpeg png freetype timidity lzma lzo2"
CustomBuildScript=y
AppCflags=''

View File

@@ -11,11 +11,11 @@ LOCAL_PATH=`cd $LOCAL_PATH && pwd`
# OpenTTD build system is uglier than war.
if [ \! -f openttd/objs/lang/english.lng ] ; then
sh -c "cd openttd && ./configure --without-freetype --without-png --without-zlib --without-lzo2 --without-lzma --endian=LE && make lang && make -C objs/release endian_target.h depend"
sh -c "cd openttd && ./configure --without-freetype --without-png --without-zlib --without-lzo2 --endian=LE && make lang && make -C objs/release endian_target.h depend"
rm -f openttd/Makefile
fi
if [ \! -f openttd/Makefile ] ; then
../setEnvironment.sh sh -c "cd openttd && ./configure --host=arm-eabi --with-sdl --with-freetype=sdl-config --with-png --with-zlib --with-libtimidity=$LOCAL_PATH/../../../obj/local/armeabi/libtimidity.so --with-lzo2=$LOCAL_PATH/../../../obj/local/armeabi/liblzo2.so --prefix-dir='.' --data-dir='' --without-allegro --without-fontconfig --endian=LE --with-lzma=sdl-config"
../setEnvironment.sh sh -c "cd openttd && ./configure --host=arm-eabi --with-sdl --with-freetype=sdl-config --with-png --with-zlib --with-libtimidity=$LOCAL_PATH/../../../obj/local/armeabi/libtimidity.so --with-lzo2=$LOCAL_PATH/../../../obj/local/armeabi/liblzo2.so --prefix-dir='.' --data-dir='' --without-allegro --without-fontconfig --endian=LE"
fi
../setEnvironment.sh sh -c "cd openttd && make -j1 VERBOSE=1 LIBS='-lsdl-1.2 -llzo2 -lpng -ltimidity -lfreetype -lgcc -lz -lc -lstdc++'" && cp -f openttd/objs/release/openttd libapplication.so

View File

@@ -13,7 +13,7 @@ Index: src/sound/sdl_s.cpp
static void CDECL fill_sound_buffer(void *userdata, Uint8 *stream, int len)
{
MxMixSamples(stream, len / 4);
+#ifdef ANDROID
+#if defined(ANDROID) && defined(LIBTIMIDITY)
+ Android_MidiMixMusic((Sint16 *)stream, len / 2);
+#endif
}

View File

@@ -1 +1 @@
fheroes2
openttd-lowmem