|
@@ -227,7 +227,7 @@
|
|
|
DLog(@"skipping symbolic link: %@", file);
|
|
|
return;
|
|
|
}
|
|
|
- NSString *fat = [HelperClass singleLineReturnForProcess:[NSString stringWithFormat:@"/usr/bin/lipo -info %@",file]];
|
|
|
+ NSString *fat = [HelperClass singleLineReturnForProcess:@"/usr/bin/lipo -info %@",file];
|
|
|
if ([fat containsString:@"Architectures"]){
|
|
|
NSString *newFile = [file stringByAppendingPathExtension:@"thin"];
|
|
|
[HelperClass singleLineReturnForProcess:[NSString stringWithFormat:@"/usr/bin/lipo -thin arm64 %@ -output %@",file, newFile]];
|
|
@@ -250,8 +250,13 @@
|
|
|
NSString *ldidPath = [self validLDIDPath];
|
|
|
if (ldidPath) {
|
|
|
[FM removeItemAtPath:@"/tmp/ent.plist" error:nil];
|
|
|
- [HelperClass singleLineReturnForProcess:[NSString stringWithFormat:@"%@ -e %@ > /tmp/ent.plist", ldidPath, file]];
|
|
|
- [HelperClass singleLineReturnForProcess:[NSString stringWithFormat:@"%@ -S/tmp/ent.plist %@", ldidPath, file]];
|
|
|
+ [HelperClass singleLineReturnForProcess:@"%@ -e %@ > /tmp/ent.plist", ldidPath, file];
|
|
|
+ NSString *fileCheck = [NSString stringWithContentsOfFile:@"/tmp/ent.plist" encoding:NSUTF8StringEncoding error:nil];
|
|
|
+ if (fileCheck.length == 0) {
|
|
|
+ [HelperClass singleLineReturnForProcess:@"%@ -S %@", ldidPath, file];
|
|
|
+ } else {
|
|
|
+ [HelperClass singleLineReturnForProcess:@"%@ -S/tmp/ent.plist %@", ldidPath, file];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -273,7 +278,7 @@
|
|
|
|
|
|
[self.files enumerateObjectsUsingBlock:^(InputPackageFile * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
NSString *file = [thePath stringByAppendingPathComponent:obj.path];
|
|
|
- DLog(@"check sig file: %@", obj.path);
|
|
|
+ //DLog(@"check sig file: %@", obj.path);
|
|
|
[self flattenIfNecessary:file];
|
|
|
}];
|
|
|
|
|
@@ -283,7 +288,7 @@
|
|
|
if (self.skipSignatureChecks) { return; }
|
|
|
[self.files enumerateObjectsUsingBlock:^(InputPackageFile * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
NSString *file = [thePath stringByAppendingPathComponent:obj.path];
|
|
|
- DLog(@"check sig file: %@", file);
|
|
|
+ //DLog(@"check sig file: %@", file);
|
|
|
[self codesignIfNecessary:file];
|
|
|
}];
|
|
|
|
|
@@ -305,7 +310,7 @@
|
|
|
fullString = [fullString stringByReplacingOccurrencesOfString:@"#!/bin/sh" withString:@""];
|
|
|
if (fullString.length > 0) {
|
|
|
[fullString writeToFile:fullPath atomically:TRUE encoding:NSUTF8StringEncoding error:nil];
|
|
|
- [HelperClass singleLineReturnForProcess:[NSString stringWithFormat:@"chmod +x %@", fullPath]];
|
|
|
+ [HelperClass singleLineReturnForProcess:@"chmod +x %@", fullPath];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -349,7 +354,7 @@
|
|
|
|
|
|
NSArray *ignoreFiles = @[@".fauxsu", @".DS_Store"];
|
|
|
NSArray *forbiddenRoots = @[@"etc", @"var", @"tmp"];
|
|
|
-
|
|
|
+ [self flattenInPath:tmpPath];
|
|
|
[self validateSignaturesInPath:tmpPath];
|
|
|
|
|
|
//__block NSMutableArray *_overwriteArray = [NSMutableArray new];
|