Browse Source

some bug fixes re-flattening, also no need to universalize anymore

Kevin Bradley 9 months ago
parent
commit
0a961f294d
2 changed files with 8 additions and 5 deletions
  1. 6 4
      bootstrapTool/Classes/InputPackage.m
  2. 2 1
      bootstrapTool/main.m

+ 6 - 4
bootstrapTool/Classes/InputPackage.m

@@ -270,10 +270,11 @@
 }
 
 - (void)flattenIfNecessary:(NSString *)file {
-    if ([self fileIsSymbolicLink:file]){
-        DLog(@"skipping symbolic link: %@", file);
+    if ([self fileIsSymbolicLink:file] || ![self shouldCodesignFile:file]){
+        //DLog(@"skipping file: %@", file);
         return;
     }
+    DLog(@"processing file: %@", file);
     NSString *fat = [HelperClass singleLineReturnForProcess:@"/usr/bin/lipo -info %@",file];
     if ([fat containsString:@"Architectures"]){
         NSString *newFile = [file stringByAppendingPathExtension:@"thin"];
@@ -282,13 +283,14 @@
             [FM removeItemAtPath:file error:nil];
             [FM moveItemAtPath:newFile toPath:file error:nil];
         }
+        /*
         int uni = [Universalize universalize:file];
         if (uni == 1){
             DLog(@"Universalized %@ successfully!", file);
             [self codesignRetainingSignature:file];
         } else {
             DLog(@"Universalize %@ failed or non zero!: %d", file, uni);
-        }
+        } */
         // @"sudo lipo -thin arm64 $input.og -output $input";
     }
 }
@@ -322,7 +324,7 @@
 }
 
 - (void)flattenInPath:(NSString *)thePath {
-    
+    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: %@", obj.path);

+ 2 - 1
bootstrapTool/main.m

@@ -88,6 +88,7 @@ int main(int argc, char **argv) {
         DLog(@"gotIm: %@", gotIm);
         return 0;
          */
+       
         NSString *up = nil;
         while ((flag = getopt_long(argc, argv, OPTION_FLAGS, longopts, NULL)) != -1) {
             switch(flag) {
@@ -148,7 +149,6 @@ int main(int argc, char **argv) {
                     return -1;
             }
         }
-        
         if (argc-optind == 1) {
             argc -= optind;
             argv += optind;
@@ -167,6 +167,7 @@ int main(int argc, char **argv) {
         }
         
         if (bump == TRUE && debFile) {
+            DLog(@"skip signature checks: %d", skip);
             return [HelperClass bumpPackageAtPath:debFile withPrefix:prefix sigChecks:skip];
         }