68 Str[0] = (
char)(
'0' + ((Date & 0x01E0) >> 5) / 10);
69 Str[1] = (
char)(
'0' + ((Date & 0x01E0) >> 5) % 10);
72 Str[3] = (
char)(
'0' + (Date & 0x001F) / 10);
73 Str[4] = (
char)(
'0' + (Date & 0x001F) % 10);
76 dw = 1980 + ((Date & 0xFE00) >> 9);
100 Hour = ((
Time & 0xF800) >> 11);
107 Str[0] = (
char)(
'0' + Hour / 10);
109 Str[1] = (
char)(
'0' + Hour % 10);
112 Str[3] = (
char)(
'0' + ((
Time & 0x07E0) >> 5) / 10);
113 Str[4] = (
char)(
'0' + ((
Time & 0x07E0) >> 5) % 10);
120 Str[8] = PM?
'p' :
'a';
193 printf(
"ReactOS Cabinet Manager\n\n");
194 printf(
"CABMAN [-D | -E] [-A] [-L dir] cabinet [filename ...]\n");
195 printf(
"CABMAN [-M mode] -C dirfile [-I] [-RC file] [-P dir]\n");
196 printf(
"CABMAN [-M mode] -S cabinet filename [-F folder] [filename] [...]\n");
197 printf(
" cabinet Cabinet file.\n");
198 printf(
" filename Name of the file to add to or extract from the cabinet.\n");
199 printf(
" Wild cards and multiple filenames\n");
200 printf(
" (separated by blanks) may be used.\n\n");
202 printf(
" dirfile Name of the directive file to use.\n");
204 printf(
" -A Process ALL cabinets. Follows cabinet chain\n");
205 printf(
" starting in first cabinet mentioned.\n");
206 printf(
" -C Create cabinet.\n");
207 printf(
" -D Display cabinet directory.\n");
208 printf(
" -E Extract files from cabinet.\n");
209 printf(
" -F Put the files from the next 'filename' filter in the cab in folder\filename.\n");
210 printf(
" -I Don't create the cabinet, only the .inf file.\n");
211 printf(
" -L dir Location to place extracted or generated files\n");
212 printf(
" (default is current directory).\n");
213 printf(
" -M mode Specify the compression method to use:\n");
214 printf(
" raw - No compression\n");
215 printf(
" mszip - MsZip compression (default)\n");
216 printf(
" -N Don't create the .inf file, only the cabinet.\n");
217 printf(
" -RC Specify file to put in cabinet reserved area\n");
218 printf(
" (size must be less than 64KB).\n");
219 printf(
" -S Create simple cabinet.\n");
220 printf(
" -P dir Files in the .dff are relative to this directory.\n");
221 printf(
" -V Verbose mode (prints more messages).\n");
236 bool FoundCabinet =
false;
237 std::string NextFolder;
242 if (
argv[
i][0] ==
'-')
271 NextFolder =
argv[
i];
275 NextFolder =
argv[
i] + 2;
328 printf(
"ERROR: Cannot open cabinet reserved area file.\n");
336 printf(
"ERROR: Cannot open cabinet reserved area file.\n");
379 printf(
"ERROR: You may only specify one directive file!\n");
388 else if(FoundCabinet)
415 printf(
"ERROR: You have to enter input file names!\n");
433 printf(
"ERROR: Specified directive file could not be found: %s.\n",
FileName);
500 printf(
"WARNING: No files in cabinet.");
537 printf(
"ERROR: Cabinet contains errors.\n");
542 printf(
"ERROR: Cabinet uses unsupported compression type.\n");
547 printf(
"ERROR: You've run out of free space on the destination volume or the volume is damaged.\n");
580 printf(
"ReactOS Cabinet Manager\n\n");
643 const char* DiskLabel)
694 return CABMgr.
Run() ? 0 : 1;
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define CAB_STATUS_UNSUPPCOMP
#define CAB_STATUS_SUCCESS
#define CAB_STATUS_CANNOT_WRITE
#define CAB_STATUS_INVALID_CAB
#define CAB_ATTRIB_HIDDEN
#define CAB_FILE_CONTINUED
#define CAB_ATTRIB_READONLY
#define CAB_ATTRIB_SYSTEM
#define CAB_ATTRIB_ARCHIVE
char * Date2Str(char *Str, USHORT Date)
char * Time2Str(char *Str, USHORT Time)
char * Pad(char *Str, char PadChar, ULONG Length)
char * Attr2Str(char *Str, USHORT Attr)
#define CM_MODE_CREATE_SIMPLE
virtual void OnVerboseMessage(const char *Message) override
virtual void OnExtract(PCFFILE File, const char *FileName) override
virtual bool OnOverwrite(PCFFILE File, const char *FileName) override
bool ExtractFromCabinet()
virtual void OnDiskChange(const char *CabinetName, const char *DiskLabel) override
bool ParseCmdline(int argc, char *argv[])
virtual void OnAdd(PCFFILE Entry, const char *FileName) override
void DestroySearchCriteria()
void SetDestinationPath(const char *DestinationPath)
std::string GetFileName(const std::string &Path)
ULONG ExtractFile(const char *FileName)
bool SetCabinetReservedFile(const char *FileName)
ULONG FindFirst(PCAB_SEARCH Search)
void SetCabinetName(const char *FileName)
bool SetCompressionCodec(const char *CodecName)
void SelectCodec(LONG Id)
ULONG FindNext(PCAB_SEARCH Search)
ULONG AddSearchCriteria(const std::string &SearchCriteria, const std::string &TargetFolder)
bool CreateSimpleCabinet()
PCABINET_NAME CabinetName
void SetFileRelativePath(char *Path)
ULONG Load(char *FileName)
static const WCHAR Message[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
REFIID LPVOID DWORD_PTR dw
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static PLARGE_INTEGER Time
static void ShowUsage(int ExitCode)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount