mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 16:11:38 -06:00
4.30 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
bcd1db2f5a
commit
e18587ba51
@@ -276,6 +276,14 @@ SOURCE=..\..\..\Windows\FileName.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\MemoryLock.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\MemoryLock.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\..\Windows\PropVariant.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#include "Windows/FileName.h"
|
||||
#include "Windows/Defs.h"
|
||||
#include "Windows/Error.h"
|
||||
#ifdef _WIN32
|
||||
#include "Windows/MemoryLock.h"
|
||||
#endif
|
||||
|
||||
#include "../../IPassword.h"
|
||||
#include "../../ICoder.h"
|
||||
@@ -69,7 +72,7 @@ static const char *kHelpString =
|
||||
"<Commands>\n"
|
||||
" a: Add files to archive\n"
|
||||
" d: Delete files from archive\n"
|
||||
" e: Extract files from archive\n"
|
||||
" e: Extract files from archive (without using directory names)\n"
|
||||
" l: List contents of archive\n"
|
||||
// " l[a|t][f]: List contents of archive\n"
|
||||
// " a - with Additional fields\n"
|
||||
@@ -77,7 +80,7 @@ static const char *kHelpString =
|
||||
// " f - with Full pathnames\n"
|
||||
" t: Test integrity of archive\n"
|
||||
" u: Update files to archive\n"
|
||||
" x: eXtract files with full pathname\n"
|
||||
" x: eXtract files with full paths\n"
|
||||
"<Switches>\n"
|
||||
" -ai[r[-|0]]{@listfile|!wildcard}: Include archives\n"
|
||||
" -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives\n"
|
||||
@@ -88,7 +91,7 @@ static const char *kHelpString =
|
||||
" -p{Password}: set Password\n"
|
||||
" -r[-|0]: Recurse subdirectories\n"
|
||||
" -sfx[{name}]: Create SFX archive\n"
|
||||
" -si: read data from stdin\n"
|
||||
" -si[{name}]: read data from stdin\n"
|
||||
" -so: write data to stdout\n"
|
||||
" -t{Type}: Set type of archive\n"
|
||||
" -v{Size}[b|k|m|g]: Create volumes\n"
|
||||
@@ -178,6 +181,11 @@ int Main2(
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (options.LargePages)
|
||||
NSecurity::EnableLockMemoryPrivilege();
|
||||
#endif
|
||||
|
||||
CStdOutStream &stdStream = options.StdOutMode ? g_StdErr : g_StdOut;
|
||||
g_StdStream = &stdStream;
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "Common/NewHandler.h"
|
||||
#include "Common/Exception.h"
|
||||
#include "Common/StringConvert.h"
|
||||
#ifdef _WIN32
|
||||
#include "Common/Alloc.h"
|
||||
#endif
|
||||
|
||||
#include "../Common/ExitCode.h"
|
||||
#include "ConsoleClose.h"
|
||||
@@ -18,6 +21,10 @@ using namespace NWindows;
|
||||
|
||||
CStdOutStream *g_StdStream = 0;
|
||||
|
||||
#ifndef _UNICODE
|
||||
bool g_IsNT = false;
|
||||
#endif
|
||||
|
||||
extern int Main2(
|
||||
#ifndef _WIN32
|
||||
int numArguments, const char *arguments[]
|
||||
@@ -31,7 +38,6 @@ static const char *kMemoryExceptionMessage = "\n\nERROR: Can't allocate required
|
||||
static const char *kUnknownExceptionMessage = "\n\nUnknown Error\n";
|
||||
static const char *kInternalExceptionMessage = "\n\nInternal Error #";
|
||||
|
||||
#ifdef UNICODE
|
||||
static inline bool IsItWindowsNT()
|
||||
{
|
||||
OSVERSIONINFO versionInfo;
|
||||
@@ -40,7 +46,6 @@ static inline bool IsItWindowsNT()
|
||||
return false;
|
||||
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
#ifdef _MSC_VER
|
||||
@@ -54,13 +59,20 @@ int numArguments, const char *arguments[]
|
||||
)
|
||||
{
|
||||
g_StdStream = &g_StdOut;
|
||||
#ifdef UNICODE
|
||||
#ifdef _UNICODE
|
||||
if (!IsItWindowsNT())
|
||||
{
|
||||
(*g_StdStream) << "This program requires Windows NT/2000/XP/2003";
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
#else
|
||||
g_IsNT = IsItWindowsNT();
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
SetLargePageSize();
|
||||
#endif
|
||||
|
||||
// setlocale(LC_COLLATE, ".OCP");
|
||||
NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
|
||||
try
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
static const wchar_t *kEmptyFileAlias = L"[Content]";
|
||||
|
||||
static const char *kCreatingArchiveMessage = "Creating archive ";
|
||||
static const char *kUpdatingArchiveMessage = "Updating archive ";
|
||||
static const char *kScanningMessage = "Scanning";
|
||||
@@ -129,6 +131,8 @@ HRESULT CUpdateCallbackConsole::GetStream(const wchar_t *name, bool isAnti)
|
||||
m_PercentPrinter.PrintString("Anti item ");
|
||||
else
|
||||
m_PercentPrinter.PrintString("Compressing ");
|
||||
if (wcslen(name) == 0)
|
||||
name = kEmptyFileAlias;
|
||||
m_PercentPrinter.PrintString(name);
|
||||
if (EnablePercents)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,7 @@ WIN_OBJS = \
|
||||
$O\FileFind.obj \
|
||||
$O\FileIO.obj \
|
||||
$O\FileName.obj \
|
||||
$O\MemoryLock.obj \
|
||||
$O\PropVariant.obj \
|
||||
$O\PropVariantConversions.obj \
|
||||
$O\Registry.obj \
|
||||
|
||||
Reference in New Issue
Block a user