This commit is contained in:
Igor Pavlov
2015-06-15 00:00:00 +00:00
committed by Kornel Lesiński
parent 0713a3ab80
commit 54490d51d5
591 changed files with 34932 additions and 16390 deletions

View File

@@ -58,6 +58,11 @@ HRESULT CExtractCallbackImp::Open_SetCompleted(const UInt64 * /* numFiles */, co
#endif
}
HRESULT CExtractCallbackImp::Open_Finished()
{
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
{
#ifndef _NO_PROGRESS
@@ -83,7 +88,7 @@ void CExtractCallbackImp::CreateComplexDirectory(const UStringVector &dirPathPar
{
fullPath += us2fs(dirPathParts[i]);
CreateDir(fullPath);
fullPath += FCHAR_PATH_SEPARATOR;
fullPath.Add_PathSepar();
}
}
@@ -95,18 +100,21 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
return E_ABORT;
#endif
_outFileStream.Release();
NCOM::CPropVariant propVariantName;
RINOK(_archiveHandler->GetProperty(index, kpidPath, &propVariantName));
UString fullPath;
if (propVariantName.vt == VT_EMPTY)
fullPath = _itemDefaultName;
else
{
if (propVariantName.vt != VT_BSTR)
return E_FAIL;
fullPath = propVariantName.bstrVal;
NCOM::CPropVariant prop;
RINOK(_archiveHandler->GetProperty(index, kpidPath, &prop));
if (prop.vt == VT_EMPTY)
fullPath = _itemDefaultName;
else
{
if (prop.vt != VT_BSTR)
return E_FAIL;
fullPath.SetFromBstr(prop.bstrVal);
}
_filePath = fullPath;
}
_filePath = fullPath;
if (askExtractMode == NArchive::NExtract::NAskMode::kExtract)
{

View File

@@ -205,14 +205,6 @@ SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp
# End Source File
# Begin Source File
@@ -257,7 +249,15 @@ SOURCE=..\..\Compress\BcjRegister.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\BranchCoder.cpp
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
@@ -269,6 +269,10 @@ 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
@@ -513,14 +517,6 @@ 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\OutBuffer.cpp
# End Source File
# Begin Source File
@@ -680,6 +676,20 @@ 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
@@ -689,6 +699,11 @@ SOURCE=..\..\..\..\C\Bra86.c
# 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
@@ -698,6 +713,15 @@ SOURCE=..\..\..\..\C\CpuArch.h
# 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

View File

@@ -94,12 +94,11 @@ static bool ReadDataString(CFSTR fileName, LPCSTR startID,
}
}
static char kStartID[] = ",!@Install@!UTF-8!";
static char kEndID[] = ",!@InstallEnd@!";
static char kStartID[] = { ',','!','@','I','n','s','t','a','l','l','@','!','U','T','F','-','8','!', 0 };
static char kEndID[] = { ',','!','@','I','n','s','t','a','l','l','E','n','d','@','!', 0 };
class CInstallIDInit
struct CInstallIDInit
{
public:
CInstallIDInit()
{
kStartID[0] = ';';
@@ -147,7 +146,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
switches.Trim();
bool assumeYes = false;
if (MyStringCompareNoCase_N(switches, L"-y", 2) == 0)
if (switches.IsPrefixedBy_Ascii_NoCase("-y"))
{
assumeYes = true;
switches = switches.Ptr(2);
@@ -177,7 +176,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
UString friendlyName = GetTextConfigValue(pairs, L"Title");
UString installPrompt = GetTextConfigValue(pairs, L"BeginPrompt");
UString progress = GetTextConfigValue(pairs, L"Progress");
if (progress.IsEqualToNoCase(L"no"))
if (progress.IsEqualTo_Ascii_NoCase("no"))
showProgress = false;
int index = FindTextConfigItem(pairs, L"Directory");
if (index >= 0)
@@ -265,8 +264,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
if (!switches.IsEmpty())
{
if (!executeParameters.IsEmpty())
executeParameters += L' ';
executeParameters.Add_Space_if_NotEmpty();
executeParameters += switches;
}
@@ -315,7 +313,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
if (!switches.IsEmpty())
{
appLaunched += L' ';
appLaunched.Add_Space();
appLaunched += switches;
}
STARTUPINFO startupInfo;

View File

@@ -44,7 +44,6 @@ WIN_CTRL_OBJS = \
$O\InBuffer.obj \
$O\FilterCoder.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\PropId.obj \
@@ -68,7 +67,6 @@ FM_OBJS = \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
@@ -82,13 +80,15 @@ AR_COMMON_OBJS = \
$O\7zRegister.obj \
COMPRESS_OBJS = \
$O\BranchCoder.obj \
$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 \
@@ -96,8 +96,12 @@ COMPRESS_OBJS = \
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\Threads.obj \

View File

@@ -1,4 +1,4 @@
#include "../../../../C/7zVersion.rc"
#include "../../MyVersionInfo.rc"
#include "resource.h"
MY_VERSION_INFO_APP("7z Setup SFX", "7zS.sfx")