diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2007-04-17 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:50 +0300 |
commit | a145bfc7cf17f7bbcfae8f0064333c8ea75b455c (patch) | |
tree | 4ea458c9f35956fe080562989a702ea8c9af4b90 /CPP/7zip/Archive/Cab | |
parent | d9666cf046a8453b33b3e2fbf4d82295a9f87df3 (diff) |
4.45 beta
Diffstat (limited to 'CPP/7zip/Archive/Cab')
-rwxr-xr-x | CPP/7zip/Archive/Cab/Cab.dsp | 395 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/Cab.dsw | 29 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/CabBlockInStream.cpp | 6 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/CabHandler.cpp | 1 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/CabRegister.cpp | 13 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/DllExports.cpp | 72 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/makefile | 70 | ||||
-rwxr-xr-x | CPP/7zip/Archive/Cab/resource.rc | 5 |
8 files changed, 18 insertions, 573 deletions
diff --git a/CPP/7zip/Archive/Cab/Cab.dsp b/CPP/7zip/Archive/Cab/Cab.dsp deleted file mode 100755 index 565661f6..00000000 --- a/CPP/7zip/Archive/Cab/Cab.dsp +++ /dev/null @@ -1,395 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Cab" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=Cab - Win32 Debug -!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 "Cab.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 "Cab.mak" CFG="Cab - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Cab - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "Cab - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Cab - Win32 Release" - -# 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" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 1 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAB_EXPORTS" /YX /FD /c -# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAB_EXPORTS" /FAs /Yu"StdAfx.h" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x419 /d "NDEBUG" -# ADD RSC /l 0x419 /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 /dll /machine:I386 -# ADD 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 /dll /machine:I386 /out:"C:\Program Files\7-Zip\Formats\cab.dll" /opt:NOWIN98 -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "Cab - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 1 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAB_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAB_EXPORTS" /FAcs /Yu"StdAfx.h" /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x419 /d "_DEBUG" -# ADD RSC /l 0x419 /d "_DEBUG" -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 /dll /debug /machine:I386 /pdbtype:sept -# ADD 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 /dll /debug /machine:I386 /out:"C:\Program Files\7-Zip\Formats\cab.dll" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "Cab - Win32 Release" -# Name "Cab - Win32 Debug" -# Begin Group "Spec" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\Archive.def -# End Source File -# Begin Source File - -SOURCE=.\DllExports.cpp -# End Source File -# Begin Source File - -SOURCE=.\resource.rc -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# End Group -# Begin Group "Common" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\Common\Alloc.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\Alloc.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\IntToString.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\IntToString.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\NewHandler.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\NewHandler.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\String.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\String.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\StringConvert.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\StringConvert.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\UTFConvert.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\UTFConvert.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\Vector.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Common\Vector.h -# End Source File -# End Group -# Begin Group "Windows" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\..\Windows\PropVariant.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\..\Windows\PropVariant.h -# End Source File -# End Group -# Begin Group "Engine" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\CabBlockInStream.cpp -# End Source File -# Begin Source File - -SOURCE=.\CabBlockInStream.h -# End Source File -# Begin Source File - -SOURCE=.\CabHandler.cpp -# End Source File -# Begin Source File - -SOURCE=.\CabHandler.h -# End Source File -# Begin Source File - -SOURCE=.\CabHeader.cpp -# End Source File -# Begin Source File - -SOURCE=.\CabHeader.h -# End Source File -# Begin Source File - -SOURCE=.\CabIn.cpp -# End Source File -# Begin Source File - -SOURCE=.\CabIn.h -# End Source File -# Begin Source File - -SOURCE=.\CabItem.h -# End Source File -# End Group -# Begin Group "7zip Common" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Common\InBuffer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Common\InBuffer.h -# End Source File -# Begin Source File - -SOURCE=..\..\Common\LSBFDecoder.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Common\LSBFDecoder.h -# End Source File -# Begin Source File - -SOURCE=..\..\Common\MSBFDecoder.h -# End Source File -# Begin Source File - -SOURCE=..\..\Common\OutBuffer.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Common\OutBuffer.h -# End Source File -# Begin Source File - -SOURCE=..\..\Common\StreamUtils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Common\StreamUtils.h -# End Source File -# End Group -# Begin Group "Compress" - -# PROP Default_Filter "" -# Begin Group "LZ" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Compress\LZ\LZOutWindow.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\LZ\LZOutWindow.h -# End Source File -# End Group -# Begin Group "Lzx" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Compress\Lzx\Lzx.h -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Lzx\Lzx86Converter.cpp - -!IF "$(CFG)" == "Cab - Win32 Release" - -# ADD CPP /O2 -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "Cab - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Lzx\Lzx86Converter.h -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Lzx\LzxDecoder.cpp - -!IF "$(CFG)" == "Cab - Win32 Release" - -# ADD CPP /O2 -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "Cab - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Lzx\LzxDecoder.h -# End Source File -# End Group -# Begin Group "Deflate" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Compress\Deflate\DeflateConst.h -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Deflate\DeflateDecoder.cpp - -!IF "$(CFG)" == "Cab - Win32 Release" - -# ADD CPP /O2 -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "Cab - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Deflate\DeflateDecoder.h -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Deflate\DeflateExtConst.h -# End Source File -# End Group -# Begin Group "Copy" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Compress\Copy\CopyCoder.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Copy\CopyCoder.h -# End Source File -# End Group -# Begin Group "Quantum" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Compress\Quantum\QuantumDecoder.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Quantum\QuantumDecoder.h -# End Source File -# End Group -# Begin Group "Huffman" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\Compress\Huffman\HuffmanDecoder.h -# End Source File -# End Group -# End Group -# Begin Source File - -SOURCE=.\cab.ico -# End Source File -# End Target -# End Project diff --git a/CPP/7zip/Archive/Cab/Cab.dsw b/CPP/7zip/Archive/Cab/Cab.dsw deleted file mode 100755 index 470cb1b3..00000000 --- a/CPP/7zip/Archive/Cab/Cab.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Cab"=.\Cab.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/CPP/7zip/Archive/Cab/CabBlockInStream.cpp b/CPP/7zip/Archive/Cab/CabBlockInStream.cpp index b775c105..570ce058 100755 --- a/CPP/7zip/Archive/Cab/CabBlockInStream.cpp +++ b/CPP/7zip/Archive/Cab/CabBlockInStream.cpp @@ -2,7 +2,11 @@ #include "StdAfx.h" -#include "Common/Alloc.h" +extern "C" +{ +#include "../../../../C/Alloc.h" +} + #include "Common/Defs.h" #include "../../Common/StreamUtils.h" diff --git a/CPP/7zip/Archive/Cab/CabHandler.cpp b/CPP/7zip/Archive/Cab/CabHandler.cpp index cac79b11..f23484f7 100755 --- a/CPP/7zip/Archive/Cab/CabHandler.cpp +++ b/CPP/7zip/Archive/Cab/CabHandler.cpp @@ -4,7 +4,6 @@ #include "Common/StringConvert.h" #include "Common/Defs.h" -#include "Common/Alloc.h" #include "Common/UTFConvert.h" #include "Common/ComTry.h" #include "Common/IntToString.h" diff --git a/CPP/7zip/Archive/Cab/CabRegister.cpp b/CPP/7zip/Archive/Cab/CabRegister.cpp new file mode 100755 index 00000000..0ce8a87f --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabRegister.cpp @@ -0,0 +1,13 @@ +// CabRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "CabHandler.h" +static IInArchive *CreateArc() { return new NArchive::NCab::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Cab", L"cab", 0, 8, { 0x4D, 0x53, 0x43, 0x46 }, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Cab) diff --git a/CPP/7zip/Archive/Cab/DllExports.cpp b/CPP/7zip/Archive/Cab/DllExports.cpp deleted file mode 100755 index fa17f10b..00000000 --- a/CPP/7zip/Archive/Cab/DllExports.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// DLLExports.cpp - -#include "StdAfx.h" - -#include "Common/MyInitGuid.h" -#include "Common/ComTry.h" -#include "Windows/PropVariant.h" -#include "CabHandler.h" -#include "../../ICoder.h" - -// {23170F69-40C1-278A-1000-000110080000} -DEFINE_GUID(CLSID_CCabHandler, - 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x08, 0x00, 0x00); - -extern "C" -BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID) -{ - return TRUE; -} - -STDAPI CreateObject( - const GUID *classID, - const GUID *interfaceID, - void **outObject) -{ - COM_TRY_BEGIN - *outObject = 0; - if (*classID != CLSID_CCabHandler) - return CLASS_E_CLASSNOTAVAILABLE; - if (*interfaceID != IID_IInArchive) - return E_NOINTERFACE; - CMyComPtr<IInArchive> inArchive = (IInArchive *)new NArchive::NCab::CHandler; - *outObject = inArchive.Detach(); - COM_TRY_END - return S_OK; -} - -STDAPI GetHandlerProperty(PROPID propID, PROPVARIANT *value) -{ - NWindows::NCOM::CPropVariant propVariant; - switch(propID) - { - case NArchive::kName: - propVariant = L"Cab"; - break; - case NArchive::kClassID: - { - if ((value->bstrVal = ::SysAllocStringByteLen( - (const char *)&CLSID_CCabHandler, sizeof(GUID))) != 0) - value->vt = VT_BSTR; - return S_OK; - } - case NArchive::kExtension: - propVariant = L"cab"; - break; - case NArchive::kUpdate: - propVariant = false; - break; - case NArchive::kKeepName: - propVariant = false; - break; - case NArchive::kStartSignature: - { - const char sig[] = { 0x4D, 0x53, 0x43, 0x46 }; - if ((value->bstrVal = ::SysAllocStringByteLen(sig, 4)) != 0) - value->vt = VT_BSTR; - return S_OK; - } - } - propVariant.Detach(value); - return S_OK; -} diff --git a/CPP/7zip/Archive/Cab/makefile b/CPP/7zip/Archive/Cab/makefile deleted file mode 100755 index 672afed3..00000000 --- a/CPP/7zip/Archive/Cab/makefile +++ /dev/null @@ -1,70 +0,0 @@ -PROG = cab.dll -DEF_FILE = ../Archive.def -CFLAGS = $(CFLAGS) -I ../../../ -LIBS = $(LIBS) oleaut32.lib user32.lib - -CAB_OBJS = \ - $O\DllExports.obj \ - $O\CabBlockInStream.obj \ - $O\CabHandler.obj \ - $O\CabHeader.obj \ - $O\CabIn.obj \ - -COMMON_OBJS = \ - $O\Alloc.obj \ - $O\IntToString.obj \ - $O\NewHandler.obj \ - $O\String.obj \ - $O\StringConvert.obj \ - $O\StringToInt.obj \ - $O\UTFConvert.obj \ - $O\Vector.obj \ - -WIN_OBJS = \ - $O\PropVariant.obj \ - -7ZIP_COMMON_OBJS = \ - $O\InBuffer.obj \ - $O\LSBFDecoder.obj \ - $O\OutBuffer.obj \ - $O\ProgressUtils.obj \ - $O\StreamUtils.obj \ - -COMPRESS_LZX_OBJS = \ - $O\LzxDecoder.obj \ - $O\Lzx86Converter.obj \ - -OBJS = \ - $O\StdAfx.obj \ - $(CAB_OBJS) \ - $(COMMON_OBJS) \ - $(WIN_OBJS) \ - $(7ZIP_COMMON_OBJS) \ - $(COMPRESS_LZX_OBJS) \ - $O\DeflateDecoder.obj \ - $O\QuantumDecoder.obj \ - $O\LZOutWindow.obj \ - $O\CopyCoder.obj \ - $O\resource.res - -!include "../../../Build.mak" - -$(CAB_OBJS): $(*B).cpp - $(COMPL) -$(COMMON_OBJS): ../../../Common/$(*B).cpp - $(COMPL) -$(WIN_OBJS): ../../../Windows/$(*B).cpp - $(COMPL) -$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp - $(COMPL) -$(COMPRESS_LZX_OBJS): ../../Compress/Lzx/$(*B).cpp - $(COMPL_O2) -$O\DeflateDecoder.obj: ../../Compress/Deflate/$(*B).cpp - $(COMPL_O2) -$O\QuantumDecoder.obj: ../../Compress/Quantum/$(*B).cpp - $(COMPL) -$O\LZOutWindow.obj: ../../Compress/LZ/$(*B).cpp - $(COMPL) -$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp - $(COMPL) - diff --git a/CPP/7zip/Archive/Cab/resource.rc b/CPP/7zip/Archive/Cab/resource.rc deleted file mode 100755 index fa0792bd..00000000 --- a/CPP/7zip/Archive/Cab/resource.rc +++ /dev/null @@ -1,5 +0,0 @@ -#include "../../MyVersionInfo.rc" - -MY_VERSION_INFO_DLL("Cab Plugin", "cab") - -101 ICON "cab.ico" |