Tiny bit of tidy up.
This commit is contained in:
parent
dac909cd3a
commit
ca9df1a6c0
|
@ -24,7 +24,7 @@
|
|||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D4A4962A105419AA00BE38AE /* libunrar */;
|
||||
remoteGlobalIDString = D4A4962A105419AA00BE38AE;
|
||||
remoteInfo = libunrar;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
|
|
@ -229,8 +229,6 @@
|
|||
<key>Layout</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BecomeActive</key>
|
||||
<true/>
|
||||
<key>ContentConfiguration</key>
|
||||
<dict>
|
||||
<key>PBXBottomSmartGroupGIDs</key>
|
||||
|
@ -275,6 +273,7 @@
|
|||
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
|
||||
<array>
|
||||
<array>
|
||||
<integer>17</integer>
|
||||
<integer>16</integer>
|
||||
</array>
|
||||
</array>
|
||||
|
@ -298,7 +297,7 @@
|
|||
<real>150</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>4 55 1276 723 0 0 1280 778 </string>
|
||||
<string>6 55 1276 723 0 0 1280 778 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
@ -309,6 +308,8 @@
|
|||
<key>Dock</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BecomeActive</key>
|
||||
<true/>
|
||||
<key>ContentConfiguration</key>
|
||||
<dict>
|
||||
<key>PBXProjectModuleGUID</key>
|
||||
|
@ -326,7 +327,7 @@
|
|||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>D488BF3010B1B64800B3451C</string>
|
||||
<string>D488BFA310B1F66B00B3451C</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>D4A4963610541A1C00BE38AE</string>
|
||||
|
@ -360,7 +361,7 @@
|
|||
<key>Frame</key>
|
||||
<string>{{0, 0}, {1104, 618}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>4 55 1276 723 0 0 1280 778 </string>
|
||||
<string>6 55 1276 723 0 0 1280 778 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
|
@ -380,7 +381,7 @@
|
|||
<key>Frame</key>
|
||||
<string>{{0, 623}, {1104, 59}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>4 55 1276 723 0 0 1280 778 </string>
|
||||
<string>6 55 1276 723 0 0 1280 778 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
@ -548,13 +549,13 @@
|
|||
<string>D488BD7710AF722600B3451C</string>
|
||||
<string>D488B03D10AF1C2900B3451C</string>
|
||||
<string>D488B03E10AF1C2900B3451C</string>
|
||||
<string>1C78EAAD065D492600B07095</string>
|
||||
<string>1CD10A99069EF8BA00B06720</string>
|
||||
<string>D4A49630105419F700BE38AE</string>
|
||||
<string>1C78EAAD065D492600B07095</string>
|
||||
<string>/Users/rob/Programming/Projects - Mine/QuietUnrar/QuietUnrar.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>4 55 1276 723 0 0 1280 778 </string>
|
||||
<string>6 55 1276 723 0 0 1280 778 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -927,7 +928,7 @@
|
|||
<key>WindowToolGUID</key>
|
||||
<string>1C78EAAD065D492600B07095</string>
|
||||
<key>WindowToolIsVisible</key>
|
||||
<false/>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Identifier</key>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -84,32 +84,38 @@ int callbackFunction(UINT message, LPARAM userData, LPARAM parameterOne, LPARAM
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)application:(NSApplication *)theApplication openFiles:(NSArray *) arrayOfFilenames {
|
||||
// NSLog(@"openFiles: %@", arrayOfFilenames);
|
||||
|
||||
for (NSString * filename in arrayOfFilenames) {
|
||||
[self extractRarWith:filename];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark "Main"
|
||||
- (BOOL) extractRarWith:(NSString *) filename {
|
||||
quietUnrar = (void *) self;
|
||||
char commentBuffer[BUF_LEN];
|
||||
BOOL extractionSuccessful = YES;
|
||||
struct RARHeaderData headerData;
|
||||
NSString * lastExtractedFilename = @"";
|
||||
NSString * currentFilename;
|
||||
|
||||
//Determine the folder we should extract the archive to. This by default
|
||||
//is the <folderContainingTheArchive>/<archiveNameWithPathExtension>
|
||||
NSString * folderToExtractTo = [filename stringByDeletingPathExtension];
|
||||
|
||||
char * filenameCString = (char *)[filename cStringUsingEncoding:NSISOLatin1StringEncoding];
|
||||
|
||||
// Open the Archive for extraction, we set the open result to 3 so we can see it has changed
|
||||
char * filenameCString = (char *)[filename cStringUsingEncoding:NSISOLatin1StringEncoding];
|
||||
struct RAROpenArchiveData arcData = { filenameCString, RAR_OM_EXTRACT, 3, &commentBuffer[0], BUF_LEN, 0, 0};
|
||||
|
||||
HANDLE archive = RAROpenArchive(&arcData);
|
||||
//NSLog(@"Opening Archive %s with result %d", filenameCString, arcData.OpenResult);
|
||||
|
||||
// set call backs for if password needed or need to change volume
|
||||
RARSetChangeVolProc(archive, &changeVolume);
|
||||
RARSetCallback(archive, &callbackFunction, (LPARAM)archive);
|
||||
|
||||
//
|
||||
struct RARHeaderData headerData;
|
||||
NSString * lastExtractedFilename = @"";
|
||||
NSString * currentFilename;
|
||||
|
||||
|
||||
while (RARReadHeader(archive, &headerData) != ERAR_END_ARCHIVE) {
|
||||
//NSLog(@"Attempting to extract %s to %@", headerData.FileName, folderToExtractTo);
|
||||
|
||||
|
|
Loading…
Reference in New Issue