mirror of
https://github.com/LisherSong/ps5-web-file-manager.git
synced 2026-10-06 10:00:24 +02:00
New RAR engine for v1.9, replacing dmc_unrar 1.7.0. dmc_unrar only
dispatches RAR5 compression version 5 (switch(file->version) case
0x5000); WinRAR 6.x/7.x writes version 6 -> DMC_UNRAR_FILE_UNSUPPORTED_VERSION
-> user-facing "corrupt archive" on real v6 archives (diagnosed 2026-09-05
from a v6:8M:m0:m3 test file). unrar 7.20.1 natively supports v6,
encrypted and multi-volume RAR.
Vendored into third_party/unrar7/ (new dir) so the tree stays buildable
while src/rar_extract.c still references the dmc facade. Contents are a
verbatim copy of opello/unrar @97e1780 (159 files, v7.20.1) plus two
project files:
- unrar_c_api.h (C facade shim: platform types + dll.hpp re-export)
- VENDORED.md (source pin, build model, license notes)
Build model verified on host (MinGW g++ 16.2, Windows):
- all 49 UnRARDll.vcxproj sources compile with
-std=c++17 -DRARDLL -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
- links + runs: RARGetDllVersion() = 9 (smoke binary in .build/, ignored)
- Windows link additionally needs -lpowrprof
License: UnRAR freeware license (not GPL) - free to use for handling RAR
archives; cannot be used to build a RAR-compatible archiver. THIRD_PARTY_NOTICES
update lands with the engine swap commit.
Next (v1.9 work items): engine swap in rar_extract.c, Makefile .cpp rules,
fixtures + host tests, frontend password/multi-volume, then ELF build.
37 lines
549 B
C++
37 lines
549 B
C++
#include "rar.hpp"
|
|
|
|
|
|
|
|
void InitLogOptions(const std::wstring &LogFileName,RAR_CHARSET CSet)
|
|
{
|
|
}
|
|
|
|
|
|
void CloseLogOptions()
|
|
{
|
|
}
|
|
|
|
|
|
#ifndef SILENT
|
|
void Log(const wchar *ArcName,const wchar *fmt,...)
|
|
{
|
|
// Preserve the error code for possible following system error message.
|
|
int Code=ErrHandler.GetSystemErrorCode();
|
|
|
|
uiAlarm(UIALARM_ERROR);
|
|
|
|
va_list arglist;
|
|
va_start(arglist,fmt);
|
|
|
|
std::wstring s=vwstrprintf(fmt,arglist);
|
|
|
|
ReplaceEsc(s);
|
|
|
|
va_end(arglist);
|
|
eprintf(L"%ls",s.c_str());
|
|
ErrHandler.SetSystemErrorCode(Code);
|
|
}
|
|
#endif
|
|
|
|
|