diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2007-05-25 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:51 +0300 |
commit | c574fc0f4bba94e693b0e22f730d355b75d4f4ce (patch) | |
tree | da4ebd90c776d508ac679d50492f29461db80be0 /CPP/7zip/Bundles | |
parent | a145bfc7cf17f7bbcfae8f0064333c8ea75b455c (diff) |
4.46 beta
Diffstat (limited to 'CPP/7zip/Bundles')
-rwxr-xr-x | CPP/7zip/Bundles/Format7zExtract/makefile | 1 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/Format7zExtractR/makefile | 3 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/Format7zF/Format7z.dsp | 68 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXCon/Main.cpp | 10 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXCon/SFXCon.dsp | 19 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXCon/makefile | 1 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp | 7 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp | 9 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXSetup/makefile | 1 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXWin/Main.cpp | 46 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXWin/SFXWin.dsp | 19 | ||||
-rwxr-xr-x | CPP/7zip/Bundles/SFXWin/makefile | 1 |
12 files changed, 150 insertions, 35 deletions
diff --git a/CPP/7zip/Bundles/Format7zExtract/makefile b/CPP/7zip/Bundles/Format7zExtract/makefile index a8549741..5926949f 100755 --- a/CPP/7zip/Bundles/Format7zExtract/makefile +++ b/CPP/7zip/Bundles/Format7zExtract/makefile @@ -126,6 +126,7 @@ CRYPTO_HASH_OBJS = \ C_OBJS = \ $O\Alloc.obj \ + $O\Threads.obj \ C_BRANCH_OBJS = \ $O\BranchARM.obj \ diff --git a/CPP/7zip/Bundles/Format7zExtractR/makefile b/CPP/7zip/Bundles/Format7zExtractR/makefile index 17a836dc..e2c1b838 100755 --- a/CPP/7zip/Bundles/Format7zExtractR/makefile +++ b/CPP/7zip/Bundles/Format7zExtractR/makefile @@ -95,7 +95,8 @@ LZMA_OPT_OBJS = \ C_OBJS = \ $O\Alloc.obj \ - $O\7zCrc.obj + $O\7zCrc.obj \ + $O\Threads.obj \ C_BRANCH_OBJS = \ $O\BranchARM.obj \ diff --git a/CPP/7zip/Bundles/Format7zF/Format7z.dsp b/CPP/7zip/Bundles/Format7zF/Format7z.dsp index 164fc24b..7a4bafb2 100755 --- a/CPP/7zip/Bundles/Format7zF/Format7z.dsp +++ b/CPP/7zip/Bundles/Format7zF/Format7z.dsp @@ -236,6 +236,10 @@ SOURCE=..\..\..\Windows\Synchronization.cpp SOURCE=..\..\..\Windows\Synchronization.h # End Source File +# Begin Source File + +SOURCE=..\..\..\Windows\Thread.h +# End Source File # End Group # Begin Group "Compress" @@ -785,14 +789,6 @@ SOURCE=..\..\Compress\Quantum\QuantumDecoder.h # PROP Default_Filter "" # Begin Source File -SOURCE=..\..\Compress\Lzh\Lzh1Decoder.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Compress\Lzh\Lzh1Decoder.h -# End Source File -# Begin Source File - SOURCE=..\..\Compress\Lzh\LzhDecoder.cpp # End Source File # Begin Source File @@ -2346,5 +2342,61 @@ SOURCE=..\..\IPassword.h SOURCE=..\..\IProgress.h # End Source File # End Group +# Begin Source File + +SOURCE=..\..\Archive\Arj\arj.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\BZip2\bz2.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Cab\cab.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Cpio\cpio.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Deb\deb.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\GZip\gz.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Iso\Iso.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Lzh\lzh.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Rar\rar.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\RPM\rpm.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Split\Split.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Tar\tar.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Z\Z.ico +# End Source File +# Begin Source File + +SOURCE=..\..\Archive\Zip\zip.ico +# End Source File # End Target # End Project diff --git a/CPP/7zip/Bundles/SFXCon/Main.cpp b/CPP/7zip/Bundles/SFXCon/Main.cpp index 97efd2b8..c3122cd1 100755 --- a/CPP/7zip/Bundles/SFXCon/Main.cpp +++ b/CPP/7zip/Bundles/SFXCon/Main.cpp @@ -123,9 +123,7 @@ static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] = // static const bool kTestExtractRecursedDefault = true; // static const bool kAddRecursedDefault = false; -static const int kMaxCmdLineSize = 1000; static const wchar_t *kUniversalWildcard = L"*"; -// static const int kMinNonSwitchWords = 1; static const int kCommandIndex = 0; static const char *kHelpString = @@ -416,13 +414,19 @@ int Main2( } else { + UInt64 numErrors = 0; HRESULT result = ListArchives( codecs, v1, v2, wildcardCensorHead, true, false, passwordEnabled, - password); + password, numErrors); + if (numErrors > 0) + { + g_StdOut << endl << "Errors: " << numErrors; + return NExitCode::kFatalError; + } if (result != S_OK) throw CSystemException(result); } diff --git a/CPP/7zip/Bundles/SFXCon/SFXCon.dsp b/CPP/7zip/Bundles/SFXCon/SFXCon.dsp index 17ffd0df..abf7f22c 100755 --- a/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +++ b/CPP/7zip/Bundles/SFXCon/SFXCon.dsp @@ -67,7 +67,7 @@ LINK32=link.exe # 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 /W3 /Gm /GX /ZI /Od /I "..\..\..\..\\" /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 CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\\" /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 @@ -125,14 +125,6 @@ SOURCE=..\..\Archive\Common\CoderMixer2MT.h # End Source File # Begin Source File -SOURCE=..\..\Archive\Common\CoderMixer2ST.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Archive\Common\CoderMixer2ST.h -# End Source File -# Begin Source File - SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp # End Source File # Begin Source File @@ -801,6 +793,15 @@ SOURCE=..\..\..\..\C\Alloc.c SOURCE=..\..\..\..\C\Alloc.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 diff --git a/CPP/7zip/Bundles/SFXCon/makefile b/CPP/7zip/Bundles/SFXCon/makefile index 61edd86b..33bd52c4 100755 --- a/CPP/7zip/Bundles/SFXCon/makefile +++ b/CPP/7zip/Bundles/SFXCon/makefile @@ -118,6 +118,7 @@ CRYPTO_HASH_OBJS = \ C_OBJS = \ $O\Alloc.obj \ + $O\Threads.obj \ C_BRANCH_OBJS = \ $O\BranchX86.obj \ diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp index a0df3042..210e52ae 100755 --- a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +++ b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp @@ -40,7 +40,7 @@ struct CThreadExtracting ExtractCallbackSpec->ProgressDialog.MyClose(); return 0; } - static DWORD WINAPI MyThreadFunction(void *param) + static THREAD_FUNC_DECL MyThreadFunction(void *param) { return ((CThreadExtracting *)param)->Process(); } @@ -115,9 +115,8 @@ HRESULT ExtractArchive( if (showProgress) { - CThread thread; - if (!thread.Create(CThreadExtracting::MyThreadFunction, &extracter)) - throw 271824; + NWindows::CThread thread; + RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &extracter)); UString title; #ifdef LANG diff --git a/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp b/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp index bf0194b9..b09dce22 100755 --- a/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +++ b/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp @@ -710,6 +710,15 @@ SOURCE=..\..\..\..\C\Alloc.c SOURCE=..\..\..\..\C\Alloc.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 diff --git a/CPP/7zip/Bundles/SFXSetup/makefile b/CPP/7zip/Bundles/SFXSetup/makefile index 129d60cf..a93d0379 100755 --- a/CPP/7zip/Bundles/SFXSetup/makefile +++ b/CPP/7zip/Bundles/SFXSetup/makefile @@ -100,6 +100,7 @@ LZMA_OPT_OBJS = \ C_OBJS = \ $O\Alloc.obj \ + $O\Threads.obj \ C_BRANCH_OBJS = \ $O\BranchX86.obj \ diff --git a/CPP/7zip/Bundles/SFXWin/Main.cpp b/CPP/7zip/Bundles/SFXWin/Main.cpp index 9c85d6b7..39ca5306 100755 --- a/CPP/7zip/Bundles/SFXWin/Main.cpp +++ b/CPP/7zip/Bundles/SFXWin/Main.cpp @@ -15,6 +15,7 @@ #include "../../IPassword.h" #include "../../Archive/IArchive.h" #include "../../UI/Common/Extract.h" +#include "../../UI/Common/ExitCode.h" #include "../../UI/Explorer/MyMessages.h" #include "../../UI/GUI/ExtractGUI.h" @@ -31,13 +32,11 @@ static inline bool IsItWindowsNT() } #endif -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */) -{ - g_hInstance = (HINSTANCE)hInstance; - #ifndef _UNICODE - g_IsNT = IsItWindowsNT(); - #endif +static const wchar_t *kMemoryExceptionMessage = L"ERROR: Can't allocate required memory!"; +static const wchar_t *kUnknownExceptionMessage = L"ERROR: Unknown Error!"; +int APIENTRY WinMain2() +{ UString password; bool assumeYes = false; bool outputFolderDefined = false; @@ -116,9 +115,38 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR / outputFolderDefined ? outputFolder : fullPath.Left(fileNamePartStartIndex)); */ + if (result == S_OK) + { + return 0; + } + if (result == E_ABORT) + return NExitCode::kUserBreak; if (result == S_FALSE) - MyMessageBox(L"Archive is not supported"); - else if (result != S_OK && result != E_ABORT) + MyMessageBox(L"Error in archive"); + else ShowErrorMessage(0, result); - return 0; + return NExitCode::kFatalError; +} + +int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */) +{ + g_hInstance = (HINSTANCE)hInstance; + #ifndef _UNICODE + g_IsNT = IsItWindowsNT(); + #endif + try + { + return WinMain2(); + } + catch(const CNewException &) + { + MyMessageBox(kMemoryExceptionMessage); + return (NExitCode::kMemoryError); + } + catch(...) + { + MyMessageBox(kUnknownExceptionMessage); + return NExitCode::kFatalError; + } } + diff --git a/CPP/7zip/Bundles/SFXWin/SFXWin.dsp b/CPP/7zip/Bundles/SFXWin/SFXWin.dsp index 3e9b5c33..06c0020e 100755 --- a/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +++ b/CPP/7zip/Bundles/SFXWin/SFXWin.dsp @@ -71,7 +71,7 @@ LINK32=link.exe # 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 /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /GZ /c +# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /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" @@ -712,6 +712,14 @@ SOURCE=..\..\..\Common\IntToString.h # End Source File # Begin Source File +SOURCE=..\..\..\Common\NewHandler.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\Common\NewHandler.h +# End Source File +# Begin Source File + SOURCE=..\..\..\Common\String.cpp # End Source File # Begin Source File @@ -881,6 +889,15 @@ SOURCE=..\..\..\..\C\Alloc.c SOURCE=..\..\..\..\C\Alloc.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 diff --git a/CPP/7zip/Bundles/SFXWin/makefile b/CPP/7zip/Bundles/SFXWin/makefile index b883bcf5..a7e52be2 100755 --- a/CPP/7zip/Bundles/SFXWin/makefile +++ b/CPP/7zip/Bundles/SFXWin/makefile @@ -123,6 +123,7 @@ CRYPTO_HASH_OBJS = \ C_OBJS = \ $O\Alloc.obj \ + $O\Threads.obj \ C_BRANCH_OBJS = \ $O\BranchX86.obj \ |