File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 206206 089C1669FE841209C02AAC07 /* Project object */ = {
207207 isa = PBXProject;
208208 attributes = {
209- LastUpgradeCheck = 0700 ;
209+ LastUpgradeCheck = 0730 ;
210210 };
211211 buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */;
212212 compatibilityVersion = "Xcode 3.2";
338338 2CA3261F0896AD4900168862 /* Debug */ = {
339339 isa = XCBuildConfiguration;
340340 buildSettings = {
341+ COMBINE_HIDPI_IMAGES = YES;
341342 OTHER_CFLAGS = "-DDEBUG";
342343 };
343344 name = Debug;
344345 };
345346 2CA326200896AD4900168862 /* Release */ = {
346347 isa = XCBuildConfiguration;
347348 buildSettings = {
349+ COMBINE_HIDPI_IMAGES = YES;
348350 };
349351 name = Release;
350352 };
Original file line number Diff line number Diff line change 6969
7070 // Set up preferences
7171 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults ];
72+
73+ // Try to find highlight location
74+ NSString *highlightPath = [defaults valueForKey: @" pathHL" ];
75+ if (highlightPath == nil ) {
76+ NSTask *task = [[NSTask alloc ] init ];
77+ [task setLaunchPath: @" /bin/bash" ];
78+ [task setArguments: @[@" -l" , @" -c" , @" which highlight" ]];
79+ NSPipe *pipe;
80+ pipe = [NSPipe pipe ];
81+ [task setStandardOutput: pipe];
82+ NSFileHandle *file;
83+ file = [pipe fileHandleForReading ];
84+ [task launch ];
85+ NSData *data;
86+ data = [file readDataToEndOfFile ];
87+ [task waitUntilExit ];
88+ highlightPath = [[[[NSString alloc ] initWithData: data encoding: NSUTF8StringEncoding] autorelease ] stringByTrimmingCharactersInSet: [NSCharacterSet newlineCharacterSet ]];
89+ [task release ];
90+ [file closeFile ];
91+ if (![highlightPath hasPrefix: @" /" ] || ![highlightPath hasSuffix: @" highlight" ]) { // fallback on default
92+ highlightPath = @" /opt/local/bin/highlight" ;
93+ }
94+ [defaults setObject: highlightPath forKey: @" pathHL" ];
95+ [defaults synchronize ];
96+ }
97+
7298 NSMutableDictionary *env = [NSMutableDictionary dictionaryWithDictionary:
7399 [[NSProcessInfo processInfo ] environment ]];
74100 [env addEntriesFromDictionary: [NSDictionary dictionaryWithObjectsAndKeys:
You can’t perform that action at this time.
0 commit comments