mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 13:15:04 -06:00
4.46 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
a145bfc7cf
commit
c574fc0f4b
@@ -53,6 +53,7 @@ static CIDLangPair kIDLangPairs[] =
|
||||
{ IDC_STATIC_COMPRESS_UPDATE_MODE, 0x02000D02 },
|
||||
{ IDC_STATIC_COMPRESS_OPTIONS, 0x02000D07 },
|
||||
{ IDC_COMPRESS_SFX, 0x02000D08 },
|
||||
{ IDC_COMPRESS_SHARED, 0x02000D16 },
|
||||
|
||||
{ IDC_COMPRESS_ENCRYPTION, 0x02000D10 },
|
||||
{ IDC_STATIC_COMPRESS_PASSWORD1, 0x02000B01 },
|
||||
@@ -194,7 +195,7 @@ static const CFormatInfo g_Formats[] =
|
||||
},
|
||||
{
|
||||
L"GZip",
|
||||
(1 << 5) | (1 << 7) | (1 << 9),
|
||||
(1 << 1) | (1 << 5) | (1 << 7) | (1 << 9),
|
||||
g_GZipMethods, MY_SIZE_OF_ARRAY(g_GZipMethods),
|
||||
false, false, false, false, false, false
|
||||
},
|
||||
@@ -301,6 +302,7 @@ bool CCompressDialog::OnInit()
|
||||
SetItemText(IDC_COMPRESS_HARDWARE_THREADS, s);
|
||||
|
||||
CheckButton(IDC_COMPRESS_SFX, Info.SFXMode);
|
||||
CheckButton(IDC_COMPRESS_SHARED, Info.OpenShareForWrite);
|
||||
|
||||
CheckControlsEnable();
|
||||
|
||||
@@ -539,6 +541,8 @@ void CCompressDialog::OnOK()
|
||||
Info.EncryptionMethod = GetEncryptionMethodSpec();
|
||||
Info.ArchiverInfoIndex = m_Format.GetCurSel();
|
||||
Info.SFXMode = IsSFX();
|
||||
Info.OpenShareForWrite = IsButtonCheckedBool(IDC_COMPRESS_SHARED);
|
||||
|
||||
m_RegistryInfo.EncryptHeaders = Info.EncryptHeaders = IsButtonCheckedBool(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES);
|
||||
|
||||
m_Params.GetText(Info.Options);
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace NCompressDialog
|
||||
UString EncryptionMethod;
|
||||
|
||||
bool SFXMode;
|
||||
bool OpenShareForWrite;
|
||||
|
||||
|
||||
UString ArchiveName; // in: Relative for ; out: abs
|
||||
UString CurrentDirPrefix;
|
||||
|
||||
@@ -36,6 +36,8 @@ static const int kPathModeButtons[] =
|
||||
IDC_EXTRACT_RADIO_NO_PATHNAMES
|
||||
};
|
||||
|
||||
#ifndef _SFX
|
||||
|
||||
static const NExtract::NPathMode::EEnum kPathModeButtonsVals[] =
|
||||
{
|
||||
NExtract::NPathMode::kFullPathnames,
|
||||
@@ -74,7 +76,6 @@ static const int kFilesButtons[] =
|
||||
static const int kNumFilesButtons = sizeof(kFilesButtons) / sizeof(kFilesButtons[0]);
|
||||
*/
|
||||
|
||||
#ifndef _SFX
|
||||
void CExtractDialog::GetPathMode()
|
||||
{
|
||||
for (int i = 0; i < kNumPathnamesButtons; i++)
|
||||
@@ -169,7 +170,9 @@ static CIDLangPair kIDLangPairs[] =
|
||||
|
||||
// static const int kWildcardsButtonIndex = 2;
|
||||
|
||||
#ifndef NO_REGISTRY
|
||||
static const int kHistorySize = 8;
|
||||
#endif
|
||||
|
||||
bool CExtractDialog::OnInit()
|
||||
{
|
||||
|
||||
@@ -72,7 +72,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();
|
||||
}
|
||||
@@ -154,9 +154,8 @@ HRESULT ExtractGUI(
|
||||
extracter.Options = &options;
|
||||
extracter.OpenCallback = openCallback;
|
||||
|
||||
CThread thread;
|
||||
if (!thread.Create(CThreadExtracting::MyThreadFunction, &extracter))
|
||||
throw 271824;
|
||||
NWindows::CThread thread;
|
||||
RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &extracter));
|
||||
extracter.ExtractCallbackSpec->StartProgressDialog(title);
|
||||
if (extracter.Result == S_OK && options.TestMode &&
|
||||
extracter.ExtractCallbackSpec->Messages.IsEmpty() &&
|
||||
|
||||
@@ -46,14 +46,13 @@ HINSTANCE g_hInstance;
|
||||
bool g_IsNT = false;
|
||||
#endif
|
||||
|
||||
static const wchar_t *kExceptionErrorMessage = L"Error:";
|
||||
static const wchar_t *kUserBreak = L"Break signaled";
|
||||
// static const wchar_t *kExceptionErrorMessage = L"Error:";
|
||||
// static const wchar_t *kUserBreak = L"Break signaled";
|
||||
|
||||
static const wchar_t *kMemoryExceptionMessage = L"ERROR: Can't allocate required memory!";
|
||||
static const wchar_t *kUnknownExceptionMessage = L"Unknown Error";
|
||||
static const wchar_t *kInternalExceptionMessage = L"Internal Error #";
|
||||
|
||||
static const wchar_t *kIncorrectCommandMessage = L"Incorrect command";
|
||||
// static const wchar_t *kInternalExceptionMessage = L"Internal Error #";
|
||||
// static const wchar_t *kIncorrectCommandMessage = L"Incorrect command";
|
||||
|
||||
static void ErrorMessage(const wchar_t *message)
|
||||
{
|
||||
|
||||
@@ -684,6 +684,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 Group "Common"
|
||||
|
||||
|
||||
@@ -76,8 +76,6 @@ static const UInt32 kMaxDicSize =
|
||||
(1 << 27);
|
||||
#endif
|
||||
|
||||
static const int kDefaultDictionary = 22;
|
||||
|
||||
bool CBenchmarkDialog::OnInit()
|
||||
{
|
||||
#ifdef LANG
|
||||
@@ -423,7 +421,7 @@ struct CThreadBenchmark
|
||||
|
||||
HRESULT Process();
|
||||
HRESULT Result;
|
||||
static DWORD WINAPI MyThreadFunction(void *param)
|
||||
static THREAD_FUNC_DECL MyThreadFunction(void *param)
|
||||
{
|
||||
((CThreadBenchmark *)param)->Result = ((CThreadBenchmark *)param)->Process();
|
||||
return 0;
|
||||
@@ -465,8 +463,9 @@ HRESULT CBenchCallback::SetDecodeResult(const CBenchInfo &info, bool final)
|
||||
if (info2.NumIterations == 0)
|
||||
info2.NumIterations = 1;
|
||||
|
||||
info2.GlobalTime /= info2.NumIterations;
|
||||
info2.UserTime /= info2.NumIterations;
|
||||
info2.UnpackSize *= info2.NumIterations;
|
||||
info2.PackSize *= info2.NumIterations;
|
||||
info2.NumIterations = 1;
|
||||
|
||||
if (final && SyncInfo->DecompressingInfo.GlobalTime == 0)
|
||||
{
|
||||
@@ -575,10 +574,8 @@ HRESULT Benchmark(
|
||||
benchmarkDialog._syncInfo.NumThreads = numThreads;
|
||||
|
||||
benchmarker.SyncInfo = &benchmarkDialog._syncInfo;
|
||||
CThread thread;
|
||||
if (!thread.Create(CThreadBenchmark::MyThreadFunction, &benchmarker))
|
||||
return E_FAIL;
|
||||
NWindows::CThread thread;
|
||||
RINOK(thread.Create(CThreadBenchmark::MyThreadFunction, &benchmarker));
|
||||
benchmarkDialog.Create(0);
|
||||
thread.Wait();
|
||||
return S_OK;
|
||||
return thread.Wait();
|
||||
}
|
||||
|
||||
@@ -39,6 +39,11 @@ public:
|
||||
CBenchInfo2 DecompressingInfoTemp;
|
||||
CBenchInfo2 DecompressingInfo;
|
||||
|
||||
CProgressSyncInfo()
|
||||
{
|
||||
if (_startEvent.Create() != S_OK)
|
||||
throw 3986437;
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
Changed = false;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
using namespace NWindows;
|
||||
using namespace NFile;
|
||||
|
||||
static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path";
|
||||
// static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path";
|
||||
static const wchar_t *kDefaultSfxModule = L"7z.sfx";
|
||||
static const wchar_t *kSFXExtension = L"exe";
|
||||
|
||||
@@ -76,7 +76,7 @@ struct CThreadUpdating
|
||||
UpdateCallbackGUI->ProgressDialog.MyClose();
|
||||
return 0;
|
||||
}
|
||||
static DWORD WINAPI MyThreadFunction(void *param)
|
||||
static THREAD_FUNC_DECL MyThreadFunction(void *param)
|
||||
{
|
||||
return ((CThreadUpdating *)param)->Process();
|
||||
}
|
||||
@@ -273,6 +273,7 @@ static HRESULT ShowDialog(
|
||||
|
||||
di.CurrentDirPrefix = currentDirPrefix;
|
||||
di.SFXMode = options.SfxMode;
|
||||
di.OpenShareForWrite = options.OpenShareForWrite;
|
||||
|
||||
if (callback->PasswordIsDefined)
|
||||
di.Password = callback->Password;
|
||||
@@ -334,6 +335,7 @@ static HRESULT ShowDialog(
|
||||
di.EncryptHeadersIsAllowed, di.EncryptHeaders,
|
||||
di.SFXMode);
|
||||
|
||||
options.OpenShareForWrite = di.OpenShareForWrite;
|
||||
ParseAndAddPropertires(options.MethodMode.Properties, di.Options);
|
||||
|
||||
if (di.SFXMode)
|
||||
@@ -388,9 +390,8 @@ HRESULT UpdateGUI(
|
||||
tu.OpenCallback = openCallback;
|
||||
tu.ErrorInfo = &errorInfo;
|
||||
|
||||
CThread thread;
|
||||
if (!thread.Create(CThreadUpdating::MyThreadFunction, &tu))
|
||||
throw 271824;
|
||||
NWindows::CThread thread;
|
||||
RINOK(thread.Create(CThreadUpdating::MyThreadFunction, &tu))
|
||||
tu.UpdateCallbackGUI->StartProgressDialog(LangString(IDS_PROGRESS_COMPRESSING, 0x02000DC0));
|
||||
return tu.Result;
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ FM_OBJS = \
|
||||
|
||||
C_OBJS = \
|
||||
$O\Alloc.obj \
|
||||
$O\Threads.obj \
|
||||
|
||||
!include "../../Crc2.mak"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user