Some more fixes, mainly issue #116

This commit is contained in:
Tino Reichardt
2020-04-10 19:17:11 +02:00
parent 16b902a89f
commit 2314c89604
3 changed files with 15 additions and 15 deletions

View File

@@ -5,7 +5,7 @@
#define MY_AUTHOR_NAME "Tino Reichardt" #define MY_AUTHOR_NAME "Tino Reichardt"
#undef MY_COPYRIGHT #undef MY_COPYRIGHT
#define MY_COPYRIGHT "Copyright (c) 2016 - 2019 Tino Reichardt" #define MY_COPYRIGHT "Copyright (c) 2016 - 2020 Tino Reichardt"
#undef MY_COPYRIGHT_DATE #undef MY_COPYRIGHT_DATE
#define MY_COPYRIGHT_DATE MY_COPYRIGHT " : " MY_DATE #define MY_COPYRIGHT_DATE MY_COPYRIGHT " : " MY_DATE

View File

@@ -252,15 +252,22 @@ HRESULT CompressFiles(
params += temp; params += temp;
} }
#if 0
// need to split the extra Options /TR 2020-04-10
if (!fo.Options.IsEmpty()) if (!fo.Options.IsEmpty())
{ {
params += " -m"; params += " -m";
params += fo.Options; params += fo.Options;
} }
if (!fo.SplitVolume.IsEmpty())
{
params += " -v";
params += fo.SplitVolume;
}
#endif
} }
} }
// for testing current params, /TR 2017-05-18
// ErrorMessage(params);
if (email) if (email)
params += kEmailSwitch; params += kEmailSwitch;
@@ -290,6 +297,8 @@ HRESULT CompressFiles(
arcName); arcName);
} }
// for testing current params, /TR 2017-05-18
// ErrorMessage(params);
return Call7zGui(params, return Call7zGui(params,
// (arcPathPrefix.IsEmpty()? 0: (LPCWSTR)arcPathPrefix), // (arcPathPrefix.IsEmpty()? 0: (LPCWSTR)arcPathPrefix),
waitFinish, &event); waitFinish, &event);

View File

@@ -33,8 +33,6 @@ extern bool g_IsNT;
#include "CompressDialogRes.h" #include "CompressDialogRes.h"
#include "ExtractRes.h" #include "ExtractRes.h"
#define DLGDBG 0
#ifdef LANG #ifdef LANG
static const UInt32 kLangIDs[] = static const UInt32 kLangIDs[] =
{ {
@@ -264,7 +262,7 @@ struct CFormatInfo
bool EncryptFileNames; bool EncryptFileNames;
}; };
#if DLGDBG #if 0
void ShowInfo(LPCWSTR str, ...) void ShowInfo(LPCWSTR str, ...)
{ {
wchar_t buf[4000]; wchar_t buf[4000];
@@ -274,11 +272,8 @@ void ShowInfo(LPCWSTR str, ...)
va_end(args); va_end(args);
ShowErrorMessage(NULL, buf); ShowErrorMessage(NULL, buf);
} }
#else
#define ShowInfo(x, ...)
#endif #endif
#define METHODS_PAIR(x) ARRAY_SIZE(x), x #define METHODS_PAIR(x) ARRAY_SIZE(x), x
static const CFormatInfo g_Formats[] = static const CFormatInfo g_Formats[] =
@@ -938,12 +933,10 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
case IDC_COMPRESS_FORMAT: case IDC_COMPRESS_FORMAT:
{ {
//ShowInfo(L"FORMAT level=%d method=%d format=%d", GetLevel(), GetMethodID(), GetFormatIndex());
bool isSFX = IsSFX(); bool isSFX = IsSFX();
SaveOptionsInMem(); SaveOptionsInMem();
m_Solid.ResetContent(); m_Solid.ResetContent();
SetLevel(); SetLevel();
SetMethod(GetMethodID());
SetSolidBlockSize(); SetSolidBlockSize();
SetNumThreads(); SetNumThreads();
SetParams(); SetParams();
@@ -951,12 +944,12 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
SetArchiveName2(isSFX); SetArchiveName2(isSFX);
SetEncryptionMethod(); SetEncryptionMethod();
SetMemoryUsage(); SetMemoryUsage();
SetMethod(GetMethodID());
return true; return true;
} }
case IDC_COMPRESS_LEVEL: case IDC_COMPRESS_LEVEL:
{ {
//ShowInfo(L"LEVEL level=%d method=%d format=%d", GetLevel(), GetMethodID(), GetFormatIndex());
{ {
const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()];
int index = FindRegistryFormatAlways(ai.Name); int index = FindRegistryFormatAlways(ai.Name);
@@ -973,7 +966,6 @@ bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam)
case IDC_COMPRESS_METHOD: case IDC_COMPRESS_METHOD:
{ {
//ShowInfo(L"METHOD level=%d method=%d format=%d", GetLevel(), GetMethodID(), GetFormatIndex());
SetMethod(GetMethodID()); SetMethod(GetMethodID());
SetDictionary(); SetDictionary();
SetOrder(); SetOrder();
@@ -1216,7 +1208,7 @@ void CCompressDialog::SetLevel()
} }
} }
ShowInfo(L"SetLevel() methodID=%d level=%d start=%d end=%d", GetMethodID(), level, LevelsStart, LevelsEnd); // ShowInfo(L"SetLevel() methodID=%d level=%d start=%d end=%d", GetMethodID(), level, LevelsStart, LevelsEnd);
SetNearestSelectComboBox(m_Level, level); SetNearestSelectComboBox(m_Level, level);
return; return;
@@ -1234,7 +1226,6 @@ void CCompressDialog::SetMethod(int keepMethodId)
int mID = GetMethodID(); int mID = GetMethodID();
static int mID_old = 0; static int mID_old = 0;
ShowInfo(L"SetMethod level=%d method=%d methodPrev=%d", GetLevel(), mID, mID_old);
if (mID != mID_old) { if (mID != mID_old) {
mID_old = mID; mID_old = mID;
SetLevel(); SetLevel();