Skip to content

Commit

Permalink
Fix output dictionary file name
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgod committed Aug 11, 2015
1 parent d89f419 commit 79cc83d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DictUnifierAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,15 @@ - (void) startBuildingWith: (NSString *) dictName
NSDictionary *environments = [NSDictionary dictionaryWithObjectsAndKeys:
@"en_US.UTF-8", @"LANG",
binaryDir, @"DICT_BUILD_TOOL_BIN", nil];
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:
[NSString stringWithFormat: @"'%@'", self.dictID], @"Dictionary.xml",
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:self.dictID, @"Dictionary.xml",
@"Dictionary.css", @"DictInfo.plist", nil];

// If we have Mac OS X 10.6, use the new (compress) feature provided by Dictionary Development Kit.
NSDictionary *version = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
NSString *productVersion = [version objectForKey:@"ProductVersion"];
NSInteger versionMinor = [[[productVersion componentsSeparatedByString:@"."] lastObject] integerValue];
if (versionMinor >= 6) {
[arguments insertObject: @"-v" atIndex: 0];
[arguments insertObject: @"-v" atIndex: 0];
[arguments insertObject: versionMinor >= 11 ? @"10.11" : @"10.6" atIndex: 1];
NSLog(@"%@", arguments);
}
Expand Down

0 comments on commit 79cc83d

Please sign in to comment.