From dfbbce73d6d2c02e83c3064e8f09c2493a93db43 Mon Sep 17 00:00:00 2001 From: hsoft Date: Sat, 6 Jun 2009 12:11:11 +0000 Subject: [PATCH] pe cocoa: adapted to the latest structural updates. --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%404 --- pe/cocoa/ResultWindow.h | 5 - pe/cocoa/ResultWindow.m | 118 +- pe/cocoa/dupeguru.xcodeproj/hsoft.mode1 | 1380 ------------------- pe/cocoa/dupeguru.xcodeproj/project.pbxproj | 17 - pe/cocoa/gen.py | 14 + pe/cocoa/py/build_py.sh | 2 - pe/cocoa/py/dg_cocoa.py | 10 +- pe/cocoa/py/gen.py | 18 + pe/cocoa/py/setup.py | 17 +- 9 files changed, 55 insertions(+), 1526 deletions(-) delete mode 100644 pe/cocoa/dupeguru.xcodeproj/hsoft.mode1 create mode 100644 pe/cocoa/gen.py delete mode 100755 pe/cocoa/py/build_py.sh create mode 100644 pe/cocoa/py/gen.py diff --git a/pe/cocoa/ResultWindow.h b/pe/cocoa/ResultWindow.h index dcc96079..5816d50a 100644 --- a/pe/cocoa/ResultWindow.h +++ b/pe/cocoa/ResultWindow.h @@ -6,14 +6,9 @@ @interface ResultWindow : ResultWindowBase { IBOutlet NSPopUpButton *actionMenu; - IBOutlet NSView *actionMenuView; - IBOutlet id app; IBOutlet NSMenu *columnsMenu; - IBOutlet NSView *deltaSwitchView; IBOutlet NSSearchField *filterField; - IBOutlet NSView *filterFieldView; IBOutlet NSSegmentedControl *pmSwitch; - IBOutlet NSView *pmSwitchView; IBOutlet NSWindow *preferencesPanel; IBOutlet NSTextField *stats; diff --git a/pe/cocoa/ResultWindow.m b/pe/cocoa/ResultWindow.m index e0679e4f..361dc876 100644 --- a/pe/cocoa/ResultWindow.m +++ b/pe/cocoa/ResultWindow.m @@ -6,15 +6,6 @@ #import "AppDelegate.h" #import "Consts.h" -static NSString* tbbDirectories = @"tbbDirectories"; -static NSString* tbbDetails = @"tbbDetail"; -static NSString* tbbPreferences = @"tbbPreferences"; -static NSString* tbbPowerMarker = @"tbbPowerMarker"; -static NSString* tbbScan = @"tbbScan"; -static NSString* tbbAction = @"tbbAction"; -static NSString* tbbDelta = @"tbbDelta"; -static NSString* tbbFilter = @"tbbFilter"; - @implementation ResultWindow /* Override */ - (void)awakeFromNib @@ -39,12 +30,18 @@ static NSString* tbbFilter = @"tbbFilter"; NSToolbar *t = [[[NSToolbar alloc] initWithIdentifier:@"ResultWindowToolbar"] autorelease]; [t setAllowsUserCustomization:YES]; - [t setAutosavesConfiguration:NO]; + [t setAutosavesConfiguration:YES]; [t setDisplayMode:NSToolbarDisplayModeIconAndLabel]; [t setDelegate:self]; [[self window] setToolbar:t]; } +/* Overrides */ +- (NSString *)logoImageName +{ + return @"dgpe_logo32"; +} + /* Actions */ - (IBAction)changePowerMarker:(id)sender @@ -465,105 +462,4 @@ static NSString* tbbFilter = @"tbbFilter"; [self refreshStats]; } -/* Toolbar */ - -- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag -{ - NSToolbarItem *tbi = [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease]; - if (itemIdentifier == tbbDirectories) - { - [tbi setLabel: @"Directories"]; - [tbi setToolTip: @"Show/Hide the directories panel."]; - [tbi setImage: [NSImage imageNamed: @"folder32"]]; - [tbi setTarget: self]; - [tbi setAction: @selector(toggleDirectories:)]; - } - else if (itemIdentifier == tbbDetails) - { - [tbi setLabel: @"Details"]; - [tbi setToolTip: @"Show/Hide the details panel."]; - [tbi setImage: [NSImage imageNamed: @"details32"]]; - [tbi setTarget: self]; - [tbi setAction: @selector(toggleDetailsPanel:)]; - } - else if (itemIdentifier == tbbPreferences) - { - [tbi setLabel: @"Preferences"]; - [tbi setToolTip: @"Show the preferences panel."]; - [tbi setImage: [NSImage imageNamed: @"preferences32"]]; - [tbi setTarget: self]; - [tbi setAction: @selector(showPreferencesPanel:)]; - } - else if (itemIdentifier == tbbPowerMarker) - { - [tbi setLabel: @"Power Marker"]; - [tbi setToolTip: @"When enabled, only the duplicates are shown, not the references."]; - [tbi setView:pmSwitchView]; - [tbi setMinSize:[pmSwitchView frame].size]; - [tbi setMaxSize:[pmSwitchView frame].size]; - } - else if (itemIdentifier == tbbScan) - { - [tbi setLabel: @"Start Scanning"]; - [tbi setToolTip: @"Start scanning for duplicates in the selected diectories."]; - [tbi setImage: [NSImage imageNamed: @"dgpe_logo_32"]]; - [tbi setTarget: self]; - [tbi setAction: @selector(startDuplicateScan:)]; - } - else if (itemIdentifier == tbbAction) - { - [tbi setLabel: @"Action"]; - [tbi setView:actionMenuView]; - [tbi setMinSize:[actionMenuView frame].size]; - [tbi setMaxSize:[actionMenuView frame].size]; - } - else if (itemIdentifier == tbbDelta) - { - [tbi setLabel: @"Delta Values"]; - [tbi setToolTip: @"When enabled, this option makes dupeGuru display, where applicable, delta values instead of absolute values."]; - [tbi setView:deltaSwitchView]; - [tbi setMinSize:[deltaSwitchView frame].size]; - [tbi setMaxSize:[deltaSwitchView frame].size]; - } - else if (itemIdentifier == tbbFilter) - { - [tbi setLabel: @"Filter"]; - [tbi setToolTip: @"Filters the results using regular expression."]; - [tbi setView:filterFieldView]; - [tbi setMinSize:[filterFieldView frame].size]; - [tbi setMaxSize:NSMakeSize(1000, [filterFieldView frame].size.height)]; - } - [tbi setPaletteLabel: [tbi label]]; - return tbi; -} - -- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar -{ - return [NSArray arrayWithObjects: - tbbDirectories, - tbbDetails, - tbbPreferences, - tbbPowerMarker, - tbbScan, - tbbAction, - tbbDelta, - tbbFilter, - NSToolbarSeparatorItemIdentifier, - NSToolbarSpaceItemIdentifier, - NSToolbarFlexibleSpaceItemIdentifier, - nil]; -} - -- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar -{ - return [NSArray arrayWithObjects: - tbbScan, - tbbAction, - tbbDirectories, - tbbDetails, - tbbPowerMarker, - tbbDelta, - tbbFilter, - nil]; -} @end \ No newline at end of file diff --git a/pe/cocoa/dupeguru.xcodeproj/hsoft.mode1 b/pe/cocoa/dupeguru.xcodeproj/hsoft.mode1 deleted file mode 100644 index 699331ae..00000000 --- a/pe/cocoa/dupeguru.xcodeproj/hsoft.mode1 +++ /dev/null @@ -1,1380 +0,0 @@ - - - - - ActivePerspectiveName - Project - AllowedModules - - - BundleLoadPath - - MaxInstances - n - Module - PBXSmartGroupTreeModule - Name - Groups and Files Outline View - - - BundleLoadPath - - MaxInstances - n - Module - PBXNavigatorGroup - Name - Editor - - - BundleLoadPath - - MaxInstances - n - Module - XCTaskListModule - Name - Task List - - - BundleLoadPath - - MaxInstances - n - Module - XCDetailModule - Name - File and Smart Group Detail Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXBuildResultsModule - Name - Detailed Build Results Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXProjectFindModule - Name - Project Batch Find Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXRunSessionModule - Name - Run Log - - - BundleLoadPath - - MaxInstances - n - Module - PBXBookmarksModule - Name - Bookmarks Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXClassBrowserModule - Name - Class Browser - - - BundleLoadPath - - MaxInstances - n - Module - PBXCVSModule - Name - Source Code Control Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXDebugBreakpointsModule - Name - Debug Breakpoints Tool - - - BundleLoadPath - - MaxInstances - n - Module - XCDockableInspector - Name - Inspector - - - BundleLoadPath - - MaxInstances - n - Module - PBXOpenQuicklyModule - Name - Open Quickly Tool - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugSessionModule - Name - Debugger - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugCLIModule - Name - Debug Console - - - Description - DefaultDescriptionKey - DockingSystemVisible - - Extension - mode1 - FavBarConfig - - PBXProjectModuleGUID - CE381CB409914B41003581CE - XCBarModuleItemNames - - XCBarModuleItems - - - FirstTimeWindowDisplayed - - Identifier - com.apple.perspectives.project.mode1 - MajorVersion - 31 - MinorVersion - 1 - Name - Default - Notifications - - OpenEditors - - PerspectiveWidths - - -1 - -1 - - Perspectives - - - ChosenToolbarItems - - active-executable-popup - action - active-buildstyle-popup - active-target-popup - buildOrClean - build-and-runOrDebug - com.apple.ide.PBXToolbarStopButton - get-info - toggle-editor - - ControllerClassBaseName - - IconName - WindowOfProjectWithEditor - Identifier - perspective.project - IsVertical - - Layout - - - BecomeActive - - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - 1CC0EA4004350EF90044410B - 1CC0EA4004350EF90041110B - - PBXProjectModuleGUID - 1CE0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 194 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 29B97314FDCFA39411CA2CEA - 080E96DDFE201D6D7F000001 - 29B97315FDCFA39411CA2CEA - 29B97317FDCFA39411CA2CEA - 29B97323FDCFA39411CA2CEA - 1058C7A0FEA54F0111CA2CBB - 19C28FACFE9D520D11CA2CBB - 1C37FBAC04509CD000000102 - CE2ACA9A0CA214440012E1E8 - CE2ACA9B0CA214440012E1E8 - CE2ACA9C0CA214440012E1E8 - CE2ACA9D0CA214440012E1E8 - 1C37FAAC04509CD000000102 - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 17 - 15 - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {194, 764}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - - XCSharingToken - com.apple.Xcode.GFSharingToken - - GeometryConfiguration - - Frame - {{0, 0}, {211, 782}} - GroupTreeTableConfiguration - - MainColumn - 194 - - RubberWindowFrame - 4 54 1366 823 0 0 1440 878 - - Module - PBXSmartGroupTreeModule - Proportion - 211pt - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20306471E060097A5F4 - PBXProjectModuleLabel - PyDupeGuru.h - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CE0B20406471E060097A5F4 - PBXProjectModuleLabel - PyDupeGuru.h - _historyCapacity - 10 - bookmark - CE2ACAA20CA214B50012E1E8 - history - - CEE22C420B9A163B000D3096 - CEE584280BACAE4E004F9755 - CEE586070BACBCA6004F9755 - CEE301880BF7350900D6840C - CEE301890BF7350900D6840C - CEE3018A0BF7350900D6840C - CEE301DC0BF73A0300D6840C - CEE301DD0BF73A0300D6840C - CEE301F30BF73A9A00D6840C - CEB6A23E0C9EA80D00767CC9 - - prevStack - - CE2CB4DA09AE70AA0015538F - CEF411510A11093E00E7F110 - CE6E6AE70AA528B2002F29BE - CEFA86C20AAEE6DE00E0FAA1 - CEFA86C30AAEE6DE00E0FAA1 - CED527320AB0C9EB00D70726 - CEE2E1F30AB0E4A900D458B6 - CEE2E1F40AB0E4A900D458B6 - CEF650770ABABB44009F3C83 - CEE3018C0BF7350900D6840C - CEE3018F0BF7350900D6840C - - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {1150, 544}} - RubberWindowFrame - 4 54 1366 823 0 0 1440 878 - - Module - PBXNavigatorGroup - Proportion - 544pt - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20506471E060097A5F4 - PBXProjectModuleLabel - Detail - - GeometryConfiguration - - Frame - {{0, 549}, {1150, 233}} - RubberWindowFrame - 4 54 1366 823 0 0 1440 878 - - Module - XCDetailModule - Proportion - 233pt - - - Proportion - 1150pt - - - Name - Project - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - XCModuleDock - PBXNavigatorGroup - XCDetailModule - - TableOfContents - - CE2ACA9F0CA214440012E1E8 - 1CE0B1FE06471DED0097A5F4 - CE2ACAA00CA214440012E1E8 - 1CE0B20306471E060097A5F4 - 1CE0B20506471E060097A5F4 - - ToolbarConfiguration - xcode.toolbar.config.default - - - ControllerClassBaseName - - IconName - WindowOfProject - Identifier - perspective.morph - IsVertical - 0 - Layout - - - BecomeActive - 1 - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - 1CC0EA4004350EF90044410B - 1CC0EA4004350EF90041110B - - PBXProjectModuleGUID - 11E0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 186 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 29B97314FDCFA39411CA2CEA - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {186, 337}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - 1 - XCSharingToken - com.apple.Xcode.GFSharingToken - - GeometryConfiguration - - Frame - {{0, 0}, {203, 355}} - GroupTreeTableConfiguration - - MainColumn - 186 - - RubberWindowFrame - 373 269 690 397 0 0 1440 878 - - Module - PBXSmartGroupTreeModule - Proportion - 100% - - - Name - Morph - PreferredWidth - 300 - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - - TableOfContents - - 11E0B1FE06471DED0097A5F4 - - ToolbarConfiguration - xcode.toolbar.config.default.short - - - PerspectivesBarVisible - - ShelfIsVisible - - SourceDescription - file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec' - StatusbarIsVisible - - TimeStamp - 0.0 - ToolbarDisplayMode - 1 - ToolbarIsVisible - - ToolbarSizeMode - 1 - Type - Perspectives - UpdateMessage - The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? - WindowJustification - 5 - WindowOrderList - - /Users/hsoft/src/dupeguru_pe_cocoa/dupeguru.xcodeproj - - WindowString - 4 54 1366 823 0 0 1440 878 - WindowTools - - - FirstTimeWindowDisplayed - - Identifier - windowTool.build - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528F0623707200166675 - PBXProjectModuleLabel - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {1366, 540}} - RubberWindowFrame - 0 56 1366 822 0 0 1440 878 - - Module - PBXNavigatorGroup - Proportion - 540pt - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - XCMainBuildResultsModuleGUID - PBXProjectModuleLabel - Build - XCBuildResultsTrigger_Collapse - 1021 - XCBuildResultsTrigger_Open - 1011 - - GeometryConfiguration - - Frame - {{0, 545}, {1366, 236}} - RubberWindowFrame - 0 56 1366 822 0 0 1440 878 - - Module - PBXBuildResultsModule - Proportion - 236pt - - - Proportion - 781pt - - - Name - Build Results - ServiceClasses - - PBXBuildResultsModule - - StatusbarIsVisible - - TableOfContents - - CE381CCE09914BC8003581CE - CEB6A2360C9EA7D700767CC9 - 1CD0528F0623707200166675 - XCMainBuildResultsModuleGUID - - ToolbarConfiguration - xcode.toolbar.config.build - WindowString - 0 56 1366 822 0 0 1440 878 - WindowToolGUID - CE381CCE09914BC8003581CE - WindowToolIsVisible - - - - FirstTimeWindowDisplayed - - Identifier - windowTool.debugger - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - Debugger - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {150, 339}} - {{150, 0}, {874, 339}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {1024, 339}} - {{0, 339}, {1024, 306}} - - - - LauncherConfigVersion - 8 - PBXProjectModuleGUID - 1C162984064C10D400B95A72 - PBXProjectModuleLabel - Debug - GLUTExamples (Underwater) - - GeometryConfiguration - - DebugConsoleDrawerSize - {100, 120} - DebugConsoleVisible - None - DebugConsoleWindowFrame - {{200, 200}, {500, 300}} - DebugSTDIOWindowFrame - {{200, 200}, {500, 300}} - Frame - {{0, 0}, {1024, 645}} - RubberWindowFrame - 328 62 1024 686 0 0 1440 878 - - Module - PBXDebugSessionModule - Proportion - 645pt - - - Proportion - 645pt - - - Name - Debugger - ServiceClasses - - PBXDebugSessionModule - - StatusbarIsVisible - - TableOfContents - - 1CD10A99069EF8BA00B06720 - CEC94B9A0BA3652F009F7CBD - 1C162984064C10D400B95A72 - CEC94B9B0BA3652F009F7CBD - CEC94B9C0BA3652F009F7CBD - CEC94B9D0BA3652F009F7CBD - CEC94B9E0BA3652F009F7CBD - CEC94B9F0BA3652F009F7CBD - CEC94BA00BA3652F009F7CBD - - ToolbarConfiguration - xcode.toolbar.config.debug - WindowString - 328 62 1024 686 0 0 1440 878 - WindowToolGUID - 1CD10A99069EF8BA00B06720 - WindowToolIsVisible - - - - FirstTimeWindowDisplayed - - Identifier - windowTool.find - IsVertical - - Layout - - - Dock - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CDD528C0622207200134675 - PBXProjectModuleLabel - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {781, 212}} - RubberWindowFrame - 31 253 781 470 0 0 1024 746 - - Module - PBXNavigatorGroup - Proportion - 781pt - - - Proportion - 212pt - - - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528E0623707200166675 - PBXProjectModuleLabel - Project Find - - GeometryConfiguration - - Frame - {{0, 217}, {781, 212}} - RubberWindowFrame - 31 253 781 470 0 0 1024 746 - - Module - PBXProjectFindModule - Proportion - 212pt - - - Proportion - 429pt - - - Name - Project Find - ServiceClasses - - PBXProjectFindModule - - StatusbarIsVisible - - TableOfContents - - 1C530D57069F1CE1000CFCEE - CE3755460A37628100022F3B - CE3755470A37628100022F3B - 1CDD528C0622207200134675 - 1CD0528E0623707200166675 - - WindowString - 31 253 781 470 0 0 1024 746 - WindowToolGUID - 1C530D57069F1CE1000CFCEE - WindowToolIsVisible - - - - Identifier - MENUSEPARATOR - - - FirstTimeWindowDisplayed - - Identifier - windowTool.debuggerConsole - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAAC065D492600B07095 - PBXProjectModuleLabel - Debugger Console - - GeometryConfiguration - - Frame - {{0, 0}, {440, 358}} - RubberWindowFrame - 72 414 440 400 0 0 1440 878 - - Module - PBXDebugCLIModule - Proportion - 358pt - - - Proportion - 359pt - - - Name - Debugger Console - ServiceClasses - - PBXDebugCLIModule - - StatusbarIsVisible - - TableOfContents - - CECD0ADE099294C1003DC359 - CEC94BA10BA3652F009F7CBD - 1C78EAAC065D492600B07095 - - WindowString - 72 414 440 400 0 0 1440 878 - WindowToolGUID - CECD0ADE099294C1003DC359 - WindowToolIsVisible - - - - FirstTimeWindowDisplayed - - Identifier - windowTool.run - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - LauncherConfigVersion - 3 - PBXProjectModuleGUID - 1CD0528B0623707200166675 - PBXProjectModuleLabel - Run - Runner - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {366, 168}} - {{0, 173}, {366, 270}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {406, 443}} - {{411, 0}, {517, 443}} - - - - - GeometryConfiguration - - Frame - {{0, 0}, {1377, 781}} - RubberWindowFrame - 0 56 1377 822 0 0 1440 878 - - Module - PBXRunSessionModule - Proportion - 781pt - - - Proportion - 781pt - - - Name - Run Log - ServiceClasses - - PBXRunSessionModule - - StatusbarIsVisible - - TableOfContents - - 1C0AD2B3069F1EA900FABCE6 - CE89234E0BFF46580079C065 - 1CD0528B0623707200166675 - CE89234F0BFF46580079C065 - - ToolbarConfiguration - xcode.toolbar.config.run - WindowString - 0 56 1377 822 0 0 1440 878 - WindowToolGUID - 1C0AD2B3069F1EA900FABCE6 - WindowToolIsVisible - - - - Identifier - windowTool.scm - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAB2065D492600B07095 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1C78EAB3065D492600B07095 - - SplitCount - 1 - - StatusBarVisibility - 1 - - GeometryConfiguration - - Frame - {{0, 0}, {452, 0}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - - Module - PBXNavigatorGroup - Proportion - 0pt - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - 1CD052920623707200166675 - PBXProjectModuleLabel - SCM - - GeometryConfiguration - - ConsoleFrame - {{0, 259}, {452, 0}} - Frame - {{0, 7}, {452, 259}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - TableConfiguration - - Status - 30 - FileName - 199 - Path - 197.09500122070312 - - TableFrame - {{0, 0}, {452, 250}} - - Module - PBXCVSModule - Proportion - 262pt - - - Proportion - 266pt - - - Name - SCM - ServiceClasses - - PBXCVSModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C78EAB4065D492600B07095 - 1C78EAB5065D492600B07095 - 1C78EAB2065D492600B07095 - 1CD052920623707200166675 - - ToolbarConfiguration - xcode.toolbar.config.scm - WindowString - 743 379 452 308 0 0 1280 1002 - - - FirstTimeWindowDisplayed - - Identifier - windowTool.breakpoints - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C77FABC04509CD000000102 - - PBXProjectModuleGUID - 1CE0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - no - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 168 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 1C77FABC04509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {168, 350}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - - - GeometryConfiguration - - Frame - {{0, 0}, {185, 368}} - GroupTreeTableConfiguration - - MainColumn - 168 - - RubberWindowFrame - 21 314 744 409 0 0 1024 746 - - Module - PBXSmartGroupTreeModule - Proportion - 185pt - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - 1CA1AED706398EBD00589147 - PBXProjectModuleLabel - Detail - - GeometryConfiguration - - Frame - {{190, 0}, {554, 368}} - RubberWindowFrame - 21 314 744 409 0 0 1024 746 - - Module - XCDetailModule - Proportion - 554pt - - - Proportion - 368pt - - - MajorVersion - 2 - MinorVersion - 0 - Name - Breakpoints - ServiceClasses - - PBXSmartGroupTreeModule - XCDetailModule - - StatusbarIsVisible - - TableOfContents - - CEDA9EAC09D2BBCE00741F3F - CEDA9EAD09D2BBCE00741F3F - 1CE0B1FE06471DED0097A5F4 - 1CA1AED706398EBD00589147 - - ToolbarConfiguration - xcode.toolbar.config.breakpoints - WindowString - 21 314 744 409 0 0 1024 746 - WindowToolGUID - CEDA9EAC09D2BBCE00741F3F - WindowToolIsVisible - - - - Identifier - windowTool.debugAnimator - Layout - - - Dock - - - Module - PBXNavigatorGroup - Proportion - 100% - - - Proportion - 100% - - - Name - Debug Visualizer - ServiceClasses - - PBXNavigatorGroup - - StatusbarIsVisible - 1 - ToolbarConfiguration - xcode.toolbar.config.debugAnimator - WindowString - 100 100 700 500 0 0 1280 1002 - - - Identifier - windowTool.bookmarks - Layout - - - Dock - - - Module - PBXBookmarksModule - Proportion - 100% - - - Proportion - 100% - - - Name - Bookmarks - ServiceClasses - - PBXBookmarksModule - - StatusbarIsVisible - 0 - WindowString - 538 42 401 187 0 0 1280 1002 - - - Identifier - windowTool.classBrowser - Layout - - - Dock - - - BecomeActive - 1 - ContentConfiguration - - OptionsSetName - Hierarchy, all classes - PBXProjectModuleGUID - 1CA6456E063B45B4001379D8 - PBXProjectModuleLabel - Class Browser - NSObject - - GeometryConfiguration - - ClassesFrame - {{0, 0}, {374, 96}} - ClassesTreeTableConfiguration - - PBXClassNameColumnIdentifier - 208 - PBXClassBookColumnIdentifier - 22 - - Frame - {{0, 0}, {630, 331}} - MembersFrame - {{0, 105}, {374, 395}} - MembersTreeTableConfiguration - - PBXMemberTypeIconColumnIdentifier - 22 - PBXMemberNameColumnIdentifier - 216 - PBXMemberTypeColumnIdentifier - 97 - PBXMemberBookColumnIdentifier - 22 - - PBXModuleWindowStatusBarHidden2 - 1 - RubberWindowFrame - 385 179 630 352 0 0 1440 878 - - Module - PBXClassBrowserModule - Proportion - 332pt - - - Proportion - 332pt - - - Name - Class Browser - ServiceClasses - - PBXClassBrowserModule - - StatusbarIsVisible - 0 - TableOfContents - - 1C0AD2AF069F1E9B00FABCE6 - 1C0AD2B0069F1E9B00FABCE6 - 1CA6456E063B45B4001379D8 - - ToolbarConfiguration - xcode.toolbar.config.classbrowser - WindowString - 385 179 630 352 0 0 1440 878 - WindowToolGUID - 1C0AD2AF069F1E9B00FABCE6 - WindowToolIsVisible - 0 - - - - diff --git a/pe/cocoa/dupeguru.xcodeproj/project.pbxproj b/pe/cocoa/dupeguru.xcodeproj/project.pbxproj index 02043065..9d13aec4 100644 --- a/pe/cocoa/dupeguru.xcodeproj/project.pbxproj +++ b/pe/cocoa/dupeguru.xcodeproj/project.pbxproj @@ -323,7 +323,6 @@ isa = PBXNativeTarget; buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */; buildPhases = ( - CEABE1A60FCC00E3005F8031 /* ShellScript */, 8D1107290486CEB800E47090 /* Resources */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, @@ -383,22 +382,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - CEABE1A60FCC00E3005F8031 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd help\npython gen.py\n/Developer/Applications/Utilities/Help\\ Indexer.app/Contents/MacOS/Help\\ Indexer dupeguru_pe_help"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 8D11072C0486CEB800E47090 /* Sources */ = { isa = PBXSourcesBuildPhase; diff --git a/pe/cocoa/gen.py b/pe/cocoa/gen.py new file mode 100644 index 00000000..69d7125d --- /dev/null +++ b/pe/cocoa/gen.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import os + +print "Generating help" +os.chdir('help') +os.system('python -u gen.py') +os.system('/Developer/Applications/Utilities/Help\\ Indexer.app/Contents/MacOS/Help\\ Indexer dupeguru_pe_help') +os.chdir('..') + +print "Generating py plugin" +os.chdir('py') +os.system('python -u gen.py') +os.chdir('..') \ No newline at end of file diff --git a/pe/cocoa/py/build_py.sh b/pe/cocoa/py/build_py.sh deleted file mode 100755 index c9ac2993..00000000 --- a/pe/cocoa/py/build_py.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -python setup.py py2app \ No newline at end of file diff --git a/pe/cocoa/py/dg_cocoa.py b/pe/cocoa/py/dg_cocoa.py index 76126ec1..b3aadcb6 100644 --- a/pe/cocoa/py/dg_cocoa.py +++ b/pe/cocoa/py/dg_cocoa.py @@ -1,13 +1,15 @@ #!/usr/bin/env python import objc from AppKit import * -from PyObjCTools import NibClassBuilder - -NibClassBuilder.extractClasses("MainMenu", bundle=NSBundle.mainBundle()) from dupeguru import app_pe_cocoa, scanner -class PyApp(NibClassBuilder.AutoBaseClass): +# Fix py2app imports which chokes on relative imports +from dupeguru import app, app_cocoa, data, directories, engine, export, ignore, results, scanner +from dupeguru.picture import block, cache, matchbase +from hsfs import auto, manual, stats, tree, utils + +class PyApp(NSObject): pass #fake class class PyDupeGuru(PyApp): diff --git a/pe/cocoa/py/gen.py b/pe/cocoa/py/gen.py new file mode 100644 index 00000000..6195927d --- /dev/null +++ b/pe/cocoa/py/gen.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +import os +import os.path as op +import shutil + +from hsutil.build import print_and_do + +os.chdir('dupeguru') +print_and_do('python gen.py') +os.chdir('..') + +if op.exists('build'): + shutil.rmtree('build') +if op.exists('dist'): + shutil.rmtree('dist') + +print_and_do('python -u setup.py py2app') \ No newline at end of file diff --git a/pe/cocoa/py/setup.py b/pe/cocoa/py/setup.py index 8bf847db..af81b3ed 100644 --- a/pe/cocoa/py/setup.py +++ b/pe/cocoa/py/setup.py @@ -1,11 +1,14 @@ #!/usr/bin/env python -from setuptools import setup -from hs.build import set_buildenv +from distutils.core import setup +import py2app -set_buildenv() +from hsutil.build import move_testdata_out, put_testdata_back -setup( - plugin=['dg_cocoa.py'], - setup_requires=['py2app'], -) +move_log = move_testdata_out() +try: + setup( + plugin = ['dg_cocoa.py'], + ) +finally: + put_testdata_back(move_log)