e402720a12
- Implemented plugin API in `pluginapi.cpp` and `pluginapi.h` for NSIS integration. - Added resource files `resource.h` and `resource.rc` for versioning and resource management. - Created `ExtractCallbackConsole` class to handle extraction progress and user input. - Developed main extraction logic in `Main.cpp` and `MainAr.cpp` for handling archives. - Introduced user input utilities in `UserInputUtils2.cpp` and `UserInputUtils2.h` for password handling and user prompts. - Added break signal handling in `NSISBreak.cpp` and `NSISBreak.h` for graceful interruption of extraction processes. - Included standard header `StdAfx.h` for precompiled headers and common includes.
32 lines
368 B
C++
32 lines
368 B
C++
// ConsoleClose.cpp
|
|
|
|
#include "StdAfx.h"
|
|
|
|
#include "NSISBreak.h"
|
|
|
|
static int g_BreakCounter = 0;
|
|
|
|
namespace NNSISBreak {
|
|
|
|
void SendBreakSignal()
|
|
{
|
|
g_BreakCounter++;
|
|
}
|
|
|
|
bool TestBreakSignal()
|
|
{
|
|
/*
|
|
if (g_BreakCounter > 0)
|
|
return true;
|
|
*/
|
|
return (g_BreakCounter > 0);
|
|
}
|
|
|
|
void CheckCtrlBreak()
|
|
{
|
|
if (TestBreakSignal())
|
|
throw CCtrlBreakException();
|
|
}
|
|
|
|
}
|