Added UnrarKit
Prebuilt based on version 2.10b8 (iirc) - should use either cathage or pod, or convert unrarkit to work with swift package manager. For now this is just for experimentation.
This commit is contained in:
parent
bd1c709eda
commit
e1707a7d1c
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/Headers
|
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/Modules
|
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/Resources
|
|
@ -0,0 +1 @@
|
||||||
|
Versions/Current/UnrarKit
|
|
@ -0,0 +1,526 @@
|
||||||
|
//
|
||||||
|
// URKArchive.h
|
||||||
|
// UnrarKit
|
||||||
|
//
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <CoreGraphics/CoreGraphics.h>
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UnrarKit/UnrarKitMacros.h>
|
||||||
|
|
||||||
|
RarosHppIgnore
|
||||||
|
#import <UnrarKit/raros.hpp>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
DllHppIgnore
|
||||||
|
#import <UnrarKit/dll.hpp>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
@class URKFileInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the various error codes that the listing and extraction methods return.
|
||||||
|
* These are returned in NSError's [code]([NSError code]) field.
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSInteger, URKErrorCode) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The last file of the archive has been read
|
||||||
|
*/
|
||||||
|
URKErrorCodeEndOfArchive = ERAR_END_ARCHIVE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The library ran out of memory while reading the archive
|
||||||
|
*/
|
||||||
|
URKErrorCodeNoMemory = ERAR_NO_MEMORY,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The header's CRC doesn't match the decompressed data's CRC
|
||||||
|
*/
|
||||||
|
URKErrorCodeBadData = ERAR_BAD_DATA,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The archive is not a valid RAR file
|
||||||
|
*/
|
||||||
|
URKErrorCodeBadArchive = ERAR_BAD_ARCHIVE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The archive is an unsupported RAR format or version
|
||||||
|
*/
|
||||||
|
URKErrorCodeUnknownFormat = ERAR_UNKNOWN_FORMAT,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failed to open a reference to the file
|
||||||
|
*/
|
||||||
|
URKErrorCodeOpen = ERAR_EOPEN,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failed to create the target directory for extraction
|
||||||
|
*/
|
||||||
|
URKErrorCodeCreate = ERAR_ECREATE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failed to close the archive
|
||||||
|
*/
|
||||||
|
URKErrorCodeClose = ERAR_ECLOSE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failed to read the archive
|
||||||
|
*/
|
||||||
|
URKErrorCodeRead = ERAR_EREAD,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failed to write a file to disk
|
||||||
|
*/
|
||||||
|
URKErrorCodeWrite = ERAR_EWRITE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The archive header's comments are larger than the buffer size
|
||||||
|
*/
|
||||||
|
URKErrorCodeSmall = ERAR_SMALL_BUF,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The cause of the error is unspecified
|
||||||
|
*/
|
||||||
|
URKErrorCodeUnknown = ERAR_UNKNOWN,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A password was not given for a password-protected archive
|
||||||
|
*/
|
||||||
|
URKErrorCodeMissingPassword = ERAR_MISSING_PASSWORD,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No data was returned from the archive
|
||||||
|
*/
|
||||||
|
URKErrorCodeArchiveNotFound = 101,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User cancelled the operation
|
||||||
|
*/
|
||||||
|
URKErrorCodeUserCancelled = 102,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error converting string to UTF-8
|
||||||
|
*/
|
||||||
|
URKErrorCodeStringConversion = 103,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef NSString *const URKProgressInfoKey;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the keys passed in `-[NSProgress userInfo]` for certain methods
|
||||||
|
*/
|
||||||
|
static URKProgressInfoKey _Nonnull
|
||||||
|
/**
|
||||||
|
* For `extractFilesTo:overwrite:error:`, this key contains an instance of URKFileInfo with the file currently being extracted
|
||||||
|
*/
|
||||||
|
URKProgressInfoKeyFileInfoExtracting = @"URKProgressInfoKeyFileInfoExtracting";
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
extern NSString *URKErrorDomain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An Objective-C/Cocoa wrapper around the unrar library
|
||||||
|
*/
|
||||||
|
@interface URKArchive : NSObject
|
||||||
|
// Minimum of iOS 9, macOS 10.11 SDKs
|
||||||
|
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED > 90000) || (defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
|
||||||
|
<NSProgressReporting>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The URL of the archive
|
||||||
|
*/
|
||||||
|
@property(nullable, weak, atomic, readonly) NSURL *fileURL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The filename of the archive
|
||||||
|
*/
|
||||||
|
@property(nullable, weak, atomic, readonly) NSString *filename;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The password of the archive
|
||||||
|
*/
|
||||||
|
@property(nullable, nonatomic, strong) NSString *password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total uncompressed size (in bytes) of all files in the archive. Returns nil on errors
|
||||||
|
*/
|
||||||
|
@property(nullable, atomic, readonly) NSNumber *uncompressedSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The total compressed size (in bytes) of the archive. Returns nil on errors
|
||||||
|
*/
|
||||||
|
@property(nullable, atomic, readonly) NSNumber *compressedSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if the file is one volume of a multi-part archive
|
||||||
|
*/
|
||||||
|
@property(atomic, readonly) BOOL hasMultipleVolumes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Can be used for progress reporting, but it's not necessary. You can also use
|
||||||
|
* implicit progress reporting. If you don't use it, one will still be created,
|
||||||
|
* which will become a child progress of whichever one is the current NSProgress
|
||||||
|
* instance.
|
||||||
|
*
|
||||||
|
* To use this, assign it before beginning an operation that reports progress. Once
|
||||||
|
* the method you're calling has a reference to it, it will nil it out. Please check
|
||||||
|
* for nil before assigning it to avoid concurrency conflicts.
|
||||||
|
*/
|
||||||
|
@property(nullable, strong) NSProgress *progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When performing operations on a RAR archive, the contents of compressed files are checked
|
||||||
|
* against the record of what they were when the archive was created. If there's a mismatch,
|
||||||
|
* either the metadata (header) or archive contents have become corrupted. You can defeat this check by
|
||||||
|
* setting this property to YES, though there may be security implications to turning the
|
||||||
|
* warnings off, as it may indicate a maliciously crafted archive intended to exploit a vulnerability.
|
||||||
|
*
|
||||||
|
* It's recommended to leave the decision of how to treat archives with mismatched CRCs to the user
|
||||||
|
*/
|
||||||
|
@property (assign) BOOL ignoreCRCMismatches;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Creates and returns an archive at the given path
|
||||||
|
*
|
||||||
|
* @param filePath A path to the archive file
|
||||||
|
*/
|
||||||
|
+ (nullable instancetype)rarArchiveAtPath:(NSString *)filePath __deprecated_msg("Use -initWithPath:error: instead");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Creates and returns an archive at the given URL
|
||||||
|
*
|
||||||
|
* @param fileURL The URL of the archive file
|
||||||
|
*/
|
||||||
|
+ (nullable instancetype)rarArchiveAtURL:(NSURL *)fileURL __deprecated_msg("Use -initWithURL:error: instead");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Creates and returns an archive at the given path, with a given password
|
||||||
|
*
|
||||||
|
* @param filePath A path to the archive file
|
||||||
|
* @param password The passowrd of the given archive
|
||||||
|
*/
|
||||||
|
+ (nullable instancetype)rarArchiveAtPath:(NSString *)filePath password:(NSString *)password __deprecated_msg("Use -initWithPath:password:error: instead");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Creates and returns an archive at the given URL, with a given password
|
||||||
|
*
|
||||||
|
* @param fileURL The URL of the archive file
|
||||||
|
* @param password The passowrd of the given archive
|
||||||
|
*/
|
||||||
|
+ (nullable instancetype)rarArchiveAtURL:(NSURL *)fileURL password:(NSString *)password __deprecated_msg("Use -initWithURL:password:error: instead");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do not use the default initializer
|
||||||
|
*/
|
||||||
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns an archive at the given path
|
||||||
|
*
|
||||||
|
* @param filePath A path to the archive file
|
||||||
|
* @param error Contains any error during initialization
|
||||||
|
*
|
||||||
|
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
|
||||||
|
*/
|
||||||
|
- (nullable instancetype)initWithPath:(NSString *)filePath error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns an archive at the given URL
|
||||||
|
*
|
||||||
|
* @param fileURL The URL of the archive file
|
||||||
|
* @param error Contains any error during initialization
|
||||||
|
*
|
||||||
|
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
|
||||||
|
*/
|
||||||
|
- (nullable instancetype)initWithURL:(NSURL *)fileURL error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns an archive at the given path, with a given password
|
||||||
|
*
|
||||||
|
* @param filePath A path to the archive file
|
||||||
|
* @param password The passowrd of the given archive
|
||||||
|
* @param error Contains any error during initialization
|
||||||
|
*
|
||||||
|
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the path
|
||||||
|
*/
|
||||||
|
- (nullable instancetype)initWithPath:(NSString *)filePath password:(NSString *)password error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and returns an archive at the given URL, with a given password
|
||||||
|
*
|
||||||
|
* @param fileURL The URL of the archive file
|
||||||
|
* @param password The passowrd of the given archive
|
||||||
|
* @param error Contains any error during initialization
|
||||||
|
*
|
||||||
|
* @return Returns an initialized URKArchive, unless there's a problem creating a bookmark to the URL
|
||||||
|
*/
|
||||||
|
- (nullable instancetype)initWithURL:(NSURL *)fileURL password:(NSString *)password error:(NSError **)error;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines whether a file is a RAR archive by reading the signature
|
||||||
|
*
|
||||||
|
* @param filePath Path to the file being checked
|
||||||
|
*
|
||||||
|
* @return YES if the file exists and contains a signature indicating it is a RAR archive
|
||||||
|
*/
|
||||||
|
+ (BOOL)pathIsARAR:(NSString *)filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines whether a file is a RAR archive by reading the signature
|
||||||
|
*
|
||||||
|
* @param fileURL URL of the file being checked
|
||||||
|
*
|
||||||
|
* @return YES if the file exists and contains a signature indicating it is a RAR archive
|
||||||
|
*/
|
||||||
|
+ (BOOL)urlIsARAR:(NSURL *)fileURL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists the names of the files in the archive
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return Returns a list of NSString containing the paths within the archive's contents, or nil if an error was encountered
|
||||||
|
*/
|
||||||
|
- (nullable NSArray<NSString*> *)listFilenames:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists the various attributes of each file in the archive
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return Returns a list of URKFileInfo objects, which contain metadata about the archive's files, or nil if an error was encountered
|
||||||
|
*/
|
||||||
|
- (nullable NSArray<URKFileInfo*> *)listFileInfo:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterates the header of the archive, calling the block with each archived file's info.
|
||||||
|
*
|
||||||
|
* WARNING: There is no filtering of duplicate header entries. If a file is listed twice, `action`
|
||||||
|
* will be called twice with that file's path
|
||||||
|
*
|
||||||
|
* @param action The action to perform using the data. Must be non-nil
|
||||||
|
*
|
||||||
|
* - *fileInfo* The metadata of the file within the archive
|
||||||
|
* - *stop* Set to YES to stop reading the archive
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return Returns NO if an error was encountered
|
||||||
|
*/
|
||||||
|
- (BOOL) iterateFileInfo:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
|
||||||
|
error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists the URLs of volumes in a single- or multi-volume archive
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return Returns the list of URLs of all volumes of the archive
|
||||||
|
*/
|
||||||
|
- (nullable NSArray<NSURL*> *)listVolumeURLs:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes all files in the archive to the given path. Supports NSProgress for progress reporting, which also
|
||||||
|
* allows cancellation in the middle of extraction. Use the progress property (as explained in the README) to
|
||||||
|
* retrieve more detailed information, such as the current file being extracted, number of files extracted,
|
||||||
|
* and the URKFileInfo instance being extracted
|
||||||
|
*
|
||||||
|
* @param filePath The destination path of the unarchived files
|
||||||
|
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return YES on successful extraction, NO if an error was encountered
|
||||||
|
*/
|
||||||
|
- (BOOL)extractFilesTo:(NSString *)filePath
|
||||||
|
overwrite:(BOOL)overwrite
|
||||||
|
error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Writes all files in the archive to the given path
|
||||||
|
*
|
||||||
|
* @param filePath The destination path of the unarchived files
|
||||||
|
* @param overwrite YES to overwrite files in the destination directory, NO otherwise
|
||||||
|
* @param progressBlock Called every so often to report the progress of the extraction
|
||||||
|
*
|
||||||
|
* - *currentFile* The info about the file that's being extracted
|
||||||
|
* - *percentArchiveDecompressed* The percentage of the archive that has been decompressed
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return YES on successful extraction, NO if an error was encountered
|
||||||
|
*/
|
||||||
|
- (BOOL)extractFilesTo:(NSString *)filePath
|
||||||
|
overwrite:(BOOL)overwrite
|
||||||
|
progress:(nullable void (^)(URKFileInfo *currentFile, CGFloat percentArchiveDecompressed))progressBlock
|
||||||
|
error:(NSError **)error __deprecated_msg("Use -extractFilesTo:overwrite:error: instead, and if using the progress block, replace with NSProgress as described in the README");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
|
||||||
|
* allows cancellation in the middle of extraction
|
||||||
|
*
|
||||||
|
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||||
|
*/
|
||||||
|
- (nullable NSData *)extractData:(URKFileInfo *)fileInfo
|
||||||
|
error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Unarchive a single file from the archive into memory
|
||||||
|
*
|
||||||
|
* @param fileInfo The info of the file within the archive to be expanded. Only the filename property is used
|
||||||
|
* @param progressBlock Called every so often to report the progress of the extraction
|
||||||
|
*
|
||||||
|
* - *percentDecompressed* The percentage of the archive that has been decompressed
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||||
|
*/
|
||||||
|
- (nullable NSData *)extractData:(URKFileInfo *)fileInfo
|
||||||
|
progress:(nullable void (^)(CGFloat percentDecompressed))progressBlock
|
||||||
|
error:(NSError **)error __deprecated_msg("Use -extractData:error: instead, and if using the progress block, replace with NSProgress as described in the README");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
|
||||||
|
* allows cancellation in the middle of extraction
|
||||||
|
*
|
||||||
|
* @param filePath The path of the file within the archive to be expanded
|
||||||
|
*
|
||||||
|
* - *percentDecompressed* The percentage of the file that has been decompressed
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||||
|
*/
|
||||||
|
- (nullable NSData *)extractDataFromFile:(NSString *)filePath
|
||||||
|
error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **DEPRECATED:** Unarchive a single file from the archive into memory
|
||||||
|
*
|
||||||
|
* @param filePath The path of the file within the archive to be expanded
|
||||||
|
* @param progressBlock Called every so often to report the progress of the extraction
|
||||||
|
*
|
||||||
|
* - *percentDecompressed* The percentage of the file that has been decompressed
|
||||||
|
*
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
*
|
||||||
|
* @return An NSData object containing the bytes of the file, or nil if an error was encountered
|
||||||
|
*/
|
||||||
|
- (nullable NSData *)extractDataFromFile:(NSString *)filePath
|
||||||
|
progress:(nullable void (^)(CGFloat percentDecompressed))progressBlock
|
||||||
|
error:(NSError **)error __deprecated_msg("Use -extractDataFromFile:error: instead, and if using the progress block, replace with NSProgress as described in the README");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loops through each file in the archive in alphabetical order, allowing you to perform an
|
||||||
|
* action using its info. Supports NSProgress for progress reporting, which also allows
|
||||||
|
* cancellation of the operation in the middle
|
||||||
|
*
|
||||||
|
* @param action The action to perform using the data
|
||||||
|
*
|
||||||
|
* - *fileInfo* The metadata of the file within the archive
|
||||||
|
* - *stop* Set to YES to stop reading the archive
|
||||||
|
*
|
||||||
|
* @param error Contains an error if any was returned
|
||||||
|
*
|
||||||
|
* @return YES if no errors were encountered, NO otherwise
|
||||||
|
*/
|
||||||
|
- (BOOL)performOnFilesInArchive:(void(^)(URKFileInfo *fileInfo, BOOL *stop))action
|
||||||
|
error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts each file in the archive into memory, allowing you to perform an action
|
||||||
|
* on it (not sorted). Supports NSProgress for progress reporting, which also allows
|
||||||
|
* cancellation of the operation in the middle
|
||||||
|
*
|
||||||
|
* @param action The action to perform using the data
|
||||||
|
*
|
||||||
|
* - *fileInfo* The metadata of the file within the archive
|
||||||
|
* - *fileData* The full data of the file in the archive
|
||||||
|
* - *stop* Set to YES to stop reading the archive
|
||||||
|
*
|
||||||
|
* @param error Contains an error if any was returned
|
||||||
|
*
|
||||||
|
* @return YES if no errors were encountered, NO otherwise
|
||||||
|
*/
|
||||||
|
- (BOOL)performOnDataInArchive:(void(^)(URKFileInfo *fileInfo, NSData *fileData, BOOL *stop))action
|
||||||
|
error:(NSError **)error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unarchive a single file from the archive into memory. Supports NSProgress for progress reporting, which also
|
||||||
|
* allows cancellation in the middle of extraction
|
||||||
|
*
|
||||||
|
* @param filePath The path of the file within the archive to be expanded
|
||||||
|
* @param error Contains an NSError object when there was an error reading the archive
|
||||||
|
* @param action The block to run for each chunk of data, each of size <= bufferSize
|
||||||
|
*
|
||||||
|
* - *dataChunk* The data read from the archived file. Read bytes and length to write the data
|
||||||
|
* - *percentDecompressed* The percentage of the file that has been decompressed
|
||||||
|
*
|
||||||
|
* @return YES if all data was read successfully, NO if an error was encountered
|
||||||
|
*/
|
||||||
|
- (BOOL)extractBufferedDataFromFile:(NSString *)filePath
|
||||||
|
error:(NSError **)error
|
||||||
|
action:(void(^)(NSData *dataChunk, CGFloat percentDecompressed))action;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YES if archive protected with a password, NO otherwise
|
||||||
|
*/
|
||||||
|
- (BOOL)isPasswordProtected;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests whether the provided password unlocks the archive
|
||||||
|
*
|
||||||
|
* @return YES if correct password or archive is not password protected, NO if password is wrong
|
||||||
|
*/
|
||||||
|
- (BOOL)validatePassword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Iterate through the archive, checking for any errors, including CRC mismatches between
|
||||||
|
the archived file and its header
|
||||||
|
|
||||||
|
@return YES if the data is all correct, false if any check failed (_even if ignoreCRCMismatches is YES_)
|
||||||
|
*/
|
||||||
|
- (BOOL)checkDataIntegrity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Iterate through the archive, checking for any errors, including CRC mismatches between
|
||||||
|
the archived file and its header. If any file's CRC doesn't match, run the given block
|
||||||
|
to allow the API consumer to decide whether to ignore mismatches. NOTE: This may be a
|
||||||
|
security risk. The block is intended to prompt the user, which is why it's forced onto
|
||||||
|
the main thread, rather than making a design-time decision
|
||||||
|
|
||||||
|
@param ignoreCRCMismatches This block, called on the main thread, allows a consuming API to
|
||||||
|
prompt the user whether or not he'd like to ignore CRC mismatches.
|
||||||
|
This block is called the first time a CRC mismatch is detected, if
|
||||||
|
at all. It won't be called if all CRCs match. If this returns YES,
|
||||||
|
then all further CRC mismatches will be ignored for the
|
||||||
|
archive instance
|
||||||
|
|
||||||
|
@return YES if the data is all correct and/or the block returns YES; returns false if
|
||||||
|
any check failed and the given block also returns NO
|
||||||
|
*/
|
||||||
|
- (BOOL)checkDataIntegrityIgnoringCRCMismatches:(BOOL(^)(void))ignoreCRCMismatches;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Check a particular file, to determine if its data matches the CRC
|
||||||
|
checksum stored at the time it written
|
||||||
|
|
||||||
|
@param filePath The file in the archive to check
|
||||||
|
|
||||||
|
@return YES if the data is correct, false if any check failed
|
||||||
|
*/
|
||||||
|
- (BOOL)checkDataIntegrityOfFile:(NSString *)filePath;
|
||||||
|
|
||||||
|
@end
|
||||||
|
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,158 @@
|
||||||
|
//
|
||||||
|
// URKFileInfo.h
|
||||||
|
// UnrarKit
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UnrarKit/UnrarKitMacros.h>
|
||||||
|
|
||||||
|
RarosHppIgnore
|
||||||
|
#import <UnrarKit/raros.hpp>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
DllHppIgnore
|
||||||
|
#import <UnrarKit/dll.hpp>
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
/* See http://www.forensicswiki.org/wiki/RAR and
|
||||||
|
http://www.rarlab.com/technote.htm#filehead for
|
||||||
|
more information about the RAR File Header spec */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the packing methods that can be used on a file in an archive
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSUInteger, URKCompressionMethod) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No compression is used
|
||||||
|
*/
|
||||||
|
URKCompressionMethodStorage = 0x30,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fastest compression
|
||||||
|
*/
|
||||||
|
URKCompressionMethodFastest = 0x31,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fast compression
|
||||||
|
*/
|
||||||
|
URKCompressionMethodFast = 0x32,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Normal compression
|
||||||
|
*/
|
||||||
|
URKCompressionMethodNormal = 0x33,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Good compression
|
||||||
|
*/
|
||||||
|
URKCompressionMethodGood = 0x34,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Best compression
|
||||||
|
*/
|
||||||
|
URKCompressionMethodBest = 0x35,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the various operating systems that can be used when archiving
|
||||||
|
*/
|
||||||
|
typedef NS_ENUM(NSUInteger, URKHostOS) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MS-DOS
|
||||||
|
*/
|
||||||
|
URKHostOSMSDOS = 0,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OS/2
|
||||||
|
*/
|
||||||
|
URKHostOSOS2 = 1,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Windows
|
||||||
|
*/
|
||||||
|
URKHostOSWindows = 2,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unix
|
||||||
|
*/
|
||||||
|
URKHostOSUnix = 3,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mac OS
|
||||||
|
*/
|
||||||
|
URKHostOSMacOS = 4,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BeOS
|
||||||
|
*/
|
||||||
|
URKHostOSBeOS = 5,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A wrapper around a RAR archive's file header, defining the various fields
|
||||||
|
* it contains
|
||||||
|
*/
|
||||||
|
@interface URKFileInfo : NSObject
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the file's archive
|
||||||
|
*/
|
||||||
|
@property (readonly, strong) NSString *archiveName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the file
|
||||||
|
*/
|
||||||
|
@property (readonly, strong) NSString *filename;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The timestamp of the file
|
||||||
|
*/
|
||||||
|
@property (readonly, strong) NSDate *timestamp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The CRC checksum of the file
|
||||||
|
*/
|
||||||
|
@property (readonly, assign) NSUInteger CRC;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Size of the uncompressed file
|
||||||
|
*/
|
||||||
|
@property (readonly, assign) long long uncompressedSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Size of the compressed file
|
||||||
|
*/
|
||||||
|
@property (readonly, assign) long long compressedSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YES if the file will be continued of the next volume
|
||||||
|
*/
|
||||||
|
@property (readonly) BOOL isEncryptedWithPassword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* YES if the file is a directory
|
||||||
|
*/
|
||||||
|
@property (readonly) BOOL isDirectory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of compression
|
||||||
|
*/
|
||||||
|
@property (readonly, assign) URKCompressionMethod compressionMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The OS of the file
|
||||||
|
*/
|
||||||
|
@property (readonly, assign) URKHostOS hostOS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a URKFileInfo instance for the given extended header data
|
||||||
|
*
|
||||||
|
* @param fileHeader The header data for a RAR file
|
||||||
|
*
|
||||||
|
* @return an instance of URKFileInfo
|
||||||
|
*/
|
||||||
|
+ (instancetype) fileInfo:(struct RARHeaderDataEx *)fileHeader;
|
||||||
|
|
||||||
|
@end
|
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// UnrarKit.h
|
||||||
|
// UnrarKit
|
||||||
|
//
|
||||||
|
// Created by Dov Frankel on 1/9/2015.
|
||||||
|
// Copyright (c) 2015 Abbey Code. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
//! Project version number for UnrarKit.
|
||||||
|
FOUNDATION_EXPORT double UnrarKitVersionNumber;
|
||||||
|
|
||||||
|
//! Project version string for UnrarKit.
|
||||||
|
FOUNDATION_EXPORT const unsigned char UnrarKitVersionString[];
|
||||||
|
|
||||||
|
|
||||||
|
#import <UnrarKit/URKArchive.h>
|
||||||
|
#import <UnrarKit/URKFileInfo.h>
|
|
@ -0,0 +1,126 @@
|
||||||
|
//
|
||||||
|
// UnrarKitMacros.h
|
||||||
|
// UnrarKit
|
||||||
|
//
|
||||||
|
// Created by Dov Frankel on 8/8/17.
|
||||||
|
// Copyright © 2017 Abbey Code. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef UnrarKitMacros_h
|
||||||
|
#define UnrarKitMacros_h
|
||||||
|
|
||||||
|
//#import "Availability.h"
|
||||||
|
//#import "AvailabilityInternal.h"
|
||||||
|
|
||||||
|
#define _stringify(a) #a
|
||||||
|
|
||||||
|
#define RarHppIgnore \
|
||||||
|
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wcast-align" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wextra-semi" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wold-style-cast" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wpadded" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wshorten-64-to-32" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wcast-qual" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wundef" ) ) \
|
||||||
|
|
||||||
|
#define DllHppIgnore \
|
||||||
|
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wstrict-prototypes" ) ) \
|
||||||
|
|
||||||
|
#define RarosHppIgnore \
|
||||||
|
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wreserved-id-macro" ) ) \
|
||||||
|
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wundef"
|
||||||
|
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
|
||||||
|
|
||||||
|
|
||||||
|
// iOS 10, macOS 10.12, tvOS 10.0, watchOS 3.0
|
||||||
|
#define UNIFIED_LOGGING_SUPPORTED \
|
||||||
|
__IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 \
|
||||||
|
|| __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 \
|
||||||
|
|| __TV_OS_VERSION_MIN_REQUIRED >= 100000 \
|
||||||
|
|| __WATCH_OS_VERSION_MIN_REQUIRED >= 30000
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#define SDK_10_13_MAJOR 11
|
||||||
|
#define SDK_10_13_MINOR 0
|
||||||
|
#else
|
||||||
|
#define SDK_10_13_MAJOR 10
|
||||||
|
#define SDK_10_13_MINOR 13
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNIFIED_LOGGING_SUPPORTED
|
||||||
|
#import <os/log.h>
|
||||||
|
#import <os/activity.h>
|
||||||
|
|
||||||
|
// Called from +[UnrarKit initialize] and +[URKArchiveTestCase setUp]
|
||||||
|
extern os_log_t unrarkit_log; // Declared in URKArchive.mm
|
||||||
|
extern BOOL unrarkitIsAtLeast10_13SDK; // Declared in URKArchive.m
|
||||||
|
#define URKLogInit() \
|
||||||
|
unrarkit_log = os_log_create("com.abbey-code.UnrarKit", "General"); \
|
||||||
|
\
|
||||||
|
NSOperatingSystemVersion minVersion; \
|
||||||
|
minVersion.majorVersion = SDK_10_13_MAJOR; \
|
||||||
|
minVersion.minorVersion = SDK_10_13_MINOR; \
|
||||||
|
minVersion.patchVersion = 0; \
|
||||||
|
unrarkitIsAtLeast10_13SDK = [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:minVersion]; \
|
||||||
|
URKLogDebug("Is >= 10.13 (or iOS 11): %@", unrarkitIsAtLeast10_13SDK ? @"YES" : @"NO");
|
||||||
|
|
||||||
|
#define URKLog(format, ...) os_log(unrarkit_log, format, ##__VA_ARGS__);
|
||||||
|
#define URKLogInfo(format, ...) os_log_info(unrarkit_log, format, ##__VA_ARGS__);
|
||||||
|
#define URKLogDebug(format, ...) os_log_debug(unrarkit_log, format, ##__VA_ARGS__);
|
||||||
|
|
||||||
|
|
||||||
|
#define URKLogError(format, ...) \
|
||||||
|
if (unrarkitIsAtLeast10_13SDK) os_log_error(unrarkit_log, format, ##__VA_ARGS__); \
|
||||||
|
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_ERROR, format, ##__VA_ARGS__);
|
||||||
|
|
||||||
|
#define URKLogFault(format, ...) \
|
||||||
|
if (unrarkitIsAtLeast10_13SDK) os_log_fault(unrarkit_log, format, ##__VA_ARGS__); \
|
||||||
|
else os_log_with_type(unrarkit_log, OS_LOG_TYPE_FAULT, format, ##__VA_ARGS__);
|
||||||
|
|
||||||
|
|
||||||
|
#define URKCreateActivity(name) \
|
||||||
|
os_activity_t activity = os_activity_create(name, OS_ACTIVITY_CURRENT, OS_ACTIVITY_FLAG_DEFAULT); \
|
||||||
|
os_activity_scope(activity);
|
||||||
|
|
||||||
|
|
||||||
|
#else // Fall back to regular NSLog
|
||||||
|
|
||||||
|
// No-op, as nothing needs to be initialized
|
||||||
|
#define URKLogInit() (void)0
|
||||||
|
|
||||||
|
|
||||||
|
// Only used below
|
||||||
|
#define _removeLogFormatTokens(format) [[@format \
|
||||||
|
stringByReplacingOccurrencesOfString:@"{public}" withString:@""] \
|
||||||
|
stringByReplacingOccurrencesOfString:@"{iec-bytes}" withString:@""]
|
||||||
|
#define _nsLogWithoutWarnings(format, ...) \
|
||||||
|
_Pragma( _stringify( clang diagnostic push ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wformat-nonliteral" ) ) \
|
||||||
|
_Pragma( _stringify( clang diagnostic ignored "-Wformat-security" ) ) \
|
||||||
|
NSLog(_removeLogFormatTokens(format), ##__VA_ARGS__); \
|
||||||
|
_Pragma( _stringify( clang diagnostic pop ) )
|
||||||
|
|
||||||
|
// All levels do the same thing
|
||||||
|
#define URKLog(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||||
|
#define URKLogInfo(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||||
|
#define URKLogDebug(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||||
|
#define URKLogError(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||||
|
#define URKLogFault(format, ...) _nsLogWithoutWarnings(format, ##__VA_ARGS__);
|
||||||
|
|
||||||
|
// No-op, as no equivalent to Activities exists
|
||||||
|
#define URKCreateActivity(name) (void)0
|
||||||
|
|
||||||
|
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
|
#endif // UNIFIED_LOGGING_SUPPORTED
|
||||||
|
|
||||||
|
#endif /* UnrarKitMacros_h */
|
|
@ -0,0 +1,189 @@
|
||||||
|
#ifndef _UNRAR_DLL_
|
||||||
|
#define _UNRAR_DLL_
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
|
#define ERAR_SUCCESS 0
|
||||||
|
#define ERAR_END_ARCHIVE 10
|
||||||
|
#define ERAR_NO_MEMORY 11
|
||||||
|
#define ERAR_BAD_DATA 12
|
||||||
|
#define ERAR_BAD_ARCHIVE 13
|
||||||
|
#define ERAR_UNKNOWN_FORMAT 14
|
||||||
|
#define ERAR_EOPEN 15
|
||||||
|
#define ERAR_ECREATE 16
|
||||||
|
#define ERAR_ECLOSE 17
|
||||||
|
#define ERAR_EREAD 18
|
||||||
|
#define ERAR_EWRITE 19
|
||||||
|
#define ERAR_SMALL_BUF 20
|
||||||
|
#define ERAR_UNKNOWN 21
|
||||||
|
#define ERAR_MISSING_PASSWORD 22
|
||||||
|
#define ERAR_EREFERENCE 23
|
||||||
|
#define ERAR_BAD_PASSWORD 24
|
||||||
|
|
||||||
|
#define RAR_OM_LIST 0
|
||||||
|
#define RAR_OM_EXTRACT 1
|
||||||
|
#define RAR_OM_LIST_INCSPLIT 2
|
||||||
|
|
||||||
|
#define RAR_SKIP 0
|
||||||
|
#define RAR_TEST 1
|
||||||
|
#define RAR_EXTRACT 2
|
||||||
|
|
||||||
|
#define RAR_VOL_ASK 0
|
||||||
|
#define RAR_VOL_NOTIFY 1
|
||||||
|
|
||||||
|
#define RAR_DLL_VERSION 8
|
||||||
|
|
||||||
|
#define RAR_HASH_NONE 0
|
||||||
|
#define RAR_HASH_CRC32 1
|
||||||
|
#define RAR_HASH_BLAKE2 2
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _UNIX
|
||||||
|
#define CALLBACK
|
||||||
|
#define PASCAL
|
||||||
|
#define LONG long
|
||||||
|
#define HANDLE void *
|
||||||
|
#define LPARAM long
|
||||||
|
#define UINT unsigned int
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define RHDF_SPLITBEFORE 0x01
|
||||||
|
#define RHDF_SPLITAFTER 0x02
|
||||||
|
#define RHDF_ENCRYPTED 0x04
|
||||||
|
#define RHDF_SOLID 0x10
|
||||||
|
#define RHDF_DIRECTORY 0x20
|
||||||
|
|
||||||
|
|
||||||
|
struct RARHeaderData
|
||||||
|
{
|
||||||
|
char ArcName[260];
|
||||||
|
char FileName[260];
|
||||||
|
unsigned int Flags;
|
||||||
|
unsigned int PackSize;
|
||||||
|
unsigned int UnpSize;
|
||||||
|
unsigned int HostOS;
|
||||||
|
unsigned int FileCRC;
|
||||||
|
unsigned int FileTime;
|
||||||
|
unsigned int UnpVer;
|
||||||
|
unsigned int Method;
|
||||||
|
unsigned int FileAttr;
|
||||||
|
char *CmtBuf;
|
||||||
|
unsigned int CmtBufSize;
|
||||||
|
unsigned int CmtSize;
|
||||||
|
unsigned int CmtState;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct RARHeaderDataEx
|
||||||
|
{
|
||||||
|
char ArcName[1024];
|
||||||
|
wchar_t ArcNameW[1024];
|
||||||
|
char FileName[1024];
|
||||||
|
wchar_t FileNameW[1024];
|
||||||
|
unsigned int Flags;
|
||||||
|
unsigned int PackSize;
|
||||||
|
unsigned int PackSizeHigh;
|
||||||
|
unsigned int UnpSize;
|
||||||
|
unsigned int UnpSizeHigh;
|
||||||
|
unsigned int HostOS;
|
||||||
|
unsigned int FileCRC;
|
||||||
|
unsigned int FileTime;
|
||||||
|
unsigned int UnpVer;
|
||||||
|
unsigned int Method;
|
||||||
|
unsigned int FileAttr;
|
||||||
|
char *CmtBuf;
|
||||||
|
unsigned int CmtBufSize;
|
||||||
|
unsigned int CmtSize;
|
||||||
|
unsigned int CmtState;
|
||||||
|
unsigned int DictSize;
|
||||||
|
unsigned int HashType;
|
||||||
|
char Hash[32];
|
||||||
|
unsigned int RedirType;
|
||||||
|
wchar_t *RedirName;
|
||||||
|
unsigned int RedirNameSize;
|
||||||
|
unsigned int DirTarget;
|
||||||
|
unsigned int MtimeLow;
|
||||||
|
unsigned int MtimeHigh;
|
||||||
|
unsigned int CtimeLow;
|
||||||
|
unsigned int CtimeHigh;
|
||||||
|
unsigned int AtimeLow;
|
||||||
|
unsigned int AtimeHigh;
|
||||||
|
unsigned int Reserved[988];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct RAROpenArchiveData
|
||||||
|
{
|
||||||
|
char *ArcName;
|
||||||
|
unsigned int OpenMode;
|
||||||
|
unsigned int OpenResult;
|
||||||
|
char *CmtBuf;
|
||||||
|
unsigned int CmtBufSize;
|
||||||
|
unsigned int CmtSize;
|
||||||
|
unsigned int CmtState;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef int (CALLBACK *UNRARCALLBACK)(UINT msg,LPARAM UserData,LPARAM P1,LPARAM P2);
|
||||||
|
|
||||||
|
#define ROADF_VOLUME 0x0001
|
||||||
|
#define ROADF_COMMENT 0x0002
|
||||||
|
#define ROADF_LOCK 0x0004
|
||||||
|
#define ROADF_SOLID 0x0008
|
||||||
|
#define ROADF_NEWNUMBERING 0x0010
|
||||||
|
#define ROADF_SIGNED 0x0020
|
||||||
|
#define ROADF_RECOVERY 0x0040
|
||||||
|
#define ROADF_ENCHEADERS 0x0080
|
||||||
|
#define ROADF_FIRSTVOLUME 0x0100
|
||||||
|
|
||||||
|
#define ROADOF_KEEPBROKEN 0x0001
|
||||||
|
|
||||||
|
struct RAROpenArchiveDataEx
|
||||||
|
{
|
||||||
|
char *ArcName;
|
||||||
|
wchar_t *ArcNameW;
|
||||||
|
unsigned int OpenMode;
|
||||||
|
unsigned int OpenResult;
|
||||||
|
char *CmtBuf;
|
||||||
|
unsigned int CmtBufSize;
|
||||||
|
unsigned int CmtSize;
|
||||||
|
unsigned int CmtState;
|
||||||
|
unsigned int Flags;
|
||||||
|
UNRARCALLBACK Callback;
|
||||||
|
LPARAM UserData;
|
||||||
|
unsigned int OpFlags;
|
||||||
|
wchar_t *CmtBufW;
|
||||||
|
unsigned int Reserved[25];
|
||||||
|
};
|
||||||
|
|
||||||
|
enum UNRARCALLBACK_MESSAGES {
|
||||||
|
UCM_CHANGEVOLUME,UCM_PROCESSDATA,UCM_NEEDPASSWORD,UCM_CHANGEVOLUMEW,
|
||||||
|
UCM_NEEDPASSWORDW
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef int (PASCAL *CHANGEVOLPROC)(char *ArcName,int Mode);
|
||||||
|
typedef int (PASCAL *PROCESSDATAPROC)(unsigned char *Addr,int Size);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
HANDLE PASCAL RAROpenArchive(struct RAROpenArchiveData *ArchiveData);
|
||||||
|
HANDLE PASCAL RAROpenArchiveEx(struct RAROpenArchiveDataEx *ArchiveData);
|
||||||
|
int PASCAL RARCloseArchive(HANDLE hArcData);
|
||||||
|
int PASCAL RARReadHeader(HANDLE hArcData,struct RARHeaderData *HeaderData);
|
||||||
|
int PASCAL RARReadHeaderEx(HANDLE hArcData,struct RARHeaderDataEx *HeaderData);
|
||||||
|
int PASCAL RARProcessFile(HANDLE hArcData,int Operation,char *DestPath,char *DestName);
|
||||||
|
int PASCAL RARProcessFileW(HANDLE hArcData,int Operation,wchar_t *DestPath,wchar_t *DestName);
|
||||||
|
void PASCAL RARSetCallback(HANDLE hArcData,UNRARCALLBACK Callback,LPARAM UserData);
|
||||||
|
void PASCAL RARSetChangeVolProc(HANDLE hArcData,CHANGEVOLPROC ChangeVolProc);
|
||||||
|
void PASCAL RARSetProcessDataProc(HANDLE hArcData,PROCESSDATAPROC ProcessDataProc);
|
||||||
|
void PASCAL RARSetPassword(HANDLE hArcData,char *Password);
|
||||||
|
int PASCAL RARGetDllVersion();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,36 @@
|
||||||
|
#ifndef _RAR_RAROS_
|
||||||
|
#define _RAR_RAROS_
|
||||||
|
|
||||||
|
#ifdef __EMX__
|
||||||
|
#define _EMX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __DJGPP__
|
||||||
|
#define _DJGPP
|
||||||
|
#define _EMX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__WIN32__) || defined(_WIN32)
|
||||||
|
#define _WIN_ALL // Defined for all Windows platforms, 32 and 64 bit, mobile and desktop.
|
||||||
|
#ifdef _M_X64
|
||||||
|
#define _WIN_64
|
||||||
|
#else
|
||||||
|
#define _WIN_32
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(ANDROID) || defined(__ANDROID__)
|
||||||
|
#define _UNIX
|
||||||
|
#define _ANDROID
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#define _UNIX
|
||||||
|
#define _APPLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(_EMX) && !defined(_WIN_ALL) && !defined(_BEOS) && !defined(_APPLE)
|
||||||
|
#define _UNIX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,6 @@
|
||||||
|
framework module UnrarKit {
|
||||||
|
umbrella header "UnrarKit.h"
|
||||||
|
|
||||||
|
export *
|
||||||
|
module * { export * }
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BuildMachineOSBuild</key>
|
||||||
|
<string>20E241</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>UnrarKit</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.abbey-code.UnrarKit</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>UnrarKit</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>2.10-beta8</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>2.10-beta8</string>
|
||||||
|
<key>DTCompiler</key>
|
||||||
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||||
|
<key>DTPlatformBuild</key>
|
||||||
|
<string>12E262</string>
|
||||||
|
<key>DTPlatformName</key>
|
||||||
|
<string>macosx</string>
|
||||||
|
<key>DTPlatformVersion</key>
|
||||||
|
<string>11.3</string>
|
||||||
|
<key>DTSDKBuild</key>
|
||||||
|
<string>20E214</string>
|
||||||
|
<key>DTSDKName</key>
|
||||||
|
<string>macosx11.3</string>
|
||||||
|
<key>DTXcode</key>
|
||||||
|
<string>1250</string>
|
||||||
|
<key>DTXcodeBuild</key>
|
||||||
|
<string>12E262</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.15</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BuildMachineOSBuild</key>
|
||||||
|
<string>20E241</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.abbey-code.UnrarKitResources</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>UnrarKitResources</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>BNDL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>2.10-beta8</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>2.10-beta8</string>
|
||||||
|
<key>DTCompiler</key>
|
||||||
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||||
|
<key>DTPlatformBuild</key>
|
||||||
|
<string>12E262</string>
|
||||||
|
<key>DTPlatformName</key>
|
||||||
|
<string>macosx</string>
|
||||||
|
<key>DTPlatformVersion</key>
|
||||||
|
<string>11.3</string>
|
||||||
|
<key>DTSDKBuild</key>
|
||||||
|
<string>20E214</string>
|
||||||
|
<key>DTSDKName</key>
|
||||||
|
<string>macosx11.3</string>
|
||||||
|
<key>DTXcode</key>
|
||||||
|
<string>1250</string>
|
||||||
|
<key>DTXcodeBuild</key>
|
||||||
|
<string>12E262</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.15</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2017 Abbey Code. All rights reserved.</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,139 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>files</key>
|
||||||
|
<dict>
|
||||||
|
<key>Resources/en.lproj/UnrarKit.strings</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
4aNLooY8/Q8rOLSmctvEV9DwGAI=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>files2</key>
|
||||||
|
<dict>
|
||||||
|
<key>Resources/en.lproj/UnrarKit.strings</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
4aNLooY8/Q8rOLSmctvEV9DwGAI=
|
||||||
|
</data>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
VkPIaVIWGPyRA1tTE53onpl4aTmx0CNs/3U2d7cG4kc=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>rules</key>
|
||||||
|
<dict>
|
||||||
|
<key>^Resources/</key>
|
||||||
|
<true/>
|
||||||
|
<key>^Resources/.*\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1100</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/Base\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1010</real>
|
||||||
|
</dict>
|
||||||
|
<key>^version.plist$</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>rules2</key>
|
||||||
|
<dict>
|
||||||
|
<key>.*\.dSYM($|/)</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>11</real>
|
||||||
|
</dict>
|
||||||
|
<key>^(.*/)?\.DS_Store$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>2000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||||
|
<dict>
|
||||||
|
<key>nested</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>10</real>
|
||||||
|
</dict>
|
||||||
|
<key>^.*</key>
|
||||||
|
<true/>
|
||||||
|
<key>^Info\.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^PkgInfo$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1100</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/Base\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1010</real>
|
||||||
|
</dict>
|
||||||
|
<key>^[^/]+$</key>
|
||||||
|
<dict>
|
||||||
|
<key>nested</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>10</real>
|
||||||
|
</dict>
|
||||||
|
<key>^embedded\.provisionprofile$</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^version\.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
|
@ -0,0 +1,261 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>files</key>
|
||||||
|
<dict>
|
||||||
|
<key>Resources/Info.plist</key>
|
||||||
|
<data>
|
||||||
|
kP+2hGbc5UbBLTWCykQCQHNGqVg=
|
||||||
|
</data>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/Info.plist</key>
|
||||||
|
<data>
|
||||||
|
Opiy+QsoZ4Z9HnQ5FuuqJVeKu4Y=
|
||||||
|
</data>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/Resources/en.lproj/UnrarKit.strings</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash</key>
|
||||||
|
<data>
|
||||||
|
4aNLooY8/Q8rOLSmctvEV9DwGAI=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeDirectory</key>
|
||||||
|
<data>
|
||||||
|
X/1CdbBv5ljMRaLAqxX97GriBBA=
|
||||||
|
</data>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements</key>
|
||||||
|
<data>
|
||||||
|
OnX22wWFKRSOFN1+obRynMCeyXM=
|
||||||
|
</data>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements-1</key>
|
||||||
|
<data>
|
||||||
|
utnQg7dzZjbLL250eedIQZhLplQ=
|
||||||
|
</data>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeResources</key>
|
||||||
|
<data>
|
||||||
|
3xyPKEjTSKm1dE8pKU5KJxlzgQ8=
|
||||||
|
</data>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeSignature</key>
|
||||||
|
<data>
|
||||||
|
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>files2</key>
|
||||||
|
<dict>
|
||||||
|
<key>Headers/URKArchive.h</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
rox3zCtp5PtT6aCGBTc1urWEeCJWSVnbsKHdY1SV5aU=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Headers/URKFileInfo.h</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
DErdK++0JLNG/lSf5ria/P7Ptb1joLcY5+JS+EbbQjM=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Headers/UnrarKit.h</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
Im9W8u5nUegygTw75tBTuhRUIB8SXdaLaaU2SknY53Q=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Headers/UnrarKitMacros.h</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
vKAewkQ+cR0c+94ld4BCAoOzicn0ulUtzKSJizjVs0w=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Headers/dll.hpp</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
dkoTdXvns0VAnQEd3UOvIVqVdI1jeZe4CoRH+HSR2gk=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Headers/raros.hpp</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
TbRkm1cPRL7UDN/I1f7b7t8nm+p8qh5fsrogXk9ufDI=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Modules/module.modulemap</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
QFhnMeeSvaRbXgjqqZukQbhw6sra4mMmeaWDBLZ3bNs=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/Info.plist</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
oFI2EUT3wJtNxFjndO2DAV5kvegT3oIk+Rh7oLoiur8=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/Info.plist</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
Xh55AZikgaMdZGZTYMHyoo7wFxKFVTt+idYrxVuqbWc=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/Resources/en.lproj/UnrarKit.strings</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
VkPIaVIWGPyRA1tTE53onpl4aTmx0CNs/3U2d7cG4kc=
|
||||||
|
</data>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeDirectory</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
uWJS1b2WPBEsDL3c0Hq2WiDig0Du9nZnYqmyYD59dyg=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
mHkgkE6rZQ51eIwFSqCwUk5qgL/HGqMt+NI3phdD+YY=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeRequirements-1</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
xnfMwM29lyD/os6DQ6LuOXHUv8CmFE4Y8ks2mr2ILh0=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeResources</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
dYGyaLe+INkvAnQFRHNAbgDP4a0iweQD6U2S6rEO0UA=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
<key>Resources/UnrarKitResources.bundle/Contents/_CodeSignature/CodeSignature</key>
|
||||||
|
<dict>
|
||||||
|
<key>hash2</key>
|
||||||
|
<data>
|
||||||
|
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
|
||||||
|
</data>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>rules</key>
|
||||||
|
<dict>
|
||||||
|
<key>^Resources/</key>
|
||||||
|
<true/>
|
||||||
|
<key>^Resources/.*\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1100</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/Base\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1010</real>
|
||||||
|
</dict>
|
||||||
|
<key>^version.plist$</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>rules2</key>
|
||||||
|
<dict>
|
||||||
|
<key>.*\.dSYM($|/)</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>11</real>
|
||||||
|
</dict>
|
||||||
|
<key>^(.*/)?\.DS_Store$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>2000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||||
|
<dict>
|
||||||
|
<key>nested</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>10</real>
|
||||||
|
</dict>
|
||||||
|
<key>^.*</key>
|
||||||
|
<true/>
|
||||||
|
<key>^Info\.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^PkgInfo$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>optional</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1000</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>omit</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1100</real>
|
||||||
|
</dict>
|
||||||
|
<key>^Resources/Base\.lproj/</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>1010</real>
|
||||||
|
</dict>
|
||||||
|
<key>^[^/]+$</key>
|
||||||
|
<dict>
|
||||||
|
<key>nested</key>
|
||||||
|
<true/>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>10</real>
|
||||||
|
</dict>
|
||||||
|
<key>^embedded\.provisionprofile$</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
<key>^version\.plist$</key>
|
||||||
|
<dict>
|
||||||
|
<key>weight</key>
|
||||||
|
<real>20</real>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1 @@
|
||||||
|
A
|
|
@ -17,6 +17,8 @@
|
||||||
D4A49691105435BE00BE38AE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
D4A49691105435BE00BE38AE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||||
D4A49692105435C100BE38AE /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
D4A49692105435C100BE38AE /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||||
D4A96E2110545E9A0091ECB4 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A96E2010545E9A0091ECB4 /* Carbon.framework */; };
|
D4A96E2110545E9A0091ECB4 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4A96E2010545E9A0091ECB4 /* Carbon.framework */; };
|
||||||
|
E2A3B839265C00AA00A6C0A3 /* UnrarKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */; };
|
||||||
|
E2A3B83A265C00AA00A6C0A3 /* UnrarKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
@ -36,6 +38,7 @@
|
||||||
dstPath = "";
|
dstPath = "";
|
||||||
dstSubfolderSpec = 10;
|
dstSubfolderSpec = 10;
|
||||||
files = (
|
files = (
|
||||||
|
E2A3B83A265C00AA00A6C0A3 /* UnrarKit.framework in CopyFiles */,
|
||||||
D488BCC110AF49C700B3451C /* libunrar.so in CopyFiles */,
|
D488BCC110AF49C700B3451C /* libunrar.so in CopyFiles */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -167,6 +170,7 @@
|
||||||
D4A96E2010545E9A0091ECB4 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
|
D4A96E2010545E9A0091ECB4 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
|
||||||
E296811D24BE4BCD00974229 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
E296811D24BE4BCD00974229 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
E296811E24BE4BCD00974229 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
E296811E24BE4BCD00974229 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
|
E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UnrarKit.framework; path = Frameworks/UnrarKit.framework; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
@ -176,6 +180,7 @@
|
||||||
files = (
|
files = (
|
||||||
D488BC6810AF437B00B3451C /* libunrar.so in Frameworks */,
|
D488BC6810AF437B00B3451C /* libunrar.so in Frameworks */,
|
||||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||||
|
E2A3B839265C00AA00A6C0A3 /* UnrarKit.framework in Frameworks */,
|
||||||
D4A96E2110545E9A0091ECB4 /* Carbon.framework in Frameworks */,
|
D4A96E2110545E9A0091ECB4 /* Carbon.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -257,6 +262,7 @@
|
||||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
E2A3B838265C00AA00A6C0A3 /* UnrarKit.framework */,
|
||||||
D488BC6710AF437B00B3451C /* libunrar.so */,
|
D488BC6710AF437B00B3451C /* libunrar.so */,
|
||||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||||
|
@ -471,7 +477,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "#export NEWLIBPATH=\"@loader_path/../Frameworks\"\n#export PROJECT_PATH=\"/Users/rob/Programming/Projects - Mine/QuietUnrar\"\n#\n#mkdir \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks\"\n#cp -f \"$PROJECT_PATH/libunrar/libunrar.so\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/libunrar.so\"\n\ninstall_name_tool -change libunrar.so @loader_path/../Frameworks/libunrar.so \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"";
|
shellScript = "#export NEWLIBPATH=\"@loader_path/../Frameworks\"\n#export PROJECT_PATH=\"/Users/rob/Programming/Projects - Mine/QuietUnrar\"\n#\n#mkdir \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks\"\n#cp -f \"$PROJECT_PATH/libunrar/libunrar.so\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/libunrar.so\"\n\ninstall_name_tool -change libunrar.so @loader_path/../Frameworks/libunrar.so \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\"\n";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
@ -526,6 +532,7 @@
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\"$(SRCROOT)/Frameworks\"",
|
"\"$(SRCROOT)/Frameworks\"",
|
||||||
|
"$(PROJECT_DIR)/Frameworks",
|
||||||
);
|
);
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
|
@ -536,6 +543,7 @@
|
||||||
INFOPLIST_FILE = "QuietUnrar-Info.plist";
|
INFOPLIST_FILE = "QuietUnrar-Info.plist";
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
LD_DYLIB_INSTALL_NAME = "";
|
LD_DYLIB_INSTALL_NAME = "";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
@ -557,6 +565,7 @@
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\"$(SRCROOT)/Frameworks\"",
|
"\"$(SRCROOT)/Frameworks\"",
|
||||||
|
"$(PROJECT_DIR)/Frameworks",
|
||||||
);
|
);
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
|
@ -565,6 +574,7 @@
|
||||||
INFOPLIST_FILE = "QuietUnrar-Info.plist";
|
INFOPLIST_FILE = "QuietUnrar-Info.plist";
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
LD_DYLIB_INSTALL_NAME = "";
|
LD_DYLIB_INSTALL_NAME = "";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Loading…
Reference in New Issue