chore: initial commit (extracted from Launchers monorepo)

Plugin: ns7zip v2.0.0
Architectures: x86-ansi, x86-unicode, amd64-unicode
License: LGPL-2.1-or-later
This commit is contained in:
Simone
2026-04-29 14:07:51 +02:00
commit d074cc7c07
3848 changed files with 1076682 additions and 0 deletions
@@ -0,0 +1,85 @@
// ProgressBox.h
#ifndef ZIP7_INC_PROGRESS_BOX_H
#define ZIP7_INC_PROGRESS_BOX_H
#include "../../../Common/MyString.h"
#include "../../../Common/MyTypes.h"
struct CPercentPrinterState
{
UInt64 Completed;
UInt64 Total;
UInt64 Files;
UInt64 FilesTotal;
AString Command;
UString FileName;
void ClearCurState();
bool IsEqualTo(const CPercentPrinterState &s) const
{
return
Completed == s.Completed
&& Total == s.Total
&& Files == s.Files
&& FilesTotal == s.FilesTotal
&& Command == s.Command
&& FileName == s.FileName;
}
CPercentPrinterState():
Completed(0),
Total((UInt64)(Int64)-1),
Files(0),
FilesTotal(0)
{}
};
class CProgressBox: public CPercentPrinterState
{
UInt32 _tickStep;
DWORD _prevTick;
DWORD _prevElapsedSec;
bool _wasPrinted;
public:
bool UseBytesForPercents;
DWORD StartTick;
unsigned MaxLen;
private:
UString _tempU;
UString _name1U;
UString _name2U;
CPercentPrinterState _printedState;
AString _title;
AString _timeStr;
AString _files;
AString _sizesStr;
AString _name1;
AString _name2;
AString _perc;
void ReduceString(const UString &src, AString &dest);
public:
CProgressBox(UInt32 tickStep = 200):
_tickStep(tickStep),
_prevTick(0),
UseBytesForPercents(true),
StartTick(0),
MaxLen(60)
{}
void Init(const char *title);
void Print();
};
#endif