Added Dosbox makefiles provided by Lubomyr

This commit is contained in:
pelya
2011-02-02 14:56:39 +00:00
parent a4cb94028c
commit aa1bea227e
6 changed files with 118 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# The application settings for Android libSDL port
AppSettingVersion=16
LibSdlVersion=1.2
AppName="DosBox"
AppFullName=com.dosbox.sdl
ScreenOrientation=h
InhibitSuspend=y
AppDataDownloadUrl="Data size is 1 Mb|dosbox-data.zip"
SdlVideoResize=y
SdlVideoResizeKeepAspect=n
NeedDepthBuffer=n
AppUsesMouse=y
AppNeedsTwoButtonMouse=y
AppNeedsArrowKeys=n
AppNeedsTextInput=y
AppUsesJoystick=n
AppHandlesJoystickSensitivity=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="LCTRL RETURN KP_PLUS KP_MINUS LCTRL"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="LCTRL RETURN KP_PLUS KP_MINUS LCTRL"
MultiABI=n
AppVersionCode=07401
AppVersionName="0.74.01"
CompiledLibraries="jpeg png"
CustomBuildScript=y
AppCflags=''
AppLdflags=''
AppSubdirsBuild=''
AppUseCrystaXToolchain=y
AppCmdline=''
ReadmeText='^You may press "Home" now - the data will be downloaded in background'

View File

@@ -0,0 +1,17 @@
#!/bin/sh
LOCAL_PATH=`dirname $0`
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
ln -sf libsdl-1.2.so $LOCAL_PATH/../../../obj/local/armeabi/libSDL.so
if [ \! -f dosbox-0.74/configure ] ; then
sh -c "cd dosbox-0.74 && ./autogen.sh"
fi
if [ \! -f dosbox-0.74/Makefile ] ; then
../setEnvironment.sh sh -c "cd dosbox-0.74 && ./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi"
fi
../setEnvironment.sh sh -c "cd dosbox-0.74 && make -j1 VERBOSE=1 STRIP='' LIBS='-lsdl-1.2 -lpng -lgcc -lz -lc -lstdc++'" && cp -f dosbox-0.74/src/dosbox libapplication.so

View File

@@ -0,0 +1,12 @@
Build instructions
unpack dosbox-0.74-cfg-pelyaSDL.tar.gz into ~/commandergenius/project/jni/application
Download http://sourceforge.net/projects/dosbox/files/dosbox/0.74/dosbox-0.74.tar.gz/download
unpack dosbox-0.74.tar.gz into ~/commandergenius/project/jni/application/dosbox
apply patch dosbox-0.74-androidSDL.diff
cd ~/commandergenius/project/jni/application
rm src
ln -s dosbox src
cd ~/commandergenius
./build.sh

View File

@@ -0,0 +1,55 @@
diff -ru orig/dosbox-0.74/config.sub dosbox-0.74/config.sub
--- orig/dosbox-0.74/config.sub 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/config.sub 2011-02-01 15:00:39.000000000 -0500
@@ -1298,7 +1298,7 @@
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -udi* | -eabi* | -androideabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
diff -ru orig/dosbox-0.74/src/dos/drive_local.cpp dosbox-0.74/src/dos/drive_local.cpp
--- orig/dosbox-0.74/src/dos/drive_local.cpp 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/src/dos/drive_local.cpp 2010-11-26 07:31:54.000000000 -0500
@@ -273,7 +273,7 @@
find_size=(Bit32u) stat_block.st_size;
struct tm *time;
- if((time=localtime(&stat_block.st_mtime))!=0){
+ if((time=localtime((const time_t *) &stat_block.st_mtime))!=0){
find_date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday);
find_time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec);
} else {
@@ -393,7 +393,7 @@
if(stat(newname,&temp_stat)!=0) return false;
/* Convert the stat to a FileStat */
struct tm *time;
- if((time=localtime(&temp_stat.st_mtime))!=0) {
+ if((time=localtime((const time_t *) &temp_stat.st_mtime))!=0) {
stat_block->time=DOS_PackTime((Bit16u)time->tm_hour,(Bit16u)time->tm_min,(Bit16u)time->tm_sec);
stat_block->date=DOS_PackDate((Bit16u)(time->tm_year+1900),(Bit16u)(time->tm_mon+1),(Bit16u)time->tm_mday);
} else {
@@ -532,7 +532,7 @@
struct stat temp_stat;
fstat(fileno(fhandle),&temp_stat);
struct tm * ltime;
- if((ltime=localtime(&temp_stat.st_mtime))!=0) {
+ if((ltime=localtime((const time_t *) &temp_stat.st_mtime))!=0) {
time=DOS_PackTime((Bit16u)ltime->tm_hour,(Bit16u)ltime->tm_min,(Bit16u)ltime->tm_sec);
date=DOS_PackDate((Bit16u)(ltime->tm_year+1900),(Bit16u)(ltime->tm_mon+1),(Bit16u)ltime->tm_mday);
} else {
diff -ru orig/dosbox-0.74/src/gui/sdlmain.cpp dosbox-0.74/src/gui/sdlmain.cpp
--- orig/dosbox-0.74/src/gui/sdlmain.cpp 2010-05-10 13:43:54.000000000 -0400
+++ dosbox-0.74/src/gui/sdlmain.cpp 2011-02-01 15:39:31.000000000 -0500
@@ -1743,8 +1743,7 @@
#if SDL_VERSION_ATLEAST(1, 2, 14)
putenv(const_cast<char*>("SDL_DISABLE_LOCK_KEYS=1"));
#endif
- if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_CDROM
- |SDL_INIT_NOPARACHUTE
+ if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE
) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError());
sdl.inited = true;

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB