better no-compression mode

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
justin1014 2002-09-18 21:21:50 +00:00
parent 634b923901
commit 6e42002980
2 changed files with 19 additions and 17 deletions

View file

@ -273,23 +273,25 @@
#endif
#endif
#ifdef NSIS_COMPRESS_USE_ZLIB
#ifdef NSIS_ZLIB_COMPRESS_WHOLE
#define NSIS_COMPRESS_WHOLE
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
#ifndef _NSIS_CONFIG_VERIFYDIALOG
#define _NSIS_CONFIG_VERIFYDIALOG
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
#ifdef NSIS_COMPRESS_USE_ZLIB
#ifdef NSIS_ZLIB_COMPRESS_WHOLE
#define NSIS_COMPRESS_WHOLE
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
#ifndef _NSIS_CONFIG_VERIFYDIALOG
#define _NSIS_CONFIG_VERIFYDIALOG
#endif
#endif
#endif
#endif
#endif
#ifdef NSIS_COMPRESS_USE_BZIP2
#ifdef NSIS_BZIP2_COMPRESS_WHOLE
#define NSIS_COMPRESS_WHOLE
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
#ifndef _NSIS_CONFIG_VERIFYDIALOG
#define _NSIS_CONFIG_VERIFYDIALOG
#ifdef NSIS_COMPRESS_USE_BZIP2
#ifdef NSIS_BZIP2_COMPRESS_WHOLE
#define NSIS_COMPRESS_WHOLE
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
#ifndef _NSIS_CONFIG_VERIFYDIALOG
#define _NSIS_CONFIG_VERIFYDIALOG
#endif
#endif
#endif
#endif

View file

@ -29,7 +29,7 @@ static char *g_db_strtab;
static int g_db_offset;
HANDLE g_db_hFile;
#ifdef NSIS_COMPRESS_WHOLE
#if defined(NSIS_CONFIG_COMPRESSION_SUPPORT) && defined(NSIS_COMPRESS_WHOLE)
HANDLE dbd_hFile=INVALID_HANDLE_VALUE;
static int dbd_size, dbd_pos, dbd_srcpos, dbd_fulllen;
#endif//NSIS_COMPRESS_WHOLE
@ -61,7 +61,6 @@ int NSISCALL loadHeaders(void)
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
inflateInit(&g_inflate_stream);
#endif
#ifdef NSIS_COMPRESS_WHOLE
inflateReset(&g_inflate_stream);
@ -79,6 +78,7 @@ int NSISCALL loadHeaders(void)
}
dbd_srcpos=SetFilePointer(g_db_hFile,0,NULL,FILE_CURRENT);
dbd_fulllen=dbd_srcpos-sizeof(h)+h.length_of_all_following_data-((h.flags&FH_FLAGS_CRC)?4:0);
#endif
#endif
if (GetCompressedDataFromDataBlockToMemory(-1,data,h.length_of_header) != h.length_of_header)
@ -88,7 +88,7 @@ int NSISCALL loadHeaders(void)
return -1;
}
#ifndef NSIS_COMPRESS_WHOLE
#if !defined(NSIS_COMPRESS_WHOLE) || !defined(NSIS_CONFIG_COMPRESSION_SUPPORT)
g_db_offset=SetFilePointer(g_db_hFile,0,NULL,FILE_CURRENT);
#else
g_db_offset=dbd_pos;
@ -123,7 +123,7 @@ const char * NSISCALL GetStringFromStringTab(int offs)
// returns -3 if compression error/eof/etc
#ifndef NSIS_COMPRESS_WHOLE
#if !defined(NSIS_COMPRESS_WHOLE) || !defined(NSIS_CONFIG_COMPRESSION_SUPPORT)
static int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
{