Skip to content

Commit 686171e

Browse files
committed
UI: show debug messagebox in debug mode only
1 parent 74822c3 commit 686171e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

CPP/7zip/Archive/PyInstaller/PyinstallerRegister.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ namespace NArchive {
222222
}
223223

224224
RINOK(extractCallback->PrepareOperation(askMode));
225-
225+
#ifdef _DEBUG
226226
std::wstringstream debugMsg;
227227
debugMsg << L"[Debug] Extracting file index " << index << L":\n"
228228
<< L" Name: " << item.name.c_str() << L"\n"
@@ -240,19 +240,21 @@ namespace NArchive {
240240
contentMsg << byte;
241241
}
242242
MessageBox(NULL, contentMsg.str().c_str(), L"Debug Info", MB_OK);
243-
243+
#endif
244244
HRESULT writeResult = realOutStream->Write(item.decompressedData.data(), (UINT32)item.decompressedData.size(), NULL);
245245
if (writeResult != S_OK) {
246246
std::wstringstream errMsg;
247+
#ifdef _DEBUG
247248
errMsg << L"[Debug] Failed to write data for file index " << index << L". Data size: " << item.decompressedData.size();
248249
MessageBox(NULL, errMsg.str().c_str(), L"Debug Info", MB_OK);
250+
#endif
249251
return writeResult;
250252
}
251-
253+
#ifdef _DEBUG
252254
std::wstringstream successMsg;
253255
successMsg << L"[Debug] Successfully wrote data for file index " << index << L". Data size: " << item.decompressedData.size();
254256
MessageBox(NULL, successMsg.str().c_str(), L"Debug Info", MB_OK);
255-
257+
#endif
256258
realOutStream.Release();
257259
RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK));
258260
}
@@ -294,4 +296,4 @@ namespace NArchive {
294296
0,
295297
NULL)
296298
}
297-
}
299+
}

0 commit comments

Comments
 (0)