This commit is contained in:
Igor Pavlov
2003-12-11 00:00:00 +00:00
committed by Kornel Lesiński
commit 8c1b5c7b7e
982 changed files with 118799 additions and 0 deletions

View File

@@ -0,0 +1,266 @@
// ExtractCallback.h
#include "StdAfx.h"
#include "ExtractCallback.h"
#include "Common/Wildcard.h"
#include "Common/StringConvert.h"
#include "Windows/COM.h"
#include "Windows/FileDir.h"
#include "Windows/FileFind.h"
#include "Windows/Time.h"
#include "Windows/Defs.h"
#include "Windows/PropVariant.h"
#include "Windows/PropVariantConversions.h"
using namespace NWindows;
using namespace NFile;
static LPCWSTR kErrorTitle = L"7-Zip";
static LPCWSTR kCantDeleteFile = L"Can not delete output file";
static LPCWSTR kCantOpenFile = L"Can not open output file";
static LPCWSTR kUnsupportedMethod = L"Unsupported Method";
static LPCWSTR kCRCFailed = L"CRC Failed";
static LPCWSTR kDataError = L"Data Error";
// static LPCTSTR kUnknownError = TEXT("Unknown Error");
void CExtractCallbackImp::Init(IInArchive *archiveHandler,
const UString &directoryPath,
const UString &itemDefaultName,
const FILETIME &utcLastWriteTimeDefault,
UINT32 attributesDefault)
{
_numErrors = 0;
_itemDefaultName = itemDefaultName;
_utcLastWriteTimeDefault = utcLastWriteTimeDefault;
_attributesDefault = attributesDefault;
_archiveHandler = archiveHandler;
_directoryPath = directoryPath;
NName::NormalizeDirPathPrefix(_directoryPath);
}
STDMETHODIMP CExtractCallbackImp::SetTotal(UINT64 size)
{
#ifndef _NO_PROGRESS
ProgressDialog.ProgressSynch.SetProgress(size, 0);
#endif
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::SetCompleted(const UINT64 *completeValue)
{
#ifndef _NO_PROGRESS
while(true)
{
if(ProgressDialog.ProgressSynch.GetStopped())
return E_ABORT;
if(!ProgressDialog.ProgressSynch.GetPaused())
break;
::Sleep(100);
}
if (completeValue != NULL)
ProgressDialog.ProgressSynch.SetPos(*completeValue);
#endif
return S_OK;
}
void CExtractCallbackImp::CreateComplexDirectory(const UStringVector &dirPathParts)
{
UString fullPath = _directoryPath;
for(int i = 0; i < dirPathParts.Size(); i++)
{
fullPath += dirPathParts[i];
NDirectory::MyCreateDirectory(fullPath);
fullPath += NName::kDirDelimiter;
}
}
STDMETHODIMP CExtractCallbackImp::GetStream(UINT32 index,
ISequentialOutStream **outStream, INT32 askExtractMode)
{
#ifndef _NO_PROGRESS
if(ProgressDialog.ProgressSynch.GetStopped())
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;
}
_filePath = fullPath;
// m_CurrentFilePath = GetSystemString(fullPath, _codePage);
if(askExtractMode == NArchive::NExtract::NAskMode::kExtract)
{
NCOM::CPropVariant propVariant;
RINOK(_archiveHandler->GetProperty(index, kpidAttributes, &propVariant));
if (propVariant.vt == VT_EMPTY)
_processedFileInfo.Attributes = _attributesDefault;
else
{
if (propVariant.vt != VT_UI4)
return E_FAIL;
_processedFileInfo.Attributes = propVariant.ulVal;
}
RINOK(_archiveHandler->GetProperty(index, kpidIsFolder, &propVariant));
_processedFileInfo.IsDirectory = VARIANT_BOOLToBool(propVariant.boolVal);
bool isAnti = false;
{
NCOM::CPropVariant propVariantTemp;
RINOK(_archiveHandler->GetProperty(index, kpidIsAnti,
&propVariantTemp));
if (propVariantTemp.vt == VT_BOOL)
isAnti = VARIANT_BOOLToBool(propVariantTemp.boolVal);
}
RINOK(_archiveHandler->GetProperty(index, kpidLastWriteTime, &propVariant));
switch(propVariant.vt)
{
case VT_EMPTY:
_processedFileInfo.UTCLastWriteTime = _utcLastWriteTimeDefault;
break;
case VT_FILETIME:
_processedFileInfo.UTCLastWriteTime = propVariant.filetime;
break;
default:
return E_FAIL;
}
UStringVector pathParts;
SplitPathToParts(fullPath, pathParts);
if(pathParts.IsEmpty())
return E_FAIL;
UString processedPath = fullPath;
if(!_processedFileInfo.IsDirectory)
pathParts.DeleteBack();
if (!pathParts.IsEmpty())
{
if (!isAnti)
CreateComplexDirectory(pathParts);
}
UString fullProcessedPath = _directoryPath + processedPath;
if(_processedFileInfo.IsDirectory)
{
_diskFilePath = fullProcessedPath;
if (isAnti)
NDirectory::MyRemoveDirectory(_diskFilePath);
return S_OK;
}
NFind::CFileInfoW fileInfo;
if(NFind::FindFile(fullProcessedPath, fileInfo))
{
if (!NDirectory::DeleteFileAlways(fullProcessedPath))
{
#ifdef _SILENT
_message = kCantDeleteFile;
#else
MessageBoxW(0, kCantDeleteFile, kErrorTitle, 0);
#endif
// g_StdOut << GetOemString(fullProcessedPath);
// return E_ABORT;
return E_ABORT;
}
}
if (!isAnti)
{
_outFileStreamSpec = new COutFileStream;
CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
if (!_outFileStreamSpec->Open(fullProcessedPath))
{
#ifdef _SILENT
_message = kCantOpenFile;
#else
MessageBoxW(0, kCantOpenFile, kErrorTitle, 0);
#endif
return E_ABORT;
}
_outFileStream = outStreamLoc;
*outStream = outStreamLoc.Detach();
}
_diskFilePath = fullProcessedPath;
}
else
{
*outStream = NULL;
}
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::PrepareOperation(INT32 askExtractMode)
{
_extractMode = false;
switch (askExtractMode)
{
case NArchive::NExtract::NAskMode::kExtract:
_extractMode = true;
break;
};
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::SetOperationResult(INT32 resultEOperationResult)
{
switch(resultEOperationResult)
{
case NArchive::NExtract::NOperationResult::kOK:
{
break;
}
default:
{
_numErrors++;
UString errorMessage;
_outFileStream.Release();
switch(resultEOperationResult)
{
case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
errorMessage = kUnsupportedMethod;
break;
case NArchive::NExtract::NOperationResult::kCRCError:
errorMessage = kCRCFailed;
break;
case NArchive::NExtract::NOperationResult::kDataError:
errorMessage = kDataError;
break;
/*
default:
errorMessage = kUnknownError;
*/
}
#ifdef _SILENT
_message = errorMessage;
#else
MessageBoxW(0, errorMessage, kErrorTitle, 0);
#endif
return E_FAIL;
}
}
if(_outFileStream != NULL)
_outFileStreamSpec->File.SetLastWriteTime(&_processedFileInfo.UTCLastWriteTime);
_outFileStream.Release();
if (_extractMode)
NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attributes);
return S_OK;
}

View File

@@ -0,0 +1,105 @@
// ExtractCallback.h
#pragma once
#ifndef __EXTRACTCALLBACK_H
#define __EXTRACTCALLBACK_H
#include "resource.h"
#include "Common/String.h"
#include "Windows/ResourceString.h"
#include "../../Archive/IArchive.h"
#include "../../Common/FileStreams.h"
// #include "../../Common/ZipSettings.h"
#include "../../ICoder.h"
#ifndef _NO_PROGRESS
#include "../../FileManager/Resource/ProgressDialog/ProgressDialog.h"
#endif
// #include "../../Explorer/MyMessages.h"
class CExtractCallbackImp:
public IArchiveExtractCallback,
public CMyUnknownImp
{
public:
MY_UNKNOWN_IMP
// IProgress
STDMETHOD(SetTotal)(UINT64 size);
STDMETHOD(SetCompleted)(const UINT64 *completeValue);
// IExtractCallback
STDMETHOD(GetStream)(UINT32 index, ISequentialOutStream **outStream,
INT32 askExtractMode);
STDMETHOD(PrepareOperation)(INT32 askExtractMode);
STDMETHOD(SetOperationResult)(INT32 resultEOperationResult);
private:
CMyComPtr<IInArchive> _archiveHandler;
UString _directoryPath;
UString _filePath;
UString _diskFilePath;
bool _extractMode;
struct CProcessedFileInfo
{
FILETIME UTCLastWriteTime;
bool IsDirectory;
UINT32 Attributes;
} _processedFileInfo;
COutFileStream *_outFileStreamSpec;
CMyComPtr<ISequentialOutStream> _outFileStream;
UString _itemDefaultName;
FILETIME _utcLastWriteTimeDefault;
UINT32 _attributesDefault;
void CreateComplexDirectory(const UStringVector &dirPathParts);
public:
#ifndef _NO_PROGRESS
CProgressDialog ProgressDialog;
#endif
#ifdef _SILENT
UString _message;
#endif
void Init(IInArchive *archiveHandler,
const UString &directoryPath,
const UString &itemDefaultName,
const FILETIME &utcLastWriteTimeDefault,
UINT32 attributesDefault);
UINT64 _numErrors;
#ifndef _NO_PROGRESS
HRESULT StartProgressDialog(const UString &title)
{
ProgressDialog.Create(title, 0);
{
#ifdef LANG
ProgressDialog.SetText(LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890));
#else
ProgressDialog.SetText(NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING));
#endif
}
ProgressDialog.Show(SW_SHOWNORMAL);
// _progressDialog.Start(m_ParentWindow, PROGDLG_MODAL | PROGDLG_AUTOTIME);
return S_OK;
}
~CExtractCallbackImp() { ProgressDialog.Destroy(); }
#endif
};
#endif

View File

@@ -0,0 +1,150 @@
// ExtractEngine.h
#include "StdAfx.h"
#include "ExtractEngine.h"
#include "Common/StringConvert.h"
#include "Windows/FileDir.h"
#include "Windows/FileFind.h"
#include "Windows/Thread.h"
#include "../../UI/Common/OpenArchive.h"
#include "../../UI/Explorer/MyMessages.h"
#include "../../FileManager/FormatUtils.h"
#include "ExtractCallback.h"
using namespace NWindows;
struct CThreadExtracting
{
CMyComPtr<IInArchive> ArchiveHandler;
CExtractCallbackImp *ExtractCallbackSpec;
CMyComPtr<IArchiveExtractCallback> ExtractCallback;
#ifndef _NO_PROGRESS
HRESULT Result;
DWORD Process()
{
ExtractCallbackSpec->ProgressDialog.WaitCreating();
Result = ArchiveHandler->Extract(0, (UINT32)-1 , BoolToInt(false),
ExtractCallback);
ExtractCallbackSpec->ProgressDialog.MyClose();
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
{
return ((CThreadExtracting *)param)->Process();
}
#endif
};
static const LPCTSTR kCantFindArchive = TEXT("Can not find archive file");
static const LPCTSTR kCantOpenArchive = TEXT("File is not correct archive");
HRESULT ExtractArchive(
const UString &fileName,
const UString &folderName
#ifdef _SILENT
, UString &resultMessage
#endif
)
{
NFile::NFind::CFileInfoW archiveFileInfo;
if (!NFile::NFind::FindFile(fileName, archiveFileInfo))
{
#ifndef _SILENT
MessageBox(0, kCantFindArchive, TEXT("7-Zip"), 0);
#else
resultMessage = kCantFindArchive;
#endif
return E_FAIL;
}
CThreadExtracting extracter;
CArchiverInfo archiverInfoResult;
int subExtIndex;
HRESULT result = OpenArchive(fileName, &extracter.ArchiveHandler,
archiverInfoResult, subExtIndex, NULL);
if (result != S_OK)
{
#ifdef _SILENT
resultMessage = kCantOpenArchive;
#endif
return E_FAIL;
}
UString directoryPath = folderName;
NFile::NName::NormalizeDirPathPrefix(directoryPath);
/*
UString directoryPath;
{
UString aFullPath;
int aFileNamePartStartIndex;
if (!NWindows::NFile::NDirectory::MyGetFullPathName(fileName, aFullPath, aFileNamePartStartIndex))
{
MessageBox(NULL, "Error 1329484", "7-Zip", 0);
return E_FAIL;
}
directoryPath = aFullPath.Left(aFileNamePartStartIndex);
}
*/
if(!NFile::NDirectory::CreateComplexDirectory(directoryPath))
{
#ifndef _SILENT
MyMessageBox(MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
#ifdef LANG
0x02000603,
#endif
directoryPath));
#else
resultMessage = TEXT("Can not create output folder");
#endif
return E_FAIL;
}
extracter.ExtractCallbackSpec = new CExtractCallbackImp;
extracter.ExtractCallback = extracter.ExtractCallbackSpec;
// anExtractCallBackSpec->StartProgressDialog();
// anExtractCallBackSpec->m_ProgressDialog.ShowWindow(SW_SHOWNORMAL);
extracter.ExtractCallbackSpec->Init(extracter.ArchiveHandler,
directoryPath, L"Default", archiveFileInfo.LastWriteTime, 0);
#ifndef _NO_PROGRESS
CThread thread;
if (!thread.Create(CThreadExtracting::MyThreadFunction, &extracter))
throw 271824;
UString title;
#ifdef LANG
title = LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890);
#else
title = NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING);
#endif
extracter.ExtractCallbackSpec->StartProgressDialog(title);
return extracter.Result;
#else
result = extracter.ArchiveHandler->Extract(0, (UINT32)-1,
BoolToInt(false), extracter.ExtractCallback);
#ifdef _SILENT
resultMessage = extracter.ExtractCallbackSpec->_message;
#endif
return result;
#endif
}

View File

@@ -0,0 +1,17 @@
// ExtractEngine.h
#ifndef __EXTRACTENGINE_H
#define __EXTRACTENGINE_H
#include "Common/String.h"
HRESULT ExtractArchive(
const UString &fileName,
const UString &folderName
#ifdef _SILENT
, UString &resultMessage
#endif
);
#endif

235
7zip/Bundles/SFXSetup/Main.cpp Executable file
View File

@@ -0,0 +1,235 @@
// Main.cpp
#include "StdAfx.h"
#include <initguid.h>
#include "Common/StringConvert.h"
#include "Common/Random.h"
#include "Common/TextConfig.h"
#include "Common/CommandLineParser.h"
#include "Windows/FileDir.h"
#include "Windows/FileIO.h"
#include "Windows/FileFind.h"
#include "Windows/FileName.h"
#include "Windows/DLL.h"
#include "../../IPassword.h"
#include "../../ICoder.h"
#include "../../Archive/IArchive.h"
#include "../../UI/Explorer/MyMessages.h"
#include "ExtractEngine.h"
HINSTANCE g_hInstance;
using namespace NWindows;
static LPCTSTR kTempDirPrefix = TEXT("7zS");
static bool ReadDataString(LPCWSTR fileName, LPCSTR startID,
LPCSTR endID, AString &stringResult)
{
stringResult.Empty();
NFile::NIO::CInFile inFile;
if (!inFile.Open(fileName))
return false;
const int kBufferSize = (1 << 12);
BYTE buffer[kBufferSize];
int signatureStartSize = lstrlenA(startID);
int signatureEndSize = lstrlenA(endID);
UINT32 numBytesPrev = 0;
bool writeMode = false;
UINT64 posTotal = 0;
while(true)
{
if (posTotal > (1 << 20))
return (stringResult.IsEmpty());
UINT32 numReadBytes = kBufferSize - numBytesPrev;
UINT32 processedSize;
if (!inFile.Read(buffer + numBytesPrev, numReadBytes, processedSize))
return false;
if (processedSize == 0)
return true;
UINT32 numBytesInBuffer = numBytesPrev + processedSize;
UINT32 pos = 0;
while (true)
{
if (writeMode)
{
if (pos > numBytesInBuffer - signatureEndSize)
break;
if (memcmp(buffer + pos, endID, signatureEndSize) == 0)
return true;
char b = buffer[pos];
if (b == 0)
return false;
stringResult += b;
pos++;
}
else
{
if (pos > numBytesInBuffer - signatureStartSize)
break;
if (memcmp(buffer + pos, startID, signatureStartSize) == 0)
{
writeMode = true;
pos += signatureStartSize;
}
else
pos++;
}
}
numBytesPrev = numBytesInBuffer - pos;
posTotal += pos;
memmove(buffer, buffer + pos, numBytesPrev);
}
}
static char kStartID[] = ",!@Install@!UTF-8!";
static char kEndID[] = ",!@InstallEnd@!";
class CInstallIDInit
{
public:
CInstallIDInit()
{
kStartID[0] = ';';
kEndID[0] = ';';
};
} g_CInstallIDInit;
class CCurrentDirRestorer
{
CSysString m_CurrentDirectory;
public:
CCurrentDirRestorer()
{ NFile::NDirectory::MyGetCurrentDirectory(m_CurrentDirectory); }
~CCurrentDirRestorer()
{ RestoreDirectory();}
bool RestoreDirectory()
{ return BOOLToBool(::SetCurrentDirectory(m_CurrentDirectory)); }
};
int APIENTRY WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
InitCommonControls();
g_hInstance = (HINSTANCE)hInstance;
UString archiveName, switches;
NCommandLineParser::SplitCommandLine(GetCommandLineW(), archiveName, switches);
UString fullPath;
NDLL::MyGetModuleFileName(g_hInstance, fullPath);
AString config;
if (!ReadDataString(fullPath, kStartID, kEndID, config))
{
MyMessageBox(L"Can't load config info");
return 1;
}
switches.Trim();
bool assumeYes = false;
if (switches.Left(2).CompareNoCase(UString(L"-y")) == 0)
{
assumeYes = true;
switches = switches.Mid(2);
switches.Trim();
}
UString appLaunched;
if (!config.IsEmpty())
{
CObjectVector<CTextConfigPair> pairs;
if (!GetTextConfig(config, pairs))
{
MyMessageBox(L"Config failed");
return 1;
}
UString friendlyName = GetTextConfigValue(pairs, L"Title");
UString installPrompt = GetTextConfigValue(pairs, L"BeginPrompt");
if (!installPrompt.IsEmpty() && !assumeYes)
{
if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
MB_ICONQUESTION) != IDYES)
return 0;
}
appLaunched = GetTextConfigValue(pairs, L"RunProgram");
}
NFile::NDirectory::CTempDirectory tempDir;
if (!tempDir.Create(kTempDirPrefix))
{
MyMessageBox(L"Can not create temp folder archive");
return 1;
}
HRESULT result = ExtractArchive(fullPath, GetUnicodeString(tempDir.GetPath()));
if (result != S_OK)
{
if (result == S_FALSE)
MyMessageBox(L"Can not open archive");
else if (result != E_ABORT)
ShowErrorMessage(result);
return 1;
}
CCurrentDirRestorer currentDirRestorer;
if (!SetCurrentDirectory(tempDir.GetPath()))
return 1;
if (appLaunched.IsEmpty())
{
appLaunched = L"Setup.exe";
if (!NFile::NFind::DoesFileExist(GetSystemString(appLaunched)))
return 1;
}
STARTUPINFO startupInfo;
startupInfo.cb = sizeof(startupInfo);
startupInfo.lpReserved = 0;
startupInfo.lpDesktop = 0;
startupInfo.lpTitle = 0;
startupInfo.dwFlags = 0;
startupInfo.cbReserved2 = 0;
startupInfo.lpReserved2 = 0;
PROCESS_INFORMATION processInformation;
CSysString shortPath;
if (!NFile::NDirectory::MyGetShortPathName(tempDir.GetPath(), shortPath))
return 1;
UString appLaunchedSysU = appLaunched;
appLaunchedSysU.Replace(TEXT(L"%%T"), GetUnicodeString(shortPath));
appLaunchedSysU += L' ';
appLaunchedSysU += switches;
CSysString tempDirPathNormalized = shortPath;
NFile::NName::NormalizeDirPathPrefix(shortPath);
// CSysString appLaunchedSys = shortPath + GetSystemString(appLaunchedSysU);
CSysString appLaunchedSys = CSysString(TEXT(".\\")) + GetSystemString(appLaunchedSysU);
BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys,
NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
&startupInfo, &processInformation);
if (createResult == 0)
{
ShowLastErrorMessage();
return 1;
}
WaitForSingleObject(processInformation.hProcess, INFINITE);
::CloseHandle(processInformation.hThread);
::CloseHandle(processInformation.hProcess);
return 0;
}

View File

@@ -0,0 +1,617 @@
# Microsoft Developer Studio Project File - Name="SFXSetup" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=SFXSetup - 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 "SFXSetup.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 "SFXSetup.mak" CFG="SFXSetup - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SFXSetup - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "SFXSetup - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "SFXSetup - Win32 ReleaseD" (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
!IF "$(CFG)" == "SFXSetup - 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 "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /D "_NO_CRYPTO" /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 /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 /nologo /subsystem:windows /machine:I386 /out:"C:\UTIL\7zSfxS.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SFXSetup - 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 "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /D "_NO_CRYPTO" /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 /subsystem:windows /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 comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\UTIL\7zSfxS.exe" /pdbtype:sept
!ELSEIF "$(CFG)" == "SFXSetup - Win32 ReleaseD"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseD"
# PROP BASE Intermediate_Dir "ReleaseD"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseD"
# PROP Intermediate_Dir "ReleaseD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /D "_NO_CRYPTO" /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 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 /nologo /subsystem:windows /machine:I386 /out:"C:\UTIL\7zWinSR.exe"
# SUBTRACT BASE LINK32 /debug /nodefaultlib
# 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 /nologo /subsystem:windows /machine:I386 /out:"C:\UTIL\7zSfxSD.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "SFXSetup - Win32 Release"
# Name "SFXSetup - Win32 Debug"
# Name "SFXSetup - Win32 ReleaseD"
# Begin Group "Spec"
# PROP Default_Filter ""
# 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 "Interface"
# PROP Default_Filter ""
# 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\7zFolderOutStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.h
# 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.cpp
# 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
# 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\CrossThreadProgress.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.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\OutStreamWithCRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
# End Source File
# End Group
# Begin Group "Compress"
# PROP Default_Filter ""
# Begin Group "LZMA"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMADecoder.cpp
# End Source File
# End Group
# Begin Group "Branch"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Branch\x86.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86_2.cpp
# 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 "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
# End Group
# Begin Group "SDK"
# PROP Default_Filter ""
# 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\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\TextConfig.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\TextConfig.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
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.h
# End Source File
# End Group
# Begin Group "Windows"
# PROP Default_Filter ""
# Begin Group "Control"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Windows\Control\Dialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Control\Dialog.h
# End Source File
# End Group
# 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\Error.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Error.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\ResourceString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\ResourceString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Window.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Window.h
# End Source File
# End Group
# Begin Group "7z Common"
# PROP Default_Filter ""
# 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\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\MultiStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\MultiStream.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\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
# End Group
# Begin Group "UI"
# PROP Default_Filter ""
# Begin Group "Explorer"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Explorer\MyMessages.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Explorer\MyMessages.h
# End Source File
# End Group
# Begin Group "UI Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.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
# End Group
# End Group
# Begin Group "File Manager"
# PROP Default_Filter ""
# Begin Group "Dialog"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\ProgressDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\ProgressDialog.h
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\resource.h
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\resource.rc
# PROP Exclude_From_Build 1
# End Source File
# End Group
# Begin Source File
SOURCE=..\..\FileManager\FormatUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\FormatUtils.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\ExtractCallback.cpp
# End Source File
# Begin Source File
SOURCE=.\ExtractCallback.h
# End Source File
# Begin Source File
SOURCE=.\ExtractEngine.cpp
# End Source File
# Begin Source File
SOURCE=.\ExtractEngine.h
# End Source File
# Begin Source File
SOURCE=.\Main.cpp
# End Source File
# Begin Source File
SOURCE=.\setup.ico
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "SFXSetup"=.\SFXSetup.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "stdafx.h"

11
7zip/Bundles/SFXSetup/StdAfx.h Executable file
View File

@@ -0,0 +1,11 @@
// stdafx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include <windows.h>
#include <commctrl.h>
#include <limits.h>
// #include <time.h>
#endif

View File

@@ -0,0 +1,19 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by resource.rc
//
#define IDI_ICON3 159
#define IDS_CANNOT_CREATE_FOLDER 9
#define IDS_PROGRESS_EXTRACTING 69
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 160
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1091
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

148
7zip/Bundles/SFXSetup/resource.rc Executable file
View File

@@ -0,0 +1,148 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Russian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
#ifdef _WIN32
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""..\\..\\FileManager\\Resource\\ProgressDialog\\resource.rc""\r\n"
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON3 ICON DISCARDABLE "setup.ico"
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,12,0,0
PRODUCTVERSION 3,12,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Igor Pavlov\0"
VALUE "FileDescription", "7z Self-Extract Setup\0"
VALUE "FileVersion", "3, 12, 0, 0\0"
VALUE "InternalName", "7zS.sfx\0"
VALUE "LegalCopyright", "Copyright (C) 1999-2003 Igor Pavlov\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "7zS.sfx\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "7-Zip\0"
VALUE "ProductVersion", "3, 12, 0, 0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_PROGRESS_EXTRACTING "Extracting"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#include "..\..\FileManager\Resource\ProgressDialog\resource.rc"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

BIN
7zip/Bundles/SFXSetup/setup.ico Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB