Changeset 250

Show
Ignore:
Timestamp:
01/06/07 12:41:21 (2 years ago)
Author:
gbooker
Message:

Fixed a sloppy mistake in the plist generation.
Added Authenticated removal of components.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CPFPerianPrefPaneController.m

    r247 r250  
    253253         
    254254        setenv("SRC_ARCHIVE", [archivePath fileSystemRepresentation], 1); 
    255         setenv("$DST_COMPONENT", [finalPath fileSystemRepresentation], 1); 
     255        setenv("DST_COMPONENT", [finalPath fileSystemRepresentation], 1); 
    256256        setenv("TMP_PATH", [[finalPath stringByAppendingPathExtension:@"old"] fileSystemRepresentation], 1); 
    257257        setenv("DST_PATH", [destination fileSystemRepresentation], 1); 
     
    282282        char *buf = NULL; 
    283283        asprintf(&buf, 
    284                          "rm -rf \"$COMP_PATH\" && "); 
     284                         "rm -rf \"$COMP_PATH\""); 
    285285        if(!buf) 
    286286                return FALSE; 
     
    407407         
    408408        int tag = 0; 
    409         BOOL result = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[self quickTimeComponentDir] destination:@"" files:[NSArray arrayWithObject:@"Perian.component"] tag:&tag]; 
     409        BOOL result = NO; 
     410        if(auth != nil) 
     411                [self _authenticatedRemove:[[self quickTimeComponentDir] stringByAppendingPathComponent:@"Perian.component"] authorization:auth]; 
     412        else 
     413                result = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:[self quickTimeComponentDir] destination:@"" files:[NSArray arrayWithObject:@"Perian.component"] tag:&tag]; 
    410414         
    411415        NSEnumerator *componentEnum = [myComponentsInfo objectEnumerator]; 
     
    427431                                break; 
    428432                } 
    429                 result = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:directory destination:@"" files:[myComponent objectForKey:ComponentNameKey] tag:&tag]; 
     433                if(auth != nil) 
     434                        [self _authenticatedRemove:[directory stringByAppendingPathComponent:[myComponent objectForKey:ComponentNameKey]] authorization:auth]; 
     435                else 
     436                        result = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:directory destination:@"" files:[NSArray arrayWithObject:[myComponent objectForKey:ComponentNameKey]] tag:&tag]; 
    430437        } 
    431438        if(auth != nil) 
  • trunk/Perian.xcodeproj/project.pbxproj

    r249 r250  
    12851285                        runOnlyForDeploymentPostprocessing = 0; 
    12861286                        shellPath = /bin/sh; 
    1287                         shellScript = "cd \"$BUILT_PRODUCTS_DIR\"\n./PerianPanePListGenerator \"${SRCROOT}/PerianPane-Info.plist\" \"${BUILT_PRODUCTS_DIR}\n\" \"${SRCROOT}/PerianPaneReal-Info.plist\""; 
     1287                        shellScript = "cd \"$BUILT_PRODUCTS_DIR\"\n./PerianPanePListGenerator \"${SRCROOT}/PerianPane-Info.plist\" \"${BUILT_PRODUCTS_DIR}\" \"${SRCROOT}/PerianPaneReal-Info.plist\""; 
    12881288                }; 
    12891289                F5CFD3B90B50142100616865 /* ShellScript */ = {