mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Merge pull request #38 from YACReader/feature/rar5_support
Enable Rar5 support through 7zip 18.05
This commit is contained in:
commit
c72e1d37a1
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,6 +5,7 @@ debug64*
|
|||||||
dependencies/create-dmg
|
dependencies/create-dmg
|
||||||
signapps.sh
|
signapps.sh
|
||||||
lib7zip
|
lib7zip
|
||||||
|
libp7zip
|
||||||
|
|
||||||
# C++ objects and libs
|
# C++ objects and libs
|
||||||
*.slo
|
*.slo
|
||||||
@ -16,6 +17,7 @@ lib7zip
|
|||||||
*.so
|
*.so
|
||||||
*.dll
|
*.dll
|
||||||
*.dylib
|
*.dylib
|
||||||
|
*.pch
|
||||||
|
|
||||||
# Qt-es
|
# Qt-es
|
||||||
object_script.*.Release
|
object_script.*.Release
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
VERSION=${1:-"8.6.0"}
|
VERSION=${1:-"9.5.0"}
|
||||||
|
|
||||||
if [ "$2" == "clean" ]; then
|
if [ "$2" == "clean" ]; then
|
||||||
./cleanOSX.sh
|
./cleanOSX.sh
|
||||||
|
@ -3,6 +3,16 @@
|
|||||||
|
|
||||||
//WIN includes
|
//WIN includes
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#include "lib7zip/C/Alloc.h"
|
||||||
|
#include "lib7zip/C/7zTypes.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "lib7zip/CPP/Common/Common.h"
|
||||||
|
#include "lib7zip/CPP/Common/MyWindows.h"
|
||||||
|
|
||||||
|
|
||||||
#include "lib7zip/CPP/Common/StringConvert.h"
|
#include "lib7zip/CPP/Common/StringConvert.h"
|
||||||
#include "lib7zip/CPP/Common/MyInitGuid.h"
|
#include "lib7zip/CPP/Common/MyInitGuid.h"
|
||||||
#include "lib7zip/CPP/Common/MyCom.h"
|
#include "lib7zip/CPP/Common/MyCom.h"
|
||||||
@ -14,52 +24,56 @@
|
|||||||
#include "lib7zip/CPP/7zip/IPassword.h"
|
#include "lib7zip/CPP/7zip/IPassword.h"
|
||||||
#include "lib7zip/CPP/7zip/MyVersion.h"
|
#include "lib7zip/CPP/7zip/MyVersion.h"
|
||||||
|
|
||||||
#include "lib7zip/C/Types.h"
|
|
||||||
|
|
||||||
#include "lib7zip/CPP/Windows/PropVariant.h"
|
#include "lib7zip/CPP/Windows/PropVariant.h"
|
||||||
#include "lib7zip/CPP/Windows/PropVariantConversions.h"
|
#include "lib7zip/CPP/Windows/PropVariantConv.h"
|
||||||
|
|
||||||
#include "lib7zip/CPP/7zip/Common/StreamObjects.h"
|
#include "lib7zip/CPP/7zip/Common/StreamObjects.h"
|
||||||
#include "lib7zip/CPP/7zip/Common/StreamUtils.h"
|
#include "lib7zip/CPP/7zip/Common/StreamUtils.h"
|
||||||
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#include "lib7zip/C/Alloc.h"
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
//POSIX includes
|
//POSIX includes
|
||||||
#include "libp7zip/CPP/myWindows/myPrivate.h"
|
|
||||||
#include "libp7zip/CPP/myWindows/config.h"
|
|
||||||
|
|
||||||
#include "libp7zip/CPP/Common/MyGuidDef.h"
|
extern "C"
|
||||||
|
{
|
||||||
|
#include "libp7zip/C/Alloc.h"
|
||||||
|
#include "libp7zip/C/7zTypes.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "libp7zip/CPP/Windows/Defs.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "libp7zip/CPP/Common/Common.h"
|
||||||
|
#include "libp7zip/CPP/Common/MyCom.h"
|
||||||
|
|
||||||
|
//macos
|
||||||
|
//typedef int BOOL; ---> typedef signed char BOOL;
|
||||||
|
#include "libp7zip/CPP/include_windows/windows.h"
|
||||||
|
#include "libp7zip/CPP/include_windows/basetyps.h"
|
||||||
|
#include "libp7zip/CPP/include_windows/tchar.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/Common/MyWindows.h"
|
#include "libp7zip/CPP/Common/MyWindows.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/Common/StringConvert.h"
|
#include "libp7zip/CPP/Common/StringConvert.h"
|
||||||
#include "libp7zip/CPP/Common/MyInitGuid.h"
|
|
||||||
#include "libp7zip/CPP/Common/MyCom.h"
|
|
||||||
#include "libp7zip/CPP/7zip/Common/FileStreams.h"
|
|
||||||
#include "libp7zip/CPP/7zip/Archive/IArchive.h"
|
#include "libp7zip/CPP/7zip/Archive/IArchive.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/7zip/IStream.h"
|
#include "libp7zip/CPP/7zip/IStream.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/7zip/IPassword.h"
|
#include "libp7zip/CPP/7zip/IPassword.h"
|
||||||
|
#include "libp7zip/CPP/7zip/IProgress.h"
|
||||||
|
|
||||||
|
#include "libp7zip/CPP/7zip/Common/FileStreams.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/7zip/MyVersion.h"
|
#include "libp7zip/CPP/7zip/MyVersion.h"
|
||||||
|
|
||||||
#include "libp7zip/C/Types.h"
|
|
||||||
|
|
||||||
#include "libp7zip/CPP/Windows/Defs.h"
|
|
||||||
#include "libp7zip/CPP/Windows/PropVariant.h"
|
#include "libp7zip/CPP/Windows/PropVariant.h"
|
||||||
#include "libp7zip/CPP/Windows/PropVariantConversions.h"
|
#include "libp7zip/CPP/Windows/PropVariantConv.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/7zip/Common/StreamObjects.h"
|
#include "libp7zip/CPP/7zip/Common/StreamObjects.h"
|
||||||
#include "libp7zip/CPP/7zip/Common/StreamUtils.h"
|
#include "libp7zip/CPP/7zip/Common/StreamUtils.h"
|
||||||
|
|
||||||
#include "libp7zip/CPP/7zip/ICoder.h"
|
#include "libp7zip/CPP/7zip/ICoder.h"
|
||||||
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#include "libp7zip/C/Alloc.h"
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _7Z_INCLUDES_H
|
#endif // _7Z_INCLUDES_H
|
||||||
|
10
compressed_archive/7z_precompiled_header.h
Normal file
10
compressed_archive/7z_precompiled_header.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef _7Z_PRECOMPILED_HEADER_H
|
||||||
|
#define _7Z_PRECOMPILED_HEADER_H
|
||||||
|
|
||||||
|
#if defined __cplusplus
|
||||||
|
|
||||||
|
#include "libp7zip/CPP/myWindows/StdAfx.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // 7Z_PRECOMPILED_HEADER_H
|
@ -4,16 +4,6 @@ you need to download de source code of 7zip (Windows) or p7zip (Linux/MacOSX).
|
|||||||
Please extract it and rename the folder to lib7zip (Windows) or libp7zip (Linux/MacOSX),
|
Please extract it and rename the folder to lib7zip (Windows) or libp7zip (Linux/MacOSX),
|
||||||
then copy it to $YACREADER_SRC/compressed_archive/ (this folder).
|
then copy it to $YACREADER_SRC/compressed_archive/ (this folder).
|
||||||
|
|
||||||
YACReader is compiled using 7zip/p7zip 9.20.1 and will not work with newer versions.
|
YACReader is compiled using 7zip 18.05 and p7zip 16.02.
|
||||||
|
|
||||||
On Linux/Unix this means your YACReader installation will stop working if you
|
7zip is the recommended library to use is you want support for 7zip files and rar5.
|
||||||
update your installation of p7zip to a newer version. If you wish to keep using
|
|
||||||
p7zip with YACReader, you can copy 7z.so and Codecs/Rar29.so from p7zip 9.20.1
|
|
||||||
to "/usr/lib/yacreader/". YACReader will then detect these files and use
|
|
||||||
them instead of the system provided p7zip files which allows you to keep both
|
|
||||||
YACReader and an up to date p7zip installation.
|
|
||||||
|
|
||||||
Please keep in mind this is only a workaround that is provided for backwards
|
|
||||||
compatibility and not intended as a long time solution.
|
|
||||||
It is recommended that you switch to unarr as a decompression backend instead
|
|
||||||
(see README.txt in compressed_archive/unarr).
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
#include <QtCore>
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
|
#include "libp7zip/CPP/Common/MyInitGuid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "compressed_archive.h"
|
#include "compressed_archive.h"
|
||||||
#include "extract_delegate.h"
|
#include "extract_delegate.h"
|
||||||
|
|
||||||
@ -9,12 +14,28 @@
|
|||||||
#include "open_callbacks.h"
|
#include "open_callbacks.h"
|
||||||
#include "extract_callbacks.h"
|
#include "extract_callbacks.h"
|
||||||
|
|
||||||
|
#include "7z_includes.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#define _MY_WINAPI WINAPI
|
||||||
|
#else
|
||||||
|
#define _MY_WINAPI
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef quint32 (_MY_WINAPI * CreateObjectFunc)(const GUID *clsID,const GUID *interfaceID,void **outObject);
|
||||||
|
typedef quint32 (_MY_WINAPI *GetMethodPropertyFunc)(quint32 index, PROPID propID, PROPVARIANT *value);
|
||||||
|
typedef quint32 (_MY_WINAPI *GetNumberOfMethodsFunc)(quint32 *numMethods);
|
||||||
|
typedef quint32 (_MY_WINAPI *GetNumberOfFormatsFunc)(quint32 *numFormats);
|
||||||
|
typedef quint32 (_MY_WINAPI *GetHandlerPropertyFunc)(PROPID propID, PROPVARIANT *value);
|
||||||
|
typedef quint32 (_MY_WINAPI *GetHandlerPropertyFunc2)(quint32 index, PROPID propID, PROPVARIANT *value);
|
||||||
|
typedef quint32 (_MY_WINAPI *SetLargePageModeFunc)();
|
||||||
|
|
||||||
//DEFINE_GUID(CLSID_CFormat7z,0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
|
//DEFINE_GUID(CLSID_CFormat7z,0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
|
||||||
//DEFINE_GUID(IArchiveKK,0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00);
|
//DEFINE_GUID(IArchiveKK,0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00);
|
||||||
|
|
||||||
DEFINE_GUID(CLSID_CFormat7z, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
|
DEFINE_GUID(CLSID_CFormat7z, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);
|
||||||
DEFINE_GUID(CLSID_CFormatRar, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x03, 0x00, 0x00);
|
DEFINE_GUID(CLSID_CFormatRar, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x03, 0x00, 0x00);
|
||||||
|
DEFINE_GUID(CLSID_CFormatRar5, 0X23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0xCC, 0x00, 0x00);
|
||||||
DEFINE_GUID(CLSID_CFormatZip, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x01, 0x00, 0x00);
|
DEFINE_GUID(CLSID_CFormatZip, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x01, 0x00, 0x00);
|
||||||
DEFINE_GUID(CLSID_CFormatTar, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0xee, 0x00, 0x00);
|
DEFINE_GUID(CLSID_CFormatTar, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0xee, 0x00, 0x00);
|
||||||
DEFINE_GUID(CLSID_CFormatArj, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x04, 0x00, 0x00);
|
DEFINE_GUID(CLSID_CFormatArj, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x04, 0x00, 0x00);
|
||||||
@ -37,21 +58,21 @@ DEFINE_GUID(CLSID_CFormatWim, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00,
|
|||||||
DEFINE_GUID(CLSID_CFormatZ, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x05, 0x00, 0x00);*/
|
DEFINE_GUID(CLSID_CFormatZ, 0x23170f69, 0x40c1, 0x278a, 0x10, 0x00, 0x00, 0x01, 0x10, 0x05, 0x00, 0x00);*/
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
GUID _supportedFileFormats[] = {CLSID_CFormatRar,CLSID_CFormatZip,CLSID_CFormatTar,CLSID_CFormat7z,CLSID_CFormatArj};
|
GUID _supportedFileFormats[] = {CLSID_CFormatRar,CLSID_CFormatZip,CLSID_CFormatTar,CLSID_CFormat7z,CLSID_CFormatArj,CLSID_CFormatRar5};
|
||||||
#else
|
#else
|
||||||
GUID _supportedFileFormats[] = {CLSID_CFormatZip,CLSID_CFormatTar,CLSID_CFormat7z,CLSID_CFormatArj};
|
GUID _supportedFileFormats[] = {CLSID_CFormatZip,CLSID_CFormatTar,CLSID_CFormat7z,CLSID_CFormatArj};
|
||||||
#endif
|
#endif
|
||||||
std::vector<GUID> supportedFileFormats (_supportedFileFormats, _supportedFileFormats + sizeof(_supportedFileFormats) / sizeof(_supportedFileFormats[0]) );
|
std::vector<GUID> supportedFileFormats (_supportedFileFormats, _supportedFileFormats + sizeof(_supportedFileFormats) / sizeof(_supportedFileFormats[0]) );
|
||||||
|
|
||||||
DEFINE_GUID(IID_InArchive, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00);
|
DEFINE_GUID(IID_InArchive, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0x00, 0x00);
|
||||||
DEFINE_GUID(IID_ISetCompressCodecsInfo, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x00);
|
DEFINE_GUID(IID_ISetCompressCodecsInfoX, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x00);
|
||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
/*#ifdef Q_OS_UNIX
|
||||||
DEFINE_GUID(IID_IOutStream, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00);
|
DEFINE_GUID(IID_IOutStream, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00);
|
||||||
DEFINE_GUID(IID_IInStream, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00);
|
DEFINE_GUID(IID_IInStream, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00);
|
||||||
DEFINE_GUID(IID_IStreamGetSize, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00);
|
DEFINE_GUID(IID_IStreamGetSize, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00);
|
||||||
DEFINE_GUID(IID_ISequentialInStream, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00);
|
DEFINE_GUID(IID_ISequentialInStream, 0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00);
|
||||||
#endif
|
#endif*/
|
||||||
|
|
||||||
struct SevenZipInterface {
|
struct SevenZipInterface {
|
||||||
CreateObjectFunc createObjectFunc;
|
CreateObjectFunc createObjectFunc;
|
||||||
@ -101,7 +122,7 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
|||||||
CInFileStream *fileSpec = new CInFileStream;
|
CInFileStream *fileSpec = new CInFileStream;
|
||||||
CMyComPtr<IInStream> file = fileSpec;
|
CMyComPtr<IInStream> file = fileSpec;
|
||||||
|
|
||||||
CArchiveOpenCallback *openCallbackSpec = new CArchiveOpenCallback;
|
YCArchiveOpenCallback *openCallbackSpec = new YCArchiveOpenCallback;
|
||||||
CMyComPtr<IArchiveOpenCallback> openCallback = openCallbackSpec;
|
CMyComPtr<IArchiveOpenCallback> openCallback = openCallbackSpec;
|
||||||
openCallbackSpec->PasswordIsDefined = false;
|
openCallbackSpec->PasswordIsDefined = false;
|
||||||
// openCallbackSpec->PasswordIsDefined = true;
|
// openCallbackSpec->PasswordIsDefined = true;
|
||||||
@ -151,7 +172,7 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
|||||||
#else
|
#else
|
||||||
if (memcmp(magicNumber,rar,6) == 0)
|
if (memcmp(magicNumber,rar,6) == 0)
|
||||||
if (memcmp(magicNumber,rar5,7) == 0)
|
if (memcmp(magicNumber,rar5,7) == 0)
|
||||||
return;
|
i=5;
|
||||||
else
|
else
|
||||||
i=0;
|
i=0;
|
||||||
else if (memcmp(magicNumber,zip,2)==0)
|
else if (memcmp(magicNumber,zip,2)==0)
|
||||||
@ -218,11 +239,16 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (memcmp(magicNumber,rar5,7) == 0)
|
//RAR in macos and unix
|
||||||
return;//we don't support rar5
|
GUID clsidRar;
|
||||||
|
if (memcmp(magicNumber,rar5,7) == 0) {
|
||||||
|
clsidRar = CLSID_CFormatRar5;
|
||||||
|
} else {
|
||||||
|
clsidRar = CLSID_CFormatRar;
|
||||||
|
}
|
||||||
|
|
||||||
isRar=true; //tell the destructor we *tried* to open a rar file!
|
isRar=true; //tell the destructor we *tried* to open a rar file!
|
||||||
if (szInterface->createObjectFunc(&CLSID_CFormatRar, &IID_InArchive, (void **)&szInterface->archive) != S_OK)
|
if (szInterface->createObjectFunc(&clsidRar, &IID_InArchive, (void **)&szInterface->archive) != S_OK)
|
||||||
{
|
{
|
||||||
qDebug() << "Error creating rar archive :" + filePath;
|
qDebug() << "Error creating rar archive :" + filePath;
|
||||||
return;
|
return;
|
||||||
@ -230,7 +256,7 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
|||||||
|
|
||||||
CMyComPtr<ISetCompressCodecsInfo> codecsInfo;
|
CMyComPtr<ISetCompressCodecsInfo> codecsInfo;
|
||||||
|
|
||||||
if (szInterface->archive->QueryInterface(IID_ISetCompressCodecsInfo,(void **)&codecsInfo) != S_OK)
|
if (szInterface->archive->QueryInterface(IID_ISetCompressCodecsInfoX,(void **)&codecsInfo) != S_OK)
|
||||||
{
|
{
|
||||||
qDebug() << "Error getting rar codec :" + filePath;
|
qDebug() << "Error getting rar codec :" + filePath;
|
||||||
return;
|
return;
|
||||||
@ -296,22 +322,22 @@ bool CompressedArchive::loadFunctions()
|
|||||||
{
|
{
|
||||||
#if defined Q_OS_UNIX
|
#if defined Q_OS_UNIX
|
||||||
#if defined Q_OS_MAC
|
#if defined Q_OS_MAC
|
||||||
rarLib = new QLibrary(QCoreApplication::applicationDirPath()+"/utils/Codecs/Rar29");
|
rarLib = new QLibrary(QCoreApplication::applicationDirPath()+"/utils/Codecs/Rar");
|
||||||
#else
|
#else
|
||||||
//check if a yacreader specific version of p7zip exists on the system
|
//check if a yacreader specific version of p7zip exists on the system
|
||||||
QFileInfo rarCodec(QString(LIBDIR)+"/yacreader/Codecs/Rar29.so");
|
QFileInfo rarCodec(QString(LIBDIR)+"/yacreader/Codecs/Rar.so");
|
||||||
if (rarCodec.exists())
|
if (rarCodec.exists())
|
||||||
{
|
{
|
||||||
rarLib = new QLibrary(rarCodec.absoluteFilePath());
|
rarLib = new QLibrary(rarCodec.absoluteFilePath());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rarLib = new QLibrary(QString(LIBDIR)+"/p7zip/Codecs/Rar29.so");
|
rarLib = new QLibrary(QString(LIBDIR)+"/p7zip/Codecs/Rar.so");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(!rarLib->load())
|
if(!rarLib->load())
|
||||||
{
|
{
|
||||||
qDebug() << "Error Loading Rar29.so : " + rarLib->errorString() << endl;
|
qDebug() << "Error Loading Rar.so : " + rarLib->errorString() << endl;
|
||||||
QCoreApplication::exit(700); //TODO yacreader_global can't be used here, it is GUI dependant, YACReader::SevenZNotFound
|
QCoreApplication::exit(700); //TODO yacreader_global can't be used here, it is GUI dependant, YACReader::SevenZNotFound
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -387,7 +413,7 @@ void CompressedArchive::setupFilesNames()
|
|||||||
if(!isDir)
|
if(!isDir)
|
||||||
{
|
{
|
||||||
szInterface->archive->GetProperty(i, kpidPath, &prop);
|
szInterface->archive->GetProperty(i, kpidPath, &prop);
|
||||||
UString s = ConvertPropVariantToString(prop);
|
UString s = prop.bstrVal;
|
||||||
const wchar_t * chars = s.operator const wchar_t *();
|
const wchar_t * chars = s.operator const wchar_t *();
|
||||||
files.append(QString::fromWCharArray(chars));
|
files.append(QString::fromWCharArray(chars));
|
||||||
offsets.append(i);
|
offsets.append(i);
|
||||||
@ -440,7 +466,7 @@ int CompressedArchive::getNumEntries()
|
|||||||
|
|
||||||
QList<QByteArray> CompressedArchive::getAllData(const QVector<quint32> & indexes, ExtractDelegate * delegate)
|
QList<QByteArray> CompressedArchive::getAllData(const QVector<quint32> & indexes, ExtractDelegate * delegate)
|
||||||
{
|
{
|
||||||
CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback(indexesToPages, true, delegate);
|
YCArchiveExtractCallback *extractCallbackSpec = new YCArchiveExtractCallback(indexesToPages, true, delegate);
|
||||||
CMyComPtr<IArchiveExtractCallback> extractCallback(extractCallbackSpec);
|
CMyComPtr<IArchiveExtractCallback> extractCallback(extractCallbackSpec);
|
||||||
extractCallbackSpec->Init(szInterface->archive, L""); // second parameter is output folder path
|
extractCallbackSpec->Init(szInterface->archive, L""); // second parameter is output folder path
|
||||||
extractCallbackSpec->PasswordIsDefined = false;
|
extractCallbackSpec->PasswordIsDefined = false;
|
||||||
@ -464,7 +490,7 @@ QByteArray CompressedArchive::getRawDataAtIndex(int index)
|
|||||||
{
|
{
|
||||||
if(index>=0 && index < getNumFiles())
|
if(index>=0 && index < getNumFiles())
|
||||||
{
|
{
|
||||||
CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback(indexesToPages);
|
YCArchiveExtractCallback *extractCallbackSpec = new YCArchiveExtractCallback(indexesToPages);
|
||||||
CMyComPtr<IArchiveExtractCallback> extractCallback(extractCallbackSpec);
|
CMyComPtr<IArchiveExtractCallback> extractCallback(extractCallbackSpec);
|
||||||
extractCallbackSpec->Init(szInterface->archive, L""); // second parameter is output folder path
|
extractCallbackSpec->Init(szInterface->archive, L""); // second parameter is output folder path
|
||||||
extractCallbackSpec->PasswordIsDefined = false;
|
extractCallbackSpec->PasswordIsDefined = false;
|
||||||
@ -489,7 +515,7 @@ QByteArray CompressedArchive::getRawDataAtIndex(int index)
|
|||||||
|
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
|
|
||||||
STDMETHODIMP CompressedArchive::GetNumberOfMethods(UInt32 *numMethods)
|
STDMETHODIMP CompressedArchive::GetNumMethods(UInt32 *numMethods)
|
||||||
{
|
{
|
||||||
return szInterface->getNumberOfMethodsFuncRar(numMethods);
|
return szInterface->getNumberOfMethodsFuncRar(numMethods);
|
||||||
}
|
}
|
||||||
|
@ -8,23 +8,9 @@
|
|||||||
#include "libp7zip/CPP/Common/MyCom.h"
|
#include "libp7zip/CPP/Common/MyCom.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class ExtractDelegate;
|
class ExtractDelegate;
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
#include "7z_includes.h"
|
|
||||||
#define _MY_WINAPI WINAPI
|
|
||||||
#else
|
|
||||||
#define _MY_WINAPI
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef quint32 (_MY_WINAPI * CreateObjectFunc)(const GUID *clsID,const GUID *interfaceID,void **outObject);
|
|
||||||
typedef quint32 (_MY_WINAPI *GetMethodPropertyFunc)(quint32 index, PROPID propID, PROPVARIANT *value);
|
|
||||||
typedef quint32 (_MY_WINAPI *GetNumberOfMethodsFunc)(quint32 *numMethods);
|
|
||||||
typedef quint32 (_MY_WINAPI *GetNumberOfFormatsFunc)(quint32 *numFormats);
|
|
||||||
typedef quint32 (_MY_WINAPI *GetHandlerPropertyFunc)(PROPID propID, PROPVARIANT *value);
|
|
||||||
typedef quint32 (_MY_WINAPI *GetHandlerPropertyFunc2)(quint32 index, PROPID propID, PROPVARIANT *value);
|
|
||||||
typedef quint32 (_MY_WINAPI *SetLargePageModeFunc)();
|
|
||||||
|
|
||||||
class QLibrary;
|
class QLibrary;
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
@ -48,7 +34,7 @@ public:
|
|||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
MY_UNKNOWN_IMP
|
MY_UNKNOWN_IMP
|
||||||
|
|
||||||
STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods);
|
STDMETHOD(GetNumMethods)(UInt32 *numMethods);
|
||||||
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
|
STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value);
|
||||||
STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder);
|
STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder);
|
||||||
STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder);
|
STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder);
|
||||||
|
@ -40,7 +40,7 @@ static HRESULT IsArchiveItemFolder(IInArchive *archive, UInt32 index, bool &resu
|
|||||||
return IsArchiveItemProp(archive, index, kpidIsDir, result);
|
return IsArchiveItemProp(archive, index, kpidIsDir, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
class CArchiveExtractCallback:
|
class YCArchiveExtractCallback:
|
||||||
public IArchiveExtractCallback,
|
public IArchiveExtractCallback,
|
||||||
public ICryptoGetTextPassword,
|
public ICryptoGetTextPassword,
|
||||||
public CMyUnknownImp
|
public CMyUnknownImp
|
||||||
@ -92,28 +92,28 @@ public:
|
|||||||
UInt64 newFileSize;
|
UInt64 newFileSize;
|
||||||
QMap<qint32, qint32> indexesToPages;
|
QMap<qint32, qint32> indexesToPages;
|
||||||
|
|
||||||
CArchiveExtractCallback(const QMap<qint32, qint32> & indexesToPages ,bool c = false,ExtractDelegate * d = 0) : PasswordIsDefined(false),all(c),delegate(d),indexesToPages(indexesToPages) {}
|
YCArchiveExtractCallback(const QMap<qint32, qint32> & indexesToPages ,bool c = false,ExtractDelegate * d = 0) : PasswordIsDefined(false),all(c),delegate(d),indexesToPages(indexesToPages) {}
|
||||||
~CArchiveExtractCallback() {MidFree(data);}
|
~YCArchiveExtractCallback() {MidFree(data);}
|
||||||
};
|
};
|
||||||
|
|
||||||
void CArchiveExtractCallback::Init(IInArchive *archiveHandler, const UString &directoryPath)
|
void YCArchiveExtractCallback::Init(IInArchive *archiveHandler, const UString &directoryPath)
|
||||||
{
|
{
|
||||||
NumErrors = 0;
|
NumErrors = 0;
|
||||||
_archiveHandler = archiveHandler;
|
_archiveHandler = archiveHandler;
|
||||||
directoryPath;//unused
|
directoryPath;//unused
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 /* size */)
|
STDMETHODIMP YCArchiveExtractCallback::SetTotal(UInt64 /* size */)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 * /* completeValue */)
|
STDMETHODIMP YCArchiveExtractCallback::SetCompleted(const UInt64 * /* completeValue */)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
|
STDMETHODIMP YCArchiveExtractCallback::GetStream(UInt32 index,
|
||||||
ISequentialOutStream **outStream, Int32 askExtractMode)
|
ISequentialOutStream **outStream, Int32 askExtractMode)
|
||||||
{
|
{
|
||||||
*outStream = 0;
|
*outStream = 0;
|
||||||
@ -185,7 +185,7 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//se necesita conocer el tamaño del archivo para poder reservar suficiente memoria
|
//se necesita conocer el tama?o del archivo para poder reservar suficiente memoria
|
||||||
bool newFileSizeDefined;
|
bool newFileSizeDefined;
|
||||||
{
|
{
|
||||||
// Get Size
|
// Get Size
|
||||||
@ -193,10 +193,10 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
|
|||||||
RINOK(_archiveHandler->GetProperty(index, kpidSize, &prop));
|
RINOK(_archiveHandler->GetProperty(index, kpidSize, &prop));
|
||||||
newFileSizeDefined = (prop.vt != VT_EMPTY);
|
newFileSizeDefined = (prop.vt != VT_EMPTY);
|
||||||
if (newFileSizeDefined)
|
if (newFileSizeDefined)
|
||||||
newFileSize = ConvertPropVariantToUInt64(prop);
|
ConvertPropVariantToUInt64(prop, newFileSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
//No hay que crear ningún fichero, ni directorios intermedios
|
//No hay que crear ning?n fichero, ni directorios intermedios
|
||||||
/*{
|
/*{
|
||||||
// Create folders for file
|
// Create folders for file
|
||||||
int slashPos = _filePath.ReverseFind(WCHAR_PATH_SEPARATOR);
|
int slashPos = _filePath.ReverseFind(WCHAR_PATH_SEPARATOR);
|
||||||
@ -239,7 +239,7 @@ STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index,
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode)
|
STDMETHODIMP YCArchiveExtractCallback::PrepareOperation(Int32 askExtractMode)
|
||||||
{
|
{
|
||||||
_extractMode = false;
|
_extractMode = false;
|
||||||
switch (askExtractMode)
|
switch (askExtractMode)
|
||||||
@ -256,7 +256,7 @@ STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
|
STDMETHODIMP YCArchiveExtractCallback::SetOperationResult(Int32 operationResult)
|
||||||
{
|
{
|
||||||
switch(operationResult)
|
switch(operationResult)
|
||||||
{
|
{
|
||||||
@ -280,7 +280,7 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
|
|||||||
qDebug() << " ";
|
qDebug() << " ";
|
||||||
switch(operationResult)
|
switch(operationResult)
|
||||||
{
|
{
|
||||||
case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
|
case NArchive::NExtract::NOperationResult::kUnsupportedMethod:
|
||||||
if(delegate != 0)
|
if(delegate != 0)
|
||||||
delegate->unknownError(_index);
|
delegate->unknownError(_index);
|
||||||
qDebug() << kUnsupportedMethod;
|
qDebug() << kUnsupportedMethod;
|
||||||
@ -317,7 +317,7 @@ STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
|
STDMETHODIMP YCArchiveExtractCallback::CryptoGetTextPassword(BSTR *password)
|
||||||
{
|
{
|
||||||
if (!PasswordIsDefined)
|
if (!PasswordIsDefined)
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- libp7zip/CPP/myWindows/StdAfx.h 2014-06-06 23:52:13.397311952 +0200
|
--- libp7zip/CPP/include_windows/windows.h 2018-09-18 17:17:26.000000000 +0200
|
||||||
+++ libp7zip/CPP/myWindows/StdAfx.h 2014-06-06 23:53:20.353981756 +0200
|
--- libp7zip/CPP/include_windows/windows.h 2018-09-18 17:17:24.000000000 +0200
|
||||||
@@ -114,7 +114,7 @@
|
@@ -36,7 +36,7 @@
|
||||||
|
#define WINAPI
|
||||||
|
|
||||||
#if defined( __x86_64__ )
|
#undef BOOL
|
||||||
|
-typedef int BOOL;
|
||||||
|
+typedef signed char BOOL;
|
||||||
|
|
||||||
-#define _WIN64 1
|
|
||||||
+//#define _WIN64 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#define CREATE_NEW 1
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// Archive Open callback class
|
// Archive Open callback class
|
||||||
|
|
||||||
|
|
||||||
class CArchiveOpenCallback:
|
class YCArchiveOpenCallback:
|
||||||
public IArchiveOpenCallback,
|
public IArchiveOpenCallback,
|
||||||
public ICryptoGetTextPassword,
|
public ICryptoGetTextPassword,
|
||||||
public CMyUnknownImp
|
public CMyUnknownImp
|
||||||
@ -23,20 +23,20 @@ public:
|
|||||||
bool PasswordIsDefined;
|
bool PasswordIsDefined;
|
||||||
UString Password;
|
UString Password;
|
||||||
|
|
||||||
CArchiveOpenCallback() : PasswordIsDefined(false) {}
|
YCArchiveOpenCallback() : PasswordIsDefined(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
STDMETHODIMP CArchiveOpenCallback::SetTotal(const UInt64 * /* files */, const UInt64 * /* bytes */)
|
STDMETHODIMP YCArchiveOpenCallback::SetTotal(const UInt64 * /* files */, const UInt64 * /* bytes */)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveOpenCallback::SetCompleted(const UInt64 * /* files */, const UInt64 * /* bytes */)
|
STDMETHODIMP YCArchiveOpenCallback::SetCompleted(const UInt64 * /* files */, const UInt64 * /* bytes */)
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP CArchiveOpenCallback::CryptoGetTextPassword(BSTR *password)
|
STDMETHODIMP YCArchiveOpenCallback::CryptoGetTextPassword(BSTR *password)
|
||||||
{
|
{
|
||||||
if (!PasswordIsDefined)
|
if (!PasswordIsDefined)
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,7 @@ win32 {
|
|||||||
unix {
|
unix {
|
||||||
exists (../compressed_archive/libp7zip) {
|
exists (../compressed_archive/libp7zip) {
|
||||||
message(Found p7zip source code...)
|
message(Found p7zip source code...)
|
||||||
|
#this is probably only needed in macos
|
||||||
system(patch -N -p0 -i libp7zip.patch)
|
system(patch -N -p0 -i libp7zip.patch)
|
||||||
} else {
|
} else {
|
||||||
error(You\'ll need 7zip source code to compile YACReader. \
|
error(You\'ll need 7zip source code to compile YACReader. \
|
||||||
@ -18,20 +19,19 @@ exists (../compressed_archive/libp7zip) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG += precompile_header
|
|
||||||
|
|
||||||
win32 {PRECOMPILED_HEADER = $$PWD/StdAfx.h}
|
|
||||||
!win32 {PRECOMPILED_HEADER = $$PWD/libp7zip/CPP/myWindows/StdAfx.h}
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
INCLUDEPATH += $$PWD/lib7zip/CPP/
|
INCLUDEPATH += \
|
||||||
|
$$PWD/lib7zip/myWindows \
|
||||||
|
$$PWD/lib7zip/CPP \
|
||||||
|
$$PWD/lib7zip/include_windows \
|
||||||
|
|
||||||
DEFINES += _UNICODE _WIN32
|
DEFINES += _UNICODE _WIN32
|
||||||
|
|
||||||
SOURCES += $$PWD/compressed_archive.cpp \
|
SOURCES += \
|
||||||
|
$$PWD/compressed_archive.cpp \
|
||||||
$$PWD/lib7zip/CPP/Windows/FileIO.cpp \
|
$$PWD/lib7zip/CPP/Windows/FileIO.cpp \
|
||||||
$$PWD/lib7zip/CPP/Windows/PropVariant.cpp \
|
$$PWD/lib7zip/CPP/Windows/PropVariant.cpp \
|
||||||
$$PWD/lib7zip/CPP/Windows/PropVariantConversions.cpp \
|
$$PWD/lib7zip/CPP/Windows/PropVariantConv.cpp \
|
||||||
$$PWD/lib7zip/CPP/Common/IntToString.cpp \
|
$$PWD/lib7zip/CPP/Common/IntToString.cpp \
|
||||||
$$PWD/lib7zip/CPP/Common/MyString.cpp \
|
$$PWD/lib7zip/CPP/Common/MyString.cpp \
|
||||||
$$PWD/lib7zip/CPP/Common/MyVector.cpp \
|
$$PWD/lib7zip/CPP/Common/MyVector.cpp \
|
||||||
@ -42,50 +42,47 @@ SOURCES += $$PWD/compressed_archive.cpp \
|
|||||||
$$PWD/lib7zip/C/Alloc.c \
|
$$PWD/lib7zip/C/Alloc.c \
|
||||||
$$PWD/lib7zip/CPP/7zip/Common/StreamObjects.cpp
|
$$PWD/lib7zip/CPP/7zip/Common/StreamObjects.cpp
|
||||||
|
|
||||||
HEADERS += $$PWD/compressed_archive.h \
|
HEADERS += \
|
||||||
|
$$PWD/lib7zip/CPP/Common/Common.h \
|
||||||
|
$$PWD/compressed_archive.h \
|
||||||
$$PWD/extract_delegate.h \
|
$$PWD/extract_delegate.h \
|
||||||
$$PWD/7z_includes.h \
|
$$PWD/7z_includes.h \
|
||||||
$$PWD/open_callbacks.h \
|
$$PWD/open_callbacks.h \
|
||||||
$$PWD/extract_callbacks.h\
|
$$PWD/extract_callbacks.h
|
||||||
$$PWD/lib7zip/CPP/Windows/FileIO.h \
|
}
|
||||||
$$PWD/lib7zip/CPP/Windows/PropVariant.h \
|
|
||||||
$$PWD/lib7zip/CPP/Windows/PropVariantConversions.h \
|
!win32 {
|
||||||
$$PWD/lib7zip/CPP/Common/IntToString.h \
|
CONFIG += precompile_header
|
||||||
$$PWD/lib7zip/CPP/Common/MyString.h \
|
PRECOMPILED_HEADER = $$PWD/7z_precompiled_header.h
|
||||||
$$PWD/lib7zip/CPP/Common/MyVector.h \
|
|
||||||
$$PWD/lib7zip/CPP/Common/StringConvert.h \
|
|
||||||
$$PWD/lib7zip/CPP/Common/Wildcard.h \
|
|
||||||
$$PWD/lib7zip/CPP/7zip/Common/FileStreams.h \
|
|
||||||
$$PWD/lib7zip/CPP/7zip/IStream.h \
|
|
||||||
$$PWD/lib7zip/CPP/7zip/Common/StreamUtils.h \
|
|
||||||
$$PWD/lib7zip/C/Alloc.h \
|
|
||||||
$$PWD/lib7zip/CPP/7zip/Common/StreamObjects.h
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macx{
|
macx{
|
||||||
LIBS += -framework IOKit -framework CoreFoundation
|
LIBS += -framework IOKit -framework CoreFoundation
|
||||||
|
|
||||||
DEFINES += UNICODE _UNICODE _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
||||||
NDEBUG _REENTRANT ENV_UNIX \
|
NDEBUG _REENTRANT ENV_UNIX \
|
||||||
_7ZIP_LARGE_PAGES ENV_MACOSX _TCHAR_DEFINED
|
_7ZIP_LARGE_PAGES ENV_MACOSX _TCHAR_DEFINED \
|
||||||
|
UNICODE _UNICODE UNIX_USE_WIN_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
unix:!macx{
|
unix:!macx{
|
||||||
DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE \
|
||||||
NDEBUG _REENTRANT ENV_UNIX \
|
NDEBUG _REENTRANT ENV_UNIX \
|
||||||
_7ZIP_LARGE_PAGES
|
_7ZIP_LARGE_PAGES \
|
||||||
|
UNICODE _UNICODE UNIX_USE_WIN_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
!win32 {
|
!win32 {
|
||||||
INCLUDEPATH += $$PWD/libp7zip/CPP/ \
|
INCLUDEPATH += $$PWD/libp7zip/CPP/myWindows/ \
|
||||||
$$PWD/libp7zip/CPP/myWindows/ \
|
$$PWD/libp7zip/CPP/ \
|
||||||
$$PWD/libp7zip/CPP/include_windows/
|
$$PWD/libp7zip/CPP/include_windows/
|
||||||
|
|
||||||
SOURCES += $$PWD/compressed_archive.cpp \
|
SOURCES += \
|
||||||
|
$$PWD/compressed_archive.cpp \
|
||||||
|
$$PWD/libp7zip/CPP/Windows/PropVariant.cpp \
|
||||||
|
$$PWD/libp7zip/CPP/Windows/PropVariantConv.cpp \
|
||||||
$$PWD/libp7zip/CPP/Windows/FileIO.cpp \
|
$$PWD/libp7zip/CPP/Windows/FileIO.cpp \
|
||||||
$$PWD/libp7zip/CPP/Windows/FileFind.cpp \
|
$$PWD/libp7zip/CPP/Windows/FileFind.cpp \
|
||||||
$$PWD/libp7zip/CPP/Windows/PropVariant.cpp \
|
|
||||||
$$PWD/libp7zip/CPP/Windows/PropVariantConversions.cpp \
|
|
||||||
$$PWD/libp7zip/CPP/Common/IntToString.cpp \
|
$$PWD/libp7zip/CPP/Common/IntToString.cpp \
|
||||||
$$PWD/libp7zip/CPP/Common/MyString.cpp \
|
$$PWD/libp7zip/CPP/Common/MyString.cpp \
|
||||||
$$PWD/libp7zip/CPP/Common/MyVector.cpp \
|
$$PWD/libp7zip/CPP/Common/MyVector.cpp \
|
||||||
@ -98,30 +95,7 @@ SOURCES += $$PWD/compressed_archive.cpp \
|
|||||||
$$PWD/libp7zip/CPP/myWindows/wine_date_and_time.cpp \
|
$$PWD/libp7zip/CPP/myWindows/wine_date_and_time.cpp \
|
||||||
$$PWD/libp7zip/CPP/Common/MyWindows.cpp
|
$$PWD/libp7zip/CPP/Common/MyWindows.cpp
|
||||||
|
|
||||||
HEADERS += $$PWD/compressed_archive.h \
|
HEADERS += \
|
||||||
$$PWD/7z_includes.h \
|
$$PWD/compressed_archive.h \
|
||||||
$$PWD/open_callbacks.h \
|
$$PWD/7z_includes.h
|
||||||
$$PWD/extract_callbacks.h\
|
|
||||||
$$PWD/libp7zip/CPP/include_windows/windows.h \
|
|
||||||
$$PWD/libp7zip/CPP/include_windows/tchar.h \
|
|
||||||
$$PWD/libp7zip/CPP/include_windows/basetyps.h \
|
|
||||||
$$PWD/libp7zip/CPP/Windows/FileFind.h \
|
|
||||||
$$PWD/libp7zip/CPP/Windows/FileIO.h \
|
|
||||||
$$PWD/libp7zip/CPP/Windows/PropVariant.h \
|
|
||||||
$$PWD/libp7zip/CPP/Windows/PropVariantConversions.h \
|
|
||||||
$$PWD/libp7zip/CPP/Common/IntToString.h \
|
|
||||||
$$PWD/libp7zip/CPP/Common/MyString.h \
|
|
||||||
$$PWD/libp7zip/CPP/Common/MyVector.h \
|
|
||||||
$$PWD/libp7zip/CPP/Common/StringConvert.h \
|
|
||||||
$$PWD/libp7zip/CPP/Common/Wildcard.h \
|
|
||||||
$$PWD/libp7zip/CPP/7zip/Common/FileStreams.h \
|
|
||||||
$$PWD/libp7zip/CPP/7zip/IStream.h \
|
|
||||||
$$PWD/libp7zip/CPP/7zip/Common/StreamUtils.h \
|
|
||||||
$$PWD/libp7zip/C/Alloc.h \
|
|
||||||
$$PWD/libp7zip/CPP/7zip/Common/StreamObjects.h \
|
|
||||||
$$PWD/libp7zip/CPP/Common/MyWindows.h \
|
|
||||||
$$PWD/libp7zip/CPP/7zip/ICoder.h \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
config.pri
10
config.pri
@ -30,10 +30,18 @@ CONFIG(no_opengl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# default value for comic archive decompression backend
|
# default value for comic archive decompression backend
|
||||||
!CONFIG(unarr):!CONFIG(7zip) {
|
unix:!macx:!CONFIG(unarr):!CONFIG(7zip) {
|
||||||
CONFIG += unarr
|
CONFIG += unarr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32:!CONFIG(unarr):!CONFIG(7zip) {
|
||||||
|
CONFIG += 7zip
|
||||||
|
}
|
||||||
|
|
||||||
|
macx:!CONFIG(unarr):!CONFIG(7zip) {
|
||||||
|
CONFIG += 7zip
|
||||||
|
}
|
||||||
|
|
||||||
# default values for pdf render backend
|
# default values for pdf render backend
|
||||||
win32:!CONFIG(poppler):!CONFIG(pdfium):!CONFIG(no_pdf) {
|
win32:!CONFIG(poppler):!CONFIG(pdfium):!CONFIG(no_pdf) {
|
||||||
CONFIG += pdfium
|
CONFIG += pdfium
|
||||||
|
BIN
dependencies/7zip/macx/7z.so
vendored
Executable file
BIN
dependencies/7zip/macx/7z.so
vendored
Executable file
Binary file not shown.
BIN
dependencies/7zip/macx/Codecs/Rar.so
vendored
Executable file
BIN
dependencies/7zip/macx/Codecs/Rar.so
vendored
Executable file
Binary file not shown.
1
dependencies/7zip/macx/Version.txt
vendored
Normal file
1
dependencies/7zip/macx/Version.txt
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
p7zip 16.02 built from the orignal sources using makefile.macosx_llvm_64bits
|
1
dependencies/7zip/win/Version.txt
vendored
Normal file
1
dependencies/7zip/win/Version.txt
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
7zip 18.05 dlls from the windows installers.
|
BIN
dependencies/7zip/win/x64/7z.dll
vendored
Normal file
BIN
dependencies/7zip/win/x64/7z.dll
vendored
Normal file
Binary file not shown.
BIN
dependencies/7zip/win/x86/7z.dll
vendored
Normal file
BIN
dependencies/7zip/win/x86/7z.dll
vendored
Normal file
Binary file not shown.
@ -8,12 +8,16 @@ macdeployqt YACReader.app
|
|||||||
macdeployqt YACReaderLibrary.app -qmldir=YACReaderLibrary/qml
|
macdeployqt YACReaderLibrary.app -qmldir=YACReaderLibrary/qml
|
||||||
macdeployqt YACReaderLibraryServer.app
|
macdeployqt YACReaderLibraryServer.app
|
||||||
|
|
||||||
|
mkdir -p YACReader.app/Contents/MacOS/utils
|
||||||
mkdir -p YACReaderLibrary.app/Contents/MacOS/utils
|
mkdir -p YACReaderLibrary.app/Contents/MacOS/utils
|
||||||
|
mkdir -p YACReaderLibraryServer.app/Contents/MacOS/utils
|
||||||
|
|
||||||
cp dependencies/qrencode/macx/libqrencode.4.0.0.dylib \
|
cp dependencies/qrencode/macx/libqrencode.4.0.0.dylib \
|
||||||
YACReaderLibrary.app/Contents/MacOS/utils/libqrencode.dylib
|
YACReaderLibrary.app/Contents/MacOS/utils/libqrencode.dylib
|
||||||
|
|
||||||
chmod +w YACReaderLibrary.app/Contents/MacOS/utils/*
|
cp -R dependencies/7zip/macx/* YACReader.app/Contents/MacOS/utils/
|
||||||
|
cp -R dependencies/7zip/macx/* YACReaderLibrary.app/Contents/MacOS/utils/
|
||||||
|
cp -R dependencies/7zip/macx/* YACReaderLibraryServer.app/Contents/MacOS/utils/
|
||||||
|
|
||||||
cp -R release/server YACReaderLibrary.app/Contents/MacOS/
|
cp -R release/server YACReaderLibrary.app/Contents/MacOS/
|
||||||
cp -R release/server YACReaderLibraryServer.app/Contents/MacOS/
|
cp -R release/server YACReaderLibraryServer.app/Contents/MacOS/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user