Skip to content

Commit 6a7a070

Browse files
Update handling of build setting descriptions and add LLDB 6.1 file.
Group related files in setting list to account for change in filenames over Xcode releases. Update ReadMe and target to version 1.2.1.
1 parent bc91095 commit 6a7a070

File tree

4 files changed

+78
-25
lines changed

4 files changed

+78
-25
lines changed

BuildSettingExtractor/BuildSettingExtractor-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.2</string>
20+
<string>1.2.1</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>4</string>
24+
<string>5</string>
2525
<key>LSMinimumSystemVersion</key>
2626
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
2727
<key>NSHumanReadableCopyright</key>

BuildSettingExtractor/BuildSettingInfoSource.m

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ - (NSString *)processedDescriptionString:(NSString *)string forKey:(NSString *)k
127127
return processedString;
128128
}
129129

130-
131130
- (void)loadBuildSettingInfo {
132131
NSString *defaultXcodePath = @"/Applications/Xcode.app";
133132
NSURL *buildSettingInfoPlistURL = [[NSBundle mainBundle] URLForResource:@"BuildSettingInfoSubpaths" withExtension:@"plist"];
@@ -140,13 +139,29 @@ - (void)loadBuildSettingInfo {
140139
NSDictionary *backstopSettingsInfo = buildSettingInfoDict[@"backstopSettingInfo"];
141140
[infoStringFile addEntriesFromDictionary:backstopSettingsInfo];
142141

143-
for (NSString *subpath in buildSettingInfoSubpaths) {
144-
NSString *fullpath = [defaultXcodePath stringByAppendingPathComponent:subpath];
145-
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:fullpath];
146-
if (!dictionary) NSLog(@"Could not read dictionary at path: %@", fullpath);
147-
[infoStringFile addEntriesFromDictionary:dictionary];
142+
// Rather than track exactly what Xcode versions contain which files, group versions of an expected file in an array.
143+
// Log if no file in the group can be read in.
144+
for (NSArray *buildSettingInfoSubpathList in buildSettingInfoSubpaths) {
145+
BOOL foundOne = NO;
146+
for (NSString *subpath in buildSettingInfoSubpathList) {
147+
NSString *fullpath = [defaultXcodePath stringByAppendingPathComponent:subpath];
148+
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:fullpath];
149+
[infoStringFile addEntriesFromDictionary:dictionary];
150+
if (dictionary || foundOne) {
151+
foundOne = YES;
152+
}
153+
}
154+
if (!foundOne) {
155+
if (buildSettingInfoSubpathList.count == 0) {
156+
NSLog(@"Empty array of subpaths at index %lu", [buildSettingInfoSubpaths indexOfObject:buildSettingInfoSubpathList]);
157+
} else if (buildSettingInfoSubpathList.count == 1) {
158+
NSLog(@"Could not read settings strings at path: %@", buildSettingInfoSubpathList[0]);
159+
} else {
160+
NSLog(@"Could not read settings strings at these paths: %@", buildSettingInfoSubpathList);
161+
}
162+
}
148163
}
149-
164+
150165
_buildSettingInfoDictionary = infoStringFile;
151166
}
152167

BuildSettingExtractor/BuildSettingInfoSubpaths.plist

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,55 @@
44
<dict>
55
<key>subpaths</key>
66
<array>
7-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/Versions/Current/Resources/English.lproj/CoreBuildSystem.strings</string>
8-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Clang LLVM 1.0.xcplugin/Contents/Resources/English.lproj/Apple LLVM 6.0.strings</string>
9-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/en.lproj/Swift Compiler.strings</string>
10-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/SwiftBuildSettings.strings</string>
11-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Metal.xcplugin/Contents/Resources/Metal Compiler.strings</string>
12-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Core Data.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.model.coredata.strings</string>
13-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Core Data.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.model.coredatamapping.strings</string>
14-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Core Data.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.model.persistence.strings</string>
15-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.assetcatalog.strings</string>
16-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/com.apple.xcode.tools.ibtool.compiler.strings</string>
17-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/com.apple.xcode.tools.ibtool.postprocessor.strings</string>
18-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/Interface Builder Storyboard Compiler.strings</string>
19-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/Interface Builder Storyboard Postprocessor.strings</string>
20-
<string>Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/English.lproj/Native Build System.strings</string>
21-
<string>Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/Native Build System.strings</string>
22-
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/en.lproj/OpenCL.strings</string>
7+
<array>
8+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/Versions/Current/Resources/English.lproj/CoreBuildSystem.strings</string>
9+
</array>
10+
<array>
11+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Clang LLVM 1.0.xcplugin/Contents/Resources/English.lproj/Apple LLVM 6.0.strings</string>
12+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Clang LLVM 1.0.xcplugin/Contents/Resources/English.lproj/Apple LLVM 6.1.strings</string>
13+
</array>
14+
<array>
15+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/en.lproj/Swift Compiler.strings</string>
16+
</array>
17+
<array>
18+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/SwiftBuildSettings.strings</string>
19+
</array>
20+
<array>
21+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Metal.xcplugin/Contents/Resources/Metal Compiler.strings</string>
22+
</array>
23+
<array>
24+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Core Data.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.model.coredata.strings</string>
25+
</array>
26+
<array>
27+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Core Data.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.model.coredatamapping.strings</string>
28+
</array>
29+
<array>
30+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Core Data.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.model.persistence.strings</string>
31+
</array>
32+
<array>
33+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/com.apple.compilers.assetcatalog.strings</string>
34+
</array>
35+
<array>
36+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/com.apple.xcode.tools.ibtool.compiler.strings</string>
37+
</array>
38+
<array>
39+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/com.apple.xcode.tools.ibtool.postprocessor.strings</string>
40+
</array>
41+
<array>
42+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/Interface Builder Storyboard Compiler.strings</string>
43+
</array>
44+
<array>
45+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/IBCompilerPlugin.xcplugin/Contents/Resources/English.lproj/Interface Builder Storyboard Postprocessor.strings</string>
46+
</array>
47+
<array>
48+
<string>Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/English.lproj/Native Build System.strings</string>
49+
</array>
50+
<array>
51+
<string>Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/Native Build System.strings</string>
52+
</array>
53+
<array>
54+
<string>Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/en.lproj/OpenCL.strings</string>
55+
</array>
2356
</array>
2457
<key>backstopSettingInfo</key>
2558
<dict>

ReadMe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ These comments can be turned off in the Preferences sheet for a more compact fil
5151

5252
###Version History###
5353

54+
*Version 1.2.1*
55+
*May 16, 2015*
56+
57+
– Updated list of build setting description files to include new LLDB 6.1 file.
58+
5459
*Version 1.2*
5560
*May 16, 2015*
5661

0 commit comments

Comments
 (0)