diff options
Diffstat (limited to 'CPP/7zip/Bundles/SFXSetup')
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp | 121 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/ExtractCallback.h | 37 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp | 156 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/ExtractEngine.h | 11 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/Main.cpp | 30 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp | 12 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/makefile | 6 |
7 files changed, 164 insertions, 209 deletions
diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp index 5d56a9e7..f2af88e6 100755 --- a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp +++ b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp @@ -5,44 +5,57 @@ #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 LPCWSTR kUnknownError = L""Unknown Error"; void CExtractCallbackImp::Init(IInArchive *archiveHandler, - const UString &directoryPath, + const UString &directoryPath, const UString &itemDefaultName, - const FILETIME &utcLastWriteTimeDefault, - UInt32 attributesDefault) + const FILETIME &defaultMTime, + UInt32 defaultAttributes) { _message.Empty(); _isCorrupt = false; _itemDefaultName = itemDefaultName; - _utcLastWriteTimeDefault = utcLastWriteTimeDefault; - _attributesDefault = attributesDefault; + _defaultMTime = defaultMTime; + _defaultAttributes = defaultAttributes; _archiveHandler = archiveHandler; _directoryPath = directoryPath; NName::NormalizeDirPathPrefix(_directoryPath); } +HRESULT CExtractCallbackImp::Open_CheckBreak() +{ + #ifndef _NO_PROGRESS + return ProgressDialog.ProgressSynch.ProcessStopAndPause(); + #else + return S_OK; + #endif +} + +HRESULT CExtractCallbackImp::Open_SetTotal(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */) +{ + return S_OK; +} + +HRESULT CExtractCallbackImp::Open_SetCompleted(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */) +{ + #ifndef _NO_PROGRESS + return ProgressDialog.ProgressSynch.ProcessStopAndPause(); + #else + return S_OK; + #endif +} + STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size) { #ifndef _NO_PROGRESS @@ -54,14 +67,7 @@ STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size) STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *completeValue) { #ifndef _NO_PROGRESS - for (;;) - { - if(ProgressDialog.ProgressSynch.GetStopped()) - return E_ABORT; - if(!ProgressDialog.ProgressSynch.GetPaused()) - break; - ::Sleep(100); - } + RINOK(ProgressDialog.ProgressSynch.ProcessStopAndPause()); if (completeValue != NULL) ProgressDialog.ProgressSynch.SetPos(*completeValue); #endif @@ -83,18 +89,18 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) { #ifndef _NO_PROGRESS - if(ProgressDialog.ProgressSynch.GetStopped()) + 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) + if (propVariantName.vt == VT_EMPTY) fullPath = _itemDefaultName; - else + else { - if(propVariantName.vt != VT_BSTR) + if (propVariantName.vt != VT_BSTR) return E_FAIL; fullPath = propVariantName.bstrVal; } @@ -102,52 +108,51 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index, // m_CurrentFilePath = GetSystemString(fullPath, _codePage); - if(askExtractMode == NArchive::NExtract::NAskMode::kExtract) + if (askExtractMode == NArchive::NExtract::NAskMode::kExtract) { - NCOM::CPropVariant propVariant; - RINOK(_archiveHandler->GetProperty(index, kpidAttributes, &propVariant)); - if (propVariant.vt == VT_EMPTY) - _processedFileInfo.Attributes = _attributesDefault; + NCOM::CPropVariant prop; + RINOK(_archiveHandler->GetProperty(index, kpidAttrib, &prop)); + if (prop.vt == VT_EMPTY) + _processedFileInfo.Attributes = _defaultAttributes; else { - if (propVariant.vt != VT_UI4) + if (prop.vt != VT_UI4) return E_FAIL; - _processedFileInfo.Attributes = propVariant.ulVal; + _processedFileInfo.Attributes = prop.ulVal; } - RINOK(_archiveHandler->GetProperty(index, kpidIsFolder, &propVariant)); - _processedFileInfo.IsDirectory = VARIANT_BOOLToBool(propVariant.boolVal); + RINOK(_archiveHandler->GetProperty(index, kpidIsDir, &prop)); + _processedFileInfo.IsDir = VARIANT_BOOLToBool(prop.boolVal); bool isAnti = false; { - NCOM::CPropVariant propVariantTemp; - RINOK(_archiveHandler->GetProperty(index, kpidIsAnti, - &propVariantTemp)); - if (propVariantTemp.vt == VT_BOOL) - isAnti = VARIANT_BOOLToBool(propVariantTemp.boolVal); + NCOM::CPropVariant propTemp; + RINOK(_archiveHandler->GetProperty(index, kpidIsAnti, &propTemp)); + if (propTemp.vt == VT_BOOL) + isAnti = VARIANT_BOOLToBool(propTemp.boolVal); } - RINOK(_archiveHandler->GetProperty(index, kpidLastWriteTime, &propVariant)); - switch(propVariant.vt) + RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop)); + switch(prop.vt) { case VT_EMPTY: - _processedFileInfo.UTCLastWriteTime = _utcLastWriteTimeDefault; + _processedFileInfo.MTime = _defaultMTime; break; case VT_FILETIME: - _processedFileInfo.UTCLastWriteTime = propVariant.filetime; + _processedFileInfo.MTime = prop.filetime; break; default: return E_FAIL; } - UStringVector pathParts; + UStringVector pathParts; SplitPathToParts(fullPath, pathParts); - if(pathParts.IsEmpty()) + if (pathParts.IsEmpty()) return E_FAIL; UString processedPath = fullPath; - if(!_processedFileInfo.IsDirectory) + if (!_processedFileInfo.IsDir) pathParts.DeleteBack(); if (!pathParts.IsEmpty()) { @@ -157,7 +162,7 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index, UString fullProcessedPath = _directoryPath + processedPath; - if(_processedFileInfo.IsDirectory) + if (_processedFileInfo.IsDir) { _diskFilePath = fullProcessedPath; @@ -167,7 +172,7 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index, } NFind::CFileInfoW fileInfo; - if(NFind::FindFile(fullProcessedPath, fileInfo)) + if (NFind::FindFile(fullProcessedPath, fileInfo)) { if (!NDirectory::DeleteFileAlways(fullProcessedPath)) { @@ -214,9 +219,8 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul switch(resultEOperationResult) { case NArchive::NExtract::NOperationResult::kOK: - { break; - } + default: { _outFileStream.Release(); @@ -225,23 +229,15 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul case NArchive::NExtract::NOperationResult::kUnSupportedMethod: _message = kUnsupportedMethod; break; - case NArchive::NExtract::NOperationResult::kCRCError: - _isCorrupt = true; - // _message = kCRCFailed; - break; - case NArchive::NExtract::NOperationResult::kDataError: - _isCorrupt = true; - // _message = kDataError; - break; default: _isCorrupt = true; } return E_FAIL; } } - if(_outFileStream != NULL) + if (_outFileStream != NULL) { - _outFileStreamSpec->SetLastWriteTime(&_processedFileInfo.UTCLastWriteTime); + _outFileStreamSpec->SetMTime(&_processedFileInfo.MTime); RINOK(_outFileStreamSpec->Close()); } _outFileStream.Release(); @@ -249,4 +245,3 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attributes); return S_OK; } - diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h index 01427394..4f4258bc 100755 --- a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h +++ b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h @@ -15,38 +15,31 @@ #ifndef _NO_PROGRESS #include "../../UI/FileManager/ProgressDialog.h" #endif +#include "../../UI/Common/ArchiveOpenCallback.h" -class CExtractCallbackImp: +class CExtractCallbackImp: public IArchiveExtractCallback, + public IOpenCallbackUI, 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); + INTERFACE_IArchiveExtractCallback(;) + INTERFACE_IOpenCallbackUI(;) private: CMyComPtr<IInArchive> _archiveHandler; UString _directoryPath; - UString _filePath; - UString _diskFilePath; bool _extractMode; struct CProcessedFileInfo { - FILETIME UTCLastWriteTime; - bool IsDirectory; + FILETIME MTime; + bool IsDir; UInt32 Attributes; } _processedFileInfo; @@ -54,8 +47,8 @@ private: CMyComPtr<ISequentialOutStream> _outFileStream; UString _itemDefaultName; - FILETIME _utcLastWriteTimeDefault; - UInt32 _attributesDefault; + FILETIME _defaultMTime; + UInt32 _defaultAttributes; void CreateComplexDirectory(const UStringVector &dirPathParts); public: @@ -66,25 +59,25 @@ public: bool _isCorrupt; UString _message; - void Init(IInArchive *archiveHandler, - const UString &directoryPath, + void Init(IInArchive *archiveHandler, + const UString &directoryPath, const UString &itemDefaultName, - const FILETIME &utcLastWriteTimeDefault, - UInt32 attributesDefault); + const FILETIME &defaultMTime, + UInt32 defaultAttributes); #ifndef _NO_PROGRESS HRESULT StartProgressDialog(const UString &title) { ProgressDialog.Create(title, 0); { - #ifdef LANG + #ifdef LANG ProgressDialog.SetText(LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890)); #else ProgressDialog.SetText(NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING)); #endif } - ProgressDialog.Show(SW_SHOWNORMAL); + ProgressDialog.Show(SW_SHOWNORMAL); return S_OK; } virtual ~CExtractCallbackImp() { ProgressDialog.Destroy(); } diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp index 04c9af18..d867b74a 100755 --- a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +++ b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp @@ -12,128 +12,122 @@ #include "../../UI/Common/OpenArchive.h" -#include "../../UI/Explorer/MyMessages.h" #include "../../UI/FileManager/FormatUtils.h" #include "ExtractCallback.h" using namespace NWindows; +static LPCWSTR kCantFindArchive = L"Can not find archive file"; +static LPCWSTR kCantOpenArchive = L"Can not open the file as archive"; + struct CThreadExtracting { - CArchiveLink ArchiveLink; + #ifndef _NO_PROGRESS + bool ShowProgress; + #endif + CCodecs *Codecs; + UString FileName; + UString DestFolder; CExtractCallbackImp *ExtractCallbackSpec; CMyComPtr<IArchiveExtractCallback> ExtractCallback; - #ifndef _NO_PROGRESS + CArchiveLink ArchiveLink; HRESULT Result; + UString ErrorMessage; - HRESULT Extract() + void Process() { - return ArchiveLink.GetArchive()->Extract(0, (UInt32)-1 , BoolToInt(false), ExtractCallback); - } - DWORD Process() - { - ExtractCallbackSpec->ProgressDialog.WaitCreating(); - Result = Extract(); - ExtractCallbackSpec->ProgressDialog.MyClose(); - return 0; + NFile::NFind::CFileInfoW fi; + if (!NFile::NFind::FindFile(FileName, fi)) + { + ErrorMessage = kCantFindArchive; + Result = E_FAIL; + return; + } + + Result = MyOpenArchive(Codecs, CIntVector(), FileName, ArchiveLink, ExtractCallbackSpec); + if (Result != S_OK) + { + if (Result != S_OK) + ErrorMessage = kCantOpenArchive; + return; + } + + UString dirPath = DestFolder; + NFile::NName::NormalizeDirPathPrefix(dirPath); + + if (!NFile::NDirectory::CreateComplexDirectory(dirPath)) + { + ErrorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER, + #ifdef LANG + 0x02000603, + #endif + dirPath); + Result = E_FAIL; + return; + } + + ExtractCallbackSpec->Init(ArchiveLink.GetArchive(), dirPath, L"Default", fi.MTime, 0); + + #ifndef _NO_PROGRESS + if (ShowProgress) + ExtractCallbackSpec->ProgressDialog.WaitCreating(); + #endif + Result = ArchiveLink.GetArchive()->Extract(0, (UInt32)-1 , BoolToInt(false), ExtractCallback); + #ifndef _NO_PROGRESS + if (ShowProgress) + ExtractCallbackSpec->ProgressDialog.MyClose(); + #endif } + static THREAD_FUNC_DECL MyThreadFunction(void *param) { - return ((CThreadExtracting *)param)->Process(); + ((CThreadExtracting *)param)->Process(); + return 0; } - #endif }; -static const LPCWSTR kCantFindArchive = L"Can not find archive file"; -static const LPCWSTR kCantOpenArchive = L"File is not correct archive"; - -HRESULT ExtractArchive( - CCodecs *codecs, - const UString &fileName, - const UString &folderName, - COpenCallbackGUI *openCallback, - bool showProgress, - bool &isCorrupt, - UString &errorMessage) +HRESULT ExtractArchive(CCodecs *codecs,const UString &fileName, const UString &destFolder, + bool showProgress, bool &isCorrupt, UString &errorMessage) { isCorrupt = false; - NFile::NFind::CFileInfoW archiveFileInfo; - if (!NFile::NFind::FindFile(fileName, archiveFileInfo)) - { - errorMessage = kCantFindArchive; - return E_FAIL; - } - - CThreadExtracting extracter; - - HRESULT result = MyOpenArchive(codecs, fileName, extracter.ArchiveLink, openCallback); - - if (result != S_OK) - { - errorMessage = kCantOpenArchive; - return result; - } + CThreadExtracting t; - UString directoryPath = folderName; - NFile::NName::NormalizeDirPathPrefix(directoryPath); + t.Codecs = codecs; + t.FileName = fileName; + t.DestFolder = destFolder; - /* - UString directoryPath; - { - UString fullPath; - int fileNamePartStartIndex; - if (!NWindows::NFile::NDirectory::MyGetFullPathName(fileName, fullPath, fileNamePartStartIndex)) - { - MessageBox(NULL, "Error 1329484", "7-Zip", 0); - return E_FAIL; - } - directoryPath = fullPath.Left(fileNamePartStartIndex); - } - */ - - if(!NFile::NDirectory::CreateComplexDirectory(directoryPath)) - { - errorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER, - #ifdef LANG - 0x02000603, - #endif - directoryPath); - return E_FAIL; - } - - extracter.ExtractCallbackSpec = new CExtractCallbackImp; - extracter.ExtractCallback = extracter.ExtractCallbackSpec; + t.ExtractCallbackSpec = new CExtractCallbackImp; + t.ExtractCallback = t.ExtractCallbackSpec; - extracter.ExtractCallbackSpec->Init( - extracter.ArchiveLink.GetArchive(), - directoryPath, L"Default", archiveFileInfo.LastWriteTime, 0); - #ifndef _NO_PROGRESS + t.ShowProgress = showProgress; if (showProgress) { NWindows::CThread thread; - RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &extracter)); + RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &t)); UString title; - #ifdef LANG + #ifdef LANG title = LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890); #else title = NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING); #endif - extracter.ExtractCallbackSpec->StartProgressDialog(title); - result = extracter.Result; + t.ExtractCallbackSpec->StartProgressDialog(title); } else #endif { - result = extracter.Extract(); + t.Process(); } - errorMessage = extracter.ExtractCallbackSpec->_message; - isCorrupt = extracter.ExtractCallbackSpec->_isCorrupt; - return result; + + errorMessage = t.ErrorMessage; + if (errorMessage.IsEmpty()) + errorMessage = t.ExtractCallbackSpec->_message; + isCorrupt = t.ExtractCallbackSpec->_isCorrupt; + return t.Result; } diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h index e2f7518b..56d69686 100755 --- a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +++ b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h @@ -3,16 +3,9 @@ #ifndef __EXTRACTENGINE_H #define __EXTRACTENGINE_H -#include "../../UI/GUI/OpenCallbackGUI.h" #include "../../UI/Common/LoadCodecs.h" -HRESULT ExtractArchive( - CCodecs *codecs, - const UString &fileName, - const UString &folderName, - COpenCallbackGUI *openCallback, - bool showProgress, - bool &isCorrupt, - UString &errorMessage); +HRESULT ExtractArchive(CCodecs *codecs, const UString &fileName, const UString &destFolder, + bool showProgress, bool &isCorrupt, UString &errorMessage); #endif diff --git a/CPP/7zip/Bundles/SFXSetup/Main.cpp b/CPP/7zip/Bundles/SFXSetup/Main.cpp index ff20b304..64f0eab1 100755 --- a/CPP/7zip/Bundles/SFXSetup/Main.cpp +++ b/CPP/7zip/Bundles/SFXSetup/Main.cpp @@ -31,11 +31,11 @@ using namespace NWindows; HINSTANCE g_hInstance; -static LPCTSTR kTempDirPrefix = TEXT("7zS"); +static LPCTSTR kTempDirPrefix = TEXT("7zS"); #define _SHELL_EXECUTE -static bool ReadDataString(LPCWSTR fileName, LPCSTR startID, +static bool ReadDataString(LPCWSTR fileName, LPCSTR startID, LPCSTR endID, AString &stringResult) { stringResult.Empty(); @@ -64,7 +64,7 @@ static bool ReadDataString(LPCWSTR fileName, LPCSTR startID, UInt32 numBytesInBuffer = numBytesPrev + processedSize; UInt32 pos = 0; for (;;) - { + { if (writeMode) { if (pos > numBytesInBuffer - signatureEndSize) @@ -128,7 +128,7 @@ static inline bool IsItWindowsNT() { OSVERSIONINFO versionInfo; versionInfo.dwOSVersionInfoSize = sizeof(versionInfo); - if (!::GetVersionEx(&versionInfo)) + if (!::GetVersionEx(&versionInfo)) return false; return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT); } @@ -164,7 +164,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / if (!ReadDataString(fullPath, kStartID, kEndID, config)) { if (!assumeYes) - MyMessageBox(L"Can't load config info"); + ShowErrorMessage(L"Can't load config info"); return 1; } @@ -177,7 +177,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / if (!GetTextConfig(config, pairs)) { if (!assumeYes) - MyMessageBox(L"Config failed"); + ShowErrorMessage(L"Config failed"); return 1; } UString friendlyName = GetTextConfigValue(pairs, L"Title"); @@ -190,7 +190,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / dirPrefix = pairs[index].String; if (!installPrompt.IsEmpty() && !assumeYes) { - if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO | + if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO | MB_ICONQUESTION) != IDYES) return 0; } @@ -206,7 +206,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / if (!tempDir.Create(kTempDirPrefix)) { if (!assumeYes) - MyMessageBox(L"Can not create temp folder archive"); + ShowErrorMessage(L"Can not create temp folder archive"); return 1; } @@ -215,17 +215,15 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / HRESULT result = codecs->Load(); if (result != S_OK) { - MyMessageBox(L"Can not load codecs"); + ShowErrorMessage(L"Can not load codecs"); return 1; } - COpenCallbackGUI openCallback; - UString tempDirPath = GetUnicodeString(tempDir.GetPath()); { bool isCorrupt = false; UString errorMessage; - HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, &openCallback, showProgress, + HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, showProgress, isCorrupt, errorMessage); if (result != S_OK) @@ -278,7 +276,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / if(result <= 32) { if (!assumeYes) - MyMessageBox(L"Can not open file"); + ShowErrorMessage(L"Can not open file"); return 1; } hProcess = execInfo.hProcess; @@ -292,7 +290,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / if (!NFile::NFind::DoesFileExist(GetSystemString(appLaunched))) { if (!assumeYes) - MyMessageBox(L"Can not find setup.exe"); + ShowErrorMessage(L"Can not find setup.exe"); return 1; } } @@ -323,8 +321,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / CSysString appLaunchedSys = GetSystemString(dirPrefix + appLaunched); - BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys, - NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */, + BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys, + NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */, &startupInfo, &processInformation); if (createResult == 0) { diff --git a/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp b/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp index 3b0117a1..6a493519 100755 --- a/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +++ b/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp @@ -647,18 +647,6 @@ SOURCE=..\..\UI\Common\OpenArchive.cpp SOURCE=..\..\UI\Common\OpenArchive.h # End Source File # End Group -# Begin Group "GUI" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\UI\GUI\OpenCallbackGUI.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\UI\GUI\OpenCallbackGUI.h -# End Source File -# End Group # End Group # Begin Group "File Manager" diff --git a/CPP/7zip/Bundles/SFXSetup/makefile b/CPP/7zip/Bundles/SFXSetup/makefile index 274730cd..0d4255d1 100755 --- a/CPP/7zip/Bundles/SFXSetup/makefile +++ b/CPP/7zip/Bundles/SFXSetup/makefile @@ -12,9 +12,6 @@ SFX_WIN_OBJS = \ $O\ExtractCallback.obj \ $O\ExtractEngine.obj \ -GUI_OBJS = \ - $O\OpenCallbackGUI.obj \ - COMMON_OBJS = \ $O\CommandLineParser.obj \ $O\CRC.obj \ @@ -111,7 +108,6 @@ C_OBJS = \ OBJS = \ $O\StdAfx.obj \ $(SFX_WIN_OBJS) \ - $(GUI_OBJS) \ $(COMMON_OBJS) \ $(WIN_OBJS) \ $(WIN_CTRL_OBJS) \ @@ -135,8 +131,6 @@ OBJS = \ $(SFX_WIN_OBJS): $(*B).cpp $(COMPL) -$(GUI_OBJS): ../../UI/GUI/$(*B).cpp - $(COMPL) $(COMMON_OBJS): ../../../Common/$(*B).cpp $(COMPL) $(WIN_OBJS): ../../../Windows/$(*B).cpp |