-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed project from Unrar4iOS to UnrarKit
- Loading branch information
Showing
25 changed files
with
185 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
build | ||
.DS_Store | ||
**/*.xcodeproj/project.xcworkspace/xcuserdata/* | ||
**/*.xcodeproj/project.xcworkspace/xcshareddata/*.xccheckout | ||
**/*.xcodeproj/xcuserdata/* | ||
|
||
**/*.xccheckout | ||
**/xcuserdata/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Unrar4iOS CHANGELOG | ||
# UnrarKit CHANGELOG | ||
|
||
## 0.1.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// URKArchive.h | ||
// UnrarKit | ||
// | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "raros.hpp" | ||
#import "dll.hpp" | ||
|
||
typedef NS_ENUM(NSInteger, URKErrorCode) { | ||
URKErrorCodeEndOfArchive = ERAR_END_ARCHIVE, | ||
URKErrorCodeNoMemory = ERAR_NO_MEMORY, | ||
URKErrorCodeBadData = ERAR_BAD_DATA, | ||
URKErrorCodeBadArchive = ERAR_BAD_ARCHIVE, | ||
URKErrorCodeUnknownFormat = ERAR_UNKNOWN_FORMAT, | ||
URKErrorCodeOpen = ERAR_EOPEN, | ||
URKErrorCodeCreate = ERAR_ECREATE, | ||
URKErrorCodeClose = ERAR_ECLOSE, | ||
URKErrorCodeRead = ERAR_EREAD, | ||
URKErrorCodeWrite = ERAR_EWRITE, | ||
URKErrorCodeSmall = ERAR_SMALL_BUF, | ||
URKErrorCodeUnknown = ERAR_UNKNOWN, | ||
URKErrorCodeMissingPassword = ERAR_MISSING_PASSWORD, | ||
URKErrorCodeArchiveNotFound = 101, | ||
}; | ||
|
||
#define ERAR_ARCHIVE_NOT_FOUND 101 | ||
|
||
extern NSString *URKErrorDomain; | ||
|
||
@interface URKArchive : NSObject { | ||
|
||
HANDLE _rarFile; | ||
struct RARHeaderDataEx *header; | ||
struct RAROpenArchiveDataEx *flags; | ||
} | ||
|
||
@property(nonatomic, retain) NSString *filename; | ||
@property(nonatomic, retain) NSString *password; | ||
|
||
+ (instancetype)rarArchiveAtPath:(NSString *)filePath; | ||
+ (instancetype)rarArchiveAtURL:(NSURL *)fileURL; | ||
+ (instancetype)rarArchiveAtPath:(NSString *)filePath password:(NSString *)password; | ||
+ (instancetype)rarArchiveAtURL:(NSURL *)fileURL password:(NSString *)password; | ||
|
||
- (NSArray *)listFiles:(NSError **)error; | ||
- (BOOL)extractFilesTo:(NSString *)filePath overWrite:(BOOL)overwrite error:(NSError **)error; | ||
- (NSData *)extractDataFromFile:(NSString *)filePath error:(NSError **)error; | ||
|
||
- (BOOL)closeFile; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
28D7ACF80DDB3853001CB0EB /* UnrarExampleViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* UnrarExampleViewController.mm */; }; | ||
480F6005128A0C0B00A9B478 /* not_protected.cbr in Resources */ = {isa = PBXBuildFile; fileRef = 480F6002128A0C0B00A9B478 /* not_protected.cbr */; }; | ||
48BB62E31621B98300B424E2 /* protected.cbr in Resources */ = {isa = PBXBuildFile; fileRef = 48BB62E21621B98300B424E2 /* protected.cbr */; }; | ||
9685416E18DBA2B500B5651B /* libUnrar4iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9685416D18DBA2B500B5651B /* libUnrar4iOS.a */; }; | ||
96BBCACF18DE82D900BE9B86 /* libUnrarKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 96BBCACE18DE82D900BE9B86 /* libUnrarKit.a */; }; | ||
96CD2C1A18D4D823002D004A /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 96CD2C1918D4D823002D004A /* [email protected] */; }; | ||
/* End PBXBuildFile section */ | ||
|
||
|
@@ -37,8 +37,7 @@ | |
480F6002128A0C0B00A9B478 /* not_protected.cbr */ = {isa = PBXFileReference; lastKnownFileType = file; path = not_protected.cbr; sourceTree = "<group>"; }; | ||
48BB62E21621B98300B424E2 /* protected.cbr */ = {isa = PBXFileReference; lastKnownFileType = file; path = protected.cbr; sourceTree = "<group>"; }; | ||
8D1107310486CEB800E47090 /* UnrarExample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "UnrarExample-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; | ||
9685410A18DB9C8100B5651B /* libUnrar4iOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libUnrar4iOS.a; path = "../build/Debug-iphoneos/libUnrar4iOS.a"; sourceTree = "<group>"; }; | ||
9685416D18DBA2B500B5651B /* libUnrar4iOS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libUnrar4iOS.a; path = "../../../Library/Developer/Xcode/DerivedData/Unrar4iOS-hdcdklgxaspoqwaqzxrymrryirrr/Build/Products/Debug-iphoneos/libUnrar4iOS.a"; sourceTree = "<group>"; }; | ||
96BBCACE18DE82D900BE9B86 /* libUnrarKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libUnrarKit.a; path = "../build/Debug-iphoneos/libUnrarKit.a"; sourceTree = "<group>"; }; | ||
96CD2C1918D4D823002D004A /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
/* End PBXFileReference section */ | ||
|
||
|
@@ -47,7 +46,7 @@ | |
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
9685416E18DBA2B500B5651B /* libUnrar4iOS.a in Frameworks */, | ||
96BBCACF18DE82D900BE9B86 /* libUnrarKit.a in Frameworks */, | ||
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, | ||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, | ||
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, | ||
|
@@ -113,8 +112,7 @@ | |
29B97323FDCFA39411CA2CEA /* Frameworks */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
9685416D18DBA2B500B5651B /* libUnrar4iOS.a */, | ||
9685410A18DB9C8100B5651B /* libUnrar4iOS.a */, | ||
96BBCACE18DE82D900BE9B86 /* libUnrarKit.a */, | ||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, | ||
1D30AB110D05D00D00671497 /* Foundation.framework */, | ||
288765A40DF7441C002DB57D /* CoreGraphics.framework */, | ||
|
@@ -215,10 +213,6 @@ | |
); | ||
INFOPLIST_FILE = "UnrarExample-Info.plist"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 7.0; | ||
LIBRARY_SEARCH_PATHS = ( | ||
"$(BUILT_PRODUCTS_DIR)", | ||
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/Unrar4iOS-hdcdklgxaspoqwaqzxrymrryirrr/Build/Products/Debug-iphoneos", | ||
); | ||
PRODUCT_NAME = UnrarExample; | ||
}; | ||
name = Debug; | ||
|
@@ -238,10 +232,6 @@ | |
); | ||
INFOPLIST_FILE = "UnrarExample-Info.plist"; | ||
IPHONEOS_DEPLOYMENT_TARGET = 7.0; | ||
LIBRARY_SEARCH_PATHS = ( | ||
"$(BUILT_PRODUCTS_DIR)", | ||
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/Unrar4iOS-hdcdklgxaspoqwaqzxrymrryirrr/Build/Products/Debug-iphoneos", | ||
); | ||
PRODUCT_NAME = UnrarExample; | ||
VALIDATE_PRODUCT = YES; | ||
}; | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# About | ||
|
||
Unrar4iOS is here to allow Mac and iOS apps to easily work with RAR files for read-only operations. | ||
UnrarKit is here to enable Mac and iOS apps to easily work with RAR files for read-only operations. | ||
|
||
There is a main project, with a static library target and a unit tests target, and an example project, which demonstrates how to use the library. | ||
|
||
|
@@ -9,23 +9,23 @@ I'm always open to improvements, so please submit your pull requests. | |
|
||
# Installation | ||
|
||
Unrar4iOS has been converted to a CocoaPods project. If you're not familiar with [CocoaPods](http://cocoapods.org), you can start with their [Getting Started guide](http://guides.cocoapods.org/using/getting-started.html). | ||
UnrarKit has been converted to a CocoaPods project. If you're not familiar with [CocoaPods](http://cocoapods.org), you can start with their [Getting Started guide](http://guides.cocoapods.org/using/getting-started.html). | ||
|
||
I've included a sample [`podfile`](Example/Podfile) in the Example directory along with the sample project. Because of the way the `unrar` library (which `Unrar4iOS` wraps) was written[1], the CocoaPods installation isn't as straightforward as it should be. As long as you include the `post_install` hook in your `podfile`, everything should still install with the single command: | ||
I've included a sample [`podfile`](Example/Podfile) in the Example directory along with the sample project. Because of the way the `unrar` library (which `UnrarKit` wraps) was written[1], the CocoaPods installation isn't as straightforward as it should be. As long as you include the `post_install` hook in your `podfile`, everything should still install with the single command: | ||
|
||
pod install | ||
|
||
|
||
# Notes | ||
|
||
Since this Unrar4iOS is cpp based library you will need to change the extension of classes that uses Unrar4iOS to .mm it will allow us to include libstdc++ on linking stage, otherwise you will need to add libstdc++ as linker flags in you application. | ||
Since this UnrarKit is cpp based library you will need to change the extension of classes that uses UnrarKit to .mm it will allow us to include libstdc++ on linking stage, otherwise you will need to add libstdc++ as linker flags in you application. | ||
|
||
To open in Xcode, use the [Unrar4iOS.xcworkspace](Unrar4iOS.xcworkspace) file, which includes the other projects. | ||
To open in Xcode, use the [UnrarKit.xcworkspace](UnrarKit.xcworkspace) file, which includes the other projects. | ||
|
||
# Credits | ||
|
||
* Vicent Scott ([email protected]) | ||
* Rogerio Pereira Araujo ([email protected]) | ||
* Vicent Scott ([email protected]) | ||
* Dov Frankel ([email protected]) | ||
|
||
[1]: Some cpp files need to be downloaded, but can't be listed in the build phase. They have to be included in the build by includes in other files. |
File renamed without changes.
Oops, something went wrong.