- First LZMA enhanced NSIS version - experimental
- Added SetCompressorDictSize (only works for LZMA) - Added SetCompressionLevel (only "works" for zlib and bzip2) - doesn't work for now - Section is only supposed to get 4 parameters if /o is specified - Updated version numbers git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3190 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
320cefa4b0
commit
594c3ed0f6
84 changed files with 8083 additions and 41 deletions
|
@ -74,6 +74,12 @@
|
|||
// than zlib in whole mode usually.
|
||||
// #define NSIS_ZLIB_COMPRESS_WHOLE
|
||||
|
||||
// NSIS_LZMA_COMPRESS_WHOLE makes all install data in lzma installers
|
||||
// compressed together. Runtime requirements are increased, but potential
|
||||
// for compression is as well. Requires that the installer create a
|
||||
// (potentially large) temporary file in the temp directory.
|
||||
#define NSIS_LZMA_COMPRESS_WHOLE
|
||||
|
||||
// NSIS_BZIP2_COMPRESS_WHOLE makes all install data in bzip2 installers
|
||||
// compressed together. Runtime requirements are increased, but potential
|
||||
// for compression is as well. Requires that the installer create a
|
||||
|
@ -286,7 +292,9 @@
|
|||
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
#ifndef NSIS_COMPRESS_USE_ZLIB
|
||||
#ifndef NSIS_COMPRESS_USE_BZIP2
|
||||
#error compression is enabled but both zlib and bzip2 are disabled.
|
||||
#ifndef NSIS_COMPRESS_USE_LZMA
|
||||
#error compression is enabled but zlib, bzip2 and lzma are disabled.
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
@ -295,27 +303,39 @@
|
|||
#ifdef NSIS_COMPRESS_USE_BZIP2
|
||||
#error both zlib and bzip2 are enabled.
|
||||
#endif
|
||||
#ifdef NSIS_COMPRESS_USE_LZMA
|
||||
#error both zlib and lzma are enabled.
|
||||
#endif
|
||||
#endif
|
||||
#ifdef NSIS_COMPRESS_USE_BZIP2
|
||||
#ifdef NSIS_COMPRESS_USE_LZMA
|
||||
#error both bzip2 and lzma are enabled.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
#ifdef NSIS_COMPRESS_USE_LZMA
|
||||
#ifdef NSIS_LZMA_COMPRESS_WHOLE
|
||||
#define NSIS_COMPRESS_WHOLE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
#ifndef _NSIS_CONFIG_VERIFYDIALOG
|
||||
#define _NSIS_CONFIG_VERIFYDIALOG
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
227
Source/exehead/exehead-lzma.dsp
Normal file
227
Source/exehead/exehead-lzma.dsp
Normal file
|
@ -0,0 +1,227 @@
|
|||
# Microsoft Developer Studio Project File - Name="exehead_lzma" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=exehead_lzma - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "exehead-lzma.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "exehead-lzma.mak" CFG="exehead_lzma - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "exehead_lzma - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release-lzma"
|
||||
# PROP Intermediate_Dir "Release-lzma"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O1 /Oy /D "_WINDOWS" /D "EXEHEAD" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "WIN32_LEAN_AND_MEAN" /D "NSIS_COMPRESS_USE_LZMA" /D ZEXPORT=__stdcall /FD /c
|
||||
# SUBTRACT CPP /Fr /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib shell32.lib /nologo /entry:"WinMain" /subsystem:windows /pdb:none /map /machine:I386 /nodefaultlib /out:"Release-lzma/exehead_lzma.exe" /opt:nowin98
|
||||
# Begin Special Build Tool
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=generating include file for makenssi
|
||||
PostBuild_Cmds=bin2h Release-lzma\exehead_lzma.exe Release-lzma\exehead_lzma.h lzma_header_data
|
||||
# End Special Build Tool
|
||||
# Begin Target
|
||||
|
||||
# Name "exehead_lzma - Win32 Release"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Group "lzma"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\InBuffer.cpp
|
||||
# ADD CPP /D "__STREAM_VERSION"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\InBuffer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZMA.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZMADecoder.cpp
|
||||
# ADD CPP /D "__STREAM_VERSION"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZMADecoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZMALenCoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZMALiteralCoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZOutWindow.cpp
|
||||
# ADD CPP /D "__STREAM_VERSION"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\LZOutWindow.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\RangeCoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\RangeCoderBit.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\RangeCoderBitTree.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\RangeCoderOpt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\7zip\Compress\LZMA_SMALL\Types.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "lzmaNSIS"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\lzmaNSIS.cpp
|
||||
# ADD CPP /D "__STREAM_VERSION"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\7zip\lzmaNSIS.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bgbg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\crc32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\exec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fileform.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Ui.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\util.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\config.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\exec.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\fileform.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lang.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\state.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ui.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\util.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bitmap1.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\nsis.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\uninst.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -12,6 +12,16 @@
|
|||
#include "../zlib/zlib.h"
|
||||
#endif
|
||||
|
||||
#ifdef NSIS_COMPRESS_USE_LZMA
|
||||
#include "../7zip/lzmaNSIS.h"
|
||||
#define z_stream CLZMAState
|
||||
#define inflateInit(x) lzmaInit(x)
|
||||
#define inflateReset(x) lzmaInit(x)
|
||||
#define inflate(x) lzmaDecompress(x)
|
||||
#define Z_OK 0
|
||||
#define Z_STREAM_END 1
|
||||
#endif
|
||||
|
||||
#ifdef NSIS_COMPRESS_USE_BZIP2
|
||||
#include "../bzip2/bzlib.h"
|
||||
|
||||
|
@ -353,7 +363,9 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
ltc = tc;
|
||||
}
|
||||
|
||||
if (!u) break;
|
||||
// if there's no output, more input is needed
|
||||
if (!u)
|
||||
break;
|
||||
|
||||
if (!outbuf)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue