Fixed UQM not loading zipfiles, added optional downloads

This commit is contained in:
pelya
2010-08-25 16:52:04 +03:00
parent 9e1f47f584
commit 9a90448e08
4 changed files with 14 additions and 5 deletions

View File

@@ -1,9 +1,9 @@
AppSettingVersion=4
AppSettingVersion=5
LibSdlVersion=1.2
AppName="Ur-Quan Masters"
AppFullName=com.sourceforge.sc2
ScreenOrientation=h
AppDataDownloadUrl="Game data is 60 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip"
AppDataDownloadUrl="Game data is 14 Mb|https://sites.google.com/site/xpelyax/Home/sc2-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/sc2-data.zip^3DO remixed music (19 Mb)|:addons/3domusic/3domusic.zip:https://sites.google.com/site/xpelyax/Home/3domusic.zip?attredirects=0&d=1|:addons/3domusic/3domusic.zip:http://sitesproxy.goapk.com/site/xpelyax/Home/3domusic.zip^UQM music remix pack 1 (50 Mb)|:addons/remix/uqm-remix-pack1.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%201/uqm-remix-pack1.zip/download^UQM music remix pack 2 (60 Mb)|:addons/remix/uqm-remix-pack2.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%202/uqm-remix-pack2.zip/download^UQM music remix pack 3 (40 Mb)|:addons/remix/uqm-remix-pack3.zip:http://sourceforge.net/projects/sc2/files/UQM%20Remix%20Packs/UQM%20Remix%20Pack%203/uqm-remix-pack3.zip/download"
SdlVideoResize=y
NeedDepthBuffer=n
AppUsesMouse=n
@@ -13,9 +13,9 @@ AppUsesMultitouch=n
RedefinedKeys="RETURN RSHIFT KP_PLUS KP_MINUS ESCAPE F10"
AppTouchscreenKeyboardKeysAmount=2
MultiABI=n
AppVersionCode=1001
AppVersionName="1.0.01"
AppVersionCode=1002
AppVersionName="1.0.02"
CompiledLibraries="sdl_image"
AppCflags='-O0 -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1'
AppCflags='-O0 -DTHREADLIB_SDL=1 -DTIMELIB=SDL -DOVCODEC_TREMOR=1 -DNETPLAY=1 -DHAVE_REGEX=1 -DHAVE_GETOPT_LONG=1 -DHAVE_ZIP=1'
AppLdflags='-Lbin/ndk/local/armeabi -ltremor'
ReadmeText='^You may press "Home" now - the data will be downloaded in background'

View File

@@ -35,6 +35,7 @@
#include "mem.h"
#include "uioutils.h"
#include "uioport.h"
#include "../log.h"
#ifdef uio_MEM_DEBUG
# include "memdebug.h"
#endif
@@ -193,6 +194,7 @@ uio_mountDir(uio_Repository *destRep, const char *mountPoint,
errno = EINVAL;
return NULL;
}
log_add (log_Info, "uio_open %s", sourcePath);
handle = uio_open(sourceDir, sourcePath,
((flags & uio_MOUNT_RDONLY) == uio_MOUNT_RDONLY ?
O_RDONLY : O_RDWR)
@@ -201,12 +203,14 @@ uio_mountDir(uio_Repository *destRep, const char *mountPoint,
#endif
, 0);
if (handle == NULL) {
log_add (log_Info, "uio_open failed for %s", sourcePath);
// errno is set
return NULL;
}
}
handler = uio_getFileSystemHandler(fsType);
log_add (log_Info, "uio_getFileSystemHandler %p", handler);
if (handler == NULL) {
if (handle)
uio_close(handle);

View File

@@ -1366,6 +1366,10 @@ zip_fillDirStructureProcessExtraFields(uio_FileBlock *fileBlock,
gPFileData->gid = (uid_t) makeUInt16(buf[12], buf[13]);
break;
}
case 0x7875: // 'Unix string UID/GID'
// Just skip it
break;
default:
#ifdef DEBUG
fprintf(stderr, "Debug: Extra field 0x%04x unsupported, "

View File

@@ -464,6 +464,7 @@ mountDirZips (uio_DirHandle *dirHandle, const char *mountPoint,
for (i = 0; i < dirList->numNames; i++)
{
log_add (log_Info, "Mounting ZIP '%s'", dirList->names[i]);
if (uio_mountDir (repository, mountPoint, uio_FSTYPE_ZIP,
dirHandle, dirList->names[i], "/", autoMount,
relativeFlags | uio_MOUNT_RDONLY,