Skip to content

Commit e81d41e

Browse files
committed
Better documentation for Xcode 3.2 conflict
1 parent 8aec283 commit e81d41e

File tree

3 files changed

+54
-13
lines changed

3 files changed

+54
-13
lines changed

ChangeLog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.0.2:
2+
* Modified ReadMe.txt to include the latest info on the Xcode 3.2 conflict
3+
* Include a link to Andre Simon's page with previews of color styles
4+
15
2.0.1:
26
* Corrected build of Highlight to run on Leopard.
37
* Stop redirecting stdout of colorize.sh to stdin. Error output will appear

QLColorCode.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@
427427
2CA326230896AD4900168862 /* Debug */ = {
428428
isa = XCBuildConfiguration;
429429
buildSettings = {
430-
CURRENT_PROJECT_VERSION = 2.0.1;
430+
CURRENT_PROJECT_VERSION = 2.0.2;
431431
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
432432
GCC_WARN_ABOUT_RETURN_TYPE = YES;
433433
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -444,7 +444,7 @@
444444
i386,
445445
x86_64,
446446
);
447-
CURRENT_PROJECT_VERSION = 2.0.1;
447+
CURRENT_PROJECT_VERSION = 2.0.2;
448448
GCC_WARN_ABOUT_RETURN_TYPE = YES;
449449
GCC_WARN_UNUSED_VARIABLE = YES;
450450
PREBINDING = NO;

ReadMe.txt

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ QLColorCode
55
===============================================================================
66
IMPORTANT NOTE FOR XCODE 3.2 (SHIPPED WITH SNOW LEOPARD) USERS:
77
If you are running Xcode 3.2 or higher you will probably not see QLColorCode's
8-
output. See here for details:
9-
http://code.google.com/p/qlcolorcode/issues/detail?id=46
8+
output unless you disable Xcode's built-in source code qlgenerator.
9+
See the end of this file for details.
1010
===============================================================================
1111

1212
This is a Quick Look plugin that renders source code with syntax highlighting,
@@ -22,25 +22,23 @@ Setting the text encoding (default is UTF-8). Two settings are required. The
2222
first sets Highlight's encoding, the second sets Webkit's:
2323
defaults write org.n8gray.QLColorCode textEncoding UTF-16
2424
defaults write org.n8gray.QLColorCode webkitTextEncoding UTF-16
25+
2526
Setting the font:
2627
defaults write org.n8gray.QLColorCode font Monaco
28+
2729
the font size:
2830
defaults write org.n8gray.QLColorCode fontSizePoints 9
29-
the color style (see below):
31+
32+
the color style (see http://www.andre-simon.de/dokuwiki/doku.php?id=theme_examples
33+
or try slateGreen to see how I roll):
3034
defaults write org.n8gray.QLColorCode hlTheme ide-xcode
35+
3136
any extra command-line flags for Highlight (see below):
3237
defaults write org.n8gray.QLColorCode extraHLFlags '-l -W'
38+
3339
the maximum size (in bytes) for previewed files:
3440
defaults write org.n8gray.QLColorCode maxFileSize 1000000
3541

36-
The following color styles are included with QLColorCode:
37-
acid, bipolar, blacknblue, bright, contrast, darkblue,
38-
darkness, desert, easter, emacs, golden, greenlcd, ide-anjuta,
39-
ide-codewarrior, ide-devcpp, ide-eclipse, ide-kdev, ide-msvcpp, ide-xcode,
40-
kwrite, lucretia, matlab, moe, navy, nedit, neon, night, orion, pablo,
41-
peachpuff, print, rand01, seashell, slateGreen, the, typical, vampire,
42-
vim-dark, vim, whitengrey, zellner
43-
4442
Here are some useful 'highlight' command-line flags (from the man page):
4543
-F, --reformat=<style>
4644
reformat output in given style. <style>=[ansi, gnu, kr,
@@ -91,6 +89,45 @@ As an aside, by changing colorize.sh you can use this plugin to render any file
9189
type that you can convert to HTML. Have fun, and let me know if you do anything
9290
cool!
9391

92+
====================================================================
93+
Important information on using QLColorCode with Xcode v3.2 and later
94+
====================================================================
95+
96+
The most up-to-date copy of this info will be found here:
97+
http://code.google.com/p/qlcolorcode/wiki/ImportantNoteForXcodeUsers
98+
99+
Xcode 3.2 (the version shipped with Snow Leopard) includes a Quick Look plugin
100+
that highlights source code. It only highlights a few languages, so you probably
101+
still want to use QLColorCode. However, the Quick Look server tends to pick the
102+
Xcode plugin over QLCC. This means that for any source code file aside from .c,
103+
.m, and the other languages that Xcode understands you'll see a plain text
104+
preview with no highlighting. To get QLCC to work properly you'll need to
105+
disable the Xcode plugin.
106+
107+
Details
108+
-------
109+
110+
The Xcode plugin is installed at:
111+
112+
/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator
113+
The simplest way to disable it is to open Terminal.app and run these commands:
114+
115+
f=/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator
116+
sudo mv $f $f.disabled
117+
118+
This will rename the plugin to SourceCode.qlgenerator.disabled, which will
119+
prevent it from being loaded by quicklookd.
120+
121+
A Note on Code Signing
122+
----------------------
123+
124+
The Xcode application is cryptographically signed. Disabling the
125+
SourceCode.qlgenerator plugin will NOT invalidate the signature. You can
126+
confirm this by using the codesign command after disabling the plugin:
127+
128+
[n8gray@golux]% codesign -vv /Developer/Applications/Xcode.app
129+
/Developer/Applications/Xcode.app: valid on disk
130+
/Developer/Applications/Xcode.app: satisfies its Designated Requirement
94131

95132
Cheers,
96133
-n8

0 commit comments

Comments
 (0)