Changeset 230 for trunk/Cocoa/F-Script Anywhere
- Timestamp:
- 05/25/06 17:46:45 (19 years ago)
- Location:
- trunk/Cocoa/F-Script Anywhere/Source
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/F-Script Anywhere/Source/DeVercruesseProcessManager.m
r7 r230 175 175 } 176 176 177 [processes setSet: temp];177 [processes setSet:[temp autorelease]]; 178 178 [pool release]; 179 [temp release];180 179 } 181 180 -
trunk/Cocoa/F-Script Anywhere/Source/F-Script Anywhere.xcodeproj/project.pbxproj
r229 r230 16 16 25666C4E0A1DAE4D0006AC79 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25666C4D0A1DAE4D0006AC79 /* Security.framework */; }; 17 17 25666CA60A1DB1BD0006AC79 /* DSCL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 256669AD0A1D8DE30006AC79 /* DSCL.framework */; }; 18 258C27790A25A57200AC22BB /* FScript.framework in Resources */ = {isa = PBXBuildFile; fileRef = F5EFC2C3020A6C2601AEEDB1 /* FScript.framework */; }; 18 19 25EADA9609CD2D7100BCD8E1 /* bytesex.c in Sources */ = {isa = PBXBuildFile; fileRef = 25EADA9509CD2D7100BCD8E1 /* bytesex.c */; }; 19 20 E14C18BD05A4DE25000D4AF3 /* FSAInterpreterPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = F5680F7A020D0D0401AEEC37 /* FSAInterpreterPanel.nib */; }; … … 94 95 /* End PBXBuildFile section */ 95 96 96 /* Begin PBXBuildStyle section */97 4A9504CCFFE6A4B311CA0CBA /* Development */ = {98 isa = PBXBuildStyle;99 buildSettings = {100 COPY_PHASE_STRIP = NO;101 GCC_DYNAMIC_NO_PIC = NO;102 GCC_ENABLE_FIX_AND_CONTINUE = YES;103 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;104 GCC_OPTIMIZATION_LEVEL = 0;105 OPTIMIZATION_CFLAGS = "-O0";106 ZERO_LINK = NO;107 };108 name = Development;109 };110 4A9504CDFFE6A4B311CA0CBA /* Deployment */ = {111 isa = PBXBuildStyle;112 buildSettings = {113 COPY_PHASE_STRIP = YES;114 GCC_ENABLE_FIX_AND_CONTINUE = NO;115 OTHER_CFLAGS = "-DFSA_DEBUG=0";116 ZERO_LINK = NO;117 };118 name = Deployment;119 };120 /* End PBXBuildStyle section */121 122 97 /* Begin PBXContainerItemProxy section */ 123 98 25666BE50A1DAA120006AC79 /* PBXContainerItemProxy */ = { … … 125 100 containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; 126 101 proxyType = 1; 127 remoteGlobalIDString = 25666BE00A1DAA050006AC79 /* AddToProcMod */;102 remoteGlobalIDString = 25666BE00A1DAA050006AC79; 128 103 remoteInfo = AddToProcMod; 129 104 }; … … 179 154 25666C0F0A1DACEB0006AC79 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; 180 155 25666C4D0A1DAE4D0006AC79 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; }; 156 258C25590A259B6E00AC22BB /* FScript.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FScript.framework; sourceTree = "<group>"; }; 181 157 25EADA9509CD2D7100BCD8E1 /* bytesex.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = bytesex.c; path = "../Darwin source/Commands/Apple/cctools/libstuff/bytesex.c"; sourceTree = SOURCE_ROOT; }; 182 158 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; … … 204 180 E1EE98BD0575626E00F2D92C /* mach_inject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mach_inject.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 1; }; 205 181 E1EE9A2F0575769600F2D92C /* Info-Application.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Info-Application.plist"; sourceTree = "<group>"; }; 206 E1EE9A300575769600F2D92C /* F-Script Anywhere.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = "F-Script Anywhere.app"; sourceTree = BUILT_PRODUCTS_DIR; };182 E1EE9A300575769600F2D92C /* F-Script Anywhere.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "F-Script Anywhere.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 207 183 E1EE9A4F057576A700F2D92C /* F-Script Anywhere.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "F-Script Anywhere.bundle"; sourceTree = BUILT_PRODUCTS_DIR; }; 208 184 E1F3DF910579172A00E952A5 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/FSA.strings; sourceTree = "<group>"; }; … … 226 202 F59279FB01FED0C901AEEC37 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 227 203 F5B11ED902E67DB101AEEDB1 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; }; 228 F5EFC2C3020A6C2601AEEDB1 /* FScript.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FScript.framework; path = /Library/Frameworks/FScript.framework; sourceTree = "<absolute>"; };204 F5EFC2C3020A6C2601AEEDB1 /* FScript.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FScript.framework; sourceTree = "<group>"; }; 229 205 F5EFC2C9020A6CD101AEEDB1 /* DeVercruesseProcess.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = DeVercruesseProcess.m; sourceTree = "<group>"; }; 230 206 F5EFC2CA020A6CD101AEEDB1 /* DeVercruesseProcessManager.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = DeVercruesseProcessManager.m; sourceTree = "<group>"; }; … … 343 319 isa = PBXGroup; 344 320 children = ( 321 258C25590A259B6E00AC22BB /* FScript.framework */, 345 322 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, 346 323 F5680F7A020D0D0401AEEC37 /* FSAInterpreterPanel.nib */, … … 544 521 buildRules = ( 545 522 ); 546 buildSettings = {547 GCC_ENABLE_FIX_AND_CONTINUE = YES;548 GCC_MODEL_TUNING = G5;549 INSTALL_PATH = "$(HOME)/bin";550 PREBINDING = NO;551 PRODUCT_NAME = AddToProcMod;552 ZERO_LINK = YES;553 };554 523 dependencies = ( 555 524 ); … … 570 539 buildRules = ( 571 540 ); 572 buildSettings = {573 GCC_PRECOMPILE_PREFIX_HEADER = YES;574 GCC_PREFIX_HEADER = "$(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";575 GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;576 GCC_WARN_UNKNOWN_PRAGMAS = NO;577 INFOPLIST_FILE = "Bundle Loader-Info.plist";578 INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";579 OTHER_CFLAGS = "";580 PRODUCT_NAME = SCPatchLoader;581 WARNING_CFLAGS = "-Wmost";582 };583 541 dependencies = ( 584 542 ); … … 586 544 productName = Bundle; 587 545 productReference = E1D652040575B3D50054F5D1 /* SCPatchLoader.bundle */; 588 productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>589 <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">590 <plist version=\"1.0\">591 <dict>592 <key>CFBundleDevelopmentRegion</key>593 <string>English</string>594 <key>CFBundleExecutable</key>595 <string>Bundle</string>596 <key>CFBundleGetInfoString</key>597 <string></string>598 <key>CFBundleIconFile</key>599 <string></string>600 <key>CFBundleIdentifier</key>601 <string>com.MySoftwareCompany.Bundle</string>602 <key>CFBundleInfoDictionaryVersion</key>603 <string>6.0</string>604 <key>CFBundlePackageType</key>605 <string>APPL</string>606 <key>CFBundleShortVersionString</key>607 <string></string>608 <key>CFBundleSignature</key>609 <string>????</string>610 <key>CFBundleVersion</key>611 <string>1.0.0d1</string>612 </dict>613 </plist>614 ";615 546 productType = "com.apple.product-type.bundle"; 616 547 }; … … 629 560 buildRules = ( 630 561 ); 631 buildSettings = {632 FRAMEWORK_SEARCH_PATHS = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks";633 HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\"";634 INFOPLIST_FILE = "Info-Application.plist";635 INSTALL_PATH = /;636 LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\"";637 OTHER_LDFLAGS = (638 "-multiply_defined",639 suppress,640 "-lstuff",641 );642 PREBINDING = YES;643 PRODUCT_NAME = "F-Script Anywhere";644 SECTORDER_FLAGS = "";645 WARNING_CFLAGS = (646 "-Wno-long-double",647 "-Wmost",648 "-Wno-four-char-constants",649 "-Wno-unknown-pragmas",650 );651 WRAPPER_EXTENSION = app;652 ZERO_LINK = NO;653 };654 562 dependencies = ( 655 563 E1EE9AA60575939700F2D92C /* PBXTargetDependency */, … … 674 582 buildRules = ( 675 583 ); 676 buildSettings = {677 FRAMEWORK_SEARCH_PATHS = /Volumes/Ti/Library/Frameworks;678 GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;679 GCC_WARN_UNKNOWN_PRAGMAS = NO;680 INFOPLIST_FILE = "Bundle-Info.plist";681 INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles";682 OTHER_CFLAGS = "";683 PRODUCT_NAME = "F-Script Anywhere";684 SECTORDER_FLAGS = "";685 };686 584 dependencies = ( 687 585 ); … … 689 587 productName = Bundle; 690 588 productReference = E1EE9A4F057576A700F2D92C /* F-Script Anywhere.bundle */; 691 productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>692 <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">693 <plist version=\"1.0\">694 <dict>695 <key>CFBundleDevelopmentRegion</key>696 <string>English</string>697 <key>CFBundleExecutable</key>698 <string>Bundle</string>699 <key>CFBundleGetInfoString</key>700 <string></string>701 <key>CFBundleIconFile</key>702 <string></string>703 <key>CFBundleIdentifier</key>704 <string>com.MySoftwareCompany.Bundle</string>705 <key>CFBundleInfoDictionaryVersion</key>706 <string>6.0</string>707 <key>CFBundlePackageType</key>708 <string>APPL</string>709 <key>CFBundleShortVersionString</key>710 <string></string>711 <key>CFBundleSignature</key>712 <string>????</string>713 <key>CFBundleVersion</key>714 <string>1.0.0d1</string>715 </dict>716 </plist>717 ";718 589 productType = "com.apple.product-type.bundle"; 719 590 }; … … 724 595 isa = PBXProject; 725 596 buildConfigurationList = 25EAD8F709CD1E3900BCD8E1 /* Build configuration list for PBXProject "F-Script Anywhere" */; 726 buildSettings = {727 MACOSX_DEPLOYMENT_TARGET = 10.2;728 SDKROOT = /Developer/SDKs/MacOSX10.2.7.sdk;729 };730 buildStyles = (731 4A9504CCFFE6A4B311CA0CBA /* Development */,732 4A9504CDFFE6A4B311CA0CBA /* Deployment */,733 );734 597 hasScannedForEncodings = 1; 735 598 mainGroup = 29B97314FDCFA39411CA2CEA /* PatchTest */; … … 766 629 E1D6B7EA05A4AAE2003838B0 /* Localizable.strings in Resources */, 767 630 E14C1ECF05A8DB19000D4AF3 /* Ellipsis.tiff in Resources */, 631 258C27790A25A57200AC22BB /* FScript.framework in Resources */, 768 632 E1FD011605B91232001DABE0 /* mach_error descriptions.strings in Resources */, 769 633 ); … … 954 818 isa = XCBuildConfiguration; 955 819 buildSettings = { 820 ARCHS = ( 821 ppc, 822 i386, 823 ); 956 824 COPY_PHASE_STRIP = YES; 957 FRAMEWORK_SEARCH_PATHS = ( 958 "$(FRAMEWORK_SEARCH_PATHS)", 959 "$(SRCROOT)", 960 ); 825 FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)\""; 961 826 GCC_ENABLE_FIX_AND_CONTINUE = NO; 962 827 GCC_GENERATE_DEBUGGING_SYMBOLS = NO; … … 1111 976 GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 1112 977 GCC_OPTIMIZATION_LEVEL = 0; 1113 HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\""; 978 HEADER_SEARCH_PATHS = ( 979 "$(HEADER_SEARCH_PATHS_QUOTED_1)", 980 ); 981 HEADER_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\""; 1114 982 INFOPLIST_FILE = "Info-Application.plist"; 1115 983 INSTALL_PATH = /; 1116 LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\""; 984 LIBRARY_SEARCH_PATHS = ( 985 "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 986 ); 987 LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\""; 1117 988 OPTIMIZATION_CFLAGS = "-O0"; 1118 989 OTHER_LDFLAGS = ( … … 1145 1016 FRAMEWORK_SEARCH_PATHS = ( 1146 1017 "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 1147 "$(SRCROOT)", 1148 ); 1018 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", 1019 ); 1020 FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; 1149 1021 GCC_ENABLE_FIX_AND_CONTINUE = NO; 1150 HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\""; 1022 HEADER_SEARCH_PATHS = ( 1023 "$(HEADER_SEARCH_PATHS_QUOTED_1)", 1024 ); 1025 HEADER_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\""; 1151 1026 INFOPLIST_FILE = "Info-Application.plist"; 1152 1027 INSTALL_PATH = /; 1153 LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\""; 1028 LIBRARY_SEARCH_PATHS = ( 1029 "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 1030 ); 1031 LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\""; 1154 1032 OTHER_CFLAGS = "-DFSA_DEBUG=0"; 1155 1033 OTHER_LDFLAGS = ( … … 1157 1035 suppress, 1158 1036 "-lstuff", 1037 "-weak_framework", 1038 FScript, 1159 1039 ); 1160 1040 PREBINDING = YES; … … 1178 1058 "$(SRCROOT)", 1179 1059 ); 1180 HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\""; 1060 HEADER_SEARCH_PATHS = ( 1061 "$(HEADER_SEARCH_PATHS_QUOTED_1)", 1062 ); 1063 HEADER_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/include\""; 1181 1064 INFOPLIST_FILE = "Info-Application.plist"; 1182 1065 INSTALL_PATH = /; 1183 LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\""; 1066 LIBRARY_SEARCH_PATHS = ( 1067 "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 1068 ); 1069 LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../Darwin source/Commands/Apple/cctools/libstuff\""; 1184 1070 OTHER_LDFLAGS = ( 1185 1071 "-multiply_defined", -
trunk/Cocoa/F-Script Anywhere/Source/FSAApp.h
r153 r230 26 26 27 27 #import <Cocoa/Cocoa.h> 28 #import <Security/Authorization.h> 28 29 #import "FSAAppList.h" 29 30 … … 48 49 IBOutlet FSAAppList *appList; 49 50 FSAPatchController *patchController; 51 AuthorizationRef myAuthorizationRef; 52 AuthorizationFlags myFlags; 50 53 } 51 54 52 55 - (IBAction)installBundleInSelectedApp:(id)sender; 56 -(BOOL)createAuthorization; 53 57 54 58 @end -
trunk/Cocoa/F-Script Anywhere/Source/FSAApp.mm
r229 r230 30 30 #import <CoreFoundation/CoreFoundation.h> 31 31 #import <ApplicationServices/ApplicationServices.h> 32 #import <Security/Authorization.h>33 32 #import <Security/AuthorizationTags.h> 34 33 … … 121 120 } 122 121 122 -(void)installFScript 123 { 124 OSStatus myStatus; 125 126 NSString *installPath = nil; 127 if([[NSFileManager defaultManager] fileExistsAtPath:@"/Library/Frameworks/FScript.framework"]) 128 installPath = @"/Library/Frameworks/FScript.framework"; 129 if([[NSFileManager defaultManager] fileExistsAtPath:[@"~/Library/Frameworks/FScript.framework" stringByExpandingTildeInPath]]) 130 installPath = [@"~/Library/Frameworks/FScript.framework" stringByExpandingTildeInPath]; 131 132 if(installPath){ 133 [[NSFileManager defaultManager] removeFileAtPath:installPath handler:nil]; 134 } 135 136 if(!installPath){ 137 switch([[NSAlert alertWithMessageText:@"Install F-Script" 138 defaultButton:@"Current User" 139 alternateButton:@"All Users" 140 otherButton:nil 141 informativeTextWithFormat:@"No previous version of F-Script found. You can choose to install for just your current user (~/Library/Frameworks) or for all users (/Library/Frameworks)."] runModal]){ 142 case NSAlertDefaultReturn: // Current user 143 installPath = [@"~/Library/Frameworks/FScript.framework" stringByExpandingTildeInPath]; 144 break; 145 case NSAlertAlternateReturn: // All users 146 installPath = @"/Library/Frameworks/FScript.framework"; 147 break; 148 default: 149 break; 150 } 151 } 152 153 NSString *fromPath = [[NSBundle mainBundle] pathForResource:@"FScript" ofType:@"framework"]; 154 if(![[NSFileManager defaultManager] fileExistsAtPath:[installPath stringByDeletingLastPathComponent]]){ 155 if ([[NSFileManager defaultManager] isWritableFileAtPath:installPath]){ 156 [[NSFileManager defaultManager] createDirectoryAtPath:[installPath stringByDeletingLastPathComponent] 157 attributes:nil]; 158 } else { 159 [self createAuthorization]; 160 NSString *myToolPath = @"/bin/mkdir"; 161 char *myArguments[] = { (char *)[[installPath stringByDeletingLastPathComponent] UTF8String], NULL }; 162 myStatus = AuthorizationExecuteWithPrivileges(myAuthorizationRef, [myToolPath UTF8String], 163 myFlags, myArguments, 164 NULL); 165 } 166 } 167 if([[NSFileManager defaultManager] isWritableFileAtPath:[installPath stringByDeletingLastPathComponent]]){ 168 [[NSFileManager defaultManager] copyPath:fromPath toPath:installPath handler:nil]; 169 } else { 170 [self createAuthorization]; 171 NSString *myToolPath = @"/bin/cp"; 172 char *myArguments[] = { "-r", (char *)[fromPath UTF8String], (char *)[installPath UTF8String], NULL }; 173 myStatus = AuthorizationExecuteWithPrivileges(myAuthorizationRef, [myToolPath UTF8String], 174 myFlags, myArguments, 175 NULL); 176 } 177 } 178 123 179 - (BOOL)_shouldContinueAfterFrameworkErrorPanelReturnedWithResult:(int)result; 124 180 { … … 126 182 case NSAlertOtherReturn: 127 183 return true; 128 case NSAlertAlternateReturn: 129 [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: FSA_FScriptURL]]; 184 case NSAlertAlternateReturn: /* Install from resources */ 185 [self installFScript]; 186 return true; 130 187 case NSAlertDefaultReturn: 131 188 default: … … 135 192 } 136 193 137 -(tDirStatus)authorizeAndAddToProcMod:(NSString *)username 138 { 194 -(BOOL)createAuthorization 195 { 196 if(myAuthorizationRef) 197 return YES; 198 139 199 OSStatus myStatus; 140 AuthorizationFlags myFlags = kAuthorizationFlagDefaults; 141 AuthorizationRef myAuthorizationRef; 200 myFlags = kAuthorizationFlagDefaults; 142 201 143 202 myStatus = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, 144 203 myFlags, &myAuthorizationRef); 145 204 if(myStatus != errAuthorizationSuccess) 146 return eDSAuthFailed;205 return NO; 147 206 148 207 AuthorizationItem myItems = {kAuthorizationRightExecute, 0, NULL, 0}; … … 157 216 158 217 if(myStatus != errAuthorizationSuccess) 218 return NO; 219 220 myFlags = kAuthorizationFlagDefaults; 221 return YES; 222 } 223 224 -(tDirStatus)authorizeAndAddToProcMod:(NSString *)username 225 { 226 OSStatus myStatus; 227 228 if(![self createAuthorization]) 159 229 return eDSAuthFailed; 160 161 myFlags = kAuthorizationFlagDefaults;162 230 163 231 NSString *myToolPath = [[NSBundle mainBundle] pathForResource:@"AddToProcMod" ofType:@""]; … … 176 244 myReadBuffer[didRead - 1] = 0; 177 245 178 AuthorizationFree(myAuthorizationRef, kAuthorizationFlagDefaults);179 180 246 return (tDirStatus)strtol(myReadBuffer, NULL, 10); 181 247 } … … 274 340 int result = NSRunInformationalAlertPanel( 275 341 NSLocalizedString(@"F-Script Framework Not Found", "Framework not found alert title"), 276 NSLocalizedString(@"F-Script Anywhere requires the F-Script framework be installed in a Frameworks directory, such as ~/Library/Frameworks or /Library/Frameworks.\n\nTo download F-Script, please visit its Web site\n%@.\n\n If you believe this message is in error, click '%@'.",342 NSLocalizedString(@"F-Script Anywhere requires the F-Script framework be installed in a Frameworks directory, such as ~/Library/Frameworks or /Library/Frameworks.\n\nTo download F-Script, please visit its Web site\n%@.\n\nThis package also includes a copy of F-Script for your convenience that can be installed easily by clicking below. Note that there may be a more recent version of F-Script available from the F-Script web site.\n\nIf you believe this message is in error, click '%@'.", 277 343 "Framework not found alert message, F-Script Web site URL parameter, 'Continue' button parameter"), 278 344 NSLocalizedString(@"Quit", "Quit button title"), 279 NSLocalizedString(@" GetF-Script", "'Get F-Script' button title"),345 NSLocalizedString(@"Install F-Script", "'Get F-Script' button title"), 280 346 NSLocalizedString(@"Continue", "Continue button title"), 281 347 FSA_FScriptURL, NSLocalizedString(@"Continue", "")); … … 290 356 int result = NSRunInformationalAlertPanel( 291 357 NSLocalizedString(@"F-Script Framework Too Old", "Framework too old alert title"), 292 NSLocalizedString(@"F-Script Anywhere %s requires version %@ or later of the F-Script framework be installed in a Frameworks directory, such as ~/Library/Frameworks or /Library/Frameworks. The installed version is %@.\n\nTo upgrade F-Script, please visit its Web site\n%@.\n\nT o use this version of F-Script regardless of the problems you may experience, click '%@'.",358 NSLocalizedString(@"F-Script Anywhere %s requires version %@ or later of the F-Script framework be installed in a Frameworks directory, such as ~/Library/Frameworks or /Library/Frameworks. The installed version is %@.\n\nTo upgrade F-Script, please visit its Web site\n%@.\n\nThis package also includes a copy of F-Script for your convenience that can be installed easily by clicking below. Note that there may be a more recent version of F-Script available from the F-Script web site.\n\nTo use this version of F-Script regardless of the problems you may experience, click '%@'.", 293 359 "Framework too old alert message, FSA version parameter, minimum F-Script version parameter, current F-Script version parameter, F-Script Web site URL parameter, 'Continue' button parameter"), 294 360 NSLocalizedString(@"Quit", "Quit button title"), 295 NSLocalizedString(@" GetF-Script", "'Get F-Script' button title"),361 NSLocalizedString(@"Install F-Script", "'Get F-Script' button title"), 296 362 NSLocalizedString(@"Continue", "Continue button title"), 297 363 FSA_VERSION, FSA_FScriptMinimumVersion, frameworkVersion, 298 FSA_FScriptURL, NSLocalizedString(@" Continue", ""));364 FSA_FScriptURL, NSLocalizedString(@"Install F-Script", "")); 299 365 if (![self _shouldContinueAfterFrameworkErrorPanelReturnedWithResult: result]) return; 300 366 } 301 367 } 302 368 369 if(myAuthorizationRef){ 370 AuthorizationFree(myAuthorizationRef, kAuthorizationFlagDefaults); 371 myAuthorizationRef = nil; 372 } 373 303 374 NSNotificationCenter *workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; 304 375 [workspaceNotificationCenter -
trunk/Cocoa/F-Script Anywhere/Source/Read Me
r229 r230 91 91 (and if not, to prompt you if you want to add yourself) -- something 92 92 that is necessary for use of FSA on x86. 93 94 4. Unzip FScript.framework.zip, or put a newer version of FScript.framework 95 in the project path. This is used for the FScript framework auto installer. 93 96 94 3. Open 'F-Script Anywhere.xcodeproj' in Xcode and build the Application97 5. Open 'F-Script Anywhere.xcodeproj' in Xcode and build the Application 95 98 target. This target depends on the Bundle and Bundle Loader 96 99 targets, so you don't need to build them separately. You
Note:
See TracChangeset
for help on using the changeset viewer.