Skip to content

Commit fd1b8c3

Browse files
committed
Add SSZipArchive 0.3.2
New submodule dependency through Carthage.
1 parent 5146dbc commit fd1b8c3

File tree

7 files changed

+85
-8
lines changed

7 files changed

+85
-8
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
[submodule "Carthage/Checkouts/xcconfigs"]
1717
path = Carthage/Checkouts/xcconfigs
1818
url = https://github.com/jspahrsummers/xcconfigs.git
19+
[submodule "Carthage/Checkouts/ZipArchive"]
20+
path = Carthage/Checkouts/ZipArchive
21+
url = https://github.com/ZipArchive/ZipArchive.git

Cartfile.private

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
github "jspahrsummers/xcconfigs" >= 0.7.1
22
github "Quick/Quick" ~> 0.3
33
github "Quick/Nimble" ~> 0.4
4+
github "ZipArchive/ZipArchive" ~> 0.3

Cartfile.resolved

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
github "Quick/Nimble" "v0.4.2"
22
github "Quick/Quick" "v0.3.1"
3+
github "ZipArchive/ZipArchive" "v0.3.2"
34
github "jspahrsummers/xcconfigs" "0.7.2"

Carthage/Checkouts/ZipArchive

Submodule ZipArchive added at 60312c1

ObjectiveGitFramework.xcodeproj/project.pbxproj

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@
322322
F8D007731B4F7CC3009A8DAF /* GTSignatureSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D040AF77177B9A9E001AD9EB /* GTSignatureSpec.m */; };
323323
F8D007741B4F7CCC009A8DAF /* GTOIDSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D040AF6F177B9779001AD9EB /* GTOIDSpec.m */; };
324324
F8D007761B4F7D10009A8DAF /* GTTimeAdditionsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B1E7FF1703871900D0814D /* GTTimeAdditionsSpec.m */; };
325+
F8D007811B4F9758009A8DAF /* SSZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D007801B4F9758009A8DAF /* SSZipArchive.m */; };
326+
F8D007861B4F97F9009A8DAF /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = F8D007821B4F97F9009A8DAF /* ioapi.c */; };
327+
F8D007871B4F97F9009A8DAF /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = F8D007831B4F97F9009A8DAF /* mztools.c */; };
328+
F8D007881B4F97F9009A8DAF /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = F8D007841B4F97F9009A8DAF /* unzip.c */; };
329+
F8D007891B4F97F9009A8DAF /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = F8D007851B4F97F9009A8DAF /* zip.c */; };
325330
F8E4A2911A170CA6006485A8 /* GTRemotePushSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = F8E4A2901A170CA6006485A8 /* GTRemotePushSpec.m */; };
326331
/* End PBXBuildFile section */
327332

@@ -587,6 +592,11 @@
587592
F879D82F1B4B77F4002D5C07 /* Libgit2FeaturesSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Libgit2FeaturesSpec.m; sourceTree = "<group>"; };
588593
F879D8361B4B7F7C002D5C07 /* ObjectiveGit-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ObjectiveGit-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
589594
F879D8461B4B8138002D5C07 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Nimble.framework; path = "Carthage/Checkouts/Nimble/build/Debug-iphoneos/Nimble.framework"; sourceTree = "<group>"; };
595+
F8D007801B4F9758009A8DAF /* SSZipArchive.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SSZipArchive.m; path = Carthage/Checkouts/ZipArchive/SSZipArchive/SSZipArchive.m; sourceTree = "<group>"; };
596+
F8D007821B4F97F9009A8DAF /* ioapi.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ioapi.c; path = Carthage/Checkouts/ZipArchive/SSZipArchive/minizip/ioapi.c; sourceTree = "<group>"; };
597+
F8D007831B4F97F9009A8DAF /* mztools.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = mztools.c; path = Carthage/Checkouts/ZipArchive/SSZipArchive/minizip/mztools.c; sourceTree = "<group>"; };
598+
F8D007841B4F97F9009A8DAF /* unzip.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = unzip.c; path = Carthage/Checkouts/ZipArchive/SSZipArchive/minizip/unzip.c; sourceTree = "<group>"; };
599+
F8D007851B4F97F9009A8DAF /* zip.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = zip.c; path = Carthage/Checkouts/ZipArchive/SSZipArchive/minizip/zip.c; sourceTree = "<group>"; };
590600
F8E4A2901A170CA6006485A8 /* GTRemotePushSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRemotePushSpec.m; sourceTree = "<group>"; };
591601
/* End PBXFileReference section */
592602

@@ -650,6 +660,11 @@
650660
0867D691FE84028FC02AAC07 /* ObjectiveGitFramework */ = {
651661
isa = PBXGroup;
652662
children = (
663+
F8D007821B4F97F9009A8DAF /* ioapi.c */,
664+
F8D007831B4F97F9009A8DAF /* mztools.c */,
665+
F8D007841B4F97F9009A8DAF /* unzip.c */,
666+
F8D007851B4F97F9009A8DAF /* zip.c */,
667+
F8D007801B4F9758009A8DAF /* SSZipArchive.m */,
653668
BDD8AB01130F01AB00CB5D40 /* README.md */,
654669
887B948D1A3A38130070D41D /* ObjectiveGit.modulemap */,
655670
BDE4C05E130EFE2C00851650 /* ObjectiveGit */,
@@ -1473,6 +1488,11 @@
14731488
F8D007701B4F7CA8009A8DAF /* NSErrorGitSpec.m in Sources */,
14741489
F8D007741B4F7CCC009A8DAF /* GTOIDSpec.m in Sources */,
14751490
F879D8441B4B80C7002D5C07 /* Libgit2FeaturesSpec.m in Sources */,
1491+
F8D007811B4F9758009A8DAF /* SSZipArchive.m in Sources */,
1492+
F8D007861B4F97F9009A8DAF /* ioapi.c in Sources */,
1493+
F8D007871B4F97F9009A8DAF /* mztools.c in Sources */,
1494+
F8D007881B4F97F9009A8DAF /* unzip.c in Sources */,
1495+
F8D007891B4F97F9009A8DAF /* zip.c in Sources */,
14761496
);
14771497
runOnlyForDeploymentPostprocessing = 0;
14781498
};
@@ -2048,7 +2068,7 @@
20482068
isa = XCBuildConfiguration;
20492069
baseConfigurationReference = D0A463DB17E57C45000F5021 /* Test.xcconfig */;
20502070
buildSettings = {
2051-
ALWAYS_SEARCH_USER_PATHS = NO;
2071+
ALWAYS_SEARCH_USER_PATHS = YES;
20522072
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
20532073
CLANG_CXX_LIBRARY = "libc++";
20542074
CLANG_ENABLE_MODULES = YES;
@@ -2075,6 +2095,8 @@
20752095
GCC_PREPROCESSOR_DEFINITIONS = (
20762096
"DEBUG=1",
20772097
"$(inherited)",
2098+
"NOCRYPT=1",
2099+
"NOUNCRYPT=1",
20782100
);
20792101
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
20802102
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -2083,21 +2105,29 @@
20832105
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
20842106
GCC_WARN_UNUSED_FUNCTION = YES;
20852107
GCC_WARN_UNUSED_VARIABLE = YES;
2086-
HEADER_SEARCH_PATHS = "$(inherited)";
2108+
HEADER_SEARCH_PATHS = (
2109+
"$(inherited)",
2110+
External/ssziparchive/SSZipArchive/minizip,
2111+
);
20872112
INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist";
20882113
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
20892114
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2115+
LIBRARY_SEARCH_PATHS = (
2116+
.,
2117+
External,
2118+
);
20902119
MTL_ENABLE_DEBUG_INFO = YES;
20912120
PRODUCT_NAME = "$(TARGET_NAME)";
20922121
SDKROOT = iphoneos;
2122+
USER_HEADER_SEARCH_PATHS = External/ssziparchive/SSZipArchive/minizip;
20932123
};
20942124
name = Debug;
20952125
};
20962126
F879D8411B4B7F7D002D5C07 /* Test */ = {
20972127
isa = XCBuildConfiguration;
20982128
baseConfigurationReference = D0A463DB17E57C45000F5021 /* Test.xcconfig */;
20992129
buildSettings = {
2100-
ALWAYS_SEARCH_USER_PATHS = NO;
2130+
ALWAYS_SEARCH_USER_PATHS = YES;
21012131
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
21022132
CLANG_CXX_LIBRARY = "libc++";
21032133
CLANG_ENABLE_MODULES = YES;
@@ -2126,13 +2156,21 @@
21262156
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
21272157
GCC_WARN_UNUSED_FUNCTION = YES;
21282158
GCC_WARN_UNUSED_VARIABLE = YES;
2129-
HEADER_SEARCH_PATHS = "$(inherited)";
2159+
HEADER_SEARCH_PATHS = (
2160+
"$(inherited)",
2161+
External/ssziparchive/SSZipArchive/minizip,
2162+
);
21302163
INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist";
21312164
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
21322165
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2166+
LIBRARY_SEARCH_PATHS = (
2167+
.,
2168+
External,
2169+
);
21332170
MTL_ENABLE_DEBUG_INFO = NO;
21342171
PRODUCT_NAME = "$(TARGET_NAME)";
21352172
SDKROOT = iphoneos;
2173+
USER_HEADER_SEARCH_PATHS = External/ssziparchive/SSZipArchive/minizip;
21362174
VALIDATE_PRODUCT = YES;
21372175
};
21382176
name = Test;
@@ -2141,7 +2179,7 @@
21412179
isa = XCBuildConfiguration;
21422180
baseConfigurationReference = D0A463DB17E57C45000F5021 /* Test.xcconfig */;
21432181
buildSettings = {
2144-
ALWAYS_SEARCH_USER_PATHS = NO;
2182+
ALWAYS_SEARCH_USER_PATHS = YES;
21452183
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
21462184
CLANG_CXX_LIBRARY = "libc++";
21472185
CLANG_ENABLE_MODULES = YES;
@@ -2170,13 +2208,21 @@
21702208
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
21712209
GCC_WARN_UNUSED_FUNCTION = YES;
21722210
GCC_WARN_UNUSED_VARIABLE = YES;
2173-
HEADER_SEARCH_PATHS = "$(inherited)";
2211+
HEADER_SEARCH_PATHS = (
2212+
"$(inherited)",
2213+
External/ssziparchive/SSZipArchive/minizip,
2214+
);
21742215
INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist";
21752216
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
21762217
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2218+
LIBRARY_SEARCH_PATHS = (
2219+
.,
2220+
External,
2221+
);
21772222
MTL_ENABLE_DEBUG_INFO = NO;
21782223
PRODUCT_NAME = "$(TARGET_NAME)";
21792224
SDKROOT = iphoneos;
2225+
USER_HEADER_SEARCH_PATHS = External/ssziparchive/SSZipArchive/minizip;
21802226
VALIDATE_PRODUCT = YES;
21812227
};
21822228
name = Release;
@@ -2185,7 +2231,7 @@
21852231
isa = XCBuildConfiguration;
21862232
baseConfigurationReference = D0A463DB17E57C45000F5021 /* Test.xcconfig */;
21872233
buildSettings = {
2188-
ALWAYS_SEARCH_USER_PATHS = NO;
2234+
ALWAYS_SEARCH_USER_PATHS = YES;
21892235
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
21902236
CLANG_CXX_LIBRARY = "libc++";
21912237
CLANG_ENABLE_MODULES = YES;
@@ -2214,13 +2260,21 @@
22142260
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
22152261
GCC_WARN_UNUSED_FUNCTION = YES;
22162262
GCC_WARN_UNUSED_VARIABLE = YES;
2217-
HEADER_SEARCH_PATHS = "$(inherited)";
2263+
HEADER_SEARCH_PATHS = (
2264+
"$(inherited)",
2265+
External/ssziparchive/SSZipArchive/minizip,
2266+
);
22182267
INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist";
22192268
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
22202269
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2270+
LIBRARY_SEARCH_PATHS = (
2271+
.,
2272+
External,
2273+
);
22212274
MTL_ENABLE_DEBUG_INFO = NO;
22222275
PRODUCT_NAME = "$(TARGET_NAME)";
22232276
SDKROOT = iphoneos;
2277+
USER_HEADER_SEARCH_PATHS = External/ssziparchive/SSZipArchive/minizip;
22242278
VALIDATE_PRODUCT = YES;
22252279
};
22262280
name = Profile;

ObjectiveGitFramework.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ObjectiveGitTests/QuickSpec+GTFixtures.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import <ObjectiveGit/ObjectiveGit.h>
1010
#import "QuickSpec+GTFixtures.h"
1111
#import <objc/runtime.h>
12+
#import <SSZipArchive/SSZipArchive.h>
1213

1314
static const NSInteger FixturesErrorUnzipFailed = 666;
1415

@@ -95,6 +96,17 @@ - (NSString *)pathForFixtureRepositoryNamed:(NSString *)repositoryName {
9596
}
9697

9798
- (BOOL)unzipFile:(NSString *)member fromArchiveAtPath:(NSString *)zipPath intoDirectory:(NSString *)destinationPath error:(NSError **)error {
99+
100+
#if TARGET_OS_IPHONE
101+
// iOS: unzip in-process using SSZipArchive
102+
//
103+
// system() and NSTask() are not available when running tests in the iOS simulator
104+
105+
[SSZipArchive unzipFileAtPath:zipPath toDestination:[destinationPath stringByAppendingString:member]];
106+
107+
#else
108+
// OS X: shell out to unzip using NSTask
109+
98110
NSTask *task = [[NSTask alloc] init];
99111
task.launchPath = @"/usr/bin/unzip";
100112
task.arguments = @[ @"-qq", @"-d", destinationPath, zipPath, [member stringByAppendingString:@"*"] ];
@@ -108,6 +120,8 @@ - (BOOL)unzipFile:(NSString *)member fromArchiveAtPath:(NSString *)zipPath intoD
108120
}
109121

110122
return success;
123+
124+
#endif
111125
}
112126

113127
#pragma mark API

0 commit comments

Comments
 (0)