mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 18:07:15 -06:00
Initialer Commit
This commit is contained in:
BIN
CPP/7zip/Bundles/SFXCon/7z.ico
Normal file
BIN
CPP/7zip/Bundles/SFXCon/7z.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
869
CPP/7zip/Bundles/SFXCon/SFXCon.dsp
Normal file
869
CPP/7zip/Bundles/SFXCon/SFXCon.dsp
Normal file
@@ -0,0 +1,869 @@
|
||||
# Microsoft Developer Studio Project File - Name="SFXCon" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=SFXCon - 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 "SFXCon.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 "SFXCon.mak" CFG="SFXCon - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "SFXCon - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "SFXCon - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "SFXCon - 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 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "_SFX" /D "NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /c
|
||||
# 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 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:console /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 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:console /machine:I386 /out:"C:\Util\7zCon.exe" /opt:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "SFXCon - 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 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "_SFX" /D "NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /GZ /c
|
||||
# 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 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:console /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 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:console /debug /machine:I386 /out:"C:\Util\7zCon.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "SFXCon - Win32 Release"
|
||||
# Name "SFXCon - Win32 Debug"
|
||||
# Begin Group "Spec"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"StdAfx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Archive Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\CoderMixer2.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\CoderMixer2.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\ItemNameUtils.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\MultiStream.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\MultiStream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Console"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\ConsoleClose.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\ConsoleClose.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\ExtractCallbackConsole.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\ExtractCallbackConsole.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\List.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\List.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\MainAr.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\OpenCallbackConsole.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\OpenCallbackConsole.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\PercentPrinter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\PercentPrinter.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\UserInputUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Console\UserInputUtils.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "7z"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zDecode.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zDecode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zExtract.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zHandler.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zHandler.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zHeader.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zIn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zIn.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zItem.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\7z\7zRegister.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\SplitHandler.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Compress"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\Bcj2Coder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\Bcj2Register.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\BcjCoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\BcjRegister.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\BranchMisc.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\BranchMisc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\BranchRegister.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\CopyCoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\CopyRegister.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\DeltaFilter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\Lzma2Decoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\Lzma2Register.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\LzmaDecoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\LzmaRegister.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\PpmdDecoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Compress\PpmdRegister.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Crypto"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Crypto\7zAes.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Crypto\7zAes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Crypto\7zAesRegister.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Crypto\MyAes.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Crypto\MyAes.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Windows"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\DLL.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\DLL.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\ErrorMsg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\ErrorMsg.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileDir.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileDir.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileFind.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileFind.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileIO.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileIO.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileName.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\FileName.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariant.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariant.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariantConv.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariantConv.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\Synchronization.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\Synchronization.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CommandLineParser.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CommandLineParser.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CRC.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\CRC.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\MyString.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyString.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyVector.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\MyVector.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\StdInStream.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StdInStream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StdOutStream.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\StdOutStream.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\Wildcard.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Common\Wildcard.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "7zip Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\CreateCoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\CreateCoder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\CWrappers.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\CWrappers.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FilePathAutoRename.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FilePathAutoRename.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FileStreams.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FileStreams.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FilterCoder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\FilterCoder.h
|
||||
# End Source File
|
||||
# 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\LimitedStreams.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\LimitedStreams.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\LockedStream.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\LockedStream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\OffsetStream.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\OffsetStream.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\ProgressUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\ProgressUtils.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\PropId.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\RegisterArc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\RegisterCodec.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamBinder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamBinder.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamObjects.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamObjects.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\StreamUtils.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\VirtThread.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Common\VirtThread.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "UI"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Group "UI Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ArchiveExtractCallback.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ArchiveExtractCallback.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\DefaultName.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\DefaultName.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ExitCode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\Extract.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\Extract.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ExtractingFilePath.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ExtractingFilePath.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\ExtractMode.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\LoadCodecs.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\LoadCodecs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\OpenArchive.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\OpenArchive.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\PropIDUtils.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\UI\Common\PropIDUtils.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Group
|
||||
# Begin Group "C"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\7zCrc.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\7zCrc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\7zCrcOpt.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Aes.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Aes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\AesOpt.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Alloc.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Alloc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Bcj2.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Bcj2.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Bra.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Bra.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Bra86.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\BraIA64.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\CpuArch.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Delta.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Delta.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Lzma2Dec.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Lzma2Dec.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\LzmaDec.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\LzmaDec.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Ppmd7.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Ppmd7.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Ppmd7Dec.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Sha256.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Sha256.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Threads.c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\..\C\Threads.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\7z.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\Archive\IArchive.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SfxCon.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
29
CPP/7zip/Bundles/SFXCon/SFXCon.dsw
Normal file
29
CPP/7zip/Bundles/SFXCon/SFXCon.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "SFXCon"=.\SFXCon.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
461
CPP/7zip/Bundles/SFXCon/SfxCon.cpp
Normal file
461
CPP/7zip/Bundles/SFXCon/SfxCon.cpp
Normal file
@@ -0,0 +1,461 @@
|
||||
// Main.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
|
||||
#include "../../../Common/MyInitGuid.h"
|
||||
|
||||
#include "../../../Common/CommandLineParser.h"
|
||||
#include "../../../Common/MyException.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../../../Windows/DLL.h"
|
||||
#include "../../../Windows/FileDir.h"
|
||||
#endif
|
||||
#include "../../../Windows/FileName.h"
|
||||
|
||||
#include "../../UI/Common/ExitCode.h"
|
||||
#include "../../UI/Common/Extract.h"
|
||||
|
||||
#include "../../UI/Console/ExtractCallbackConsole.h"
|
||||
#include "../../UI/Console/List.h"
|
||||
#include "../../UI/Console/OpenCallbackConsole.h"
|
||||
|
||||
#include "../../MyVersion.h"
|
||||
|
||||
using namespace NWindows;
|
||||
using namespace NFile;
|
||||
using namespace NDir;
|
||||
using namespace NCommandLineParser;
|
||||
|
||||
#ifdef _WIN32
|
||||
HINSTANCE g_hInstance = 0;
|
||||
#endif
|
||||
int g_CodePage = -1;
|
||||
extern CStdOutStream *g_StdStream;
|
||||
|
||||
static const char *kCopyrightString =
|
||||
"\n7-Zip SFX " MY_VERSION_COPYRIGHT_DATE "\n";
|
||||
|
||||
static const int kNumSwitches = 6;
|
||||
|
||||
namespace NKey {
|
||||
enum Enum
|
||||
{
|
||||
kHelp1 = 0,
|
||||
kHelp2,
|
||||
kDisablePercents,
|
||||
kYes,
|
||||
kPassword,
|
||||
kOutputDir
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace NRecursedType {
|
||||
enum EEnum
|
||||
{
|
||||
kRecursed,
|
||||
kWildcardOnlyRecursed,
|
||||
kNonRecursed
|
||||
};
|
||||
}
|
||||
/*
|
||||
static const char kRecursedIDChar = 'R';
|
||||
static const wchar_t *kRecursedPostCharSet = L"0-";
|
||||
|
||||
namespace NRecursedPostCharIndex {
|
||||
enum EEnum
|
||||
{
|
||||
kWildcardRecursionOnly = 0,
|
||||
kNoRecursion = 1
|
||||
};
|
||||
}
|
||||
|
||||
static const char kFileListID = '@';
|
||||
static const char kImmediateNameID = '!';
|
||||
|
||||
static const char kSomeCludePostStringMinSize = 2; // at least <@|!><N>ame must be
|
||||
static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!><N>ame must be
|
||||
*/
|
||||
static const CSwitchForm kSwitchForms[kNumSwitches] =
|
||||
{
|
||||
{ "?", NSwitchType::kSimple },
|
||||
{ "H", NSwitchType::kSimple },
|
||||
{ "BD", NSwitchType::kSimple },
|
||||
{ "Y", NSwitchType::kSimple },
|
||||
{ "P", NSwitchType::kString, false, 1 },
|
||||
{ "O", NSwitchType::kString, false, 1 },
|
||||
};
|
||||
|
||||
static const int kNumCommandForms = 3;
|
||||
|
||||
static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
|
||||
{
|
||||
NRecursedType::kRecursed
|
||||
};
|
||||
|
||||
// static const bool kTestExtractRecursedDefault = true;
|
||||
// static const bool kAddRecursedDefault = false;
|
||||
|
||||
static const wchar_t *kUniversalWildcard = L"*";
|
||||
static const int kCommandIndex = 0;
|
||||
|
||||
static const char *kHelpString =
|
||||
"\nUsage: 7zSFX [<command>] [<switches>...]\n"
|
||||
"\n"
|
||||
"<Commands>\n"
|
||||
// " l: List contents of archive\n"
|
||||
" t: Test integrity of archive\n"
|
||||
" x: eXtract files with full pathname (default)\n"
|
||||
"<Switches>\n"
|
||||
// " -bd Disable percentage indicator\n"
|
||||
" -o{Directory}: set Output directory\n"
|
||||
" -p{Password}: set Password\n"
|
||||
" -y: assume Yes on all queries\n";
|
||||
|
||||
|
||||
// ---------------------------
|
||||
// exception messages
|
||||
|
||||
static const char *kUserErrorMessage = "Incorrect command line"; // NExitCode::kUserError
|
||||
// static const char *kIncorrectListFile = "Incorrect wildcard in listfile";
|
||||
static const char *kIncorrectWildcardInCommandLine = "Incorrect wildcard in command line";
|
||||
|
||||
// static const CSysString kFileIsNotArchiveMessageBefore = "File \"";
|
||||
// static const CSysString kFileIsNotArchiveMessageAfter = "\" is not archive";
|
||||
|
||||
// static const char *kProcessArchiveMessage = " archive: ";
|
||||
|
||||
static const char *kCantFindSFX = " cannot find sfx";
|
||||
|
||||
namespace NCommandType
|
||||
{
|
||||
enum EEnum
|
||||
{
|
||||
kTest = 0,
|
||||
kFullExtract,
|
||||
kList
|
||||
};
|
||||
}
|
||||
|
||||
static const char *g_Commands = "txl";
|
||||
|
||||
struct CArchiveCommand
|
||||
{
|
||||
NCommandType::EEnum CommandType;
|
||||
|
||||
NRecursedType::EEnum DefaultRecursedType() const;
|
||||
};
|
||||
|
||||
bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
|
||||
{
|
||||
UString s = commandString;
|
||||
s.MakeLower_Ascii();
|
||||
if (s.Len() != 1)
|
||||
return false;
|
||||
if (s[0] >= 0x80)
|
||||
return false;
|
||||
int index = FindCharPosInString(g_Commands, (char)s[0]);
|
||||
if (index < 0)
|
||||
return false;
|
||||
command.CommandType = (NCommandType::EEnum)index;
|
||||
return true;
|
||||
}
|
||||
|
||||
NRecursedType::EEnum CArchiveCommand::DefaultRecursedType() const
|
||||
{
|
||||
return kCommandRecursedDefault[CommandType];
|
||||
}
|
||||
|
||||
void PrintHelp(void)
|
||||
{
|
||||
g_StdOut << kHelpString;
|
||||
}
|
||||
|
||||
static void ShowMessageAndThrowException(const char *message, NExitCode::EEnum code)
|
||||
{
|
||||
g_StdOut << message << endl;
|
||||
throw code;
|
||||
}
|
||||
|
||||
static void PrintHelpAndExit() // yyy
|
||||
{
|
||||
PrintHelp();
|
||||
ShowMessageAndThrowException(kUserErrorMessage, NExitCode::kUserError);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// filenames functions
|
||||
|
||||
static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
|
||||
const UString &name, bool include, NRecursedType::EEnum type)
|
||||
{
|
||||
/*
|
||||
if (!IsWildcardFilePathLegal(name))
|
||||
return false;
|
||||
*/
|
||||
bool isWildcard = DoesNameContainWildcard(name);
|
||||
bool recursed = false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case NRecursedType::kWildcardOnlyRecursed:
|
||||
recursed = isWildcard;
|
||||
break;
|
||||
case NRecursedType::kRecursed:
|
||||
recursed = true;
|
||||
break;
|
||||
case NRecursedType::kNonRecursed:
|
||||
recursed = false;
|
||||
break;
|
||||
}
|
||||
wildcardCensor.AddPreItem(include, name, recursed, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddCommandLineWildcardToCensor(NWildcard::CCensor &wildcardCensor,
|
||||
const UString &name, bool include, NRecursedType::EEnum type)
|
||||
{
|
||||
if (!AddNameToCensor(wildcardCensor, name, include, type))
|
||||
ShowMessageAndThrowException(kIncorrectWildcardInCommandLine, NExitCode::kUserError);
|
||||
}
|
||||
|
||||
void AddToCensorFromNonSwitchesStrings(NWildcard::CCensor &wildcardCensor,
|
||||
const UStringVector & /* nonSwitchStrings */, NRecursedType::EEnum type,
|
||||
bool /* thereAreSwitchIncludeWildcards */)
|
||||
{
|
||||
AddCommandLineWildcardToCensor(wildcardCensor, kUniversalWildcard, true, type);
|
||||
}
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
static void GetArguments(int numArgs, const char *args[], UStringVector &parts)
|
||||
{
|
||||
parts.Clear();
|
||||
for (int i = 0; i < numArgs; i++)
|
||||
{
|
||||
UString s = MultiByteToUnicodeString(args[i]);
|
||||
parts.Add(s);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int Main2(
|
||||
#ifndef _WIN32
|
||||
int numArgs, const char *args[]
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||
SetFileApisToOEM();
|
||||
#endif
|
||||
|
||||
g_StdOut << kCopyrightString;
|
||||
|
||||
UStringVector commandStrings;
|
||||
#ifdef _WIN32
|
||||
NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
|
||||
#else
|
||||
GetArguments(numArgs, args, commandStrings);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
FString arcPath;
|
||||
{
|
||||
FString path;
|
||||
NDLL::MyGetModuleFileName(path);
|
||||
if (!MyGetFullPathName(path, arcPath))
|
||||
{
|
||||
g_StdOut << "GetFullPathName Error";
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
UString arcPath = commandStrings.Front();
|
||||
|
||||
#endif
|
||||
|
||||
commandStrings.Delete(0);
|
||||
|
||||
NCommandLineParser::CParser parser(kNumSwitches);
|
||||
try
|
||||
{
|
||||
parser.ParseStrings(kSwitchForms, commandStrings);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
PrintHelpAndExit();
|
||||
}
|
||||
|
||||
if (parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs)
|
||||
{
|
||||
PrintHelp();
|
||||
return 0;
|
||||
}
|
||||
const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
|
||||
|
||||
int numNonSwitchStrings = nonSwitchStrings.Size();
|
||||
|
||||
CArchiveCommand command;
|
||||
if (numNonSwitchStrings == 0)
|
||||
command.CommandType = NCommandType::kFullExtract;
|
||||
else
|
||||
{
|
||||
if (numNonSwitchStrings > 1)
|
||||
PrintHelpAndExit();
|
||||
if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], command))
|
||||
PrintHelpAndExit();
|
||||
}
|
||||
|
||||
|
||||
NRecursedType::EEnum recursedType;
|
||||
recursedType = command.DefaultRecursedType();
|
||||
|
||||
NWildcard::CCensor wildcardCensor;
|
||||
|
||||
bool thereAreSwitchIncludeWildcards;
|
||||
thereAreSwitchIncludeWildcards = false;
|
||||
|
||||
AddToCensorFromNonSwitchesStrings(wildcardCensor, nonSwitchStrings, recursedType,
|
||||
thereAreSwitchIncludeWildcards);
|
||||
|
||||
bool yesToAll = parser[NKey::kYes].ThereIs;
|
||||
|
||||
// NExtractMode::EEnum extractMode;
|
||||
// bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode);
|
||||
|
||||
bool passwordEnabled = parser[NKey::kPassword].ThereIs;
|
||||
|
||||
UString password;
|
||||
if (passwordEnabled)
|
||||
password = parser[NKey::kPassword].PostStrings[0];
|
||||
|
||||
if (!NFind::DoesFileExist(arcPath))
|
||||
throw kCantFindSFX;
|
||||
|
||||
FString outputDir;
|
||||
if (parser[NKey::kOutputDir].ThereIs)
|
||||
{
|
||||
outputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
|
||||
NName::NormalizeDirPathPrefix(outputDir);
|
||||
}
|
||||
|
||||
|
||||
wildcardCensor.AddPathsToCensor(NWildcard::k_RelatPath);
|
||||
|
||||
{
|
||||
UStringVector v1, v2;
|
||||
v1.Add(fs2us(arcPath));
|
||||
v2.Add(fs2us(arcPath));
|
||||
const NWildcard::CCensorNode &wildcardCensorHead =
|
||||
wildcardCensor.Pairs.Front().Head;
|
||||
|
||||
CCodecs *codecs = new CCodecs;
|
||||
CMyComPtr<
|
||||
#ifdef EXTERNAL_CODECS
|
||||
ICompressCodecsInfo
|
||||
#else
|
||||
IUnknown
|
||||
#endif
|
||||
> compressCodecsInfo = codecs;
|
||||
{
|
||||
HRESULT result = codecs->Load();
|
||||
if (result != S_OK)
|
||||
throw CSystemException(result);
|
||||
}
|
||||
|
||||
if (command.CommandType != NCommandType::kList)
|
||||
{
|
||||
CExtractCallbackConsole *ecs = new CExtractCallbackConsole;
|
||||
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
|
||||
ecs->Init(g_StdStream, &g_StdErr, g_StdStream);
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
ecs->PasswordIsDefined = passwordEnabled;
|
||||
ecs->Password = password;
|
||||
#endif
|
||||
|
||||
/*
|
||||
COpenCallbackConsole openCallback;
|
||||
openCallback.Init(g_StdStream, g_StdStream);
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
openCallback.PasswordIsDefined = passwordEnabled;
|
||||
openCallback.Password = password;
|
||||
#endif
|
||||
*/
|
||||
|
||||
CExtractOptions eo;
|
||||
eo.StdOutMode = false;
|
||||
eo.YesToAll = yesToAll;
|
||||
eo.TestMode = command.CommandType == NCommandType::kTest;
|
||||
eo.PathMode = NExtract::NPathMode::kFullPaths;
|
||||
eo.OverwriteMode = yesToAll ?
|
||||
NExtract::NOverwriteMode::kOverwrite :
|
||||
NExtract::NOverwriteMode::kAsk;
|
||||
eo.OutputDir = outputDir;
|
||||
|
||||
UString errorMessage;
|
||||
CDecompressStat stat;
|
||||
HRESULT result = Extract(
|
||||
codecs, CObjectVector<COpenType>(), CIntVector(),
|
||||
v1, v2,
|
||||
wildcardCensorHead,
|
||||
eo, ecs, ecs,
|
||||
// NULL, // hash
|
||||
errorMessage, stat);
|
||||
if (!errorMessage.IsEmpty())
|
||||
{
|
||||
(*g_StdStream) << endl << "Error: " << errorMessage;;
|
||||
if (result == S_OK)
|
||||
result = E_FAIL;
|
||||
}
|
||||
|
||||
if (ecs->NumArcsWithError != 0 || ecs->NumFileErrors != 0)
|
||||
{
|
||||
if (ecs->NumArcsWithError != 0)
|
||||
(*g_StdStream) << endl << "Archive Errors" << endl;
|
||||
if (ecs->NumFileErrors != 0)
|
||||
(*g_StdStream) << endl << "Sub items Errors: " << ecs->NumFileErrors << endl;
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
if (result != S_OK)
|
||||
throw CSystemException(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw CSystemException(E_NOTIMPL);
|
||||
|
||||
/*
|
||||
UInt64 numErrors = 0;
|
||||
UInt64 numWarnings = 0;
|
||||
HRESULT result = ListArchives(
|
||||
codecs, CObjectVector<COpenType>(), CIntVector(),
|
||||
false, // stdInMode
|
||||
v1, v2,
|
||||
true, // processAltStreams
|
||||
false, // showAltStreams
|
||||
wildcardCensorHead,
|
||||
true, // enableHeaders
|
||||
false, // techMode
|
||||
#ifndef _NO_CRYPTO
|
||||
passwordEnabled, password,
|
||||
#endif
|
||||
numErrors, numWarnings);
|
||||
if (numErrors > 0)
|
||||
{
|
||||
g_StdOut << endl << "Errors: " << numErrors;
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
if (result != S_OK)
|
||||
throw CSystemException(result);
|
||||
*/
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
3
CPP/7zip/Bundles/SFXCon/StdAfx.cpp
Normal file
3
CPP/7zip/Bundles/SFXCon/StdAfx.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
// StdAfx.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
8
CPP/7zip/Bundles/SFXCon/StdAfx.h
Normal file
8
CPP/7zip/Bundles/SFXCon/StdAfx.h
Normal file
@@ -0,0 +1,8 @@
|
||||
// StdAfx.h
|
||||
|
||||
#ifndef __STDAFX_H
|
||||
#define __STDAFX_H
|
||||
|
||||
#include "../../../Common/Common.h"
|
||||
|
||||
#endif
|
||||
136
CPP/7zip/Bundles/SFXCon/makefile
Normal file
136
CPP/7zip/Bundles/SFXCon/makefile
Normal file
@@ -0,0 +1,136 @@
|
||||
PROG = 7zCon.sfx
|
||||
MY_CONSOLE = 1
|
||||
CFLAGS = $(CFLAGS) \
|
||||
-DEXTRACT_ONLY \
|
||||
-DNO_READ_FROM_CODER \
|
||||
-D_SFX \
|
||||
|
||||
CURRENT_OBJS = \
|
||||
$O\SfxCon.obj \
|
||||
|
||||
CONSOLE_OBJS = \
|
||||
$O\ConsoleClose.obj \
|
||||
$O\ExtractCallbackConsole.obj \
|
||||
$O\List.obj \
|
||||
$O\MainAr.obj \
|
||||
$O\OpenCallbackConsole.obj \
|
||||
$O\PercentPrinter.obj \
|
||||
$O\UserInputUtils.obj \
|
||||
|
||||
COMMON_OBJS = \
|
||||
$O\CommandLineParser.obj \
|
||||
$O\CRC.obj \
|
||||
$O\IntToString.obj \
|
||||
$O\MyString.obj \
|
||||
$O\MyVector.obj \
|
||||
$O\NewHandler.obj \
|
||||
$O\StdInStream.obj \
|
||||
$O\StdOutStream.obj \
|
||||
$O\StringConvert.obj \
|
||||
$O\Wildcard.obj \
|
||||
$O\UTFConvert.obj \
|
||||
|
||||
WIN_OBJS = \
|
||||
$O\DLL.obj \
|
||||
$O\ErrorMsg.obj \
|
||||
$O\FileDir.obj \
|
||||
$O\FileFind.obj \
|
||||
$O\FileIO.obj \
|
||||
$O\FileName.obj \
|
||||
$O\PropVariant.obj \
|
||||
$O\PropVariantConv.obj \
|
||||
$O\Synchronization.obj \
|
||||
|
||||
7ZIP_COMMON_OBJS = \
|
||||
$O\CreateCoder.obj \
|
||||
$O\CWrappers.obj \
|
||||
$O\FilePathAutoRename.obj \
|
||||
$O\FileStreams.obj \
|
||||
$O\InBuffer.obj \
|
||||
$O\FilterCoder.obj \
|
||||
$O\LimitedStreams.obj \
|
||||
$O\OutBuffer.obj \
|
||||
$O\ProgressUtils.obj \
|
||||
$O\PropId.obj \
|
||||
$O\StreamBinder.obj \
|
||||
$O\StreamObjects.obj \
|
||||
$O\StreamUtils.obj \
|
||||
$O\VirtThread.obj \
|
||||
|
||||
UI_COMMON_OBJS = \
|
||||
$O\ArchiveExtractCallback.obj \
|
||||
$O\ArchiveOpenCallback.obj \
|
||||
$O\DefaultName.obj \
|
||||
$O\LoadCodecs.obj \
|
||||
$O\Extract.obj \
|
||||
$O\ExtractingFilePath.obj \
|
||||
$O\OpenArchive.obj \
|
||||
$O\PropIDUtils.obj \
|
||||
|
||||
AR_OBJS = \
|
||||
$O\SplitHandler.obj \
|
||||
|
||||
AR_COMMON_OBJS = \
|
||||
$O\CoderMixer2.obj \
|
||||
$O\ItemNameUtils.obj \
|
||||
$O\MultiStream.obj \
|
||||
$O\OutStreamWithCRC.obj \
|
||||
|
||||
|
||||
7Z_OBJS = \
|
||||
$O\7zDecode.obj \
|
||||
$O\7zExtract.obj \
|
||||
$O\7zHandler.obj \
|
||||
$O\7zIn.obj \
|
||||
$O\7zRegister.obj \
|
||||
|
||||
COMPRESS_OBJS = \
|
||||
$O\Bcj2Coder.obj \
|
||||
$O\Bcj2Register.obj \
|
||||
$O\BcjCoder.obj \
|
||||
$O\BcjRegister.obj \
|
||||
$O\BranchMisc.obj \
|
||||
$O\BranchRegister.obj \
|
||||
$O\CopyCoder.obj \
|
||||
$O\CopyRegister.obj \
|
||||
$O\DeltaFilter.obj \
|
||||
$O\Lzma2Decoder.obj \
|
||||
$O\Lzma2Register.obj \
|
||||
$O\LzmaDecoder.obj \
|
||||
$O\LzmaRegister.obj \
|
||||
$O\PpmdDecoder.obj \
|
||||
$O\PpmdRegister.obj \
|
||||
$O\ZstdDecoder.obj \
|
||||
$O\ZStdRegister.obj \
|
||||
|
||||
CRYPTO_OBJS = \
|
||||
$O\7zAes.obj \
|
||||
$O\7zAesRegister.obj \
|
||||
$O\MyAes.obj \
|
||||
|
||||
C_OBJS = \
|
||||
$O\Alloc.obj \
|
||||
$O\Bcj2.obj \
|
||||
$O\Bra.obj \
|
||||
$O\Bra86.obj \
|
||||
$O\BraIA64.obj \
|
||||
$O\CpuArch.obj \
|
||||
$O\Delta.obj \
|
||||
$O\Lzma2Dec.obj \
|
||||
$O\LzmaDec.obj \
|
||||
$O\Ppmd7.obj \
|
||||
$O\Ppmd7Dec.obj \
|
||||
$O\Sha256.obj \
|
||||
$O\Threads.obj \
|
||||
|
||||
ZSTD_OBJS = \
|
||||
$O\entropy_common.obj \
|
||||
$O\fse_decompress.obj \
|
||||
$O\huf_decompress.obj \
|
||||
$O\zbuff_decompress.obj \
|
||||
$O\zstd_common.obj \
|
||||
$O\zstd_decompress.obj \
|
||||
|
||||
!include "../../Aes.mak"
|
||||
!include "../../Crc.mak"
|
||||
!include "../../7zip.mak"
|
||||
5
CPP/7zip/Bundles/SFXCon/resource.rc
Normal file
5
CPP/7zip/Bundles/SFXCon/resource.rc
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "../../MyVersionInfo.rc"
|
||||
|
||||
MY_VERSION_INFO_APP("7z Console SFX", "7z.sfx")
|
||||
|
||||
101 ICON "7z.ico"
|
||||
Reference in New Issue
Block a user