diff --git a/SCStringsUtility.xcodeproj/project.pbxproj b/SCStringsUtility.xcodeproj/project.pbxproj index 7d11a18..558f6a1 100644 --- a/SCStringsUtility.xcodeproj/project.pbxproj +++ b/SCStringsUtility.xcodeproj/project.pbxproj @@ -244,7 +244,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = SC; - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Stefan Ceriu"; }; buildConfigurationList = 18D36745162772B500B6BACE /* Build configuration list for PBXProject "SCStringsUtility" */; @@ -325,6 +325,7 @@ CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -377,6 +378,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SCStringsUtility/SCStringsUtility-Prefix.pch"; INFOPLIST_FILE = "SCStringsUtility/SCStringsUtility-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.stefanceriu.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = SCStringsUtility; WRAPPER_EXTENSION = app; }; @@ -395,6 +397,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "SCStringsUtility/SCStringsUtility-Prefix.pch"; INFOPLIST_FILE = "SCStringsUtility/SCStringsUtility-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "com.stefanceriu.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = SCStringsUtility; WRAPPER_EXTENSION = app; }; diff --git a/SCStringsUtility/SCRootViewController.xib b/SCStringsUtility/SCRootViewController.xib index 04edc5d..a3fca80 100644 --- a/SCStringsUtility/SCRootViewController.xib +++ b/SCStringsUtility/SCRootViewController.xib @@ -1,1223 +1,241 @@ - - - - 1070 - 14B25 - 6254 - 1343.16 - 755.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 6254 - - - NSBox - NSButton - NSButtonCell - NSCustomObject - NSCustomView - NSOutlineView - NSProgressIndicator - NSScrollView - NSScroller - NSSearchField - NSSearchFieldCell - NSSplitView - NSTableColumn - NSTableHeaderView - NSTableView - NSTextFieldCell - NSTextView - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - SCRootViewController - - - FirstResponder - - - NSApplication - - - - 256 - - - - 290 - {{-2, -1}, {754, 20}} - - 0.0 - _NS:9 - {250, 250} - 16399 - -2 - 100 - - - - 4370 - - - - 4352 - - - - 2322 - - - - 4388 - {177, 497} - - - _NS:13 - YES - NO - YES - - - -2147483392 - {{224, 0}, {16, 17}} - - _NS:18 - - - - 174 - 16 - 1000 - - 75497536 - 2048 - - - YES - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 338690112 - 1024 - Text Cell - - YES - 13 - 1044 - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - 3 - 2 - - 3 - MQA - - - 6 - System - gridColor - - 3 - MC41AA - - - 17 - 306184192 - - - 4 - 15 - 0 - YES - 0 - 1 - NO - - - {{1, 1}, {177, 497}} - - - _NS:11 - - - 4 - YES - - - - -2147483392 - {{224, 17}, {15, 102}} - - - _NS:58 - NO - _doScroller: - - - _doScroller: - 0.51244813278008294 - 1 - - - - -2147483392 - {{1, 544}, {243, 15}} - - - _NS:60 - NO - _doScroller: - - 1 - - _doScroller: - 0.99459459459459465 - 1 - - - {179, 499} - - - _NS:9 - YES - 219698 - - - - 1 - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 4370 - - - - 2322 - - - - 4352 - {550, 481} - - - _NS:13 - YES - NO - YES - - - 256 - {550, 17} - - - - - - - -2147483392 - {{224, 0}, {16, 17}} - - _NS:19 - - - 3 - 2 - - - 17 - -490700800 - - - 3 - 1 - 15 - 0 - NO - -1 - 1 - 1 - - - {{1, 17}, {550, 481}} - - - _NS:11 - - - 4 - YES - - - - -2147483392 - {{224, 17}, {15, 102}} - - - _NS:58 - NO - _doScroller: - - - _doScroller: - 0.84679089026915111 - 1 - - - - -2147483392 - {{1, 119}, {223, 15}} - - - _NS:60 - NO - _doScroller: - - 1 - - _doScroller: - 0.99805825242718449 - 1 - - - - 2338 - - - - {{1, 0}, {550, 17}} - - - - YES - - - {{180, 0}, {552, 499}} - - - _NS:9 - YES - 133682 - - - - - 1 - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - {{10, 27}, {732, 499}} - - - _NS:9 - YES - 2 - - - - 266 - - - - 268 - {{10, 4}, {172, 18}} - - - _NS:9 - YES - - 67108864 - 268435456 - Search keys only - - _NS:9 - - 1211912448 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - NO - - - - 266 - {{188, 2}, {544, 22}} - - - YES - _NS:9 - YES - - 342884416 - 268469312 - - - _NS:9 - - YES - 1 - - 6 - System - textBackgroundColor - - - - - 0 - 0 - search - - _searchFieldSearch: - - 138690560 - 0 - - 400 - 75 - - - 0 - 0 - clear - - - cancel - - - - - _searchFieldCancel: - - 138690560 - 0 - - 400 - 75 - - 255 - BgAAAA - - NO - 1 - - - {{10, 499}, {732, 27}} - - - _NS:9 - NSView - - - - 10 - - - - 274 - - - - 268 - {{8, 10}, {40, 40}} - - - _NS:9 - YES - - 67108864 - 134250496 - - - _NS:9 - - -2033434624 - 130 - - NSImage - icon-open - - - - 400 - 75 - - NO - - - - 268 - {{52, 10}, {40, 40}} - - - 0.0 - _NS:9 - YES - - 67108864 - 134250496 - - - _NS:9 - - -2033434624 - 130 - - NSImage - icon-save - - - - 400 - 75 - - NO - - - - 268 - {{140, 10}, {40, 40}} - - - 0.0 - _NS:9 - YES - - 67108864 - 134250496 - - - _NS:9 - - -2033434624 - 130 - - NSImage - icon-export - - - - 400 - 75 - - NO - - - - 4114 - - - - 274 - - - - 4370 - - - - 2322 - - - - 3858 - {538, 43} - - - _NS:13 - - - - - - - - - - - - 166 - - - - 538 - 1 - - - 12036 - 0 - - - 3 - MSAwAA - - - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - 1 - MCAwIDEAA - - - {8, -8} - 13 - - - - - 4 - - 1 - - - 1 - - 6 - {546, 10000000} - - - - {538, 43} - - - _NS:11 - - - 3 - MSAwAA - - - {1, -1} - 0 - - 2 - YES - - - - -2147483392 - {{-100, -100}, {15, 40}} - - - _NS:83 - NO - _doScroller: - - - _doScroller: - 1 - 0.94999999999999996 - 2 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - - _NS:33 - NO - _doScroller: - - 1 - - _doScroller: - 1 - 0.94565218687057495 - 2 - - - {{8, 7}, {538, 43}} - - - _NS:9 - 133632 - - - - 2 - 0.25 - 4 - 1 - - - {{1, 1}, {548, 50}} - - - _NS:11 - - - {{183, 3}, {550, 66}} - - - _NS:9 - {0, 0} - - 67108864 - 0 - - - - - 6 - System - labelColor - - - - - 1 - 0 - 2 - NO - - - {{1, 1}, {736, 58}} - - - _NS:11 - - - {{7, 530}, {738, 74}} - - - _NS:9 - {0, 0} - - 67108864 - 0 - - - - - - - 1 - 0 - 2 - NO - - - {750, 599} - - NSView - - - - - - - view - - - - 2 - - - - progressIndicator - - - - 392 - - - - saveButton - - - - 560 - - - - onSaveClick: - - - - 291 - - - - onExportClick: - - - - 266 - - - - exportButton - - - - 559 - - - - textView - - - - 852 - - - - tableView - - - - 154 - - - - outlineView - - - - 821 - - - - splitView - - - - 873 - - - - searchField - - - - 929 - - - - searchKeysOnlyCheckboxButton - - - - 935 - - - - onSearchKeysOnlyCheckboxButtonValueChanged: - - - - 936 - - - - onOpenClick: - - - - 940 - - - - delegate - - - - 872 - - - - delegate - - - - 930 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - - - - - - - - - 364 - - - Bottom progress view - - - 460 - - - - - - - - - 801 - - - - - - - - - - 802 - - - - - - - - 805 - - - - - - - - 806 - - - - - 803 - - - - - 804 - - - - - 836 - - - - - - - - - Top toolbar - - - 844 - - - - - - - - 845 - - - - - - - - - - 848 - - - - - 847 - - - - - 846 - - - - - 256 - - - - - - Export button - - - 259 - - - - - 281 - - - - - - Save button - - - 283 - - - - - 70 - - - - - - Open button - - - 71 - - - - - 931 - - - - - - - Search Box - - - 932 - - - - - - - - 933 - - - - - 927 - - - - - - - - 928 - - - - - 144 - - - - - - - - - - - 145 - - - - - 146 - - - - - 148 - - - - - 459 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 942 - - - 0 - IBCocoaFramework - NO - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - {15, 15} - {128, 128} - {128, 128} - {128, 128} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCStringsUtility/SCStringsController.m b/SCStringsUtility/SCStringsController.m index babffb8..dbda073 100644 --- a/SCStringsUtility/SCStringsController.m +++ b/SCStringsUtility/SCStringsController.m @@ -244,13 +244,19 @@ -(void)executeGenStringsAtPath:(NSString*)path withRoutine:(NSString*)routine po [task setLaunchPath: @"/bin/sh"]; [task setCurrentDirectoryPath:path]; - NSString *tempFilePath = NSTemporaryDirectory(); + NSMutableString *argumentsString = [NSMutableString stringWithString:@"find ./ \\( -name *.m -o -name *.swift \\) -exec genstrings -a"]; - NSString *argument = [NSString stringWithFormat:@"find ./ -name *.m -print0 -o -name *.swift -print0 | xargs -0 genstrings -o %@", tempFilePath]; - if([routine length]) argument = [argument stringByAppendingString:[NSString stringWithFormat:@" -s %@", routine]]; - if(!positionalParameters) argument = [argument stringByAppendingString:@" -noPositionalParameters"]; + if([routine length]) { + [argumentsString appendString:[NSString stringWithFormat:@" -s %@", routine]]; + } + + if(!positionalParameters) { + [argumentsString appendString:@" -noPositionalParameters"]; + } + + [argumentsString appendFormat:@" -o %@ {} \\;", NSTemporaryDirectory()]; - [task setArguments:@[@"-c", argument]]; + [task setArguments:@[@"-c", argumentsString]]; NSPipe *pipe = [NSPipe pipe]; [task setStandardOutput: pipe]; diff --git a/SCStringsUtility/SCStringsUtility-Info.plist b/SCStringsUtility/SCStringsUtility-Info.plist index 498a35c..adb0ceb 100644 --- a/SCStringsUtility/SCStringsUtility-Info.plist +++ b/SCStringsUtility/SCStringsUtility-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile icon CFBundleIdentifier - com.stefanceriu.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName