From fb74e149cb4283e01e901b18642afc3b05c279e8 Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Wed, 28 Oct 2009 12:12:30 -0700 Subject: [PATCH 1/8] Add scripts to disable/restore xcode plugin --- QLColorCode.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 470f7ee..23a531b 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ 0EB496B10D0FC70D00E86E0B /* ml.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EB4960D0D0FC24000E86E0B /* ml.lang */; }; 0EC047970CFBDADF009C986E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EC047960CFBDADF009C986E /* Foundation.framework */; }; 0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; }; + 0EE90E861098CE5800468467 /* Script notes.txt in Resources */ = {isa = PBXBuildFile; fileRef = 0EE90E851098CE5800468467 /* Script notes.txt */; }; 0EF57D440D122791006084D5 /* ide-xcode.style in Copy .style Files */ = {isa = PBXBuildFile; fileRef = 0EF57D430D122791006084D5 /* ide-xcode.style */; }; 0EF57D6E0D122934006084D5 /* objc.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EF57D6D0D122934006084D5 /* objc.lang */; }; 0EF57E6A0D125AB2006084D5 /* slateGreen.style in Copy .style Files */ = {isa = PBXBuildFile; fileRef = 0EF57E690D125AB2006084D5 /* slateGreen.style */; }; @@ -120,6 +121,9 @@ 0EC047F20CFC000A009C986E /* Notes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Notes.txt; sourceTree = ""; }; 0ECBBB360CFCF98600416538 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; 0ECBBB5D0CFD447E00416538 /* colorize.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = colorize.sh; sourceTree = ""; }; + 0EE90E6F1098BE1E00468467 /* Disable XCode QL Plugin.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; path = "Disable XCode QL Plugin.scpt"; sourceTree = ""; }; + 0EE90E841098CDDF00468467 /* Restore XCode QL Plugin.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; path = "Restore XCode QL Plugin.scpt"; sourceTree = ""; }; + 0EE90E851098CE5800468467 /* Script notes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Script notes.txt"; sourceTree = ""; }; 0EF57D430D122791006084D5 /* ide-xcode.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ide-xcode.style"; sourceTree = ""; }; 0EF57D6D0D122934006084D5 /* objc.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = objc.lang; sourceTree = ""; }; 0EF57E4D0D123DD0006084D5 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; @@ -155,6 +159,7 @@ 089C166AFE841209C02AAC07 /* QLColorCode */ = { isa = PBXGroup; children = ( + 0EE90E7F1098C84600468467 /* Scripts */, 0EC047F20CFC000A009C986E /* Notes.txt */, 0ECBBB360CFCF98600416538 /* ReadMe.txt */, 0E51C65F0D04E492007853CB /* ChangeLog.txt */, @@ -209,6 +214,16 @@ name = Source; sourceTree = ""; }; + 0EE90E7F1098C84600468467 /* Scripts */ = { + isa = PBXGroup; + children = ( + 0EE90E851098CE5800468467 /* Script notes.txt */, + 0EE90E6F1098BE1E00468467 /* Disable XCode QL Plugin.scpt */, + 0EE90E841098CDDF00468467 /* Restore XCode QL Plugin.scpt */, + ); + name = Scripts; + sourceTree = ""; + }; 19C28FB6FE9D52B211CA2CBB /* Products */ = { isa = PBXGroup; children = ( @@ -281,6 +296,7 @@ files = ( 0EB495D50D0FB13C00E86E0B /* colorize.sh in Resources */, 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + 0EE90E861098CE5800468467 /* Script notes.txt in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 13465937ea484ef38dc1564d8c7ddb18a312038a Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Wed, 28 Oct 2009 15:56:43 -0700 Subject: [PATCH 2/8] Add scripts for handling Xcode plugin --- Disable XCode QL Plugin.scpt | 8 ++++++++ Restore XCode QL Plugin.scpt | 10 ++++++++++ Script notes.txt | 14 ++++++++++++++ 3 files changed, 32 insertions(+) create mode 100755 Disable XCode QL Plugin.scpt create mode 100755 Restore XCode QL Plugin.scpt create mode 100644 Script notes.txt diff --git a/Disable XCode QL Plugin.scpt b/Disable XCode QL Plugin.scpt new file mode 100755 index 0000000..2e7c964 --- /dev/null +++ b/Disable XCode QL Plugin.scpt @@ -0,0 +1,8 @@ +#!/usr/bin/osascript + +on run + do shell script "if test \\! -d /Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator; then echo 'I could not locate the XCode plugin. Have you already disabled it?'; exit 1; fi" + do shell script "x=/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator; sudo rm -rf $x.disabled; sudo mv $x $x.disabled" with administrator privileges + do shell script "qlmanage -r" + display dialog "The XCode plugin has been disabled" buttons {"OK"} default button 1 +end run diff --git a/Restore XCode QL Plugin.scpt b/Restore XCode QL Plugin.scpt new file mode 100755 index 0000000..c9a3af4 --- /dev/null +++ b/Restore XCode QL Plugin.scpt @@ -0,0 +1,10 @@ +#!/usr/bin/osascript + +on run + do shell script "if test \\! -d /Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator.disabled; then echo 'I could not locate the disabled XCode plugin. Have you already restored it?'; exit 1; fi" + do shell script "if test -e /Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator; then echo 'There is already a plugin named /Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator\\n\\nI will not overwrite it.'; exit 1; fi" + do shell script "x=/Developer/Applications/Xcode.app/Contents/Library/QuickLook/SourceCode.qlgenerator; sudo mv $x.disabled $x" with administrator privileges + do shell script "qlmanage -r" + display dialog "The XCode plugin has been restored" buttons {"OK"} default button 1 + +end run diff --git a/Script notes.txt b/Script notes.txt new file mode 100644 index 0000000..2e53b64 --- /dev/null +++ b/Script notes.txt @@ -0,0 +1,14 @@ +To package one of these scripts: +1. open it in Script Editor +2. Save As, using File Format: Application, with Startup Screen checked +3. Copy and paste the appropriate description below into the "Description" + pane in Script Editor +4. Save +5. Package & distribute the resulting app bundle + + +Descriptions: + +This script will disable the Quick Look plugin shipped with XCode by renaming it, adding a ".disabled" suffix. + +This script will restore the Quick Look plugin shipped with XCode, undoing the effects of the "Disable XCode QL Plugin" application. \ No newline at end of file From 33e4521a775fe514e49622e613caad168c7cdbef Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Tue, 13 Apr 2010 11:13:13 -0700 Subject: [PATCH 3/8] Groovy is handled in filetypes.conf, not colorize.sh --- colorize.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/colorize.sh b/colorize.sh index 8fbe550..c4e878d 100755 --- a/colorize.sh +++ b/colorize.sh @@ -71,9 +71,6 @@ case $target in lang=objc fi ;; - *.groovy ) - lang=java - ;; *.pro ) # Can be either IDL or Prolog. Prolog uses /* */ and % for comments. # IDL uses ; From b8129b788d7a546f0f37dedcaa6bb316f5dd1f79 Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Sun, 11 Sep 2011 19:16:23 -0700 Subject: [PATCH 4/8] Remove support for PPC --- QLColorCode.xcodeproj/project.pbxproj | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 23a531b..f9db20f 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -343,7 +343,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/zsh -x"; - shellScript = "set err_exit\ncd $PROJECT_DIR/highlight\nX='-arch ppc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5'\nexport CFLAGS=$X\nexport LDFLAGS=$X\nmake -j 2\n# Make sure it was built universal\nlipo -info src/highlight | grep -q ppc || exit 1\nlipo -info src/highlight | grep -q i386 || exit 1\nlipo -info src/highlight | grep -q x86_64 || exit 1\nmake \\\n\tDESTDIR=$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH \\\n\tPREFIX=/highlight/ \\\n\tinstall\n\n"; + shellScript = "set err_exit\ncd $PROJECT_DIR/highlight\nX='-arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5'\nexport CFLAGS=$X\nexport LDFLAGS=$X\nmake -j 2\n# Make sure it was built universal\nlipo -info src/highlight | grep -q i386 || exit 1\nlipo -info src/highlight | grep -q x86_64 || exit 1\nmake \\\n\tDESTDIR=$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH \\\n\tPREFIX=/highlight/ \\\n\tinstall\n\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -455,11 +455,8 @@ 2CA326240896AD4900168862 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, - x86_64, - ); + ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; CURRENT_PROJECT_VERSION = 2.0.2; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; From fff0af464c8f3405a09993abc0fe800d2a4ba88a Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Sun, 11 Sep 2011 19:17:46 -0700 Subject: [PATCH 5/8] Install highlight styles/langs/etc using folder ref. Now there's no need to change the project file when adding a new language or style. --- QLColorCode.xcodeproj/project.pbxproj | 68 +++---------------- highlight.css | 21 ++++++ .../config/filetypes.conf | 0 c.lang => override/langDefs/c.lang | 0 ml.lang => override/langDefs/ml.lang | 0 objc.lang => override/langDefs/objc.lang | 0 .../themes/ide-xcode.style | 0 .../themes/slateGreen.style | 0 8 files changed, 32 insertions(+), 57 deletions(-) create mode 100644 highlight.css rename filetypes.conf => override/config/filetypes.conf (100%) rename c.lang => override/langDefs/c.lang (100%) rename ml.lang => override/langDefs/ml.lang (100%) rename objc.lang => override/langDefs/objc.lang (100%) rename ide-xcode.style => override/themes/ide-xcode.style (100%) rename slateGreen.style => override/themes/slateGreen.style (100%) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index f9db20f..0f0c9ab 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -26,16 +26,11 @@ 0E8776580D08E004005040B4 /* Common.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E8776560D08E004005040B4 /* Common.m */; }; 0E8776B70D08ED64005040B4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E8776B60D08ED64005040B4 /* WebKit.framework */; }; 0E8776BD0D08EDA4005040B4 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E8776BC0D08EDA4005040B4 /* AppKit.framework */; }; - 0E913A0A0D10B8060067BAD6 /* filetypes.conf in Copy .conf Files */ = {isa = PBXBuildFile; fileRef = 0E913A090D10B8060067BAD6 /* filetypes.conf */; }; + 0E8FBB64141DA09D00269094 /* override in Resources */ = {isa = PBXBuildFile; fileRef = 0E8FBB56141DA09D00269094 /* override */; }; 0EB495D50D0FB13C00E86E0B /* colorize.sh in Resources */ = {isa = PBXBuildFile; fileRef = 0ECBBB5D0CFD447E00416538 /* colorize.sh */; }; - 0EB496B10D0FC70D00E86E0B /* ml.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EB4960D0D0FC24000E86E0B /* ml.lang */; }; 0EC047970CFBDADF009C986E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EC047960CFBDADF009C986E /* Foundation.framework */; }; 0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; }; 0EE90E861098CE5800468467 /* Script notes.txt in Resources */ = {isa = PBXBuildFile; fileRef = 0EE90E851098CE5800468467 /* Script notes.txt */; }; - 0EF57D440D122791006084D5 /* ide-xcode.style in Copy .style Files */ = {isa = PBXBuildFile; fileRef = 0EF57D430D122791006084D5 /* ide-xcode.style */; }; - 0EF57D6E0D122934006084D5 /* objc.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EF57D6D0D122934006084D5 /* objc.lang */; }; - 0EF57E6A0D125AB2006084D5 /* slateGreen.style in Copy .style Files */ = {isa = PBXBuildFile; fileRef = 0EF57E690D125AB2006084D5 /* slateGreen.style */; }; - 0EF57F2F0D128219006084D5 /* c.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EF57F2E0D128219006084D5 /* c.lang */; }; 2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */; }; 61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */; }; 8D576312048677EA00EA77CD /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB77B6FE84183AC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; @@ -57,30 +52,6 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 0E913A110D10B84D0067BAD6 /* Copy .conf Files */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = override/config; - dstSubfolderSpec = 7; - files = ( - 0E913A0A0D10B8060067BAD6 /* filetypes.conf in Copy .conf Files */, - ); - name = "Copy .conf Files"; - runOnlyForDeploymentPostprocessing = 0; - }; - 0EB496B00D0FC68300E86E0B /* Copy .lang Files */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = override/langDefs; - dstSubfolderSpec = 7; - files = ( - 0EF57F2F0D128219006084D5 /* c.lang in Copy .lang Files */, - 0EF57D6E0D122934006084D5 /* objc.lang in Copy .lang Files */, - 0EB496B10D0FC70D00E86E0B /* ml.lang in Copy .lang Files */, - ); - name = "Copy .lang Files"; - runOnlyForDeploymentPostprocessing = 0; - }; 0ECBBA6F0CFCA39E00416538 /* Copy to Library */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 12; @@ -92,18 +63,6 @@ name = "Copy to Library"; runOnlyForDeploymentPostprocessing = 0; }; - 0EF57D6C0D1228E3006084D5 /* Copy .style Files */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = override/themes; - dstSubfolderSpec = 7; - files = ( - 0EF57E6A0D125AB2006084D5 /* slateGreen.style in Copy .style Files */, - 0EF57D440D122791006084D5 /* ide-xcode.style in Copy .style Files */, - ); - name = "Copy .style Files"; - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -115,8 +74,7 @@ 0E8776560D08E004005040B4 /* Common.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Common.m; sourceTree = ""; }; 0E8776B60D08ED64005040B4 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = SDKs/MacOSX10.5.sdk/System/Library/Frameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; }; 0E8776BC0D08EDA4005040B4 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = SDKs/MacOSX10.5.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; - 0E913A090D10B8060067BAD6 /* filetypes.conf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = filetypes.conf; sourceTree = ""; }; - 0EB4960D0D0FC24000E86E0B /* ml.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ml.lang; sourceTree = ""; }; + 0E8FBB56141DA09D00269094 /* override */ = {isa = PBXFileReference; lastKnownFileType = folder; path = override; sourceTree = ""; }; 0EC047960CFBDADF009C986E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 0EC047F20CFC000A009C986E /* Notes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Notes.txt; sourceTree = ""; }; 0ECBBB360CFCF98600416538 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; @@ -124,11 +82,7 @@ 0EE90E6F1098BE1E00468467 /* Disable XCode QL Plugin.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; path = "Disable XCode QL Plugin.scpt"; sourceTree = ""; }; 0EE90E841098CDDF00468467 /* Restore XCode QL Plugin.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; path = "Restore XCode QL Plugin.scpt"; sourceTree = ""; }; 0EE90E851098CE5800468467 /* Script notes.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Script notes.txt"; sourceTree = ""; }; - 0EF57D430D122791006084D5 /* ide-xcode.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ide-xcode.style"; sourceTree = ""; }; - 0EF57D6D0D122934006084D5 /* objc.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = objc.lang; sourceTree = ""; }; 0EF57E4D0D123DD0006084D5 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; - 0EF57E690D125AB2006084D5 /* slateGreen.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = slateGreen.style; sourceTree = ""; }; - 0EF57F2E0D128219006084D5 /* c.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = c.lang; sourceTree = ""; }; 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = ""; }; 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = ""; }; 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLColorCode.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -189,12 +143,7 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( - 0EF57F2E0D128219006084D5 /* c.lang */, - 0EB4960D0D0FC24000E86E0B /* ml.lang */, - 0EF57D6D0D122934006084D5 /* objc.lang */, - 0EF57D430D122791006084D5 /* ide-xcode.style */, - 0EF57E690D125AB2006084D5 /* slateGreen.style */, - 0E913A090D10B8060067BAD6 /* filetypes.conf */, + 0E8FBB56141DA09D00269094 /* override */, 8D576317048677EA00EA77CD /* Info.plist */, 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, ); @@ -254,9 +203,6 @@ 8D57630F048677EA00EA77CD /* Resources */, 8D576311048677EA00EA77CD /* Sources */, 8D576313048677EA00EA77CD /* Frameworks */, - 0EB496B00D0FC68300E86E0B /* Copy .lang Files */, - 0EF57D6C0D1228E3006084D5 /* Copy .style Files */, - 0E913A110D10B84D0067BAD6 /* Copy .conf Files */, 0E9139D70D10A8320067BAD6 /* Install highlight */, 0ECBBA6F0CFCA39E00416538 /* Copy to Library */, 0E1280381061C3EA0078EC05 /* Reset quicklookd */, @@ -278,7 +224,14 @@ isa = PBXProject; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.0"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 089C166AFE841209C02AAC07 /* QLColorCode */; projectDirPath = ""; projectRoot = ""; @@ -297,6 +250,7 @@ 0EB495D50D0FB13C00E86E0B /* colorize.sh in Resources */, 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, 0EE90E861098CE5800468467 /* Script notes.txt in Resources */, + 0E8FBB64141DA09D00269094 /* override in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/highlight.css b/highlight.css new file mode 100644 index 0000000..4ba7933 --- /dev/null +++ b/highlight.css @@ -0,0 +1,21 @@ +/* Style definition file generated by highlight 2.12, http://www.andre-simon.de/ */ + +/* Highlighting theme definition: */ + +body.hl { background-color:#ffffff; } +pre.hl { color:#000000; background-color:#ffffff; font-size:10pt; font-family:'Courier New';} +.hl.num { color:#2928ff; } +.hl.esc { color:#ff00ff; } +.hl.str { color:#ff0000; } +.hl.dstr { color:#818100; } +.hl.slc { color:#838183; font-style:italic; } +.hl.com { color:#838183; font-style:italic; } +.hl.dir { color:#008200; } +.hl.sym { color:#000000; } +.hl.line { color:#555555; } +.hl.mark { background-color:#ffffbb;} +.hl.kwa { color:#000000; font-weight:bold; } +.hl.kwb { color:#830000; } +.hl.kwc { color:#000000; font-weight:bold; } +.hl.kwd { color:#010181; } + diff --git a/filetypes.conf b/override/config/filetypes.conf similarity index 100% rename from filetypes.conf rename to override/config/filetypes.conf diff --git a/c.lang b/override/langDefs/c.lang similarity index 100% rename from c.lang rename to override/langDefs/c.lang diff --git a/ml.lang b/override/langDefs/ml.lang similarity index 100% rename from ml.lang rename to override/langDefs/ml.lang diff --git a/objc.lang b/override/langDefs/objc.lang similarity index 100% rename from objc.lang rename to override/langDefs/objc.lang diff --git a/ide-xcode.style b/override/themes/ide-xcode.style similarity index 100% rename from ide-xcode.style rename to override/themes/ide-xcode.style diff --git a/slateGreen.style b/override/themes/slateGreen.style similarity index 100% rename from slateGreen.style rename to override/themes/slateGreen.style From a8fae4211aa675b114eacf5ac669f93aeaee979f Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Sun, 11 Sep 2011 19:20:39 -0700 Subject: [PATCH 6/8] Move solarized themes to proper location --- solarized-dark.style => override/themes/solarized-dark.style | 0 solarized-light.style => override/themes/solarized-light.style | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename solarized-dark.style => override/themes/solarized-dark.style (100%) rename solarized-light.style => override/themes/solarized-light.style (100%) diff --git a/solarized-dark.style b/override/themes/solarized-dark.style similarity index 100% rename from solarized-dark.style rename to override/themes/solarized-dark.style diff --git a/solarized-light.style b/override/themes/solarized-light.style similarity index 100% rename from solarized-light.style rename to override/themes/solarized-light.style From da81ae1b8736fa58688e3090ded1357f73f14a5c Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Sun, 11 Sep 2011 22:42:09 -0700 Subject: [PATCH 7/8] Mention solarized themes in readme --- ReadMe.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReadMe.txt b/ReadMe.txt index 255b755..19d8c65 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -30,7 +30,8 @@ the font size: defaults write org.n8gray.QLColorCode fontSizePoints 9 the color style (see http://www.andre-simon.de/dokuwiki/doku.php?id=theme_examples -or try slateGreen to see how I roll): +or try slateGreen to see how I roll. Also included are solarized-light and solarized-dark +as seen at http://ethanschoonover.com/solarized): defaults write org.n8gray.QLColorCode hlTheme ide-xcode any extra command-line flags for Highlight (see below): From eea6f82b7e3ffc3eb88e61190616b99d100d4e4d Mon Sep 17 00:00:00 2001 From: Nathaniel Gray Date: Sat, 9 Feb 2013 21:43:17 -0800 Subject: [PATCH 8/8] Modernize project file to build again. --- QLColorCode.xcodeproj/project.pbxproj | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 0f0c9ab..71fd8f9 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -297,8 +297,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/zsh -x"; - shellScript = "set err_exit\ncd $PROJECT_DIR/highlight\nX='-arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5'\nexport CFLAGS=$X\nexport LDFLAGS=$X\nmake -j 2\n# Make sure it was built universal\nlipo -info src/highlight | grep -q i386 || exit 1\nlipo -info src/highlight | grep -q x86_64 || exit 1\nmake \\\n\tDESTDIR=$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH \\\n\tPREFIX=/highlight/ \\\n\tinstall\n\n"; - showEnvVarsInLog = 0; + shellScript = "set err_exit\ncd $PROJECT_DIR/highlight\nX=\"-arch i386 -arch x86_64 -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET\"\nexport CFLAGS=$X\nexport LDFLAGS=$X\nmake -j 2\n# Make sure it was built universal\nlipo -info src/highlight | grep -q i386 || exit 1\nlipo -info src/highlight | grep -q x86_64 || exit 1\nmake \\\n\tDESTDIR=$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH \\\n\tPREFIX=/highlight/ \\\n\tinstall\n\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -361,10 +360,6 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(DEVELOPER_DIR)/SDKs/MacOSX10.5.sdk/System/Library/Frameworks\"", - ); GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -382,10 +377,6 @@ isa = XCBuildConfiguration; buildSettings = { DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(DEVELOPER_DIR)/SDKs/MacOSX10.5.sdk/System/Library/Frameworks\"", - ); GCC_PRECOMPILE_PREFIX_HEADER = NO; INFOPLIST_FILE = Info.plist; INSTALL_PATH = /Library/QuickLook; @@ -401,8 +392,9 @@ GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + SDKROOT = macosx; }; name = Debug; }; @@ -414,8 +406,9 @@ CURRENT_PROJECT_VERSION = 2.0.2; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.6; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + SDKROOT = macosx; }; name = Release; };