diff --git a/ImageLogger.xcodeproj/project.pbxproj b/ImageLogger.xcodeproj/project.pbxproj index a80505a..438a417 100644 --- a/ImageLogger.xcodeproj/project.pbxproj +++ b/ImageLogger.xcodeproj/project.pbxproj @@ -10,19 +10,16 @@ 6D19D0CD18E85FF20094D1B0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D19D0CC18E85FF20094D1B0 /* UIKit.framework */; }; 6D19D1A418E8C1C50094D1B0 /* LLImageLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D19D1A318E8C1C50094D1B0 /* LLImageLogger.m */; }; 6D19D1A518E8C1CA0094D1B0 /* LLImageLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D19D1A318E8C1C50094D1B0 /* LLImageLogger.m */; }; - 6D53E3C418E4384C002B3680 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D53E3C318E4384C002B3680 /* Cocoa.framework */; }; - 6D53E3CE18E4384C002B3680 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6D53E3CC18E4384C002B3680 /* InfoPlist.strings */; }; - 6D53E3D018E4384C002B3680 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D53E3CF18E4384C002B3680 /* main.m */; }; - 6D53E3D418E4384C002B3680 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 6D53E3D218E4384C002B3680 /* Credits.rtf */; }; 6D53E3D718E4384C002B3680 /* LLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D53E3D618E4384C002B3680 /* LLAppDelegate.m */; }; - 6D53E3DA18E4384C002B3680 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6D53E3D818E4384C002B3680 /* MainMenu.xib */; }; 6D53E3DC18E4384C002B3680 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D53E3DB18E4384C002B3680 /* Images.xcassets */; }; 6D53E40318E44281002B3680 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D53E40218E44281002B3680 /* Foundation.framework */; }; 6D53E40518E44281002B3680 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D53E40418E44281002B3680 /* CoreGraphics.framework */; }; - 6D53E40D18E44281002B3680 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6D53E40B18E44281002B3680 /* InfoPlist.strings */; }; 6D53E40F18E44281002B3680 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D53E40E18E44281002B3680 /* main.m */; }; 6D53E41318E44281002B3680 /* LLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D53E41218E44281002B3680 /* LLAppDelegate.m */; }; 6D53E41518E44281002B3680 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D53E41418E44281002B3680 /* Images.xcassets */; }; + 7B46C551193D2599007D72D5 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7B46C550193D2599007D72D5 /* MainMenu.xib */; }; + 7BA7BFAE193ED2B9007DAB90 /* framework.icns in Resources */ = {isa = PBXBuildFile; fileRef = 7BB55631193D5CCA002A9705 /* framework.icns */; }; + 7BB55635193D8649002A9705 /* dylib.png in Resources */ = {isa = PBXBuildFile; fileRef = 7BB55633193D8646002A9705 /* dylib.png */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -30,38 +27,26 @@ 6D19D1A218E8C1C50094D1B0 /* LLImageLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLImageLogger.h; path = Shared/LLImageLogger.h; sourceTree = ""; }; 6D19D1A318E8C1C50094D1B0 /* LLImageLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LLImageLogger.m; path = Shared/LLImageLogger.m; sourceTree = ""; }; 6D53E3C018E4384C002B3680 /* ImageLogger.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageLogger.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 6D53E3C318E4384C002B3680 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 6D53E3C618E4384C002B3680 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 6D53E3C718E4384C002B3680 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 6D53E3C818E4384C002B3680 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6D53E3CB18E4384C002B3680 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6D53E3CD18E4384C002B3680 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 6D53E3CF18E4384C002B3680 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6D53E3D318E4384C002B3680 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 6D53E3D518E4384C002B3680 /* LLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LLAppDelegate.h; sourceTree = ""; }; 6D53E3D618E4384C002B3680 /* LLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LLAppDelegate.m; sourceTree = ""; }; - 6D53E3D918E4384C002B3680 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 6D53E3DB18E4384C002B3680 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 6D53E40118E44281002B3680 /* ImageLoggerTouch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageLoggerTouch.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6D53E40218E44281002B3680 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6D53E40418E44281002B3680 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6D53E40C18E44281002B3680 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 6D53E40E18E44281002B3680 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 6D53E41118E44281002B3680 /* LLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LLAppDelegate.h; sourceTree = ""; }; 6D53E41218E44281002B3680 /* LLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LLAppDelegate.m; sourceTree = ""; }; 6D53E41418E44281002B3680 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 6D53E43118E44330002B3680 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7B46C550193D2599007D72D5 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = ""; }; + 7B4EB00F193DFDB400366BFC /* Logger.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Logger.playground; sourceTree = ""; }; + 7BB55631193D5CCA002A9705 /* framework.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = framework.icns; sourceTree = ""; }; + 7BB55633193D8646002A9705 /* dylib.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dylib.png; sourceTree = ""; }; + 7BB55634193D8649002A9705 /* framework.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = framework.png; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 6D53E3BD18E4384C002B3680 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6D53E3C418E4384C002B3680 /* Cocoa.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 6D53E3FE18E44281002B3680 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -78,10 +63,9 @@ 6D53E3B718E4384C002B3680 = { isa = PBXGroup; children = ( - 6D53E42E18E4428E002B3680 /* Shared */, - 6D53E3C918E4384C002B3680 /* ImageLogger */, - 6D53E40818E44281002B3680 /* ImageLogger Touch */, - 6D53E3C218E4384C002B3680 /* Frameworks */, + 6D53E42E18E4428E002B3680 /* Common */, + 6D53E3C918E4384C002B3680 /* ImageLogger OSX */, + 6D53E40818E44281002B3680 /* ImageLogger iOS */, 6D53E3C118E4384C002B3680 /* Products */, ); sourceTree = ""; @@ -101,63 +85,47 @@ 6D53E40218E44281002B3680 /* Foundation.framework */, 6D53E40418E44281002B3680 /* CoreGraphics.framework */, 6D19D0CC18E85FF20094D1B0 /* UIKit.framework */, - 6D53E3C318E4384C002B3680 /* Cocoa.framework */, - 6D53E3C518E4384C002B3680 /* Other Frameworks */, ); name = Frameworks; + path = ..; sourceTree = ""; }; - 6D53E3C518E4384C002B3680 /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 6D53E3C618E4384C002B3680 /* AppKit.framework */, - 6D53E3C718E4384C002B3680 /* CoreData.framework */, - 6D53E3C818E4384C002B3680 /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 6D53E3C918E4384C002B3680 /* ImageLogger */ = { + 6D53E3C918E4384C002B3680 /* ImageLogger OSX */ = { isa = PBXGroup; children = ( 6D53E3D518E4384C002B3680 /* LLAppDelegate.h */, 6D53E3D618E4384C002B3680 /* LLAppDelegate.m */, - 6D53E3D818E4384C002B3680 /* MainMenu.xib */, - 6D53E3F718E43864002B3680 /* Other Sources */, + 7B46C550193D2599007D72D5 /* MainMenu.xib */, 6D53E3CA18E4384C002B3680 /* Supporting Files */, - 6D53E3DB18E4384C002B3680 /* Images.xcassets */, ); + name = "ImageLogger OSX"; path = ImageLogger; sourceTree = ""; }; 6D53E3CA18E4384C002B3680 /* Supporting Files */ = { isa = PBXGroup; children = ( + 6D53E3DB18E4384C002B3680 /* Images.xcassets */, + 7BB55631193D5CCA002A9705 /* framework.icns */, + 7BB55633193D8646002A9705 /* dylib.png */, + 7BB55634193D8649002A9705 /* framework.png */, + 7B4EB00F193DFDB400366BFC /* Logger.playground */, 6D53E3CB18E4384C002B3680 /* Info.plist */, - 6D53E3CC18E4384C002B3680 /* InfoPlist.strings */, - 6D53E3D218E4384C002B3680 /* Credits.rtf */, ); name = "Supporting Files"; sourceTree = ""; }; - 6D53E3F718E43864002B3680 /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6D53E3CF18E4384C002B3680 /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 6D53E40818E44281002B3680 /* ImageLogger Touch */ = { + 6D53E40818E44281002B3680 /* ImageLogger iOS */ = { isa = PBXGroup; children = ( + 6D53E3C218E4384C002B3680 /* Frameworks */, 6D53E41118E44281002B3680 /* LLAppDelegate.h */, 6D53E41218E44281002B3680 /* LLAppDelegate.m */, 6D53E42F18E442B0002B3680 /* Other Sources */, 6D53E40918E44281002B3680 /* Supporting Files */, 6D53E41418E44281002B3680 /* Images.xcassets */, ); - name = "ImageLogger Touch"; + name = "ImageLogger iOS"; path = ImageLoggerTouch; sourceTree = ""; }; @@ -165,18 +133,17 @@ isa = PBXGroup; children = ( 6D53E43118E44330002B3680 /* Info.plist */, - 6D53E40B18E44281002B3680 /* InfoPlist.strings */, ); name = "Supporting Files"; sourceTree = ""; }; - 6D53E42E18E4428E002B3680 /* Shared */ = { + 6D53E42E18E4428E002B3680 /* Common */ = { isa = PBXGroup; children = ( 6D19D1A218E8C1C50094D1B0 /* LLImageLogger.h */, 6D19D1A318E8C1C50094D1B0 /* LLImageLogger.m */, ); - name = Shared; + name = Common; sourceTree = ""; }; 6D53E42F18E442B0002B3680 /* Other Sources */ = { @@ -195,7 +162,6 @@ buildConfigurationList = 6D53E3F118E4384C002B3680 /* Build configuration list for PBXNativeTarget "ImageLogger" */; buildPhases = ( 6D53E3BC18E4384C002B3680 /* Sources */, - 6D53E3BD18E4384C002B3680 /* Frameworks */, 6D53E3BE18E4384C002B3680 /* Resources */, ); buildRules = ( @@ -258,10 +224,10 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6D53E3CE18E4384C002B3680 /* InfoPlist.strings in Resources */, 6D53E3DC18E4384C002B3680 /* Images.xcassets in Resources */, - 6D53E3D418E4384C002B3680 /* Credits.rtf in Resources */, - 6D53E3DA18E4384C002B3680 /* MainMenu.xib in Resources */, + 7B46C551193D2599007D72D5 /* MainMenu.xib in Resources */, + 7BA7BFAE193ED2B9007DAB90 /* framework.icns in Resources */, + 7BB55635193D8649002A9705 /* dylib.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -269,7 +235,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6D53E40D18E44281002B3680 /* InfoPlist.strings in Resources */, 6D53E41518E44281002B3680 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -283,7 +248,6 @@ files = ( 6D53E3D718E4384C002B3680 /* LLAppDelegate.m in Sources */, 6D19D1A418E8C1C50094D1B0 /* LLImageLogger.m in Sources */, - 6D53E3D018E4384C002B3680 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -299,46 +263,12 @@ }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 6D53E3CC18E4384C002B3680 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6D53E3CD18E4384C002B3680 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 6D53E3D218E4384C002B3680 /* Credits.rtf */ = { - isa = PBXVariantGroup; - children = ( - 6D53E3D318E4384C002B3680 /* en */, - ); - name = Credits.rtf; - sourceTree = ""; - }; - 6D53E3D818E4384C002B3680 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 6D53E3D918E4384C002B3680 /* Base */, - ); - name = MainMenu.xib; - sourceTree = ""; - }; - 6D53E40B18E44281002B3680 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6D53E40C18E44281002B3680 /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 6D53E3EF18E4384C002B3680 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -352,7 +282,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = c11; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -378,6 +308,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -393,7 +324,7 @@ COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = c11; GCC_ENABLE_OBJC_EXCEPTIONS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; diff --git a/ImageLogger/LLAppDelegate.h b/ImageLogger/LLAppDelegate.h index 75798be..e695e3a 100644 --- a/ImageLogger/LLAppDelegate.h +++ b/ImageLogger/LLAppDelegate.h @@ -7,9 +7,16 @@ // #import - -@interface LLAppDelegate : NSObject +//@class LLImageLogger; +@interface LLAppDelegate : NSObject @property (assign) IBOutlet NSWindow *window; +@property (assign) IBOutlet NSTableView *table; +@property (assign) IBOutlet NSTextField *numberOfCommands, *loadedImages; +@property (nonatomic) NSArrayController *arrayController; +@property NSPopover *pop; +- (IBAction) loadMore:(id)x; @end + +//@property (assign) IBOutlet NSPathControl *path; diff --git a/ImageLogger/LLAppDelegate.m b/ImageLogger/LLAppDelegate.m index c197f88..c948cf2 100644 --- a/ImageLogger/LLAppDelegate.m +++ b/ImageLogger/LLAppDelegate.m @@ -1,18 +1,48 @@ -// -// LLAppDelegate.m -// ImageLogger -// -// Created by Damien DeVille on 3/27/14. -// Copyright (c) 2014 Damien DeVille. All rights reserved. -// + +// LLAppDelegate.m ImageLogger +// Created by Damien DeVille on 3/27/14. Copyright (c) 2014 Damien DeVille. All rights reserved. #import "LLAppDelegate.h" +#import "LLImageLogger.h" @implementation LLAppDelegate -- (void)applicationDidFinishLaunching:(NSNotification *)notification -{ - // nop +- (void) loadMore:(id)x { NSOpenPanel * p = NSOpenPanel.openPanel; + + [_table unbind:NSContentBinding]; // dunno why this is necessary.. idiotic. + [p beginSheetModalForWindow:_window + completionHandler:^(NSInteger r) { NSError *e; NSURL *u; NSBundle *b; + + if (r != NSFileHandlingPanelOKButton || !p.URLs.count) return; + + NSLog (@"Loading %@", u = [p.URLs[0]filePathURL]); + + if (!(b = [NSBundle bundleWithURL:u])) return; + + [b preflightAndReturnError:&e] && !e ? [b load], NSLog(@"Bundle:%@", b) : NSLog(@"Error:%@", e); + + [_table bind:NSContentBinding toObject:_arrayController withKeyPath:@"arrangedObjects" options:nil]; + }]; +} + +- (NSArrayController*) arrayController { return _arrayController = _arrayController ?: ({ + + [_arrayController = NSArrayController.new bind:NSContentArrayBinding toObject:LLImageLogger.logger withKeyPath:@"images" options:nil]; _arrayController; }); +} + +- (void) applicationDidFinishLaunching:(NSNotification*)n { + + [_table bind:NSContentBinding toObject:self.arrayController withKeyPath:@"arrangedObjects" options:nil]; + [_loadedImages bind:NSValueBinding toObject:_arrayController withKeyPath:@"arrangedObjects.@count" options:nil]; + [_numberOfCommands bind:NSValueBinding toObject:_arrayController withKeyPath:@"arrangedObjects.@sum.ncmds" options:nil]; + // [_table bind:NSToolTipBinding toObject:self.arrayController withKeyPath:[NSSelectedObjectBinding stringByAppendingString:@".flags"] options:nil]; } +-(void) tableViewSelectionDidChange:(NSNotification *)n { + + NSTableView* tv = n.object; + NSLog(@"%@",[[self.arrayController.arrangedObjects objectAtIndex:tv.selectedRow] valueForKey:@"flags"]); +} @end + +int main(int argc, const char **argv) { return NSApplicationMain(argc, argv); } diff --git a/ImageLogger/Base.lproj/MainMenu.xib b/ImageLogger/MainMenu.xib similarity index 61% rename from ImageLogger/Base.lproj/MainMenu.xib rename to ImageLogger/MainMenu.xib index 29aa3f9..b1176da 100644 --- a/ImageLogger/Base.lproj/MainMenu.xib +++ b/ImageLogger/MainMenu.xib @@ -1,29 +1,32 @@ - + - + + - + + + - + - - - + - + + + + - - + @@ -37,7 +40,7 @@ - + @@ -55,7 +58,7 @@ - + @@ -354,37 +357,17 @@ - - - - - - - - - - - - - - - + + + - - - - - - - - - - + + @@ -656,7 +639,7 @@ - + @@ -666,15 +649,286 @@ - + - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ImageLogger/dylib.png b/ImageLogger/dylib.png new file mode 100644 index 0000000..de35b84 Binary files /dev/null and b/ImageLogger/dylib.png differ diff --git a/ImageLogger/en.lproj/Credits.rtf b/ImageLogger/en.lproj/Credits.rtf deleted file mode 100644 index 46576ef..0000000 --- a/ImageLogger/en.lproj/Credits.rtf +++ /dev/null @@ -1,29 +0,0 @@ -{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} -{\colortbl;\red255\green255\blue255;} -\paperw9840\paperh8400 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\b\fs24 \cf0 Engineering: -\b0 \ - Some people\ -\ - -\b Human Interface Design: -\b0 \ - Some other people\ -\ - -\b Testing: -\b0 \ - Hopefully not nobody\ -\ - -\b Documentation: -\b0 \ - Whoever\ -\ - -\b With special thanks to: -\b0 \ - Mom\ -} diff --git a/ImageLogger/en.lproj/InfoPlist.strings b/ImageLogger/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/ImageLogger/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/ImageLogger/en.lproj/MainMenu.strings b/ImageLogger/en.lproj/MainMenu.strings new file mode 100644 index 0000000..b3010cc --- /dev/null +++ b/ImageLogger/en.lproj/MainMenu.strings @@ -0,0 +1,420 @@ + +/* Class = "NSMenuItem"; title = "Customize Toolbar…"; ObjectID = "1UK-8n-QPP"; */ +"1UK-8n-QPP.title" = "Customize Toolbar…"; + +/* Class = "NSMenuItem"; title = "ImageLogger"; ObjectID = "1Xt-HY-uBw"; */ +"1Xt-HY-uBw.title" = "ImageLogger"; + +/* Class = "NSMenu"; title = "Find"; ObjectID = "1b7-l0-nxx"; */ +"1b7-l0-nxx.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Lower"; ObjectID = "1tx-W0-xDw"; */ +"1tx-W0-xDw.title" = "Lower"; + +/* Class = "NSMenuItem"; title = "Raise"; ObjectID = "2h7-ER-AoG"; */ +"2h7-ER-AoG.title" = "Raise"; + +/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "2oI-Rn-ZJC"; */ +"2oI-Rn-ZJC.title" = "Transformations"; + +/* Class = "NSMenu"; title = "Spelling"; ObjectID = "3IN-sU-3Bg"; */ +"3IN-sU-3Bg.title" = "Spelling"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "3Om-Ey-2VK"; */ +"3Om-Ey-2VK.title" = "Use Default"; + +/* Class = "NSMenu"; title = "Speech"; ObjectID = "3rS-ZA-NoH"; */ +"3rS-ZA-NoH.title" = "Speech"; + +/* Class = "NSMenuItem"; title = "Tighten"; ObjectID = "46P-cB-AYj"; */ +"46P-cB-AYj.title" = "Tighten"; + +/* Class = "NSMenuItem"; title = "Find"; ObjectID = "4EN-yA-p0u"; */ +"4EN-yA-p0u.title" = "Find"; + +/* Class = "NSMenuItem"; title = "Quit ImageLogger"; ObjectID = "4sb-4s-VLi"; */ +"4sb-4s-VLi.title" = "Quit ImageLogger"; + +/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "5QF-Oa-p0T"; */ +"5QF-Oa-p0T.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Copy Style"; ObjectID = "5Vv-lz-BsD"; */ +"5Vv-lz-BsD.title" = "Copy Style"; + +/* Class = "NSMenuItem"; title = "About ImageLogger"; ObjectID = "5kV-Vb-QxS"; */ +"5kV-Vb-QxS.title" = "About ImageLogger"; + +/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "6dh-zS-Vam"; */ +"6dh-zS-Vam.title" = "Redo"; + +/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "78Y-hA-62v"; */ +"78Y-hA-62v.title" = "Correct Spelling Automatically"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "79r-o8-sxk"; */ +"79r-o8-sxk.title" = "Text Cell"; + +/* Class = "NSTableColumn"; headerCell.title = "name"; ObjectID = "7H1-W3-u4y"; */ +"7H1-W3-u4y.headerCell.title" = "name"; + +/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "8mr-sm-Yjd"; */ +"8mr-sm-Yjd.title" = "Writing Direction"; + +/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "9ic-FL-obx"; */ +"9ic-FL-obx.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "9yt-4B-nSM"; */ +"9yt-4B-nSM.title" = "Smart Copy/Paste"; + +/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */ +"AYu-sK-qS6.title" = "Main Menu"; + +/* Class = "NSMenuItem"; title = "Preferences…"; ObjectID = "BOF-NM-1cW"; */ +"BOF-NM-1cW.title" = "Preferences…"; + +/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "BgM-ve-c93"; */ +"BgM-ve-c93.title" = "\tLeft to Right"; + +/* Class = "NSMenuItem"; title = "Save As…"; ObjectID = "Bw7-FT-i3A"; */ +"Bw7-FT-i3A.title" = "Save As…"; + +/* Class = "NSMenuItem"; title = "Close"; ObjectID = "DVo-aG-piG"; */ +"DVo-aG-piG.title" = "Close"; + +/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "Dv1-io-Yv7"; */ +"Dv1-io-Yv7.title" = "Spelling and Grammar"; + +/* Class = "NSMenu"; title = "Help"; ObjectID = "F2S-fz-NVQ"; */ +"F2S-fz-NVQ.title" = "Help"; + +/* Class = "NSMenuItem"; title = "ImageLogger Help"; ObjectID = "FKE-Sm-Kum"; */ +"FKE-Sm-Kum.title" = "ImageLogger Help"; + +/* Class = "NSMenuItem"; title = "Text"; ObjectID = "Fal-I4-PZk"; */ +"Fal-I4-PZk.title" = "Text"; + +/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "FeM-D8-WVr"; */ +"FeM-D8-WVr.title" = "Substitutions"; + +/* Class = "NSMenuItem"; title = "Bold"; ObjectID = "GB9-OM-e27"; */ +"GB9-OM-e27.title" = "Bold"; + +/* Class = "NSMenu"; title = "Format"; ObjectID = "GEO-Iw-cKr"; */ +"GEO-Iw-cKr.title" = "Format"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "GUa-eO-cwY"; */ +"GUa-eO-cwY.title" = "Use Default"; + +/* Class = "NSMenuItem"; title = "Font"; ObjectID = "Gi5-1S-RQB"; */ +"Gi5-1S-RQB.title" = "Font"; + +/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "H1b-Si-o9J"; */ +"H1b-Si-o9J.title" = "Writing Direction"; + +/* Class = "NSMenuItem"; title = "View"; ObjectID = "H8h-7b-M4v"; */ +"H8h-7b-M4v.title" = "View"; + +/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "HFQ-gK-NFA"; */ +"HFQ-gK-NFA.title" = "Text Replacement"; + +/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "HFo-cy-zxI"; */ +"HFo-cy-zxI.title" = "Show Spelling and Grammar"; + +/* Class = "NSMenu"; title = "View"; ObjectID = "HyV-fh-RgO"; */ +"HyV-fh-RgO.title" = "View"; + +/* Class = "NSMenuItem"; title = "Subscript"; ObjectID = "I0S-gh-46l"; */ +"I0S-gh-46l.title" = "Subscript"; + +/* Class = "NSMenuItem"; title = "Open…"; ObjectID = "IAo-SY-fd9"; */ +"IAo-SY-fd9.title" = "Open…"; + +/* Class = "NSMenuItem"; title = "Justify"; ObjectID = "J5U-5w-g23"; */ +"J5U-5w-g23.title" = "Justify"; + +/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "J7y-lM-qPV"; */ +"J7y-lM-qPV.title" = "Use None"; + +/* Class = "NSMenuItem"; title = "Revert to Saved"; ObjectID = "KaW-ft-85H"; */ +"KaW-ft-85H.title" = "Revert to Saved"; + +/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "Kd2-mp-pUS"; */ +"Kd2-mp-pUS.title" = "Show All"; + +/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "LE2-aR-0XJ"; */ +"LE2-aR-0XJ.title" = "Bring All to Front"; + +/* Class = "NSTableColumn"; headerCell.title = "filetype"; ObjectID = "LUy-ay-SIi"; */ +"LUy-ay-SIi.headerCell.title" = "filetype"; + +/* Class = "NSMenuItem"; title = "Paste Ruler"; ObjectID = "LVM-kO-fVI"; */ +"LVM-kO-fVI.title" = "Paste Ruler"; + +/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "Lbh-J2-qVU"; */ +"Lbh-J2-qVU.title" = "\tLeft to Right"; + +/* Class = "NSMenuItem"; title = "Copy Ruler"; ObjectID = "MkV-Pr-PK5"; */ +"MkV-Pr-PK5.title" = "Copy Ruler"; + +/* Class = "NSMenuItem"; title = "Services"; ObjectID = "NMo-om-nkz"; */ +"NMo-om-nkz.title" = "Services"; + +/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "Nop-cj-93Q"; */ +"Nop-cj-93Q.title" = "\tDefault"; + +/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "OY7-WF-poV"; */ +"OY7-WF-poV.title" = "Minimize"; + +/* Class = "NSMenuItem"; title = "Baseline"; ObjectID = "OaQ-X3-Vso"; */ +"OaQ-X3-Vso.title" = "Baseline"; + +/* Class = "NSMenuItem"; title = "Hide ImageLogger"; ObjectID = "Olw-nP-bQN"; */ +"Olw-nP-bQN.title" = "Hide ImageLogger"; + +/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "OwM-mh-QMV"; */ +"OwM-mh-QMV.title" = "Find Previous"; + +/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "Oyz-dy-DGm"; */ +"Oyz-dy-DGm.title" = "Stop Speaking"; + +/* Class = "NSMenuItem"; title = "Bigger"; ObjectID = "Ptp-SP-VEL"; */ +"Ptp-SP-VEL.title" = "Bigger"; + +/* Class = "NSMenuItem"; title = "Show Fonts"; ObjectID = "Q5e-8K-NDq"; */ +"Q5e-8K-NDq.title" = "Show Fonts"; + +/* Class = "NSWindow"; title = "ImageLogger"; ObjectID = "QvC-M9-y7g"; */ +"QvC-M9-y7g.title" = "ImageLogger"; + +/* Class = "NSMenuItem"; title = "Zoom"; ObjectID = "R4o-n2-Eq4"; */ +"R4o-n2-Eq4.title" = "Zoom"; + +/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "RB4-Sm-HuC"; */ +"RB4-Sm-HuC.title" = "\tRight to Left"; + +/* Class = "NSMenuItem"; title = "Superscript"; ObjectID = "Rqc-34-cIF"; */ +"Rqc-34-cIF.title" = "Superscript"; + +/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "Ruw-6m-B2m"; */ +"Ruw-6m-B2m.title" = "Select All"; + +/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "S0p-oC-mLd"; */ +"S0p-oC-mLd.title" = "Jump to Selection"; + +/* Class = "NSMenu"; title = "Window"; ObjectID = "Td7-aD-5lo"; */ +"Td7-aD-5lo.title" = "Window"; + +/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "UEZ-Bs-lqG"; */ +"UEZ-Bs-lqG.title" = "Capitalize"; + +/* Class = "NSMenuItem"; title = "Center"; ObjectID = "VIY-Ag-zcb"; */ +"VIY-Ag-zcb.title" = "Center"; + +/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "Vdr-fp-XzO"; */ +"Vdr-fp-XzO.title" = "Hide Others"; + +/* Class = "NSMenuItem"; title = "Italic"; ObjectID = "Vjx-xi-njq"; */ +"Vjx-xi-njq.title" = "Italic"; + +/* Class = "NSMenu"; title = "Edit"; ObjectID = "W48-6f-4Dl"; */ +"W48-6f-4Dl.title" = "Edit"; + +/* Class = "NSMenuItem"; title = "Underline"; ObjectID = "WRG-CD-K1S"; */ +"WRG-CD-K1S.title" = "Underline"; + +/* Class = "NSMenuItem"; title = "New"; ObjectID = "Was-JA-tGl"; */ +"Was-JA-tGl.title" = "New"; + +/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "WeT-3V-zwk"; */ +"WeT-3V-zwk.title" = "Paste and Match Style"; + +/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "Xz5-n4-O0W"; */ +"Xz5-n4-O0W.title" = "Find…"; + +/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "YEy-JH-Tfz"; */ +"YEy-JH-Tfz.title" = "Find and Replace…"; + +/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "YGs-j5-SAR"; */ +"YGs-j5-SAR.title" = "\tDefault"; + +/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "Ynk-f8-cLZ"; */ +"Ynk-f8-cLZ.title" = "Start Speaking"; + +/* Class = "NSMenuItem"; title = "Align Left"; ObjectID = "ZM1-6Q-yy1"; */ +"ZM1-6Q-yy1.title" = "Align Left"; + +/* Class = "NSMenuItem"; title = "Paragraph"; ObjectID = "ZvO-Gk-QUH"; */ +"ZvO-Gk-QUH.title" = "Paragraph"; + +/* Class = "NSMenuItem"; title = "Print…"; ObjectID = "aTl-1u-JFS"; */ +"aTl-1u-JFS.title" = "Print…"; + +/* Class = "NSMenuItem"; title = "Window"; ObjectID = "aUF-d1-5bR"; */ +"aUF-d1-5bR.title" = "Window"; + +/* Class = "NSMenu"; title = "Font"; ObjectID = "aXa-aM-Jaq"; */ +"aXa-aM-Jaq.title" = "Font"; + +/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "agt-UL-0e3"; */ +"agt-UL-0e3.title" = "Use Default"; + +/* Class = "NSMenuItem"; title = "Show Colors"; ObjectID = "bgn-CT-cEk"; */ +"bgn-CT-cEk.title" = "Show Colors"; + +/* Class = "NSMenu"; title = "File"; ObjectID = "bib-Uj-vzu"; */ +"bib-Uj-vzu.title" = "File"; + +/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "buJ-ug-pKt"; */ +"buJ-ug-pKt.title" = "Use Selection for Find"; + +/* Class = "NSMenu"; title = "Transformations"; ObjectID = "c8a-y6-VQd"; */ +"c8a-y6-VQd.title" = "Transformations"; + +/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "cDB-IK-hbR"; */ +"cDB-IK-hbR.title" = "Use None"; + +/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "cKh-Sb-AkE"; */ +"cKh-Sb-AkE.title" = "Table View Cell"; + +/* Class = "NSMenuItem"; title = "Selection"; ObjectID = "cqv-fj-IhA"; */ +"cqv-fj-IhA.title" = "Selection"; + +/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "cwL-P1-jid"; */ +"cwL-P1-jid.title" = "Smart Links"; + +/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "d9M-CD-aMd"; */ +"d9M-CD-aMd.title" = "Make Lower Case"; + +/* Class = "NSMenu"; title = "Text"; ObjectID = "d9c-me-L2H"; */ +"d9c-me-L2H.title" = "Text"; + +/* Class = "NSMenuItem"; title = "File"; ObjectID = "dMs-cI-mzQ"; */ +"dMs-cI-mzQ.title" = "File"; + +/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "dRJ-4n-Yzg"; */ +"dRJ-4n-Yzg.title" = "Undo"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "fsr-7r-3uj"; */ +"fsr-7r-3uj.title" = "Text Cell"; + +/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "gVA-U4-sdL"; */ +"gVA-U4-sdL.title" = "Paste"; + +/* Class = "NSTableColumn"; headerCell.title = "ncmds"; ObjectID = "hLs-8L-Vaq"; */ +"hLs-8L-Vaq.headerCell.title" = "ncmds"; + +/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "hQb-2v-fYv"; */ +"hQb-2v-fYv.title" = "Smart Quotes"; + +/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "hz2-CU-CR7"; */ +"hz2-CU-CR7.title" = "Check Document Now"; + +/* Class = "NSMenu"; title = "Services"; ObjectID = "hz9-B4-Xy5"; */ +"hz9-B4-Xy5.title" = "Services"; + +/* Class = "NSMenuItem"; title = "Smaller"; ObjectID = "i1d-Er-qST"; */ +"i1d-Er-qST.title" = "Smaller"; + +/* Class = "NSMenu"; title = "Baseline"; ObjectID = "ijk-EB-dga"; */ +"ijk-EB-dga.title" = "Baseline"; + +/* Class = "NSMenuItem"; title = "Kern"; ObjectID = "jBQ-r6-VK2"; */ +"jBQ-r6-VK2.title" = "Kern"; + +/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "jFq-tB-4Kx"; */ +"jFq-tB-4Kx.title" = "\tRight to Left"; + +/* Class = "NSMenuItem"; title = "Format"; ObjectID = "jxT-CU-nIS"; */ +"jxT-CU-nIS.title" = "Format"; + +/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "mK6-2p-4JG"; */ +"mK6-2p-4JG.title" = "Check Grammar With Spelling"; + +/* Class = "NSMenuItem"; title = "Ligatures"; ObjectID = "o6e-r0-MWq"; */ +"o6e-r0-MWq.title" = "Ligatures"; + +/* Class = "NSMenu"; title = "Open Recent"; ObjectID = "oas-Oc-fiZ"; */ +"oas-Oc-fiZ.title" = "Open Recent"; + +/* Class = "NSMenuItem"; title = "Loosen"; ObjectID = "ogc-rX-tC1"; */ +"ogc-rX-tC1.title" = "Loosen"; + +/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "pa3-QI-u2k"; */ +"pa3-QI-u2k.title" = "Delete"; + +/* Class = "NSMenuItem"; title = "Save…"; ObjectID = "pxx-59-PXV"; */ +"pxx-59-PXV.title" = "Save…"; + +/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "q09-fT-Sye"; */ +"q09-fT-Sye.title" = "Find Next"; + +/* Class = "NSMenuItem"; title = "Page Setup…"; ObjectID = "qIS-W8-SiK"; */ +"qIS-W8-SiK.title" = "Page Setup…"; + +/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "rbD-Rh-wIN"; */ +"rbD-Rh-wIN.title" = "Check Spelling While Typing"; + +/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "rgM-f4-ycn"; */ +"rgM-f4-ycn.title" = "Smart Dashes"; + +/* Class = "NSMenuItem"; title = "Show Toolbar"; ObjectID = "snW-S8-Cw5"; */ +"snW-S8-Cw5.title" = "Show Toolbar"; + +/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "tRr-pd-1PS"; */ +"tRr-pd-1PS.title" = "Data Detectors"; + +/* Class = "NSMenuItem"; title = "Open Recent"; ObjectID = "tXI-mr-wws"; */ +"tXI-mr-wws.title" = "Open Recent"; + +/* Class = "NSMenu"; title = "Kern"; ObjectID = "tlD-Oa-oAM"; */ +"tlD-Oa-oAM.title" = "Kern"; + +/* Class = "NSTextFieldCell"; title = "Text Cell"; ObjectID = "u3L-YK-JOr"; */ +"u3L-YK-JOr.title" = "Text Cell"; + +/* Class = "NSMenu"; title = "ImageLogger"; ObjectID = "uQy-DD-JDr"; */ +"uQy-DD-JDr.title" = "ImageLogger"; + +/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "uRl-iY-unG"; */ +"uRl-iY-unG.title" = "Cut"; + +/* Class = "NSSegmentedCell"; uch-uS-m64.ibShadowedLabels[0] = "Load Something"; ObjectID = "uch-uS-m64"; */ +"uch-uS-m64.ibShadowedLabels[0]" = "Load Something"; + +/* Class = "NSMenuItem"; title = "Paste Style"; ObjectID = "vKC-jM-MkH"; */ +"vKC-jM-MkH.title" = "Paste Style"; + +/* Class = "NSMenuItem"; title = "Show Ruler"; ObjectID = "vLm-3I-IUL"; */ +"vLm-3I-IUL.title" = "Show Ruler"; + +/* Class = "NSMenuItem"; title = "Clear Menu"; ObjectID = "vNY-rz-j42"; */ +"vNY-rz-j42.title" = "Clear Menu"; + +/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "vmV-6d-7jI"; */ +"vmV-6d-7jI.title" = "Make Upper Case"; + +/* Class = "NSMenu"; title = "Ligatures"; ObjectID = "w0m-vy-SC9"; */ +"w0m-vy-SC9.title" = "Ligatures"; + +/* Class = "NSMenuItem"; title = "Align Right"; ObjectID = "wb2-vD-lq4"; */ +"wb2-vD-lq4.title" = "Align Right"; + +/* Class = "NSMenuItem"; title = "Help"; ObjectID = "wpr-3q-Mcd"; */ +"wpr-3q-Mcd.title" = "Help"; + +/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "wzQ-b2-LL8"; */ +"wzQ-b2-LL8.title" = "Table View Cell"; + +/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "x3v-GG-iWU"; */ +"x3v-GG-iWU.title" = "Copy"; + +/* Class = "NSMenuItem"; title = "Use All"; ObjectID = "xQD-1f-W4t"; */ +"xQD-1f-W4t.title" = "Use All"; + +/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "xrE-MZ-jX0"; */ +"xrE-MZ-jX0.title" = "Speech"; + +/* Class = "NSTextFieldCell"; title = "Table View Cell"; ObjectID = "y4c-Mt-WcR"; */ +"y4c-Mt-WcR.title" = "Table View Cell"; + +/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "z6F-FW-3nz"; */ +"z6F-FW-3nz.title" = "Show Substitutions"; diff --git a/ImageLogger/framework.icns b/ImageLogger/framework.icns new file mode 100644 index 0000000..479f686 Binary files /dev/null and b/ImageLogger/framework.icns differ diff --git a/ImageLogger/main.m b/ImageLogger/main.m deleted file mode 100644 index 3fceb87..0000000 --- a/ImageLogger/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ImageLogger -// -// Created by Damien DeVille on 3/27/14. -// Copyright (c) 2014 Damien DeVille. All rights reserved. -// - -#import - -int main(int argc, const char **argv) -{ - return NSApplicationMain(argc, argv); -} diff --git a/ImageLoggerTouch/en.lproj/InfoPlist.strings b/ImageLoggerTouch/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/ImageLoggerTouch/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Shared/LLImageLogger.h b/Shared/LLImageLogger.h index 84f0b90..b86c1eb 100644 --- a/Shared/LLImageLogger.h +++ b/Shared/LLImageLogger.h @@ -6,8 +6,20 @@ // Copyright (c) 2014 Damien DeVille. All rights reserved. // -#import +@import Foundation; + +#define NEW_IMAGES_LOADED_NOTIFICATION @"⚠️🚥🚧" + +@interface LLMachImage : NSObject +@property (readonly,copy) NSDictionary *flags; +@property (readonly,copy) NSString *name, *path, *filetype, *extension; +@property (readonly) NSUInteger warningLevel, ncmds; +@property (readonly) id icon; +@end @interface LLImageLogger : NSObject ++ (instancetype) logger; +@property (readonly) NSArray *images; + @end diff --git a/Shared/LLImageLogger.m b/Shared/LLImageLogger.m index 22b18fd..c374226 100644 --- a/Shared/LLImageLogger.m +++ b/Shared/LLImageLogger.m @@ -6,87 +6,187 @@ // Copyright (c) 2014 Damien DeVille. All rights reserved. // + #import "LLImageLogger.h" -#import -#import -#import +@import Darwin; @import MachO.dyld; @import MachO.loader; +#if TARGET_OS_IPHONE +#define NSImage UIImage +#else +@import AppKit; +#endif + +@implementation LLMachImage @synthesize icon, extension; + +- initWithDict:(NSDictionary*)d { + + return (d && (self = super.init)) ? [self setValuesForKeysWithDictionary:d], self : nil; +} + +- (NSString*) extension { return extension = extension ?: ^{ + + NSString *ext; if ((ext = self.path.pathExtension).length) return ext; + NSString *pth = self.path.copy; + + for (int i = 0; i < 10 && pth.length > 1 && !ext.length; i++) { + pth = pth.stringByDeletingLastPathComponent; + ext = pth.pathExtension; + } + return ext; + }(); +} +- icon { return icon = icon ?: ^{ id img = nil, x, y, z; + +#if !TARGET_OS_IPHONE + img = self.extension ? [NSWorkspace.sharedWorkspace iconForFileType:extension] + : [NSImage imageNamed:NSImageNameCaution]; +#endif + return img = [self.extension isEqualToString:@"framework"] ? [NSImage imageNamed:@"framework"] : img ?: + (( z = [NSBundle bundleWithPath:self.path]) + && ( x = [z objectForInfoDictionaryKey:@"CFBundleIconFile"]) + && ( y = [z pathForResource:x ofType:nil])) + ? [NSImage.alloc initWithContentsOfFile:y] : (id)nil; + }(); +} + +- (NSString*) name { return _path ? _path.lastPathComponent : nil; } + +- (NSUInteger) warningLevel { return + + [_path rangeOfString:@"Private"].location != NSNotFound ? 2 : ({ + + id arg0 = NSProcessInfo.processInfo.processName; + + [_path rangeOfString:arg0] .location != NSNotFound ? 1 : 0; }); +} + + +@end -@implementation LLImageLogger +#define MACH_HEADER_mh const struct mach_header *mh -+ (void)load -{ - _dyld_register_func_for_add_image(&image_added); +typedef void (^VisitorBlock)(struct load_command *lc, bool *stop); + +//@interface LLImageLogger () +//@property NSArray *images; +//@end + +@implementation LLImageLogger @synthesize images; + ++ (void) load { + + _dyld_register_func_for_add_image (&image_added); _dyld_register_func_for_remove_image(&image_removed); } ++ (instancetype) logger { static LLImageLogger *logger = nil; static dispatch_once_t uno; + + dispatch_once(&uno, ^{ logger = [LLImageLogger alloc]; logger = [logger init]; }); + return logger; +} #pragma mark - Callbacks -static void image_added(const struct mach_header *mh, intptr_t slide) -{ +static void image_added(MACH_HEADER_mh, intptr_t slide) { _print_image(mh, true); } - -static void image_removed(const struct mach_header *mh, intptr_t slide) -{ +static void image_removed(MACH_HEADER_mh, intptr_t slide) { _print_image(mh, false); } #pragma mark - Logger -static void _print_image(const struct mach_header *mh, bool added) -{ +static void _print_image(MACH_HEADER_mh, bool added) { + Dl_info image_info; int result = dladdr(mh, &image_info); - - if (result == 0) { - printf("Could not print info for mach_header: %p\n\n", mh); - return; - } - + + if (!result) return (void)printf("Could not print info for mach_header: %p\n\n", mh); + const char *image_name = image_info.dli_fname; - + + id new_image, new_path; + + if (( new_path = [NSString stringWithUTF8String:image_name]) + && ( new_image = [LLMachImage.alloc initWithDict:@{ + @"path" : new_path, + @"filetype" : _describe_filetype(mh), + @"ncmds" : @(mh->ncmds), + @"flags" : _describe_flags(mh)}])) + + [[LLImageLogger.logger mutableArrayValueForKey:@"images"] addObject:new_image]; + const intptr_t image_base_address = (intptr_t)image_info.dli_fbase; - const uint64_t image_text_size = _image_text_segment_size(mh); - + const uint64_t image_text_size = _image_text_segment_size(mh); + + char image_uuid[37]; const uuid_t *image_uuid_bytes = _image_retrieve_uuid(mh); uuid_unparse(*image_uuid_bytes, image_uuid); const char *log = added ? "Added" : "Removed"; - printf("%s: 0x%02lx (0x%02llx) %s <%s>\n\n", log, image_base_address, image_text_size, image_name, image_uuid); + printf("[%lu] %s: 0x%02lx (0x%02llx) %s <%s>\n\n",LLImageLogger.logger.images.count,log, image_base_address, image_text_size, image_name, image_uuid); } +NSString * _describe_filetype(MACH_HEADER_mh) { -#pragma mark - Private + NSUInteger x = mh->filetype; return -static uint32_t _image_header_size(const struct mach_header *mh) -{ - bool is_header_64_bit = (mh->magic == MH_MAGIC_64 || mh->magic == MH_CIGAM_64); - return (is_header_64_bit ? sizeof(struct mach_header_64) : sizeof(struct mach_header)); + x == MH_OBJECT ? @"relocatable object file" : + x == MH_EXECUTE ? @"demand paged executable file" : + x == MH_FVMLIB ? @"fixed VM shared library file" : + x == MH_CORE ? @"core file" : + x == MH_PRELOAD ? @"preloaded executable file" : + x == MH_DYLIB ? @"dynamically bound shared library" : + x == MH_DYLINKER ? @"dynamic link editor" : + x == MH_BUNDLE ? @"dynamically bound bundle file" : + x == MH_DYLIB_STUB ? @"shared library stub for static linking only, no section contents" : + x == MH_DSYM ? @"companion file with only debug sections" : + x == MH_KEXT_BUNDLE ? @"x86_64 kexts" : @"Unknown"; } +NSDictionary * _describe_flags(MACH_HEADER_mh){ -static void _image_visit_load_commands(const struct mach_header *mh, void (^visitor)(struct load_command *lc, bool *stop)) -{ - assert(visitor != NULL); - - uintptr_t lc_cursor = (uintptr_t)mh + _image_header_size(mh); - - for (uint32_t idx = 0; idx < mh->ncmds; idx++) { - struct load_command *lc = (struct load_command *)lc_cursor; - - bool stop = false; - visitor(lc, &stop); - - if (stop) { - return; - } - - lc_cursor += lc->cmdsize; - } + + static NSDictionary * flag_info; flag_info = flag_info ?: @{ /* Constants for the flags field of the mach_header */ + @(MH_NOUNDEFS) : @[@"MH_NOUNDEFS", @"the object file has no undefined references"], + @(MH_INCRLINK) : @[@"MH_INCRLINK", @"the object file is the output of an incremental link against a base file and can't be link edited again"], + @(MH_DYLDLINK) : @[@"MH_DYLDLINK", @"the object file is input for the dynamic linker and can't be staticly link edited again"], + @(MH_BINDATLOAD) : @[@"MH_BINDATLOAD", @"the object file's undefined references are bound by the dynamic linker when loaded."], + @(MH_PREBOUND) : @[@"MH_PREBOUND", @"the file has its dynamic undefined references prebound."], + @(MH_SPLIT_SEGS) : @[@"MH_SPLIT_SEGS", @"the file has its read-only and read-write segments split"], + @(MH_LAZY_INIT) : @[@"MH_LAZY_INIT", @"the shared library init routine is to be run lazily via catching memory faults to its writeable segments (obsolete)"], + @(MH_TWOLEVEL) : @[@"MH_TWOLEVEL", @"the image is using two-level name space bindings"], + @(MH_FORCE_FLAT) : @[@"MH_FORCE_FLAT", @"the executable is forcing all images to use flat name space bindings"], + @(MH_NOMULTIDEFS) : @[@"MH_NOMULTIDEFS", @"this umbrella guarantees no multiple defintions of symbols in its sub-images so the two-level namespace hints can always be used."], + @(MH_NOFIXPREBINDING) : @[@"MH_NOFIXPREBINDING", @"do not have dyld notify the prebinding agent about this executable"], + @(MH_PREBINDABLE) : @[@"MH_PREBINDABLE", @"the binary is not prebound but can have its prebinding redone. only used when MH_PREBOUND is not set."], + @(MH_ALLMODSBOUND) : @[@"MH_ALLMODSBOUND", @"indicates that this binary binds to all two-level namespace modules of its dependent libraries. only used when MH_PREBINDABLE and MH_TWOLEVEL are both set."], + @(MH_SUBSECTIONS_VIA_SYMBOLS) : @[@"MH_SUBSECTIONS_VIA_SYMBOLS", @"safe to divide up the sections into sub-sections via symbols for dead code stripping"], + @(MH_CANONICAL) : @[@"MH_CANONICAL", @"the binary has been canonicalized via the unprebind operation"], + @(MH_WEAK_DEFINES) : @[@"MH_WEAK_DEFINES", @"the final linked image contains external weak symbols"], + @(MH_BINDS_TO_WEAK) : @[@"MH_BINDS_TO_WEAK", @"the final linked image uses weak symbols"], + @(MH_ALLOW_STACK_EXECUTION) : @[@"MH_ALLOW_STACK_EXECUTION", @"When this bit is set, all stacks in the task will be given stack execution privilege. Only used in MH_EXECUTE filetypes."], + @(MH_ROOT_SAFE) : @[@"MH_ROOT_SAFE", @"When this bit is set, the binary declares it is safe for use in processes with uid zero"], + @(MH_SETUID_SAFE) : @[@"MH_SETUID_SAFE", @"When this bit is set, the binary declares it is safe for use in processes when issetugid() is true"], + @(MH_NO_REEXPORTED_DYLIBS) : @[@"MH_NO_REEXPORTED_DYLIBS", @"When this bit is set on a dylib, the static linker does not need to examine dependent dylibs to see if any are re-exported"], + @(MH_PIE) : @[@"MH_PIE", @"When this bit is set, the OS will load the main executable at a random address. Only used in MH_EXECUTE filetypes."], + @(MH_DEAD_STRIPPABLE_DYLIB) : @[@"MH_DEAD_STRIPPABLE_DYLIB", @"Only for use on dylibs. When linking against a dylib that has this bit set, the static linker will automatically not create a LC_LOAD_DYLIB load command to the dylib if no symbols are being referenced from the dylib."], + @(MH_HAS_TLV_DESCRIPTORS) : @[@"MH_HAS_TLV_DESCRIPTORS", @"Contains a section of type S_THREAD_LOCAL_VARIABLES"], + @(MH_NO_HEAP_EXECUTION):@[@"MH_NO_HEAP_EXECUTION",@"When this bit is set, the OS will"]}; + + uint64_t flags = mh->flags; + NSMutableDictionary *d = @{@"dummyInfo":@"poopie"}.mutableCopy; + [flag_info enumerateKeysAndObjectsUsingBlock:^(id key, NSArray* obj, BOOL *stop) { + uint64_t t = [key unsignedIntValue]; + if (flags & t) d[obj[0]] = obj[1]; + }]; + return d; } +#pragma mark - Private -static uint64_t _image_text_segment_size(const struct mach_header *mh) -{ +static uint32_t _image_header_size(MACH_HEADER_mh) { + bool is_header_64_bit = (mh->magic == MH_MAGIC_64 || mh->magic == MH_CIGAM_64); + return (is_header_64_bit ? sizeof(struct mach_header_64) : sizeof(struct mach_header)); +} +static uint64_t _image_text_segment_size(MACH_HEADER_mh) { static const char *text_segment_name = "__TEXT"; __block uint64_t text_size = 0; @@ -115,9 +215,7 @@ static uint64_t _image_text_segment_size(const struct mach_header *mh) return text_size; } - -static const uuid_t *_image_retrieve_uuid(const struct mach_header *mh) -{ +static const uuid_t *_image_retrieve_uuid(MACH_HEADER_mh) { __block const struct uuid_command *uuid_cmd = NULL; _image_visit_load_commands(mh, ^ (struct load_command *lc, bool *stop) { @@ -136,5 +234,22 @@ static uint64_t _image_text_segment_size(const struct mach_header *mh) return &uuid_cmd->uuid; } +static void _image_visit_load_commands(MACH_HEADER_mh, + VisitorBlock visitor) { + + assert(visitor != NULL); + + uintptr_t lc_cursor = (uintptr_t)mh + _image_header_size(mh); + + for (uint32_t idx = 0; idx < mh->ncmds; idx++) { + + struct load_command *lc = (struct load_command *)lc_cursor; + + bool stop = false; visitor(lc, &stop); if (stop) return; + + lc_cursor += lc->cmdsize; + } +} @end +