From 75ff2ab95569650574912a8126842540471d08d8 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 19 Nov 2016 21:19:07 +0100 Subject: [PATCH 01/95] Update project settings --- QLColorCode.xcodeproj/project.pbxproj | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 389a4b1..0384d1e 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -353,12 +353,14 @@ 2CA326230896AD4900168862 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; CLANG_ENABLE_MODULES = YES; CLANG_WARN_ASSIGN_ENUM = YES; + CLANG_WARN_CXX0X_EXTENSIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; @@ -381,12 +383,12 @@ GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_VERSION = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_STRICT_SELECTOR_MATCH = YES; @@ -398,14 +400,12 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /Library/QuickLook; MACOSX_DEPLOYMENT_TARGET = 10.12; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = macosx; - VALID_ARCHS = x86_64; WRAPPER_EXTENSION = qlgenerator; }; name = Debug; @@ -413,12 +413,14 @@ 2CA326240896AD4900168862 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; CLANG_ENABLE_MODULES = YES; CLANG_WARN_ASSIGN_ENUM = YES; + CLANG_WARN_CXX0X_EXTENSIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; @@ -438,12 +440,12 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_NO_COMMON_BLOCKS = YES; - GCC_VERSION = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_STRICT_SELECTOR_MATCH = YES; @@ -455,15 +457,12 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /Library/QuickLook; - LLVM_LTO = YES; MACOSX_DEPLOYMENT_TARGET = 10.12; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = macosx; - VALID_ARCHS = x86_64; WRAPPER_EXTENSION = qlgenerator; }; name = Release; From 95e4472f0e3a5c18d3e1557a8c01b69b3259315d Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 19 Nov 2016 21:19:27 +0100 Subject: [PATCH 02/95] Update version number --- rsrc/English.lproj/InfoPlist.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsrc/English.lproj/InfoPlist.strings b/rsrc/English.lproj/InfoPlist.strings index 852fc68..a301b76 100644 --- a/rsrc/English.lproj/InfoPlist.strings +++ b/rsrc/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "QLColorCode version 2.0.7, Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert."; +CFBundleGetInfoString = "QLColorCode version 2.0.8, Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert."; NSHumanReadableCopyright = "Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert."; From 29065fa0ac9fd2be401b1eafe4cb2ba8ed3b9e75 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 19 Nov 2016 21:22:23 +0100 Subject: [PATCH 03/95] Add public.text UTI --- Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/Info.plist b/Info.plist index 6fa78d0..e0470ee 100644 --- a/Info.plist +++ b/Info.plist @@ -21,6 +21,7 @@ com.sun.java-class org.vim.vim-script public.tex + public.text From fc4bba885a3cedaebade1d5f0fdd80641113d9a1 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 19 Nov 2016 21:25:00 +0100 Subject: [PATCH 04/95] Add public.json UTI --- Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/Info.plist b/Info.plist index e0470ee..e37125a 100644 --- a/Info.plist +++ b/Info.plist @@ -22,6 +22,7 @@ org.vim.vim-script public.tex public.text + public.json From a4d9b28dc16235af2ac23be373bb489288b9bef6 Mon Sep 17 00:00:00 2001 From: Lance E Sloan Date: Wed, 1 Feb 2017 14:00:04 -0500 Subject: [PATCH 05/95] Adding PHP and JavaScript types I don't know whether others have the same problem, but I needed to add these types in order to view PHP and JavaScript code with QLColorCode. --- Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Info.plist b/Info.plist index e37125a..847d747 100644 --- a/Info.plist +++ b/Info.plist @@ -12,6 +12,8 @@ LSItemContentTypes public.source-code + public.php-script + com.netscape.javascript-source public.css com.apple.applescript.script public.xml From 6259b606ae419dfd9ad9acd33b896563579bc786 Mon Sep 17 00:00:00 2001 From: Lance E Sloan Date: Wed, 1 Feb 2017 14:28:53 -0500 Subject: [PATCH 06/95] Explain how to add other file types I don't know whether others have the same problem, but I needed to some types in order to view PHP and JavaScript code with QLColorCode. These are the steps I followed. --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index d610dfa..0687ef7 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,47 @@ desktop then back to its installed location should do the trick. As an aside, by changing colorize.sh you can use this plugin to render any file type that you can convert to HTML. Have fun, and let me know if you do anything cool! + +### Adding Language Types + +If QLColorCode doesn't display PHP and JavaScript code properly, their types may +need to be added to Info.plist. Finding the right type string to use is the +tricky part. Getting the type strings and getting Info.plist edits to take effect +is easy by following the following steps showing how to add support for PHP: + +0. In Terminal.app (or any shell prompt), enter the command: + + ``` bash + mdls -name kMDItemContentType /full/path/to/file.php + ``` + + Use the path to any PHP file. The response will be: + + ``` txt + kMDItemContentType = "public.php-script" + ``` + + The string `public.php-script` is the type string needed in a later step. + +0. Again at a shell prompt, enter the command: + + ``` bash + open ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist + ``` + + This will open Info.plist in Xcode.app. + +0. In Xcode.app's edit window for Info.plist, go to: + + Document types > Item 0 > Document Content Type UTIs + + (If the editor is showing raw keys, that's: + CFBundleDocumentTypes > Item 0 > LSItemContentTypes) + +0. Add an item for `public.php-script`, the type string found in the first step. + +0. Save the updated Info.plist file. + +0. Try it in Finder. (It's usually unnecessary to move/return the qlgenerator + extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising + that some users might need to do so.) From f703c2c9bf6390538a1424ab7d1b81fe6f0885d4 Mon Sep 17 00:00:00 2001 From: Lance E Sloan Date: Wed, 1 Feb 2017 14:35:15 -0500 Subject: [PATCH 07/95] Changed section heading, added summary --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0687ef7..110ca2a 100644 --- a/README.md +++ b/README.md @@ -123,12 +123,12 @@ As an aside, by changing colorize.sh you can use this plugin to render any file type that you can convert to HTML. Have fun, and let me know if you do anything cool! -### Adding Language Types +##### Adding Language Types If QLColorCode doesn't display PHP and JavaScript code properly, their types may need to be added to Info.plist. Finding the right type string to use is the tricky part. Getting the type strings and getting Info.plist edits to take effect -is easy by following the following steps showing how to add support for PHP: +is easy by following the steps below, which explain how to add support for PHP: 0. In Terminal.app (or any shell prompt), enter the command: @@ -163,6 +163,11 @@ is easy by following the following steps showing how to add support for PHP: 0. Save the updated Info.plist file. -0. Try it in Finder. (It's usually unnecessary to move/return the qlgenerator +0. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising that some users might need to do so.) + +The Info.plist included with this version of QLColorCode already contains types +for PHP and JavaScript code, but these steps show how easy it is to add other +types. (Maybe somebody will develop a Preference Pane for QLColorCode to make +this even easier.) From 9a0ce714f5448107a0126bb39d0cdd971387bce9 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 11 Feb 2017 14:30:38 +0100 Subject: [PATCH 08/95] bump version number --- QLColorCode.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 0384d1e..c34d908 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -375,7 +375,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.0.8; + CURRENT_PROJECT_VERSION = 2.0.9beta; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -434,7 +434,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 2.0.8; + CURRENT_PROJECT_VERSION = 2.0.9beta; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From dca97f50bc79d05e573fbc455306e9da94b649a2 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 11 Feb 2017 14:30:51 +0100 Subject: [PATCH 09/95] Add C#/F# support --- Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Info.plist b/Info.plist index 847d747..f88ae1d 100644 --- a/Info.plist +++ b/Info.plist @@ -14,6 +14,8 @@ public.source-code public.php-script com.netscape.javascript-source + com.microsoft.c-sharp + com.microsoft.f-sharp public.css com.apple.applescript.script public.xml From 3259839e80ee326faa93be957f20264e4c7bd180 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 11 Feb 2017 14:34:57 +0100 Subject: [PATCH 10/95] Fix #24 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 110ca2a..d9d4af4 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Here are some useful 'highlight' command-line flags (from the man page): -j, --line-number-length= line number length incl. left padding - -l, --linenumbers + -l, --line-numbers print line numbers in output file -t --replace-tabs= From 809e4e6f4b2939eaab124be25620c749dca2d83d Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sat, 11 Feb 2017 14:44:43 +0100 Subject: [PATCH 11/95] Update CHANGELOG --- CHANGELOG | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7c37ece..ca7e214 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +2.0.9 (in dev.): + * Add PHP/JS support (thanks @sloanlance). + * Add C#/F# support (thanks @breiter). + +2.0.8: + * Remove bash_ref_linuxmanpages_com plugin. + 2.0.7: * Correct autodetect path on 10.11 (thanks @cc941201). * Correct LaTeX and Arduino support. From 2d9ed288f37e4ec0ce63d109996441cbb42e7d59 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Mon, 2 Oct 2017 12:17:32 +0200 Subject: [PATCH 12/95] Add 10.13 support --- CHANGELOG | 1 + QLColorCode.xcodeproj/project.pbxproj | 37 ++++++++++--------- .../xcshareddata/xcschemes/Travis.xcscheme | 4 +- rsrc/English.lproj/InfoPlist.strings | 4 +- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ca7e214..b38bd98 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ 2.0.9 (in dev.): * Add PHP/JS support (thanks @sloanlance). * Add C#/F# support (thanks @breiter). + * Compile with XCode 9.0 targeting 10.13. 2.0.8: * Remove bash_ref_linuxmanpages_com plugin. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index c34d908..c97bc93 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -24,7 +24,6 @@ /* Begin PBXBuildFile section */ 0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; }; 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; - 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; C86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; }; EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */ = {isa = PBXBuildFile; fileRef = EA43671615F6BF9C009DA6C0 /* colorize.sh */; }; EA43671D15F6BF9C009DA6C0 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = EA43671715F6BF9C009DA6C0 /* Common.h */; }; @@ -206,7 +205,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.2"; @@ -233,7 +232,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */, EA43672515F6C00B009DA6C0 /* English.lproj in Resources */, EA43672F15F6C1B8009DA6C0 /* CHANGELOG in Resources */, @@ -297,17 +295,6 @@ }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - ); - name = InfoPlist.strings; - path = /Users/tony/Documents/Projects/qlcolorcode; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 0E0E34EA0D0097020086C1E6 /* Debug */ = { isa = XCBuildConfiguration; @@ -354,12 +341,17 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; + CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; CLANG_ENABLE_MODULES = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES; CLANG_WARN_ASSIGN_ENUM = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CXX0X_EXTENSIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -370,12 +362,14 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.0.9beta; + CURRENT_PROJECT_VERSION = 2.0.9; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -400,7 +394,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -414,12 +408,17 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; + CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; CLANG_ENABLE_MODULES = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES; CLANG_WARN_ASSIGN_ENUM = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CXX0X_EXTENSIONS = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -430,11 +429,13 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 2.0.9beta; + CURRENT_PROJECT_VERSION = 2.0.9; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -457,7 +458,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme index 1833a2f..df8b93a 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Release" selectedDebuggerIdentifier = "" selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/rsrc/English.lproj/InfoPlist.strings b/rsrc/English.lproj/InfoPlist.strings index a301b76..284d8c9 100644 --- a/rsrc/English.lproj/InfoPlist.strings +++ b/rsrc/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "QLColorCode version 2.0.8, Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert."; -NSHumanReadableCopyright = "Copyright (c) 2016 Nathaniel Gray, Anthony Gelibert."; +CFBundleGetInfoString = "QLColorCode version 2.0.9, Copyright (c) 2017 Nathaniel Gray, Anthony Gelibert."; +NSHumanReadableCopyright = "Copyright (c) 2017 Nathaniel Gray, Anthony Gelibert."; From 1c4c2321cb7f267f9da499433b87532b160d7f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KARASZI=20Istv=C3=A1n?= Date: Mon, 30 Oct 2017 23:26:30 +0100 Subject: [PATCH 13/95] Add dyn.ah62d4rv4ge81g6pq for SQL --- Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Info.plist b/Info.plist index f88ae1d..08065b3 100644 --- a/Info.plist +++ b/Info.plist @@ -27,6 +27,7 @@ public.tex public.text public.json + dyn.ah62d4rv4ge81g6pq @@ -261,6 +262,7 @@ UTTypeConformsTo public.source-code + dyn.ah62d4rv4ge81g6pq UTTypeDescription SQL Source File From ca88a2e78d926bcb8459814a515735cbebc87660 Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Tue, 28 Nov 2017 18:43:56 +0100 Subject: [PATCH 14/95] Fix bash/zsh warnings in colorize.sh --- src/colorize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/colorize.sh b/src/colorize.sh index 202af95..a84fcc8 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -126,7 +126,7 @@ go4it () { cmdOpts=(${plugin} --plug-in outhtml_codefold --syntax=${lang} --quiet --include-style --font=${font} --font-size=${fontSizePoints} --style=${hlTheme} --encoding=${textEncoding} ${=extraHLFlags} --validate-input) debug "Generating the preview" - if [ ${thumb} = "1" ]; then + if [ "${thumb}" = "1" ]; then ${reader} | head -n 100 | head -c 20000 | ${cmd} ${cmdOpts} && exit 0 elif [ -n "${maxFileSize}" ]; then ${reader} | head -c ${maxFileSize} | ${cmd} -T "${target}" ${cmdOpts} && exit 0 From 08564138fc024f0675a50e05fb6d8651beee3c32 Mon Sep 17 00:00:00 2001 From: sonique6784 Date: Sat, 21 Apr 2018 22:19:15 +1000 Subject: [PATCH 15/95] added Kotlin support --- Info.plist | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Info.plist b/Info.plist index 08065b3..561b7a1 100644 --- a/Info.plist +++ b/Info.plist @@ -28,6 +28,7 @@ public.text public.json dyn.ah62d4rv4ge81g6pq + dyn.ah62d4rv4ge8007a @@ -1043,6 +1044,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge8007a + + UTTypeDescription + Kotlin Source File + UTTypeIdentifier + org.kotlinlang.source + UTTypeTagSpecification + + public.filename-extension + + kt + + + From 95fd69c5318b5967e9f13d11d14a9e4fa626428b Mon Sep 17 00:00:00 2001 From: sonique6784 Date: Sat, 21 Apr 2018 22:25:27 +1000 Subject: [PATCH 16/95] added how to install highlight --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d9d4af4..f4a550e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ This is a Quick Look plugin that renders source code with syntax highlighting, using the [Highlight library](http://www.andre-simon.de). +To install Highlight, [download the library manualy](http://www.andre-simon.de/zip/download.php), or use homebrew `brew install highlight` + To install the plugin, just drag it to `~/Library/QuickLook`. You may need to create that folder if it doesn't already exist. From b5324e564c90a6354f9c9856c4490968ba88374d Mon Sep 17 00:00:00 2001 From: sonique6784 Date: Sat, 21 Apr 2018 22:33:21 +1000 Subject: [PATCH 17/95] added gradle support --- Info.plist | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Info.plist b/Info.plist index 561b7a1..bc1210c 100644 --- a/Info.plist +++ b/Info.plist @@ -29,6 +29,7 @@ public.json dyn.ah62d4rv4ge81g6pq dyn.ah62d4rv4ge8007a + dyn.ah62d4rv4ge80s6xbqv0gn @@ -1061,6 +1062,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge80s6xbqv0gn + + UTTypeDescription + Gradle Source File + UTTypeIdentifier + org.gradle.source + UTTypeTagSpecification + + public.filename-extension + + gradle + + + From 2e8197506ffde4078fba9a8c78f69d04dfb99791 Mon Sep 17 00:00:00 2001 From: erdtsksn Date: Sun, 7 Jan 2018 18:33:43 +0300 Subject: [PATCH 18/95] feat: Delete json support for quicklook-json why: It is conflicted with quicklook-json oth: We may have a option to activate or deactivate qlcolorcode for some file types see: http://www.sagtau.com/quicklookjson.html --- Info.plist | 1 - 1 file changed, 1 deletion(-) diff --git a/Info.plist b/Info.plist index bc1210c..679ae42 100644 --- a/Info.plist +++ b/Info.plist @@ -26,7 +26,6 @@ org.vim.vim-script public.tex public.text - public.json dyn.ah62d4rv4ge81g6pq dyn.ah62d4rv4ge8007a dyn.ah62d4rv4ge80s6xbqv0gn From 7f7ba22d66e27a1de6ac833b41de58cc15dc4f65 Mon Sep 17 00:00:00 2001 From: "Deneys S. Maartens" Date: Sun, 31 Dec 2017 10:40:48 +0200 Subject: [PATCH 19/95] Remove trailing spaces --- src/Common.m | 34 +++++++++++++-------------- src/GeneratePreviewForURL.m | 30 ++++++++++++------------ src/GenerateThumbnailForURL.m | 44 +++++++++++++++++------------------ 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/Common.m b/src/Common.m index 1c830bd..5efca97 100644 --- a/src/Common.m +++ b/src/Common.m @@ -4,7 +4,7 @@ * * Created by Nathaniel Gray on 12/6/07. * Copyright 2007 Nathaniel Gray. - * + * * Modified by Anthony Gelibert on 9/5/12. * Copyright 2012 Anthony Gelibert. */ @@ -23,28 +23,28 @@ [task setEnvironment:env]; [task setLaunchPath:@"/bin/sh"]; [task setArguments:[NSArray arrayWithObjects:@"-c", script, nil]]; - + NSPipe *pipe; pipe = [NSPipe pipe]; [task setStandardOutput: pipe]; // Let stderr go to the usual place //[task setStandardError: pipe]; - + NSFileHandle *file; file = [pipe fileHandleForReading]; - + [task launch]; - + NSData *data; data = [file readDataToEndOfFile]; [task waitUntilExit]; - + *exitCode = [task terminationStatus]; [task release]; /* The docs claim this isn't needed, but we leak descriptors otherwise */ [file closeFile]; /*[pipe release];*/ - + return data; } @@ -66,17 +66,17 @@ n8log(@"url = %@", url); NSString *targetEsc = pathOfURL(url); n8log(@"targetEsc = %@", targetEsc); - + // Set up preferences NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - + NSMutableDictionary *env = [NSMutableDictionary dictionaryWithDictionary: [[NSProcessInfo processInfo] environment]]; NSString *path = [env objectForKey: @"PATH"]; NSString *newPath = [path stringByAppendingString: @":/usr/local/bin:/usr/local/sbin"]; [env setObject: newPath forKey: @"PATH"]; - + // Try to find highlight location NSString *highlightPath = [[defaults persistentDomainForName:myDomain] valueForKey:@"pathHL"]; if (highlightPath == nil) { @@ -91,7 +91,7 @@ } [userDefaults release]; } - + [env addEntriesFromDictionary:[NSDictionary dictionaryWithObjectsAndKeys: #ifdef DEBUG @"1", @"qlcc_debug", @@ -99,15 +99,15 @@ @"10", @"fontSizePoints", @"Menlo", @"font", @"edit-xcode", @"hlTheme", -// @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags", - @"-t 4 --kw-case=capitalize ", @"extraHLFlags", +// @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags", + @"-t 4 --kw-case=capitalize ", @"extraHLFlags", @"/opt/local/bin/highlight", @"pathHL", @"", @"maxFileSize", - @"UTF-8", @"textEncoding", + @"UTF-8", @"textEncoding", @"UTF-8", @"webkitTextEncoding", nil]]; [env addEntriesFromDictionary:[defaults persistentDomainForName:myDomain]]; - + // This overrides hlTheme if hlThumbTheme is set and we're generating a thumbnail // (This way we won't irritate people with existing installs) // Admittedly, it's a little shady, overriding the set value, but I'd rather complicate the compiled code @@ -119,10 +119,10 @@ @"'%@/colorize.sh' '%@' '%@' %s", rsrcEsc, rsrcEsc, [targetEsc stringByReplacingOccurrencesOfString:@"'" withString:@"'\\''"], thumbnail ? "1" : "0"]; n8log(@"cmd = %@", cmd); - + output = runTask(cmd, env, status); if (*status != 0) { - NSLog(@"QLColorCode: colorize.sh failed with exit code %d. Command was (%@).", + NSLog(@"QLColorCode: colorize.sh failed with exit code %d. Command was (%@).", *status, cmd); } return output; diff --git a/src/GeneratePreviewForURL.m b/src/GeneratePreviewForURL.m index 087e89b..de797a4 100644 --- a/src/GeneratePreviewForURL.m +++ b/src/GeneratePreviewForURL.m @@ -1,4 +1,4 @@ -/* This code is copyright Nathaniel Gray, licensed under the GPL v3. +/* This code is copyright Nathaniel Gray, licensed under the GPL v3. See LICENSE.txt for details. */ #import @@ -10,12 +10,12 @@ /* ----------------------------------------------------------------------------- Generate a preview for file - + This function's job is to create preview for designated file ----------------------------------------------------------------------------- */ -OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, - CFURLRef url, CFStringRef contentTypeUTI, +OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, + CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options) { #ifdef DEBUG @@ -24,34 +24,34 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, n8log(@"Generating Preview"); if (QLPreviewRequestIsCancelled(preview)) return noErr; - + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - + // Invoke colorize.sh CFBundleRef bundle = QLPreviewRequestGetGeneratorBundle(preview); int status; NSData *output = colorizeURL(bundle, url, &status, 0); - n8log(@"Generated preview html page in %.3f sec", + n8log(@"Generated preview html page in %.3f sec", -[startDate timeIntervalSinceNow] ); - + if (status != 0 || QLPreviewRequestIsCancelled(preview)) { #ifndef DEBUG goto done; #endif } // Now let WebKit do its thing - NSString *textEncoding = [[NSUserDefaults standardUserDefaults] + NSString *textEncoding = [[NSUserDefaults standardUserDefaults] stringForKey:@"webkitTextEncoding"]; if (!textEncoding || [textEncoding length] == 0) - textEncoding = @"UTF-8"; - CFDictionaryRef properties = - (CFDictionaryRef)[NSDictionary dictionaryWithObject:textEncoding + textEncoding = @"UTF-8"; + CFDictionaryRef properties = + (CFDictionaryRef)[NSDictionary dictionaryWithObject:textEncoding forKey:(NSString *)kQLPreviewPropertyTextEncodingNameKey]; - QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, + QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, //kUTTypePlainText, - kUTTypeHTML, + kUTTypeHTML, properties); - + #ifndef DEBUG done: #endif diff --git a/src/GenerateThumbnailForURL.m b/src/GenerateThumbnailForURL.m index f9c5208..691eee6 100644 --- a/src/GenerateThumbnailForURL.m +++ b/src/GenerateThumbnailForURL.m @@ -14,12 +14,12 @@ This function's job is to create thumbnail for designated file as fast as possible ----------------------------------------------------------------------------- */ -OSStatus -GenerateThumbnailForURL(void *thisInterface, - QLThumbnailRequestRef thumbnail, - CFURLRef url, - CFStringRef contentTypeUTI, - CFDictionaryRef options, +OSStatus +GenerateThumbnailForURL(void *thisInterface, + QLThumbnailRequestRef thumbnail, + CFURLRef url, + CFStringRef contentTypeUTI, + CFDictionaryRef options, CGSize maxSize) { n8log(@"Generating Thumbnail"); @@ -31,16 +31,16 @@ #ifdef DEBUG NSDate *startDate = [NSDate date]; #endif - - // Render as though there is an 600x800 window, and fill the thumbnail + + // Render as though there is an 600x800 window, and fill the thumbnail // vertically. This code could be more general. I'm assuming maxSize is // a square, though nothing horrible should happen if it isn't. - + NSRect renderRect = NSMakeRect(0.0, 0.0, 600.0, 800.0); float scale = (float)(maxSize.height/800.0); NSSize scaleSize = NSMakeSize(scale, scale); CGSize thumbSize = NSSizeToCGSize( - NSMakeSize((maxSize.width * (600.0/800.0)), + NSMakeSize((maxSize.width * (600.0/800.0)), maxSize.height)); /* Based on example code from quicklook-dev mailing list */ @@ -63,33 +63,33 @@ WebView* webView = [[WebView alloc] initWithFrame:renderRect]; [webView scaleUnitSquareToSize:scaleSize]; [[[webView mainFrame] frameView] setAllowsScrolling:NO]; - + [[webView mainFrame] loadData:data MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:nil]; - + while([webView isLoading]) { CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true); } - + // Get a context to render into - CGContextRef context = + CGContextRef context = QLThumbnailRequestCreateContext(thumbnail, thumbSize, false, NULL); - + if(context != NULL) { - NSGraphicsContext* nsContext = + NSGraphicsContext* nsContext = [NSGraphicsContext - graphicsContextWithGraphicsPort:(void *)context + graphicsContextWithGraphicsPort:(void *)context flipped:[webView isFlipped]]; - + [webView displayRectIgnoringOpacity:[webView bounds] inContext:nsContext]; - + QLThumbnailRequestFlushContext(thumbnail, context); - + CFRelease(context); } [webView release]; - + #ifndef DEBUG done: #endif @@ -100,7 +100,7 @@ return noErr; } -void CancelThumbnailGeneration(void* thisInterface, +void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail) { // implement only if supported From e86d87afcd2d90417774a03a1880492a7ab9be63 Mon Sep 17 00:00:00 2001 From: "Deneys S. Maartens" Date: Sun, 31 Dec 2017 11:04:50 +0200 Subject: [PATCH 20/95] GeneratePreviewForURL.m: add RTF conversion --- README.md | 6 ++++++ src/GeneratePreviewForURL.m | 23 +++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f4a550e..8a6b1f6 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,12 @@ Here are some useful 'highlight' command-line flags (from the man page): defaults write org.n8gray.QLColorCode pathHL /path/to/your/highlight +It is also possible to have the HTML preview converted to RTF. Using RTF +allows the contents of the file to be displayed instead of an icon -- similar +to QLStephen. + + defaults write org.n8gray.QLColorCode rtfRender true + ## Additional information ### Additional features diff --git a/src/GeneratePreviewForURL.m b/src/GeneratePreviewForURL.m index de797a4..f3b991b 100644 --- a/src/GeneratePreviewForURL.m +++ b/src/GeneratePreviewForURL.m @@ -5,6 +5,7 @@ #import #import #import +#import #import "Common.h" @@ -34,6 +35,19 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, n8log(@"Generated preview html page in %.3f sec", -[startDate timeIntervalSinceNow] ); + NSData *rtf = nil; + NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:myDomain]; + BOOL use_rtf = [defaults boolForKey:@"rtfPreview"]; + [defaults release]; + + if (use_rtf) { + NSDictionary *attrs; + NSAttributedString *string = [[NSAttributedString alloc] initWithHTML:output documentAttributes:&attrs]; + NSRange range = NSMakeRange(0, [string length]); + rtf = [string RTFFromRange:range documentAttributes:attrs]; + [string release]; + } + if (status != 0 || QLPreviewRequestIsCancelled(preview)) { #ifndef DEBUG goto done; @@ -47,10 +61,11 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFDictionaryRef properties = (CFDictionaryRef)[NSDictionary dictionaryWithObject:textEncoding forKey:(NSString *)kQLPreviewPropertyTextEncodingNameKey]; - QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, - //kUTTypePlainText, - kUTTypeHTML, - properties); + + if (use_rtf) + QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)rtf, kUTTypeRTF, properties); + else + QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, kUTTypeHTML, properties); #ifndef DEBUG done: From 93ce0b145bcb67959b1afaeadc91862b1b181322 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 19 Jun 2018 14:11:19 +0200 Subject: [PATCH 21/95] Add support for the latest XCode --- QLColorCode.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/xcschemes/Travis.xcscheme | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index c97bc93..f92ada4 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -205,7 +205,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.2"; @@ -299,6 +299,7 @@ 0E0E34EA0D0097020086C1E6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; @@ -312,6 +313,7 @@ 0E0E34EB0D0097020086C1E6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -325,6 +327,7 @@ 2CA3261F0896AD4900168862 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; OTHER_CFLAGS = "-DDEBUG"; }; @@ -333,6 +336,7 @@ 2CA326200896AD4900168862 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; }; name = Release; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme index df8b93a..0148541 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Release" selectedDebuggerIdentifier = "" selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" From 120f0a4539c2d797aedc2f084002233cdfcc0108 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 19 Jun 2018 14:11:32 +0200 Subject: [PATCH 22/95] Add reduce_filesize plugin by default --- src/colorize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/colorize.sh b/src/colorize.sh index a84fcc8..08c50e0 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -123,7 +123,7 @@ esac debug "Resolved ${target} to language $lang" go4it () { - cmdOpts=(${plugin} --plug-in outhtml_codefold --syntax=${lang} --quiet --include-style --font=${font} --font-size=${fontSizePoints} --style=${hlTheme} --encoding=${textEncoding} ${=extraHLFlags} --validate-input) + cmdOpts=(--plug-in reduce_filesize ${plugin} --plug-in outhtml_codefold --syntax=${lang} --quiet --include-style --font=${font} --font-size=${fontSizePoints} --style=${hlTheme} --encoding=${textEncoding} ${=extraHLFlags} --validate-input) debug "Generating the preview" if [ "${thumb}" = "1" ]; then From afcd54301797b8c9f6331bd28eadb843d1c217fc Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 19 Jun 2018 14:12:27 +0200 Subject: [PATCH 23/95] Add new languages --- CHANGELOG | 6 ++++++ Info.plist | 34 ++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b38bd98..f01569e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ * Add PHP/JS support (thanks @sloanlance). * Add C#/F# support (thanks @breiter). * Compile with XCode 9.0 targeting 10.13. + * Add Kotlin/Gradle (thanks @sonique6784). + * Remove JSON support (thanks @erdtsksn). + * Add option to preview file as RTF (thanks @silum). + * Add C# support. + * Add Scala support. + * Add "reduce_filesize" plugin by default. 2.0.8: * Remove bash_ref_linuxmanpages_com plugin. diff --git a/Info.plist b/Info.plist index 679ae42..2c46e89 100644 --- a/Info.plist +++ b/Info.plist @@ -29,6 +29,8 @@ dyn.ah62d4rv4ge81g6pq dyn.ah62d4rv4ge8007a dyn.ah62d4rv4ge80s6xbqv0gn + dyn.ah62d4rv4ge81g25brvuu + dyn.ah62d4rv4ge80g62 @@ -1062,22 +1064,22 @@ - UTTypeConformsTo - - dyn.ah62d4rv4ge80s6xbqv0gn - - UTTypeDescription - Gradle Source File - UTTypeIdentifier - org.gradle.source - UTTypeTagSpecification - - public.filename-extension - - gradle - - - + UTTypeConformsTo + + dyn.ah62d4rv4ge80s6xbqv0gn + + UTTypeDescription + Gradle Source File + UTTypeIdentifier + org.gradle.source + UTTypeTagSpecification + + public.filename-extension + + gradle + + + From 3ce3bce0255a525a22682638f5e7f96e3ad01895 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 19 Jun 2018 14:17:04 +0200 Subject: [PATCH 24/95] Update copyright year --- src/colorize.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/colorize.sh b/src/colorize.sh index 08c50e0..526c3f5 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -4,7 +4,7 @@ # This code is licensed under the GPL v3. See LICENSE.txt for details. # # Copyright 2007 Nathaniel Gray. -# Copyright 2012-2016 Anthony Gelibert. +# Copyright 2012-2018 Anthony Gelibert. # # Expects $1 = path to resources dir of bundle # $2 = name of file to colorize From b2fd596dcfef28e42431b859187bec49edce70a3 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 19 Jun 2018 14:17:27 +0200 Subject: [PATCH 25/95] Update QLColorCode version --- CHANGELOG | 12 +++++++----- QLColorCode.xcodeproj/project.pbxproj | 6 ++++-- rsrc/English.lproj/InfoPlist.strings | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f01569e..7f7933e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,14 +1,16 @@ -2.0.9 (in dev.): - * Add PHP/JS support (thanks @sloanlance). - * Add C#/F# support (thanks @breiter). - * Compile with XCode 9.0 targeting 10.13. +2.1.0: + * Add option to preview file as RTF (thanks @silum). * Add Kotlin/Gradle (thanks @sonique6784). * Remove JSON support (thanks @erdtsksn). - * Add option to preview file as RTF (thanks @silum). * Add C# support. * Add Scala support. * Add "reduce_filesize" plugin by default. +2.0.9: + * Add PHP/JS support (thanks @sloanlance). + * Add C#/F# support (thanks @breiter). + * Compile with XCode 9.0 targeting 10.13. + 2.0.8: * Remove bash_ref_linuxmanpages_com plugin. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index f92ada4..d3f1bb1 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -344,6 +344,7 @@ 2CA326230896AD4900168862 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -373,7 +374,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.0.9; + CURRENT_PROJECT_VERSION = 2.1.0; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -411,6 +412,7 @@ 2CA326240896AD4900168862 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -439,7 +441,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 2.0.9; + CURRENT_PROJECT_VERSION = 2.1.0; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; diff --git a/rsrc/English.lproj/InfoPlist.strings b/rsrc/English.lproj/InfoPlist.strings index 284d8c9..12f77e3 100644 --- a/rsrc/English.lproj/InfoPlist.strings +++ b/rsrc/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "QLColorCode version 2.0.9, Copyright (c) 2017 Nathaniel Gray, Anthony Gelibert."; -NSHumanReadableCopyright = "Copyright (c) 2017 Nathaniel Gray, Anthony Gelibert."; +CFBundleGetInfoString = "QLColorCode version 2.1.0, Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; +NSHumanReadableCopyright = "Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; From 00336900c6edbab0c583ade54d06aae208419da3 Mon Sep 17 00:00:00 2001 From: Okan Esen Date: Tue, 19 Jun 2018 22:15:38 +0200 Subject: [PATCH 26/95] Fix broken link in `all available themes` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a6b1f6..7115680 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Setting the font size (default is `10`): defaults write org.n8gray.QLColorCode fontSizePoints 9 -Setting the color style (default is `edit-xcode`, see [all available themes](http://www.andre-simon.de/dokuwiki/doku.php?id=theme_examples)): +Setting the color style (default is `edit-xcode`, see [all available themes](http://www.andre-simon.de/doku/highlight/theme-samples.php)): defaults write org.n8gray.QLColorCode hlTheme ide-xcode From b17fc5308b5a6631c7a0f85652b84c64ef4c720d Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Fri, 13 Jul 2018 20:18:58 +0200 Subject: [PATCH 27/95] Bump version number --- QLColorCode.xcodeproj/project.pbxproj | 4 ++-- rsrc/English.lproj/InfoPlist.strings | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index d3f1bb1..fa9b139 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -374,7 +374,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 2.1.0; + CURRENT_PROJECT_VERSION = "2.1.1+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -441,7 +441,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 2.1.0; + CURRENT_PROJECT_VERSION = "2.1.1+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; diff --git a/rsrc/English.lproj/InfoPlist.strings b/rsrc/English.lproj/InfoPlist.strings index 12f77e3..ca6ff4d 100644 --- a/rsrc/English.lproj/InfoPlist.strings +++ b/rsrc/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "QLColorCode version 2.1.0, Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; +CFBundleGetInfoString = "QLColorCode version 2.1.1+dev, Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; NSHumanReadableCopyright = "Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; From 4e6d85e9aa0f4931865dde785db9a0a036947ac0 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Fri, 13 Jul 2018 20:19:14 +0200 Subject: [PATCH 28/95] Add Go and JetBrain IML support --- CHANGELOG | 4 ++++ Info.plist | 20 ++++++++++++++++++++ src/colorize.sh | 3 +++ 3 files changed, 27 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7f7933e..434e47f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2.1.1 (WIP): + * Add JetBrain IML Project file support. + * Add Go support (in ~/Library/QuickLook). + 2.1.0: * Add option to preview file as RTF (thanks @silum). * Add Kotlin/Gradle (thanks @sonique6784). diff --git a/Info.plist b/Info.plist index 2c46e89..acfa0fd 100644 --- a/Info.plist +++ b/Info.plist @@ -31,6 +31,8 @@ dyn.ah62d4rv4ge80s6xbqv0gn dyn.ah62d4rv4ge81g25brvuu dyn.ah62d4rv4ge80g62 + dyn.ah62d4rv4ge80w5pq + dyn.ah62d4rv4ge80s52 @@ -426,6 +428,7 @@ UTTypeConformsTo public.source-code + dyn.ah62d4rv4ge80s52 UTTypeDescription Go Source File @@ -1080,6 +1083,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge80w5pq + + UTTypeDescription + JetBrain Project File + UTTypeIdentifier + com.jetbrain.source + UTTypeTagSpecification + + public.filename-extension + + iml + + + diff --git a/src/colorize.sh b/src/colorize.sh index 526c3f5..8e4c3d2 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -38,6 +38,9 @@ case ${target} in *.graffle | *.ps ) exit 1 ;; + *.iml ) + lang=xml + ;; *.d ) lang=make ;; From ef0edddfb4cc4e03aefb2103dd5f504cd8b0991b Mon Sep 17 00:00:00 2001 From: Nimesh Neema Date: Thu, 20 Sep 2018 19:57:20 +0530 Subject: [PATCH 29/95] Fixed certain typos. Zapped redundant spaces. --- README.md | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7115680..25468d0 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,21 @@ **Original project:** -This is a Quick Look plugin that renders source code with syntax highlighting, +This is a Quick Look plug-in that renders source code with syntax highlighting, using the [Highlight library](http://www.andre-simon.de). -To install Highlight, [download the library manualy](http://www.andre-simon.de/zip/download.php), or use homebrew `brew install highlight` +To install Highlight, [download the library manually](http://www.andre-simon.de/zip/download.php), or use Homebrew `brew install highlight` -To install the plugin, just drag it to `~/Library/QuickLook`. +To install the plug-in, just drag it to `~/Library/QuickLook`. You may need to create that folder if it doesn't already exist. -Alternative, if you use [Homebrew-Cask](https://github.com/caskroom/homebrew-cask), +Alternative, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cask), install with `brew cask install qlcolorcode`. ## Settings If you want to configure `QLColorCode`, there are several `defaults` commands that could be useful: -Setting the text encoding (default is `UTF-8`). Two settings are required. The first sets Highlight's encoding, the second sets Webkit's: +Setting the text encoding (default is `UTF-8`). Two settings are required. The first sets Highlight's encoding, the second sets Webkit's: defaults write org.n8gray.QLColorCode textEncoding UTF-16 defaults write org.n8gray.QLColorCode webkitTextEncoding UTF-16 @@ -78,11 +78,11 @@ Here are some useful 'highlight' command-line flags (from the man page): --kw-case= control case of case insensitive keywords -**Warning:** my fork uses an external `Highlight`. It will attempt to find `highlight` on your `PATH` (so it should work out of the box for homebrew and MacPorts), but if it can't find it, it'll use `/opt/local/bin/highlight` (MacPorts default). This can be changed: +**Warning:** my fork uses an external `Highlight`. It will attempt to find `highlight` on your `PATH` (so it should work out of the box for Homebrew and MacPorts), but if it can't find it, it'll use `/opt/local/bin/highlight` (MacPorts default). This can be changed: defaults write org.n8gray.QLColorCode pathHL /path/to/your/highlight -It is also possible to have the HTML preview converted to RTF. Using RTF +It is also possible to have the HTML preview converted to RTF. Using RTF allows the contents of the file to be displayed instead of an icon -- similar to QLStephen. @@ -102,9 +102,9 @@ QLColorCode decompiles some formats: ### Highlight -#### Plugins +#### Plug-ins -QLColorCode enables some Highlight plugins : +QLColorCode enables some Highlight plug-ins : - In all languages: `outhtml_modern_fonts` and `outhtml_codefold`. - Java (sources and classes): `java_library`. @@ -115,27 +115,27 @@ QLColorCode enables some Highlight plugins : - Scala: `scala_ref_scala_lang_org`. #### Handled languages -Highlight can handle lots and lots of languages, but this plugin will only be -invoked for file types that the OS knows are type "source-code". Since the OS +Highlight can handle lots and lots of languages, but this plug-in will only be +invoked for file types that the OS knows are type "source-code". Since the OS only knows about a limited number of languages, I've added Universal Type -Identifier (UTI) declarations for several "interesting" languages. If I've +Identifier (UTI) declarations for several "interesting" languages. If I've missed your favorite language, take a look at the Info.plist file inside the -plugin bundle and look for the UTImportedTypeDeclarations section. I +plug-in bundle and look for the UTImportedTypeDeclarations section. I haven't added all the languages that Highlight can handle because it's rumored that having two conflicting UTI declarations for the same file extension can -cause problems. Note that if you do edit the Info.plist file you need to -nudge the system to tell it something has changed. Moving the plugin to the +cause problems. Note that if you do edit the Info.plist file you need to +nudge the system to tell it something has changed. Moving the plug-in to the desktop then back to its installed location should do the trick. -As an aside, by changing colorize.sh you can use this plugin to render any file +As an aside, by changing colorize.sh you can use this plug-in to render any file type that you can convert to HTML. Have fun, and let me know if you do anything cool! ##### Adding Language Types If QLColorCode doesn't display PHP and JavaScript code properly, their types may -need to be added to Info.plist. Finding the right type string to use is the -tricky part. Getting the type strings and getting Info.plist edits to take effect +need to be added to Info.plist. Finding the right type string to use is the +tricky part. Getting the type strings and getting Info.plist edits to take effect is easy by following the steps below, which explain how to add support for PHP: 0. In Terminal.app (or any shell prompt), enter the command: @@ -144,7 +144,7 @@ is easy by following the steps below, which explain how to add support for PHP: mdls -name kMDItemContentType /full/path/to/file.php ``` - Use the path to any PHP file. The response will be: + Use the path to any PHP file. The response will be: ``` txt kMDItemContentType = "public.php-script" @@ -171,11 +171,9 @@ is easy by following the steps below, which explain how to add support for PHP: 0. Save the updated Info.plist file. -0. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode - extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising - that some users might need to do so.) +0. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising that some users might need to do so.) The Info.plist included with this version of QLColorCode already contains types for PHP and JavaScript code, but these steps show how easy it is to add other -types. (Maybe somebody will develop a Preference Pane for QLColorCode to make +types. (Maybe somebody will develop a Preference Pane for QLColorCode to make this even easier.) From ebbf7b5bd53fae9b6c2e3052e6529dcb7ffb13a8 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 01:52:02 +0200 Subject: [PATCH 30/95] Add HS/Cabal support --- CHANGELOG | 3 ++- Info.plist | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 434e47f..3d3d8d3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ 2.1.1 (WIP): * Add JetBrain IML Project file support. - * Add Go support (in ~/Library/QuickLook). + * Add Go support. + * Add HS/Cabal support. 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index acfa0fd..0d76cab 100644 --- a/Info.plist +++ b/Info.plist @@ -33,6 +33,8 @@ dyn.ah62d4rv4ge80g62 dyn.ah62d4rv4ge80w5pq dyn.ah62d4rv4ge80s52 + dyn.ah62d4rv4ge80g2pcqf0a + dyn.ah62d4rv4ge80u62 @@ -1100,6 +1102,40 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge80g2pcqf0a + + UTTypeDescription + CABAL file + UTTypeIdentifier + public.cabal + UTTypeTagSpecification + + public.filename-extension + + cabal + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80u62 + + UTTypeDescription + Haskell file + UTTypeIdentifier + public.haskell + UTTypeTagSpecification + + public.filename-extension + + hs + + + From dbe487adaf97b5282e388ac288e38bdf38df516e Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 01:52:38 +0200 Subject: [PATCH 31/95] Add YAML support --- CHANGELOG | 1 + Info.plist | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 3d3d8d3..c6e1cee 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ * Add JetBrain IML Project file support. * Add Go support. * Add HS/Cabal support. + * Add YAML support. 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index 0d76cab..54c0b10 100644 --- a/Info.plist +++ b/Info.plist @@ -12,6 +12,7 @@ LSItemContentTypes public.source-code + public.yaml public.php-script com.netscape.javascript-source com.microsoft.c-sharp @@ -230,6 +231,23 @@ + + UTTypeConformsTo + + public.yaml + + UTTypeDescription + YAML file + UTTypeIdentifier + public.yaml + UTTypeTagSpecification + + public.filename-extension + + yaml + + + UTTypeConformsTo From 13849225fb107f18e965eb17d626201eed99a87d Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 01:52:48 +0200 Subject: [PATCH 32/95] Add RUST support --- CHANGELOG | 1 + Info.plist | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index c6e1cee..9bd9ea9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ * Add Go support. * Add HS/Cabal support. * Add YAML support. + * Add RUST Support. 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index 54c0b10..5f6b4a5 100644 --- a/Info.plist +++ b/Info.plist @@ -35,6 +35,7 @@ dyn.ah62d4rv4ge80w5pq dyn.ah62d4rv4ge80s52 dyn.ah62d4rv4ge80g2pcqf0a + dyn.ah62d4rv4ge81e62 dyn.ah62d4rv4ge80u62 @@ -948,6 +949,24 @@ + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge81e62 + + UTTypeDescription + Rust source files + UTTypeIdentifier + org.rust.source + UTTypeTagSpecification + + public.filename-extension + + rs + + + UTTypeConformsTo From 7e2b93c40630f851a1cc84bd7abcdd180cd21bb2 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 01:53:30 +0200 Subject: [PATCH 33/95] Fix type of QLPreviewHeight --- CHANGELOG | 1 + Info.plist | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9bd9ea9..48a6196 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ * Add HS/Cabal support. * Add YAML support. * Add RUST Support. + * Fix type of QLPreviewHeight. 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index 5f6b4a5..4a1789d 100644 --- a/Info.plist +++ b/Info.plist @@ -75,7 +75,7 @@ QLNeedsToBeRunInMainThread QLPreviewHeight - 640 + 640 QLPreviewWidth 800 QLSupportsConcurrentRequests From 208520cadc9e507211f4a546e92e3b9d9ced75da Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 01:54:02 +0200 Subject: [PATCH 34/95] Update project file --- QLColorCode.xcodeproj/project.pbxproj | 19 +++++++++---------- .../xcshareddata/xcschemes/Travis.xcscheme | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index fa9b139..02e202b 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -205,17 +205,18 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0940; + LastUpgradeCheck = 1000; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + Base, + en, + fr, + de, + ja, ); mainGroup = 089C166AFE841209C02AAC07 /* QLColorCode */; projectDirPath = ""; @@ -344,7 +345,6 @@ 2CA326230896AD4900168862 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -399,7 +399,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -412,7 +412,6 @@ 2CA326240896AD4900168862 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW = YES; CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -464,7 +463,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme index 0148541..0597ce7 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme @@ -1,6 +1,6 @@ Date: Sun, 16 Aug 2020 01:54:17 +0200 Subject: [PATCH 35/95] Remove test file causing problem on my Mac --- .../de\314\201ltatre\303\270.ml" | 249 ------------------ 1 file changed, 249 deletions(-) delete mode 100644 "test/de\314\201ltatre\303\270/de\314\201ltatre\303\270.ml" diff --git "a/test/de\314\201ltatre\303\270/de\314\201ltatre\303\270.ml" "b/test/de\314\201ltatre\303\270/de\314\201ltatre\303\270.ml" deleted file mode 100644 index 259c1c8..0000000 --- "a/test/de\314\201ltatre\303\270/de\314\201ltatre\303\270.ml" +++ /dev/null @@ -1,249 +0,0 @@ -(** - * Delta Tree - * - * @author Nathaniel Gray - * @version 0.1 - * - * This is a proof-of-concept of a data structure that can be used, for example, - * to keep track of marks (or newlines) in a text file while supporting quick - * insertion and deletion of text. The main "innovation" comes from storing - * the elements as offsets rather than absolute values. I think that this - * idea can be applied to almost any type of tree, but I'm using 2-3 trees - * because I find them easy to think about. - * - * The idea is that as you dig down into the tree you keep a sum of the - * deltas that you pass on the right. So this is one possible tree for - * the values [50, 75, 100, 130, 150, 200, 295, 297]: - * {v - [ 100 100 ] - ___/ | \___ - / | \ - [50 25] [30 20] [95 2] - v} - * To retrieve the values, perform an inorder walk of the tree, adding the - * values in each node. This representation is useful because if you want to - * insert 35 characters at position 110 you only need to update two entries - * (marked with * ): - * {v - [ 100 *135 ] - ___/ | \___ - / | \ - [50 25] [*65 20] [95 2] - v} - * Text insertion costs h (the height of the tree) additions in the worst - * case. Adding or deleting marks has the usual log n cost for element - * insertion/deletion. - * - *) - -open Printf - -let debug = true - -module type DeltaTree = -sig - type 'a t - - val empty : 'a t - val add : 'a t -> int -> 'a -> 'a t - val find : 'a t -> int -> int * 'a - val print_tree : ('a -> string) -> 'a t -> unit - (* val remove : 'a t -> int -> 'a t *) -end - -module DeltaTree : DeltaTree = -struct - type 'elt dtree = - Node of 'elt dtree * (int * 'elt) * 'elt dtree * (int * 'elt) option - * 'elt dtree - | Leaf - - type 'a t = 'a dtree - - let empty = Leaf - - type direction = Left | Center | Right - - let rec print_tree printer indent prefix tree = - let print_tree = print_tree printer in - match tree with - Leaf -> () (* printf "%s%sLeaf\n" indent prefix *) - | Node (tl, (pl, el), tc, er_opt, tr) -> - begin match er_opt with - Some (pr, er) -> - print_tree (indent ^ " ") "/-" tr; - printf "%s%s[%i, %s]\n" indent prefix pr (printer er); - print_tree (indent ^ " ") ">-" tc - | None -> - print_tree (indent ^ " ") "/-" tc - end; - printf "%s%s[%i, %s]\n" indent prefix pl (printer el); - print_tree (indent ^ " ") "\\-" tl - - let print_tree printer tree = - print_tree printer "" "" tree - - type 'elt pick_subtree_result = - MatchElt of direction * (int * 'elt) - | Subtree of direction * (int * 'elt) option * int * 'elt dtree - - (* A utility function *) - let dtree_pick_subtree d (t1, e1, t2, e2opt, t3) pos = - (* if debug then - printf "pick_subtree: %i, %i\n" d pos; *) - let pos1 = d + fst e1 in - if pos = pos1 then - MatchElt (Left, e1) - else if pos < pos1 then - Subtree (Left, None, d, t1) - else - let d = pos1 in - match e2opt with - None -> - Subtree (Center, Some e1, d, t2) - | Some e2 -> - (* if debug then - printf "pick_subtree2: %i, %i\n" d pos; *) - let pos2 = d + fst e2 in - if pos = pos2 then - MatchElt (Right, e2) - else if pos < pos2 then - Subtree (Center, Some e1, d, t2) - else - Subtree (Right, Some e2, pos2, t3) - - - let rec dtree_find_pos d best_elt dtree pos : (int * 'elt) option = - match dtree with - Node (t1, e1, t2, e2opt, t3) -> - begin - match dtree_pick_subtree d (t1, e1, t2, e2opt, t3) pos with - MatchElt (_, e) -> - Some e - | Subtree (_, lparent, d, t) -> - begin - let best_elt = match lparent with - None -> best_elt - | e -> e - in - dtree_find_pos d best_elt t pos - end - end - | Leaf -> - best_elt - - (* - * Find the element before or at position pos. - * If the position is before any element, returns None. Otherwise - * returns Some (elt_pos, elt). - *) - let find dtree pos : (int * 'elt) option = - dtree_find_pos 0 None dtree pos - - let find dtree pos = - match find dtree pos with - Some x -> x - | None -> raise Not_found - - type 'elt insert_result = - Promote of 'elt dtree * (int * 'elt) * 'elt dtree - | Done of 'elt dtree - - (* Have to be careful to keep the deltas in shape while unwinding *) - let unwind_insert d (t1, e1, t2, e2opt, t3) dir result = - match result, e2opt, dir with - (* These are the easy Done cases *) - Done node, _, Left -> - Done (Node (node, e1, t2, e2opt, t3)) - | Done node, _, Center -> - Done (Node (t1, e1, node, e2opt, t3)) - | Done node, _, Right -> - Done (Node (t1, e1, t2, e2opt, node)) - - (* These are the easy merge cases *) - | Promote (tl, e, tr), None, Left -> - let p = fst e in - let p1 = fst e1 in - let e1 = (p1 - p, snd e1) in - Done (Node (tl, e, tr, Some e1, t2)) - | Promote (tl, e, tr), None, Center -> - Done (Node (t1, e1, tl, Some e, tr)) - - (* These are the merge cases that require promoting an element *) - | Promote (tl, e, tr), Some e2, Left -> - let left_tree = Node (tl, e, tr, None, Leaf) in - let right_tree = Node (t2, e2, t3, None, Leaf) in - Promote (left_tree, e1, right_tree) - | Promote (tl, e, tr), Some e2, Center -> - let p = fst e in - let p1 = fst e1 in - let p2 = fst e2 in - let e = (p1 + p, snd e) in - let e2 = (p2 - p, snd e2) in - let left_tree = Node (t1, e1, tl, None, Leaf) in - let right_tree = Node (tr, e2, t3, None, Leaf) in - Promote (left_tree, e, right_tree) - | Promote (tl, e, tr), Some e2, Right -> - let p1 = fst e1 in - let p2 = fst e2 in - let e2 = (p2 + p1, snd e2) in - let left_tree = Node (t1, e1, t2, None, Leaf) in - let right_tree = Node (tl, e, tr, None, Leaf) in - Promote (left_tree, e2, right_tree) - | _ -> - failwith "Internal error: unwind_insert" - - - let rec dtree_insert_elt d dtree pos elt = - match dtree with - Node (t1, e1, t2, e2opt, t3) -> - begin - match dtree_pick_subtree d (t1, e1, t2, e2opt, t3) pos with - MatchElt (dir, e) -> - (* There's already an element at this position - For now just replace it. Later maybe I should think - about this more *) - (* if debug then - printf "match: %i (%s -> %s)\n" pos (snd e) elt; *) - if dir = Left then - Done (Node (t1, (pos-d, elt), t2, e2opt, t3)) - else - Done (Node (t1, e1, t2, Some (pos-(fst e1), elt), t3)) - | Subtree (dir, lparent, d', tree) -> - let insert_result = dtree_insert_elt d' tree pos elt in - unwind_insert d (t1, e1, t2, e2opt, t3) dir - insert_result - end - | Leaf -> - (* if debug then - printf "promote: %i, %s\n" (pos-d) elt; *) - Promote (Leaf, (pos-d, elt), Leaf) - - let add dtree pos elt = - match dtree_insert_elt 0 dtree pos elt with - Done node -> - node - | Promote (tl, e, tr) -> - Node (tl, e, tr, None, Leaf) - - (* let remove dtree pos = *) - - -end - - - -let _ = - let values = [5; 15; 10; 20; 30; 25; 35; 40; 1; 95; 3928; 298; 22; 17; 5] in - (* let values = List.rev values in *) - let values = List.map (fun x -> x, string_of_int x ^ "s" ) values in - let print_tree = DeltaTree.print_tree (fun x-> "\"" ^ x ^ "\"") in - let dt = DeltaTree.empty in - let dt = List.fold_left - (fun dt (loc, str) -> - print_tree dt; print_newline (); - DeltaTree.add dt loc str) - dt values - in - print_tree dt - From dc10c53117df7cdd8467b1e7810ed82ac4572d48 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 02:03:31 +0200 Subject: [PATCH 36/95] Thanks the real author --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 48a6196..dffda60 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,7 @@ * Add JetBrain IML Project file support. * Add Go support. * Add HS/Cabal support. - * Add YAML support. + * Add YAML support (thanks @JJGO). * Add RUST Support. * Fix type of QLPreviewHeight. From 8fc06f9193b7a33f237efa2aab3a447182986946 Mon Sep 17 00:00:00 2001 From: Saagar Jha Date: Tue, 29 Jan 2019 02:20:04 -0800 Subject: [PATCH 37/95] Add MacPort's default path to search PATH --- src/Common.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common.m b/src/Common.m index 5efca97..1cd484a 100644 --- a/src/Common.m +++ b/src/Common.m @@ -74,7 +74,7 @@ [[NSProcessInfo processInfo] environment]]; NSString *path = [env objectForKey: @"PATH"]; - NSString *newPath = [path stringByAppendingString: @":/usr/local/bin:/usr/local/sbin"]; + NSString *newPath = [path stringByAppendingString: @":/opt/local/bin:/usr/local/bin:/usr/local/sbin"]; [env setObject: newPath forKey: @"PATH"]; // Try to find highlight location From b111afa5d355d2e694c55d8df69461b35c8d91c6 Mon Sep 17 00:00:00 2001 From: Christian R Jaensch Date: Wed, 6 Mar 2019 18:29:00 +0100 Subject: [PATCH 38/95] Added support for Crystal language Added support for the Crystal language (see also https://crystal-lang.org). It should be noted that the README description for adding a new language does **NOT** work. I had to run ```qlmanage -d 4 -p hello.cr``` to determine the appropriate UTTypeIdentifier. Using ```mdls -name kMDItemContentType hello.cr``` returns ```public.crystal-source```as Universal Type Identifier (UTI). However, that value does not work when updating the Info.plist for the Crystal language. BTW, this extension requires a corresponding change to the **highlight** library. I had to create a Crystal language definition file (```crystal.lang```) and update also the ```filetypes.conf``` file used by highlight in order to match a new language definition with the corresponding file extension. I will create a pull request for highlight so that these changes are reflected in an update highlight release. Signed-off-by: Anthony Gelibert # Conflicts: # Info.plist --- Info.plist | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Info.plist b/Info.plist index 4a1789d..5cd99bc 100644 --- a/Info.plist +++ b/Info.plist @@ -37,6 +37,7 @@ dyn.ah62d4rv4ge80g2pcqf0a dyn.ah62d4rv4ge81e62 dyn.ah62d4rv4ge80u62 + dyn.ah62d4rv4ge80g6u @@ -1173,6 +1174,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge80g6u + + UTTypeDescription + Crystal Source File + UTTypeIdentifier + org.crystal-lang.source + UTTypeTagSpecification + + public.filename-extension + + cr + + + From ae767931ac233a7ae9930208005c482850beb8fa Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 02:44:45 +0200 Subject: [PATCH 39/95] Add last commit to CHANGELOG Signed-off-by: Anthony Gelibert --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index dffda60..8f05581 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ * Add YAML support (thanks @JJGO). * Add RUST Support. * Fix type of QLPreviewHeight. + * Add Crystal Support (thanks @crjaensch). 2.1.0: * Add option to preview file as RTF (thanks @silum). From 102fd248b608290287f1b8e77135eae0df2d9832 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 03:33:34 +0200 Subject: [PATCH 40/95] Add C/C++/Objective-C Signed-off-by: Anthony Gelibert --- Info.plist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Info.plist b/Info.plist index 5cd99bc..b43ead8 100644 --- a/Info.plist +++ b/Info.plist @@ -27,6 +27,10 @@ org.vim.vim-script public.tex public.text + public.shell-script + public.c-header + public.objective-c-source + public.c-source dyn.ah62d4rv4ge81g6pq dyn.ah62d4rv4ge8007a dyn.ah62d4rv4ge80s6xbqv0gn From 5deece5ead7681790c4c7d8f16cd106be50c1378 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 03:33:56 +0200 Subject: [PATCH 41/95] Update XCode settings and version number Signed-off-by: Anthony Gelibert --- CHANGELOG | 2 +- Info.plist | 16 ++--- QLColorCode.xcodeproj/project.pbxproj | 6 +- .../xcshareddata/xcschemes/Package.xcscheme | 67 +++++++++++++++++++ rsrc/English.lproj/InfoPlist.strings | 4 +- 5 files changed, 83 insertions(+), 12 deletions(-) create mode 100644 QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme diff --git a/CHANGELOG b/CHANGELOG index 8f05581..7708570 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2.1.1 (WIP): +2.2.0 (WIP): * Add JetBrain IML Project file support. * Add Go support. * Add HS/Cabal support. diff --git a/Info.plist b/Info.plist index b43ead8..8aef57f 100644 --- a/Info.plist +++ b/Info.plist @@ -56,9 +56,9 @@ CFBundleName ${PRODUCT_NAME} CFBundleShortVersionString - ${CURRENT_PROJECT_VERSION} + $(MARKETING_VERSION) CFBundleVersion - ${CURRENT_PROJECT_VERSION} + $(CURRENT_PROJECT_VERSION) CFPlugInDynamicRegisterFunction CFPlugInDynamicRegistration @@ -80,9 +80,9 @@ QLNeedsToBeRunInMainThread QLPreviewHeight - 640 + 1024 QLPreviewWidth - 800 + 1280 QLSupportsConcurrentRequests QLThumbnailMinimumSize @@ -90,14 +90,14 @@ UTImportedTypeDeclarations - UTTypeIdentifier - com.dhowett.logos - UTTypeDescription - Logos Source File UTTypeConformsTo public.source-code + UTTypeDescription + Logos Source File + UTTypeIdentifier + com.dhowett.logos UTTypeTagSpecification public.filename-extension diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 02e202b..b4597d2 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -269,7 +269,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "qlmanage -r"; + shellScript = "qlmanage -r\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -330,6 +330,8 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = "2.2.0+dev6"; + MARKETING_VERSION = "2.2.0+dev6"; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -339,6 +341,8 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = "2.2.0+dev6"; + MARKETING_VERSION = "2.2.0+dev6"; }; name = Release; }; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme new file mode 100644 index 0000000..dd87327 --- /dev/null +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rsrc/English.lproj/InfoPlist.strings b/rsrc/English.lproj/InfoPlist.strings index ca6ff4d..a7d2668 100644 --- a/rsrc/English.lproj/InfoPlist.strings +++ b/rsrc/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "QLColorCode version 2.1.1+dev, Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; -NSHumanReadableCopyright = "Copyright (c) 2018 Nathaniel Gray, Anthony Gelibert."; +CFBundleGetInfoString = "QLColorCode version 2.2.0+dev6, Copyright (c) 2020 Nathaniel Gray, Anthony Gelibert."; +NSHumanReadableCopyright = "Copyright (c) 2020 Nathaniel Gray, Anthony Gelibert."; From cb6ca8cf07515e750b6065ec985c004246bddff1 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 03:45:37 +0200 Subject: [PATCH 42/95] Add C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support Signed-off-by: Anthony Gelibert --- CHANGELOG | 1 + Info.plist | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7708570..0ddcc5a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ * Add RUST Support. * Fix type of QLPreviewHeight. * Add Crystal Support (thanks @crjaensch). + * Add C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index 8aef57f..30bc04a 100644 --- a/Info.plist +++ b/Info.plist @@ -9,6 +9,8 @@ CFBundleTypeRole QLGenerator + CFBundleTypeName + LSItemContentTypes public.source-code @@ -25,12 +27,18 @@ public.plain-text com.sun.java-class org.vim.vim-script + org.tug.lua public.tex public.text public.shell-script public.c-header public.objective-c-source public.c-source + public.csh-script + public.zsh-script + public.python-script + com.apple.property-list + com.apple.xcode.strings-text dyn.ah62d4rv4ge81g6pq dyn.ah62d4rv4ge8007a dyn.ah62d4rv4ge80s6xbqv0gn @@ -42,6 +50,7 @@ dyn.ah62d4rv4ge81e62 dyn.ah62d4rv4ge80u62 dyn.ah62d4rv4ge80g6u + dyn.ah62d4rv4ge80g3xh From 15fe7de34700efc574138b02dab07bd53f8218b8 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 03:50:55 +0200 Subject: [PATCH 43/95] Add Vue support Signed-off-by: Anthony Gelibert --- CHANGELOG | 1 + Info.plist | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 0ddcc5a..5635fc7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ * Fix type of QLPreviewHeight. * Add Crystal Support (thanks @crjaensch). * Add C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. + * Add Vue support. 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index 30bc04a..0a0fe9c 100644 --- a/Info.plist +++ b/Info.plist @@ -51,6 +51,7 @@ dyn.ah62d4rv4ge80u62 dyn.ah62d4rv4ge80g6u dyn.ah62d4rv4ge80g3xh + dyn.ah62d4rv4ge81q7pf @@ -1204,6 +1205,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge81q7pf + + UTTypeDescription + Vue Source File + UTTypeIdentifier + org.vue.source + UTTypeTagSpecification + + public.filename-extension + + vue + + + From 6a12473a4a280b19e5091205d3afa79f041ccaf4 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 04:01:30 +0200 Subject: [PATCH 44/95] Remove public.plain-text from supported to let QLStephen --- Info.plist | 1 - 1 file changed, 1 deletion(-) diff --git a/Info.plist b/Info.plist index 0a0fe9c..146b30c 100644 --- a/Info.plist +++ b/Info.plist @@ -24,7 +24,6 @@ public.xml com.apple.property-list org.tug.tex - public.plain-text com.sun.java-class org.vim.vim-script org.tug.lua From 267d679140cb2b5b18de51b2d862efa2c95b2e73 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 04:12:00 +0200 Subject: [PATCH 45/95] Fix Height/Width/MinimumSize --- CHANGELOG | 1 + Info.plist | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5635fc7..e08aea7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ * Add Crystal Support (thanks @crjaensch). * Add C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. * Add Vue support. + * Fix Height/Width/MinimumSize (thanks @darkbrow). 2.1.0: * Add option to preview file as RTF (thanks @silum). diff --git a/Info.plist b/Info.plist index 146b30c..73ad247 100644 --- a/Info.plist +++ b/Info.plist @@ -89,13 +89,13 @@ QLNeedsToBeRunInMainThread QLPreviewHeight - 1024 + 800 QLPreviewWidth - 1280 + 800 QLSupportsConcurrentRequests QLThumbnailMinimumSize - 32 + 17 UTImportedTypeDeclarations From e0c921a71afbef220b3b85c3e687aa0757a81cc8 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 04:16:12 +0200 Subject: [PATCH 46/95] Resolve weird thumbnail icon appearance in macOS Mojave (@darkbrow) Signed-off-by: Anthony Gelibert --- QLColorCode.xcodeproj/project.pbxproj | 57 +------- .../xcshareddata/xcschemes/Travis.xcscheme | 2 +- rsrc/English.lproj/InfoPlist.strings | 5 - src/Common.h | 4 +- src/Common.m | 21 +-- src/GeneratePreviewForURL.m | 77 ++-------- src/GenerateThumbnailForURL.m | 131 ++++++------------ 7 files changed, 73 insertions(+), 224 deletions(-) delete mode 100644 rsrc/English.lproj/InfoPlist.strings diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index b4597d2..fc47448 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -23,23 +23,15 @@ /* Begin PBXBuildFile section */ 0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; }; - 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; - C86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; }; EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */ = {isa = PBXBuildFile; fileRef = EA43671615F6BF9C009DA6C0 /* colorize.sh */; }; EA43671D15F6BF9C009DA6C0 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = EA43671715F6BF9C009DA6C0 /* Common.h */; }; EA43671E15F6BF9C009DA6C0 /* Common.m in Sources */ = {isa = PBXBuildFile; fileRef = EA43671815F6BF9C009DA6C0 /* Common.m */; }; EA43671F15F6BF9C009DA6C0 /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = EA43671915F6BF9C009DA6C0 /* GeneratePreviewForURL.m */; }; EA43672015F6BF9C009DA6C0 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = EA43671A15F6BF9C009DA6C0 /* GenerateThumbnailForURL.m */; }; EA43672115F6BF9C009DA6C0 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = EA43671B15F6BF9C009DA6C0 /* main.c */; }; - EA43672515F6C00B009DA6C0 /* English.lproj in Resources */ = {isa = PBXBuildFile; fileRef = EA43672315F6C00B009DA6C0 /* English.lproj */; }; EA43672F15F6C1B8009DA6C0 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = EA43672B15F6C1B8009DA6C0 /* CHANGELOG */; }; EA43673015F6C1B8009DA6C0 /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = EA43672C15F6C1B8009DA6C0 /* COPYING */; }; EAE9D2CC169E2B3500A67B2F /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = EAE9D2CB169E2B3500A67B2F /* README.md */; }; - EAEB7B5815A4FBF7005914E0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAEB7B5715A4FBF7005914E0 /* Foundation.framework */; }; - EAEB7B5A15A4FC00005914E0 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAEB7B5915A4FC00005914E0 /* WebKit.framework */; }; - EAEB7B5C15A4FC08005914E0 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAEB7B5B15A4FC08005914E0 /* AppKit.framework */; }; - F28CFBFD0A3EC0AF000ABFF5 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */; }; - F28CFC030A3EC0C6000ABFF5 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -67,25 +59,17 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLColorCode.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; }; - C86B05260671AA6E00DD9006 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; EA43671615F6BF9C009DA6C0 /* colorize.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = colorize.sh; path = src/colorize.sh; sourceTree = ""; }; EA43671715F6BF9C009DA6C0 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Common.h; path = src/Common.h; sourceTree = ""; }; EA43671815F6BF9C009DA6C0 /* Common.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Common.m; path = src/Common.m; sourceTree = ""; }; EA43671915F6BF9C009DA6C0 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GeneratePreviewForURL.m; path = src/GeneratePreviewForURL.m; sourceTree = ""; }; EA43671A15F6BF9C009DA6C0 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GenerateThumbnailForURL.m; path = src/GenerateThumbnailForURL.m; sourceTree = ""; }; EA43671B15F6BF9C009DA6C0 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = src/main.c; sourceTree = ""; }; - EA43672315F6C00B009DA6C0 /* English.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; name = English.lproj; path = rsrc/English.lproj; sourceTree = ""; }; EA43672B15F6C1B8009DA6C0 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = ""; }; EA43672C15F6C1B8009DA6C0 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; EA43673315F6C23F009DA6C0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; EAE9D2CB169E2B3500A67B2F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; - EAEB7B5715A4FBF7005914E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - EAEB7B5915A4FC00005914E0 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; - EAEB7B5B15A4FC08005914E0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; - F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = /System/Library/Frameworks/QuickLook.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -93,13 +77,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EAEB7B5C15A4FC08005914E0 /* AppKit.framework in Frameworks */, - EAEB7B5A15A4FC00005914E0 /* WebKit.framework in Frameworks */, - EAEB7B5815A4FBF7005914E0 /* Foundation.framework in Frameworks */, - 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, - C86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */, - F28CFBFD0A3EC0AF000ABFF5 /* ApplicationServices.framework in Frameworks */, - F28CFC030A3EC0C6000ABFF5 /* QuickLook.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -114,31 +91,15 @@ EAE9D2CB169E2B3500A67B2F /* README.md */, 08FB77AFFE84173DC02AAC07 /* Source */, 089C167CFE841241C02AAC07 /* Resources */, - 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, 19C28FB6FE9D52B211CA2CBB /* Products */, ); name = QLColorCode; sourceTree = ""; }; - 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - EAEB7B5B15A4FC08005914E0 /* AppKit.framework */, - EAEB7B5915A4FC00005914E0 /* WebKit.framework */, - EAEB7B5715A4FBF7005914E0 /* Foundation.framework */, - F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */, - F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */, - C86B05260671AA6E00DD9006 /* CoreServices.framework */, - 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, - ); - name = "External Frameworks and Libraries"; - sourceTree = ""; - }; 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( EA43673315F6C23F009DA6C0 /* Info.plist */, - EA43672315F6C00B009DA6C0 /* English.lproj */, ); name = Resources; sourceTree = ""; @@ -205,18 +166,13 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - Base, - en, - fr, - de, - ja, ); mainGroup = 089C166AFE841209C02AAC07 /* QLColorCode */; projectDirPath = ""; @@ -234,7 +190,6 @@ buildActionMask = 2147483647; files = ( EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */, - EA43672515F6C00B009DA6C0 /* English.lproj in Resources */, EA43672F15F6C1B8009DA6C0 /* CHANGELOG in Resources */, EA43673015F6C1B8009DA6C0 /* COPYING in Resources */, EAE9D2CC169E2B3500A67B2F /* README.md in Resources */, @@ -269,7 +224,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "qlmanage -r\n"; + shellScript = "qlmanage -r"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -330,8 +285,6 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "2.2.0+dev6"; - MARKETING_VERSION = "2.2.0+dev6"; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -341,8 +294,6 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "2.2.0+dev6"; - MARKETING_VERSION = "2.2.0+dev6"; }; name = Release; }; @@ -403,7 +354,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -467,7 +418,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme index 0597ce7..e05d4c0 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme @@ -1,6 +1,6 @@ -#import +@import CoreFoundation; +@import Foundation; #ifdef DEBUG #define n8log(...) NSLog(__VA_ARGS__) diff --git a/src/Common.m b/src/Common.m index 1cd484a..8b57741 100644 --- a/src/Common.m +++ b/src/Common.m @@ -9,9 +9,9 @@ * Copyright 2012 Anthony Gelibert. */ -#import -#import -#import +@import CoreFoundation; +@import Foundation; + #import // PATH_MAX #include "Common.h" @@ -98,9 +98,11 @@ #endif @"10", @"fontSizePoints", @"Menlo", @"font", + @"darkplus", @"darkTheme", + @"edit-xcode", @"lightTheme", @"edit-xcode", @"hlTheme", // @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags", - @"-t 4 --kw-case=capitalize ", @"extraHLFlags", + @"-t 4 ", @"extraHLFlags", @"/opt/local/bin/highlight", @"pathHL", @"", @"maxFileSize", @"UTF-8", @"textEncoding", @@ -108,11 +110,12 @@ [env addEntriesFromDictionary:[defaults persistentDomainForName:myDomain]]; - // This overrides hlTheme if hlThumbTheme is set and we're generating a thumbnail - // (This way we won't irritate people with existing installs) - // Admittedly, it's a little shady, overriding the set value, but I'd rather complicate the compiled code - if (thumbnail && [[env allKeys] containsObject:@"hlThumbTheme"]) { - [env setObject:[env objectForKey:@"hlThumbTheme"] forKey:@"hlTheme"]; + // Change hlTheme according to system's darkmode setting. + NSString *osxMode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"]; + if ([osxMode isEqual: @"Dark"]) { + [env setObject:[env objectForKey:@"darkTheme"] forKey:@"hlTheme"]; + } else { + [env setObject:[env objectForKey:@"lightTheme"] forKey:@"hlTheme"]; } NSString *cmd = [NSString stringWithFormat: diff --git a/src/GeneratePreviewForURL.m b/src/GeneratePreviewForURL.m index f3b991b..dce8dbc 100644 --- a/src/GeneratePreviewForURL.m +++ b/src/GeneratePreviewForURL.m @@ -1,81 +1,34 @@ -/* This code is copyright Nathaniel Gray, licensed under the GPL v3. - See LICENSE.txt for details. */ +@import Cocoa; +@import CoreFoundation; +@import QuickLook; -#import -#import -#import -#import -#import #import "Common.h" +OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options); +void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview); /* ----------------------------------------------------------------------------- Generate a preview for file - + This function's job is to create preview for designated file ----------------------------------------------------------------------------- */ -OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, - CFURLRef url, CFStringRef contentTypeUTI, - CFDictionaryRef options) +OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options) { -#ifdef DEBUG - NSDate *startDate = [NSDate date]; -#endif - n8log(@"Generating Preview"); - if (QLPreviewRequestIsCancelled(preview)) - return noErr; - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // Invoke colorize.sh CFBundleRef bundle = QLPreviewRequestGetGeneratorBundle(preview); int status; - NSData *output = colorizeURL(bundle, url, &status, 0); - n8log(@"Generated preview html page in %.3f sec", - -[startDate timeIntervalSinceNow] ); - - NSData *rtf = nil; - NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:myDomain]; - BOOL use_rtf = [defaults boolForKey:@"rtfPreview"]; - [defaults release]; - if (use_rtf) { - NSDictionary *attrs; - NSAttributedString *string = [[NSAttributedString alloc] initWithHTML:output documentAttributes:&attrs]; - NSRange range = NSMakeRange(0, [string length]); - rtf = [string RTFFromRange:range documentAttributes:attrs]; - [string release]; + CFDataRef data = (__bridge CFDataRef) colorizeURL(bundle, url, &status, 0); + + if (data) { + CFDictionaryRef props = (__bridge CFDictionaryRef) [NSDictionary dictionary]; + QLPreviewRequestSetDataRepresentation(preview, data, kUTTypeHTML, props); } - - if (status != 0 || QLPreviewRequestIsCancelled(preview)) { -#ifndef DEBUG - goto done; -#endif - } - // Now let WebKit do its thing - NSString *textEncoding = [[NSUserDefaults standardUserDefaults] - stringForKey:@"webkitTextEncoding"]; - if (!textEncoding || [textEncoding length] == 0) - textEncoding = @"UTF-8"; - CFDictionaryRef properties = - (CFDictionaryRef)[NSDictionary dictionaryWithObject:textEncoding - forKey:(NSString *)kQLPreviewPropertyTextEncodingNameKey]; - - if (use_rtf) - QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)rtf, kUTTypeRTF, properties); - else - QLPreviewRequestSetDataRepresentation(preview, (CFDataRef)output, kUTTypeHTML, properties); - -#ifndef DEBUG -done: -#endif - n8log(@"Finished preview in %.3f sec", -[startDate timeIntervalSinceNow] ); - [pool release]; + return noErr; } -void CancelPreviewGeneration(void* thisInterface, QLPreviewRequestRef preview) +void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview) { - // implement only if supported + // Implement only if supported } diff --git a/src/GenerateThumbnailForURL.m b/src/GenerateThumbnailForURL.m index 691eee6..5bced9b 100644 --- a/src/GenerateThumbnailForURL.m +++ b/src/GenerateThumbnailForURL.m @@ -1,107 +1,54 @@ -/* Copyright Nathaniel Gray */ +@import Cocoa; +@import CoreFoundation; +@import QuickLook; -#include -#include -#include -#include #import "Common.h" -#define minSize 32 +OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize); +void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail); /* ----------------------------------------------------------------------------- - Generate a thumbnail for file + Generate a thumbnail for file + + This function's job is to create thumbnail for designated file as fast as possible + ----------------------------------------------------------------------------- */ - This function's job is to create thumbnail for designated file as fast as possible - ----------------------------------------------------------------------------- */ - -OSStatus -GenerateThumbnailForURL(void *thisInterface, - QLThumbnailRequestRef thumbnail, - CFURLRef url, - CFStringRef contentTypeUTI, - CFDictionaryRef options, - CGSize maxSize) +OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize) { - n8log(@"Generating Thumbnail"); - // For some reason we seem to get called for small thumbnails even though - // we put a min size in our .plist file... - if (maxSize.width < minSize || maxSize.height < minSize) + @autoreleasepool { + NSStringEncoding usedEncoding = 0; + NSError *readError = nil; + + [NSString stringWithContentsOfURL:(__bridge NSURL*)url usedEncoding:&usedEncoding error:&readError]; + + if (usedEncoding == 0) { + NSLog(@"Failed to determine encoding for file %@", [(__bridge NSURL*)url path]); return noErr; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; -#ifdef DEBUG - NSDate *startDate = [NSDate date]; -#endif - - // Render as though there is an 600x800 window, and fill the thumbnail - // vertically. This code could be more general. I'm assuming maxSize is - // a square, though nothing horrible should happen if it isn't. - - NSRect renderRect = NSMakeRect(0.0, 0.0, 600.0, 800.0); - float scale = (float)(maxSize.height/800.0); - NSSize scaleSize = NSMakeSize(scale, scale); - CGSize thumbSize = NSSizeToCGSize( - NSMakeSize((maxSize.width * (600.0/800.0)), - maxSize.height)); - - /* Based on example code from quicklook-dev mailing list */ - // NSSize previewSize = NSSizeFromCGSize(maxSize); - int status; - CFBundleRef bundle = QLThumbnailRequestGetGeneratorBundle(thumbnail); - NSData *data = colorizeURL(bundle, url, &status, 1); - //NSLog(@"%s", [data bytes]); -#ifdef DEBUG - n8log(@"Generated thumbnail html page in %.3f sec", -[startDate timeIntervalSinceNow] ); -#endif - if (status != 0) { -#ifndef DEBUG - goto done; -#endif - } - //NSRect previewRect; - //previewRect.size = previewSize; - - WebView* webView = [[WebView alloc] initWithFrame:renderRect]; - [webView scaleUnitSquareToSize:scaleSize]; - [[[webView mainFrame] frameView] setAllowsScrolling:NO]; - - [[webView mainFrame] loadData:data MIMEType:@"text/html" - textEncodingName:@"UTF-8" baseURL:nil]; - - while([webView isLoading]) { - CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true); } - // Get a context to render into - CGContextRef context = - QLThumbnailRequestCreateContext(thumbnail, thumbSize, false, NULL); - - if(context != NULL) { - NSGraphicsContext* nsContext = - [NSGraphicsContext - graphicsContextWithGraphicsPort:(void *)context - flipped:[webView isFlipped]]; - - [webView displayRectIgnoringOpacity:[webView bounds] - inContext:nsContext]; - - QLThumbnailRequestFlushContext(thumbnail, context); - - CFRelease(context); - } - [webView release]; - -#ifndef DEBUG -done: -#endif -#ifdef DEBUG - n8log(@"Finished thumbnail after %.3f sec\n\n", -[startDate timeIntervalSinceNow] ); -#endif - [pool release]; + if (QLThumbnailRequestIsCancelled(thumbnail)) + return noErr; + + NSDictionary *previewProperties = @{ + (NSString *)kQLPreviewPropertyStringEncodingKey : @( usedEncoding ) + }; + + NSDictionary *properties = @{ + (__bridge NSString *)kQLPreviewPropertyMIMETypeKey : @"text/html" + }; + + QLThumbnailRequestSetThumbnailWithURLRepresentation( + thumbnail, + url, + kUTTypePlainText, + (__bridge CFDictionaryRef)previewProperties, + (__bridge CFDictionaryRef)properties); + return noErr; + } } -void CancelThumbnailGeneration(void* thisInterface, - QLThumbnailRequestRef thumbnail) +void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail) { - // implement only if supported + // Implement only if supported } From 315ae737fa0e9760532f4fb15b8789b6e7b163a9 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 04:17:39 +0200 Subject: [PATCH 47/95] Support Mojave Dark mode Signed-off-by: Anthony Gelibert --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index e08aea7..b8080f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ * Add C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. * Add Vue support. * Fix Height/Width/MinimumSize (thanks @darkbrow). + * Support Mojave Dark mode (thanks @darkbrow). 2.1.0: * Add option to preview file as RTF (thanks @silum). From 16572da48d3cdc262a9ee615f8c8d1b5b75d60ef Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 04:24:31 +0200 Subject: [PATCH 48/95] Bump version number and build settings Signed-off-by: Anthony Gelibert --- Info.plist | 4 ++-- QLColorCode.xcodeproj/project.pbxproj | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Info.plist b/Info.plist index 73ad247..4f8d1d8 100644 --- a/Info.plist +++ b/Info.plist @@ -7,10 +7,10 @@ CFBundleDocumentTypes - CFBundleTypeRole - QLGenerator CFBundleTypeName + CFBundleTypeRole + QLGenerator LSItemContentTypes public.source-code diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index fc47448..c2d417e 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -173,6 +173,7 @@ developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( + en, ); mainGroup = 089C166AFE841209C02AAC07 /* QLColorCode */; projectDirPath = ""; @@ -224,7 +225,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "qlmanage -r"; + shellScript = "qlmanage -r\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -285,6 +286,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 3.0.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 3.0.0; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -294,6 +298,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 3.0.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 3.0.0; }; name = Release; }; From 6f847825f7d08e8c0833a5f4b0877f3a07bc0851 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 04:39:13 +0200 Subject: [PATCH 49/95] Fix CHANGELOG and bump version number Signed-off-by: Anthony Gelibert --- CHANGELOG | 2 +- QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b8080f7..c44c5e9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2.2.0 (WIP): +3.0.0: * Add JetBrain IML Project file support. * Add Go support. * Add HS/Cabal support. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index c2d417e..385154c 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -286,9 +286,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.0; + CURRENT_PROJECT_VERSION = "3.0.1+dev1"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = "3.0.1+dev1"; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -298,9 +298,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.0; + CURRENT_PROJECT_VERSION = "3.0.1+dev1"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = "3.0.1+dev1"; }; name = Release; }; From 0ef3280f8723806cb9ec057c5b235c96abaa0fef Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 05:01:27 +0200 Subject: [PATCH 50/95] =?UTF-8?q?Rename=20CHANGELOG=20and=20follow=20?= =?UTF-8?q?=C2=AB=C2=A0Keep=20a=20Changelog=C2=A0=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anthony Gelibert --- CHANGELOG | 113 --------------------------- CHANGELOG.md | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 215 insertions(+), 113 deletions(-) delete mode 100644 CHANGELOG create mode 100644 CHANGELOG.md diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index c44c5e9..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,113 +0,0 @@ -3.0.0: - * Add JetBrain IML Project file support. - * Add Go support. - * Add HS/Cabal support. - * Add YAML support (thanks @JJGO). - * Add RUST Support. - * Fix type of QLPreviewHeight. - * Add Crystal Support (thanks @crjaensch). - * Add C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. - * Add Vue support. - * Fix Height/Width/MinimumSize (thanks @darkbrow). - * Support Mojave Dark mode (thanks @darkbrow). - -2.1.0: - * Add option to preview file as RTF (thanks @silum). - * Add Kotlin/Gradle (thanks @sonique6784). - * Remove JSON support (thanks @erdtsksn). - * Add C# support. - * Add Scala support. - * Add "reduce_filesize" plugin by default. - -2.0.9: - * Add PHP/JS support (thanks @sloanlance). - * Add C#/F# support (thanks @breiter). - * Compile with XCode 9.0 targeting 10.13. - -2.0.8: - * Remove bash_ref_linuxmanpages_com plugin. - -2.0.7: - * Correct autodetect path on 10.11 (thanks @cc941201). - * Correct LaTeX and Arduino support. - -2.0.6: - * Add Logos source file support (as plain text). - * Add ViM Scripts source file support. - * Code is now GPL 3. - * Add the ability to use an optional theme only for thumbnails (thanks @vilhelmen). - * Autodetect "highlight" path (thanks @saagarjha). - -2.0.5: - * Lots of minor changes - -2.0.4: - * Update the XCode Project to 10.8 - * Add a new setting to specify the HL path (/opt/local/bin/highlight by default). - * Update the script "colorize.sh" to obtain ZSH by the environment rather than an hardcoded path. - * Update the script "colorize.sh" to call ZSH by "zsh -f" rather than simply "zsh". - * Correct some code according to CLang static analyzer. - * Add some other formats to render. - -2.0.2: - * Modified ReadMe.txt to include the latest info on the Xcode 3.2 conflict - * Include a link to Andre Simon's page with previews of color styles - -2.0.1: - * Corrected build of Highlight to run on Leopard. - * Stop redirecting stdout of colorize.sh to stdin. Error output will appear - in the console instead of the preview. - * Added qlcc_debug option. To enable, use: - defaults write org.n8gray.qlcolorcode qlcc_debug 1 - To disable, use: - defaults delete org.n8gray.qlcolorcode qlcc_debug - -2.0: - * Added a note about conflict with Xcode 3.2's source code QL plugin. If - you're having problems with QLCC on Snow Leopard please read it! - * Fixed a bug that caused QLCC to fail on files whose names contained '%'. - * Added support for Scala, Groovy, Interactive Data Language, and Coldfusion - * Upgrade highlight from 2.6.6 to 2.12 -- This was long overdue. It's nice - not to have to patch highlight anymore! - * Removed customized .css language definition -- it was fixed upstream. - * Build for x86_64 in addition to i386 and ppc - -1.1: - * Enabled "safe" plain-text handling. In other words, files like foo.txt - will be supported, but not files without extensions. The only way to - handle extensionless files is to handle *everything*. This can be done, - but it requires a more defensive style of operation. - * Added support for "textEncoding" option to set encoding for highlight - portion of renderer, with default UTF-8. - * Added support for "webkitTextEncoding" option to set encoding for webkit - portion of renderer, with default UTF-8. - * Added support for .cs, .el, .jnlp (xml), .e (eiffel), and .vb - * Fixed support for verilog files - -1.0: - * Hopefully fixed the crasher bug by keeping us single-threaded - * Added Actionscript, Lisp, IDL, Verilog, VHDL, XHTML (any others I forgot?) - * Added .cls and .sty as LaTeX extensions - * Added maxFileSize option to keep us from hanging on huge files. - -0.4: - * Added Tcl, Lua, and JSP support - * Can now configure appearance with "defaults write org.n8gray.QLColorCode ..." commands - * Improved OCaml, C/C++ and Obj-C modes. - -0.3: - * Ensure highlight is compiled as a universal binary - * If highlight fails to colorize a file render it as plain text - * Added .command as an alternate extension for shell scripts - * Added .mll and .mly extensions for OCaml - * Include customized .css and .c language definition files - * Created a slateGreen theme that matches my editor colors. :-) - -0.2: - * Switched from Pygments to Highlight. This should increase speed *and* language coverage. - * Added thumbnailing support - * Changed .tex UTI to agree with TeXShop's. - * (Try to) let the system pick a different plugin if ours fails - * Added UTIs for .css, .sql, .erl, and .sml - -0.1: Initial release diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..069b203 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,215 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [3.0.0] — 2020-08-16 + +### Added + +- JetBrain IML Project file support (as standard XML files). +- YAML support (thanks @JJGO). +- Crystal Support (thanks @crjaensch). +- HS/Cabal/VueJS/Go/Rust/C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. +- Support Mojave Dark mode (thanks @darkbrow). + +### Removed + +- Plain-Text files support to allow QLStephen processing. + +### Fixed + +- Fix Height/Width/MinimumSize (thanks @darkbrow). + +## [2.1.0] — 2018-06-19 + +### Added + +- Option to preview file as RTF (thanks @silum). +- Kotlin/Gradle (thanks @sonique6784). +- C#/Scala support. +- "reduce_filesize" plugin by default. + +### Removed + +- JSON support (thanks @erdtsksn). + +## [2.0.9] — 2017-10-02 + +### Added + +- PHP/JS support (thanks @sloanlance). +- C#/F# support (thanks @breiter). + +## [2.0.8] — 2016-10-05 + +### Removed + +- bash_ref_linuxmanpages_com plugin. + +## [2.0.7] — 2016-04-16 + +### Fixed + +- autodetect path on 10.11 (thanks @cc941201). +- LaTeX and Arduino support. + +## [2.0.6] — 2016-03-21 + +### Added + +- Logos source file support (as plain text). +- ViM Scripts source file support. +- Ability to use an optional theme only for thumbnails (thanks @vilhelmen). +- Autodetect "highlight" path (thanks @saagarjha). + +### Changed + +- Code is now GPL 3. + +## [2.0.5] — 2016-01-19 + +Lots of minor changes + +## [2.0.4] — 2012-09-05 + +First version of Anthony GELIBERT. + +### Added + +- New setting to specify the HL path (/opt/local/bin/highlight by default). +- Some other formats to render. + +### Changed + +- Update the XCode Project to 10.8 +- Update the script "colorize.sh" to obtain ZSH by the environment rather than an hardcoded path. +- Update the script "colorize.sh" to call ZSH by "zsh -f" rather than simply "zsh". + +### Fixed + +- Correct some code according to CLang static analyzer. + +## [2.0.2] — 2009-09-18 + +### Added + +- Include a link to Andre Simon's page with previews of color styles + +### Changed + +- Modified ReadMe.txt to include the latest info on the Xcode 3.2 conflict + +## [2.0.1] — 2009-09-18 + +### Added + +- Added qlcc_debug option. To enable, use: + defaults write org.n8gray.qlcolorcode qlcc_debug 1 +To disable, use: + defaults delete org.n8gray.qlcolorcode qlcc_debug + +### Changed + +- Stop redirecting stdout of colorize.sh to stdin. Error output will appear +in the console instead of the preview. + +### Fixed + +- Build of Highlight to run on Leopard. + +## [2.0.0] — 2009-09-17 + +### Added + +- A note about conflict with Xcode 3.2's source code QL plugin. If + you're having problems with QLCC on Snow Leopard please read it! +- Support for Scala, Groovy, Interactive Data Language, and Coldfusion +- Build for x86_64 in addition to i386 and ppc + +### Changed + +- Upgrade highlight from 2.6.6 to 2.12 -- This was long overdue. It's nice not to have to patch highlight anymore! + +### Removed + +- Customized .css language definition -- it was fixed upstream. + +### Fixed + +- Fixed a bug that caused QLCC to fail on files whose names contained '%'. + +## [1.1] — 2009-01-10 + +### Added + +- Enabled "safe" plain-text handling. In other words, files like foo.txt will be supported, but not files without extensions. The only way to handle extensionless files is to handle -everything-. This can be done, but it requires a more defensive style of operation. +- Support for "textEncoding" option to set encoding for highlight portion of renderer, with default UTF-8. +- Support for "webkitTextEncoding" option to set encoding for webkit portion of renderer, with default UTF-8. +- Support for `.cs`, `.el`, `.jnlp` (xml), `.e` (eiffel), and `.vb`. + +### Fixed + +- Fixed support for verilog files + +## [1.0] — 2008-01-07 + +### Added + +- Actionscript, Lisp, IDL, Verilog, VHDL, XHTML (any others I forgot?) +- `.cls` and `.sty` as LaTeX extensions. +- `maxFileSize` option to keep us from hanging on huge files. + +### Fixed + +- Hopefully fixed the crasher bug by keeping us single-threaded + +## [0.4] — 2008-01-07 + +### Added + +- Added Tcl, Lua, and JSP support + +### Changed + +- Can now configure appearance with "defaults write org.n8gray.QLColorCode ..." commands + +### Fixed + +- Improved OCaml, C/C++ and Obj-C modes. + +## [0.3] — 2007-12-15 + +### Added + +- Added .command as an alternate extension for shell scripts +- Added .mll and .mly extensions for OCaml +- Include customized .css and .c language definition files +- Created a slateGreen theme that matches my editor colors. + +### Changed + +- If highlight fails to colorize a file render it as plain text + +### Fixed + +- Ensure highlight is compiled as a universal binary + +## [0.2] — 2007-12-14 + +### Added + +- Added thumbnailing support +- Added UTIs for `.css`, `.sql`, `.erl`, and `.sml` + +### Changed + +- Switched from Pygments to Highlight. This should increase speed -and- language coverage. +- Changed .tex UTI to agree with TeXShop's. +- (Try to) let the system pick a different plugin if ours fails + +## [0.1] — + +Initial release From 2bb2a2f693a899c05a44a06ba6ad6348bbaa3690 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 05:11:16 +0200 Subject: [PATCH 51/95] CHANGELOG is now CHANGELOG.md Signed-off-by: Anthony Gelibert --- QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 385154c..4bfd15b 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -29,8 +29,8 @@ EA43671F15F6BF9C009DA6C0 /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = EA43671915F6BF9C009DA6C0 /* GeneratePreviewForURL.m */; }; EA43672015F6BF9C009DA6C0 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = EA43671A15F6BF9C009DA6C0 /* GenerateThumbnailForURL.m */; }; EA43672115F6BF9C009DA6C0 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = EA43671B15F6BF9C009DA6C0 /* main.c */; }; - EA43672F15F6C1B8009DA6C0 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = EA43672B15F6C1B8009DA6C0 /* CHANGELOG */; }; EA43673015F6C1B8009DA6C0 /* COPYING in Resources */ = {isa = PBXBuildFile; fileRef = EA43672C15F6C1B8009DA6C0 /* COPYING */; }; + EACE3C6A24E8D93800B58A51 /* CHANGELOG.md in Resources */ = {isa = PBXBuildFile; fileRef = EACE3C6924E8D93800B58A51 /* CHANGELOG.md */; }; EAE9D2CC169E2B3500A67B2F /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = EAE9D2CB169E2B3500A67B2F /* README.md */; }; /* End PBXBuildFile section */ @@ -66,9 +66,9 @@ EA43671915F6BF9C009DA6C0 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GeneratePreviewForURL.m; path = src/GeneratePreviewForURL.m; sourceTree = ""; }; EA43671A15F6BF9C009DA6C0 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GenerateThumbnailForURL.m; path = src/GenerateThumbnailForURL.m; sourceTree = ""; }; EA43671B15F6BF9C009DA6C0 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = src/main.c; sourceTree = ""; }; - EA43672B15F6C1B8009DA6C0 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = ""; }; EA43672C15F6C1B8009DA6C0 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; EA43673315F6C23F009DA6C0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EACE3C6924E8D93800B58A51 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; EAE9D2CB169E2B3500A67B2F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; /* End PBXFileReference section */ @@ -86,7 +86,7 @@ 089C166AFE841209C02AAC07 /* QLColorCode */ = { isa = PBXGroup; children = ( - EA43672B15F6C1B8009DA6C0 /* CHANGELOG */, + EACE3C6924E8D93800B58A51 /* CHANGELOG.md */, EA43672C15F6C1B8009DA6C0 /* COPYING */, EAE9D2CB169E2B3500A67B2F /* README.md */, 08FB77AFFE84173DC02AAC07 /* Source */, @@ -191,7 +191,7 @@ buildActionMask = 2147483647; files = ( EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */, - EA43672F15F6C1B8009DA6C0 /* CHANGELOG in Resources */, + EACE3C6A24E8D93800B58A51 /* CHANGELOG.md in Resources */, EA43673015F6C1B8009DA6C0 /* COPYING in Resources */, EAE9D2CC169E2B3500A67B2F /* README.md in Resources */, ); From 065219689d977ec239c7cf33e125e66921cf3997 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 05:11:23 +0200 Subject: [PATCH 52/95] Update CHANGELOG Signed-off-by: Anthony Gelibert --- CHANGELOG.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 069b203..0dc3fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- CHANGELOG follow "Keep a Changelog". + +### Removed + +- `jad` support. + + ## [3.0.0] — 2020-08-16 ### Added -- JetBrain IML Project file support (as standard XML files). -- YAML support (thanks @JJGO). -- Crystal Support (thanks @crjaensch). -- HS/Cabal/VueJS/Go/Rust/C/C++/Objective-C/Lua/CSH/ZSH/Python/CFG support. +- `JetBrain IML Project file` support (as standard XML files). +- `YAML` support (thanks @JJGO). +- `Crystal` Support (thanks @crjaensch). +- `HS`/`Cabal`/`VueJS`/`Go`/`Rust`/`C`/`C++`/`Objective-C`/`Lua`/`CSH`/`ZSH`/`Python`/`CFG` support. - Support Mojave Dark mode (thanks @darkbrow). ### Removed @@ -21,7 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed -- Fix Height/Width/MinimumSize (thanks @darkbrow). +- Fix `Height`/`Width`/`MinimumSize` (thanks @darkbrow). ## [2.1.0] — 2018-06-19 From 8fb88cf4cd0c6fa4844c3c85892aa33635e2e8c8 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 05:11:34 +0200 Subject: [PATCH 53/95] Minor cleaning Signed-off-by: Anthony Gelibert --- README.md | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 25468d0..bc45217 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Alternative, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cas install with `brew cask install qlcolorcode`. ## Settings + If you want to configure `QLColorCode`, there are several `defaults` commands that could be useful: Setting the text encoding (default is `UTF-8`). Two settings are required. The first sets Highlight's encoding, the second sets Webkit's: @@ -96,7 +97,6 @@ to QLStephen. QLColorCode decompiles some formats: -- **Java class**. It requires [jad](http://varaneckas.com/jad/) installed at `/usr/local/bin/jad`. - **Compiled AppleScript**. It requires `osadecompile` installed at `/usr/bin/osadecompile`. - **Binary PLIST**. It requires `plutil` installed at `/usr/bin/plutil`. @@ -106,7 +106,7 @@ QLColorCode decompiles some formats: QLColorCode enables some Highlight plug-ins : -- In all languages: `outhtml_modern_fonts` and `outhtml_codefold`. +- In all languages: `outhtml_codefold` and `reduce_filesize`. - Java (sources and classes): `java_library`. - C/C++: `cpp_syslog`, `cpp_ref_cplusplus_com` and `cpp_ref_local_includes`. - Perl: `perl_ref_perl_org`. @@ -115,6 +115,7 @@ QLColorCode enables some Highlight plug-ins : - Scala: `scala_ref_scala_lang_org`. #### Handled languages + Highlight can handle lots and lots of languages, but this plug-in will only be invoked for file types that the OS knows are type "source-code". Since the OS only knows about a limited number of languages, I've added Universal Type @@ -134,44 +135,42 @@ cool! ##### Adding Language Types If QLColorCode doesn't display PHP and JavaScript code properly, their types may -need to be added to Info.plist. Finding the right type string to use is the +need to be added to Info.plist. Finding the right type string to use is the tricky part. Getting the type strings and getting Info.plist edits to take effect is easy by following the steps below, which explain how to add support for PHP: -0. In Terminal.app (or any shell prompt), enter the command: - +1. In Terminal.app (or any shell prompt), enter the command: + ``` bash mdls -name kMDItemContentType /full/path/to/file.php ``` - + Use the path to any PHP file. The response will be: - + ``` txt kMDItemContentType = "public.php-script" ``` - + The string `public.php-script` is the type string needed in a later step. - -0. Again at a shell prompt, enter the command: - + +2. Again at a shell prompt, enter the command: + ``` bash open ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist ``` - + This will open Info.plist in Xcode.app. - -0. In Xcode.app's edit window for Info.plist, go to: - + +3. In Xcode.app's edit window for Info.plist, go to: + Document types > Item 0 > Document Content Type UTIs - + (If the editor is showing raw keys, that's: CFBundleDocumentTypes > Item 0 > LSItemContentTypes) -0. Add an item for `public.php-script`, the type string found in the first step. - -0. Save the updated Info.plist file. - -0. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising that some users might need to do so.) +4. Add an item for `public.php-script`, the type string found in the first step. +5. Save the updated Info.plist file. +6. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising that some users might need to do so.) The Info.plist included with this version of QLColorCode already contains types for PHP and JavaScript code, but these steps show how easy it is to add other From ed6a1a99d02933455ce1beb0f2e51cb8c6c1e5fa Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 05:11:47 +0200 Subject: [PATCH 54/95] Remove class support (no more JAD available) Signed-off-by: Anthony Gelibert --- src/colorize.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/colorize.sh b/src/colorize.sh index 8e4c3d2..b08564e 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -57,11 +57,6 @@ case ${target} in lang=java plugin=(--plug-in java_library) ;; - *.class ) - lang=java - reader=(/usr/local/bin/jad -ff -dead -noctor -p -t ${target}) - plugin=(--plug-in java_library) - ;; *.pde | *.ino ) lang=c ;; From a484d70ec6939784e786383bcfb7742c2ff23908 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 16 Aug 2020 05:33:46 +0200 Subject: [PATCH 55/95] Update CHANGELOG.md Signed-off-by: Anthony Gelibert --- CHANGELOG.md | 100 +++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc3fb9..fdaf497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,43 +38,43 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added -- Option to preview file as RTF (thanks @silum). -- Kotlin/Gradle (thanks @sonique6784). -- C#/Scala support. -- "reduce_filesize" plugin by default. +- Option to preview file as `RTF` (thanks @silum). +- `Kotlin/Gradle` (thanks @sonique6784). +- `C#/Scala` support. +- `reduce_filesize` plugin by default. ### Removed -- JSON support (thanks @erdtsksn). +- `JSON` support (thanks @erdtsksn). ## [2.0.9] — 2017-10-02 ### Added -- PHP/JS support (thanks @sloanlance). -- C#/F# support (thanks @breiter). +- `PHP`/`JS` support (thanks @sloanlance). +- `C#`/`F#` support (thanks @breiter). ## [2.0.8] — 2016-10-05 ### Removed -- bash_ref_linuxmanpages_com plugin. +- `bash_ref_linuxmanpages_com` plugin. ## [2.0.7] — 2016-04-16 ### Fixed - autodetect path on 10.11 (thanks @cc941201). -- LaTeX and Arduino support. +- `LaTeX` and `Arduino` support. ## [2.0.6] — 2016-03-21 ### Added -- Logos source file support (as plain text). -- ViM Scripts source file support. +- `Logos` source file support (as plain text). +- `ViM Scripts` source file support. - Ability to use an optional theme only for thumbnails (thanks @vilhelmen). -- Autodetect "highlight" path (thanks @saagarjha). +- Autodetect `highlight` path (thanks @saagarjha). ### Changed @@ -90,137 +90,135 @@ First version of Anthony GELIBERT. ### Added -- New setting to specify the HL path (/opt/local/bin/highlight by default). +- New setting to specify the HL path (`/opt/local/bin/highlight` by default). - Some other formats to render. ### Changed -- Update the XCode Project to 10.8 -- Update the script "colorize.sh" to obtain ZSH by the environment rather than an hardcoded path. -- Update the script "colorize.sh" to call ZSH by "zsh -f" rather than simply "zsh". +- Update the XCode Project to 10.8. +- Update the script `colorize.sh` to obtain ZSH by the environment rather than an hardcoded path. +- Update the script `colorize.sh` to call ZSH by `zsh -f` rather than simply `zsh`. ### Fixed -- Correct some code according to CLang static analyzer. +- Correct some code according to `CLang static analyzer`. ## [2.0.2] — 2009-09-18 ### Added -- Include a link to Andre Simon's page with previews of color styles +- Include a link to Andre Simon's page with previews of color styles. ### Changed -- Modified ReadMe.txt to include the latest info on the Xcode 3.2 conflict +- Modified `ReadMe.txt` to include the latest info on the `Xcode 3.2` conflict ## [2.0.1] — 2009-09-18 ### Added - Added qlcc_debug option. To enable, use: - defaults write org.n8gray.qlcolorcode qlcc_debug 1 + `defaults write org.n8gray.qlcolorcode qlcc_debug 1` To disable, use: - defaults delete org.n8gray.qlcolorcode qlcc_debug + `defaults delete org.n8gray.qlcolorcode qlcc_debug` ### Changed -- Stop redirecting stdout of colorize.sh to stdin. Error output will appear -in the console instead of the preview. +- Stop redirecting `stdout` of `colorize.sh` to `stdin`. Error output will appear in the console instead of the preview. ### Fixed -- Build of Highlight to run on Leopard. +- Build of `highlight` to run on Leopard. ## [2.0.0] — 2009-09-17 ### Added -- A note about conflict with Xcode 3.2's source code QL plugin. If - you're having problems with QLCC on Snow Leopard please read it! -- Support for Scala, Groovy, Interactive Data Language, and Coldfusion -- Build for x86_64 in addition to i386 and ppc +- A note about conflict with Xcode 3.2's source code QL plugin. If you're having problems with QLCC on Snow Leopard please read it! +- Support for `Scala`, `Groovy`, `Interactive Data Language`, and `Coldfusion`. +- Build for `x86_64` in addition to `i386` and `ppc`. ### Changed -- Upgrade highlight from 2.6.6 to 2.12 -- This was long overdue. It's nice not to have to patch highlight anymore! +- Upgrade `highlight` from `2.6.6` to `2.12` -- This was long overdue. It's nice not to have to patch highlight anymore! ### Removed -- Customized .css language definition -- it was fixed upstream. +- Customized `.css` language definition -- it was fixed upstream. ### Fixed -- Fixed a bug that caused QLCC to fail on files whose names contained '%'. +- Fixed a bug that caused `QLCC` to fail on files whose names contained '`%`'. ## [1.1] — 2009-01-10 ### Added - Enabled "safe" plain-text handling. In other words, files like foo.txt will be supported, but not files without extensions. The only way to handle extensionless files is to handle -everything-. This can be done, but it requires a more defensive style of operation. -- Support for "textEncoding" option to set encoding for highlight portion of renderer, with default UTF-8. -- Support for "webkitTextEncoding" option to set encoding for webkit portion of renderer, with default UTF-8. +- Support for `textEncoding` option to set encoding for highlight portion of renderer, with default `UTF-8`. +- Support for `webkitTextEncoding` option to set encoding for webkit portion of renderer, with default `UTF-8`. - Support for `.cs`, `.el`, `.jnlp` (xml), `.e` (eiffel), and `.vb`. ### Fixed -- Fixed support for verilog files +- Fixed support for `Verilog` files. ## [1.0] — 2008-01-07 ### Added -- Actionscript, Lisp, IDL, Verilog, VHDL, XHTML (any others I forgot?) +- `Actionscript`, `Lisp`, `IDL`, `Verilog`, `VHDL`, `XHTML` (any others I forgot?). - `.cls` and `.sty` as LaTeX extensions. - `maxFileSize` option to keep us from hanging on huge files. ### Fixed -- Hopefully fixed the crasher bug by keeping us single-threaded +- Hopefully fixed the crasher bug by keeping us single-threaded. ## [0.4] — 2008-01-07 ### Added -- Added Tcl, Lua, and JSP support +- Added `Tcl`, `Lua`, and `JSP` support. ### Changed -- Can now configure appearance with "defaults write org.n8gray.QLColorCode ..." commands +- Can now configure appearance with `defaults write org.n8gray.QLColorCode ...` commands. ### Fixed -- Improved OCaml, C/C++ and Obj-C modes. +- Improved `OCaml`, `C/C++` and `Obj-C` modes. ## [0.3] — 2007-12-15 ### Added -- Added .command as an alternate extension for shell scripts -- Added .mll and .mly extensions for OCaml -- Include customized .css and .c language definition files -- Created a slateGreen theme that matches my editor colors. +- Added `.command` as an alternate extension for shell scripts. +- Added `.mll` and `.mly` extensions for `OCaml`. +- Include customized `.css` and `.c` language definition files. +- Created a `slateGreen` theme that matches my editor colors. ### Changed -- If highlight fails to colorize a file render it as plain text +- If highlight fails to colorize a file render it as plain text. ### Fixed -- Ensure highlight is compiled as a universal binary +- Ensure highlight is compiled as a Universal Binary. ## [0.2] — 2007-12-14 ### Added -- Added thumbnailing support -- Added UTIs for `.css`, `.sql`, `.erl`, and `.sml` +- Added thumbnailing support. +- Added UTIs for `.css`, `.sql`, `.erl`, and `.sml`. ### Changed -- Switched from Pygments to Highlight. This should increase speed -and- language coverage. -- Changed .tex UTI to agree with TeXShop's. -- (Try to) let the system pick a different plugin if ours fails +- Switched from Pygments to Highlight. This should increase speed-and-language coverage. +- Changed `.tex` `UTI` to agree with TeXShop's. +- (Try to) let the system pick a different plugin if ours fails. -## [0.1] — +## [0.1] Initial release From 38afb3f450bb6e1cdd665351f7422edb29b1a999 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Fri, 4 Sep 2020 15:27:19 +0200 Subject: [PATCH 56/95] bazel support --- CHANGELOG.md | 4 ++++ Info.plist | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdaf497..6f80ff8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- `bazel` support. + ### Changed - CHANGELOG follow "Keep a Changelog". diff --git a/Info.plist b/Info.plist index 4f8d1d8..5f61bc2 100644 --- a/Info.plist +++ b/Info.plist @@ -51,6 +51,9 @@ dyn.ah62d4rv4ge80g6u dyn.ah62d4rv4ge80g3xh dyn.ah62d4rv4ge81q7pf + dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq @@ -1221,6 +1224,25 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq + + UTTypeDescription + Bazel Source File + UTTypeIdentifier + org.bazel.source + UTTypeTagSpecification + + public.filename-extension + + bazel + bzl + + + From b262347f1aba4be72be76beca95378a811ba84a3 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Fri, 4 Sep 2020 15:30:23 +0200 Subject: [PATCH 57/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 6 +++++- QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f80ff8..7e4da44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +Nothing + +## [3.0.1] — 2020-09-04 + ### Added - `bazel` support. ### Changed -- CHANGELOG follow "Keep a Changelog". +- `CHANGELOG.md` follows "Keep a Changelog". ### Removed diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 4bfd15b..e03c250 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -286,9 +286,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "3.0.1+dev1"; + CURRENT_PROJECT_VERSION = 3.0.1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = "3.0.1+dev1"; + MARKETING_VERSION = 3.0.1; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -298,9 +298,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "3.0.1+dev1"; + CURRENT_PROJECT_VERSION = 3.0.1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = "3.0.1+dev1"; + MARKETING_VERSION = 3.0.1; }; name = Release; }; From c6402e6105186c152c2e5920a9c9bae29b293db8 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Fri, 4 Sep 2020 15:41:00 +0200 Subject: [PATCH 58/95] Add an empty Test Plan --- QLColorCode.xcodeproj/project.pbxproj | 10 +++++--- .../xcshareddata/xcschemes/Travis.xcscheme | 25 +++++++++++++------ Travis.xctestplan | 23 +++++++++++++++++ 3 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 Travis.xctestplan diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index e03c250..49bd3b6 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -68,6 +68,7 @@ EA43671B15F6BF9C009DA6C0 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = src/main.c; sourceTree = ""; }; EA43672C15F6C1B8009DA6C0 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; EA43673315F6C23F009DA6C0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EA4FF23425027B3F00A5421D /* Travis.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Travis.xctestplan; sourceTree = ""; }; EACE3C6924E8D93800B58A51 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; EAE9D2CB169E2B3500A67B2F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; /* End PBXFileReference section */ @@ -86,6 +87,7 @@ 089C166AFE841209C02AAC07 /* QLColorCode */ = { isa = PBXGroup; children = ( + EA4FF23425027B3F00A5421D /* Travis.xctestplan */, EACE3C6924E8D93800B58A51 /* CHANGELOG.md */, EA43672C15F6C1B8009DA6C0 /* COPYING */, EAE9D2CB169E2B3500A67B2F /* README.md */, @@ -286,9 +288,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.1; + CURRENT_PROJECT_VERSION = 3.0.2.dev1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.1; + MARKETING_VERSION = 3.0.2.dev1; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -298,9 +300,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.1; + CURRENT_PROJECT_VERSION = 3.0.2.dev1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.1; + MARKETING_VERSION = 3.0.2.dev1; }; name = Release; }; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme index e05d4c0..acc380c 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme @@ -1,10 +1,10 @@ + version = "1.7"> + buildImplicitDependencies = "YES"> - - - - + + + + - - + + + + diff --git a/Travis.xctestplan b/Travis.xctestplan new file mode 100644 index 0000000..3fb99e2 --- /dev/null +++ b/Travis.xctestplan @@ -0,0 +1,23 @@ +{ + "configurations" : [ + { + "id" : "C8700132-686F-4CBD-BC8A-6A4291DF0FEE", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + "codeCoverage" : false, + "targetForVariableExpansion" : { + "containerPath" : "container:QLColorCode.xcodeproj", + "identifier" : "8D57630D048677EA00EA77CD", + "name" : "QLColorCode" + } + }, + "testTargets" : [ + + ], + "version" : 1 +} From 44f36c9b5b35275e4a7f0a9ea09ea51b4222ad16 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 8 Sep 2020 15:36:02 +0200 Subject: [PATCH 59/95] Revert "Add an empty Test Plan" This reverts commit c6402e6105186c152c2e5920a9c9bae29b293db8. --- QLColorCode.xcodeproj/project.pbxproj | 10 +++----- .../xcshareddata/xcschemes/Travis.xcscheme | 25 ++++++------------- Travis.xctestplan | 23 ----------------- 3 files changed, 12 insertions(+), 46 deletions(-) delete mode 100644 Travis.xctestplan diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 49bd3b6..e03c250 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -68,7 +68,6 @@ EA43671B15F6BF9C009DA6C0 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = src/main.c; sourceTree = ""; }; EA43672C15F6C1B8009DA6C0 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COPYING; sourceTree = ""; }; EA43673315F6C23F009DA6C0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EA4FF23425027B3F00A5421D /* Travis.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Travis.xctestplan; sourceTree = ""; }; EACE3C6924E8D93800B58A51 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; EAE9D2CB169E2B3500A67B2F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; /* End PBXFileReference section */ @@ -87,7 +86,6 @@ 089C166AFE841209C02AAC07 /* QLColorCode */ = { isa = PBXGroup; children = ( - EA4FF23425027B3F00A5421D /* Travis.xctestplan */, EACE3C6924E8D93800B58A51 /* CHANGELOG.md */, EA43672C15F6C1B8009DA6C0 /* COPYING */, EAE9D2CB169E2B3500A67B2F /* README.md */, @@ -288,9 +286,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.2.dev1; + CURRENT_PROJECT_VERSION = 3.0.1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.2.dev1; + MARKETING_VERSION = 3.0.1; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -300,9 +298,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.2.dev1; + CURRENT_PROJECT_VERSION = 3.0.1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.2.dev1; + MARKETING_VERSION = 3.0.1; }; name = Release; }; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme index acc380c..e05d4c0 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Travis.xcscheme @@ -1,10 +1,10 @@ + version = "1.3"> + buildImplicitDependencies = "NO"> - - - - + + + + + + - - - - diff --git a/Travis.xctestplan b/Travis.xctestplan deleted file mode 100644 index 3fb99e2..0000000 --- a/Travis.xctestplan +++ /dev/null @@ -1,23 +0,0 @@ -{ - "configurations" : [ - { - "id" : "C8700132-686F-4CBD-BC8A-6A4291DF0FEE", - "name" : "Configuration 1", - "options" : { - - } - } - ], - "defaultOptions" : { - "codeCoverage" : false, - "targetForVariableExpansion" : { - "containerPath" : "container:QLColorCode.xcodeproj", - "identifier" : "8D57630D048677EA00EA77CD", - "name" : "QLColorCode" - } - }, - "testTargets" : [ - - ], - "version" : 1 -} From c61115cd018aab7e21b147e7fdd9b87f6fad2654 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 8 Sep 2020 15:36:22 +0200 Subject: [PATCH 60/95] XSD/XQuery support --- CHANGELOG.md | 4 +++- Info.plist | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e4da44..e9b2249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -Nothing +### Added + +- `xsd`/`xquery` support. ## [3.0.1] — 2020-09-04 diff --git a/Info.plist b/Info.plist index 5f61bc2..0ea46f4 100644 --- a/Info.plist +++ b/Info.plist @@ -54,6 +54,8 @@ dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u dyn.ah62d4rv4ge80e2p4qz0a dyn.ah62d4rv4ge80e8xq + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw @@ -1243,6 +1245,25 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw + + UTTypeDescription + XSD/XQuery/ProfRaw Source File + UTTypeIdentifier + org.xml-tools.source + UTTypeTagSpecification + + public.filename-extension + + xsd + xquery + + + From 14fd09e1b3a9456ddc0db35d13bff80cd37607ea Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 8 Sep 2020 16:54:18 +0200 Subject: [PATCH 61/95] Add XSL support --- Info.plist | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Info.plist b/Info.plist index 0ea46f4..ea96ba4 100644 --- a/Info.plist +++ b/Info.plist @@ -56,6 +56,7 @@ dyn.ah62d4rv4ge80e8xq dyn.ah62d4rv4ge81u65e dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file @@ -1250,9 +1251,11 @@ dyn.ah62d4rv4ge81u65e dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file + public.xml UTTypeDescription - XSD/XQuery/ProfRaw Source File + XSD/XQuery/XSL/XML Source File UTTypeIdentifier org.xml-tools.source UTTypeTagSpecification @@ -1261,6 +1264,8 @@ xsd xquery + xml + xsl From a26074512ca1464d14baf99b12994e64178b7a5c Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 8 Sep 2020 16:57:59 +0200 Subject: [PATCH 62/95] Minimum rendering size is now 9 --- CHANGELOG.md | 6 +- Info.plist | 2522 +++++++++++++++++++++++++------------------------- 2 files changed, 1266 insertions(+), 1262 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b2249..4d4242b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added -- `xsd`/`xquery` support. +- `xsd`/`xquery`/`xml`/`xsl` support. + +### Changed + +- Minimum rendering size is now `9`. ## [3.0.1] — 2020-09-04 diff --git a/Info.plist b/Info.plist index ea96ba4..5fcdeb3 100644 --- a/Info.plist +++ b/Info.plist @@ -1,1274 +1,1274 @@ - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeName - - CFBundleTypeRole - QLGenerator - LSItemContentTypes - - public.source-code - public.yaml - public.php-script - com.netscape.javascript-source - com.microsoft.c-sharp - com.microsoft.f-sharp - public.css - com.apple.applescript.script - public.xml - com.apple.property-list - org.tug.tex - com.sun.java-class - org.vim.vim-script - org.tug.lua - public.tex - public.text - public.shell-script - public.c-header - public.objective-c-source - public.c-source - public.csh-script - public.zsh-script - public.python-script - com.apple.property-list - com.apple.xcode.strings-text - dyn.ah62d4rv4ge81g6pq - dyn.ah62d4rv4ge8007a - dyn.ah62d4rv4ge80s6xbqv0gn - dyn.ah62d4rv4ge81g25brvuu - dyn.ah62d4rv4ge80g62 - dyn.ah62d4rv4ge80w5pq - dyn.ah62d4rv4ge80s52 - dyn.ah62d4rv4ge80g2pcqf0a - dyn.ah62d4rv4ge81e62 - dyn.ah62d4rv4ge80u62 - dyn.ah62d4rv4ge80g6u - dyn.ah62d4rv4ge80g3xh - dyn.ah62d4rv4ge81q7pf - dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u - dyn.ah62d4rv4ge80e2p4qz0a - dyn.ah62d4rv4ge80e8xq - dyn.ah62d4rv4ge81u65e - dyn.ah62d4rv4ge81u6pzqz3hw - org.vim.xsl-file - - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - C044543D-70A1-46D8-A908-4B8AEA1197A4 - QuickLookGeneratorPluginFactory - - CFPlugInTypes - - 5E2D9680-5022-40FA-B806-43349622E5B9 + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes - C044543D-70A1-46D8-A908-4B8AEA1197A4 - - - CFPlugInUnloadFunction - - QLNeedsToBeRunInMainThread - - QLPreviewHeight - 800 - QLPreviewWidth - 800 - QLSupportsConcurrentRequests - - QLThumbnailMinimumSize - 17 - UTImportedTypeDeclarations - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Logos Source File - UTTypeIdentifier - com.dhowett.logos - UTTypeTagSpecification - - public.filename-extension - - xm - - - - - UTTypeIdentifier - org.ocaml.ocaml-source - UTTypeReferenceURL - http://www.ocaml.org/ - UTTypeTagSpecification - - public.filename-extension - - ml - mll - mly - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - OCaml Interface File - UTTypeIdentifier - org.ocaml.ocaml-interface - UTTypeReferenceURL - http://www.ocaml.org/ - UTTypeTagSpecification - - public.filename-extension - - mli - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Haskell Source File - UTTypeIdentifier - org.haskell.haskell-source - UTTypeReferenceURL - http://www.haskell.org/ - UTTypeTagSpecification - - public.filename-extension - - hs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Literate Haskell Source File - UTTypeIdentifier - org.haskell.literate-haskell-source - UTTypeReferenceURL - http://www.haskell.org/ - UTTypeTagSpecification - - public.filename-extension - - lhs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - scheme Source File - UTTypeIdentifier - org.n8gray.scheme-source - UTTypeTagSpecification - public.filename-extension - - scm + CFBundleTypeName + + CFBundleTypeRole + QLGenerator + LSItemContentTypes + + public.source-code + public.yaml + public.php-script + com.netscape.javascript-source + com.microsoft.c-sharp + com.microsoft.f-sharp + public.css + com.apple.applescript.script + public.xml + com.apple.property-list + org.tug.tex + com.sun.java-class + org.vim.vim-script + org.tug.lua + public.tex + public.text + public.shell-script + public.c-header + public.objective-c-source + public.c-source + public.csh-script + public.zsh-script + public.python-script + com.apple.property-list + com.apple.xcode.strings-text + dyn.ah62d4rv4ge81g6pq + dyn.ah62d4rv4ge8007a + dyn.ah62d4rv4ge80s6xbqv0gn + dyn.ah62d4rv4ge81g25brvuu + dyn.ah62d4rv4ge80g62 + dyn.ah62d4rv4ge80w5pq + dyn.ah62d4rv4ge80s52 + dyn.ah62d4rv4ge80g2pcqf0a + dyn.ah62d4rv4ge81e62 + dyn.ah62d4rv4ge80u62 + dyn.ah62d4rv4ge80g6u + dyn.ah62d4rv4ge80g3xh + dyn.ah62d4rv4ge81q7pf + dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - .ini Source File - UTTypeIdentifier - org.n8gray.ini-source - UTTypeTagSpecification + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + C044543D-70A1-46D8-A908-4B8AEA1197A4 + QuickLookGeneratorPluginFactory + + CFPlugInTypes + + 5E2D9680-5022-40FA-B806-43349622E5B9 + + C044543D-70A1-46D8-A908-4B8AEA1197A4 + + + CFPlugInUnloadFunction + + QLNeedsToBeRunInMainThread + + QLPreviewHeight + 800 + QLPreviewWidth + 800 + QLSupportsConcurrentRequests + + QLThumbnailMinimumSize + 9 + UTImportedTypeDeclarations + - public.filename-extension - - ini - - public.mime-type - text/x-ini - - - - UTTypeConformsTo - + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Logos Source File + UTTypeIdentifier + com.dhowett.logos + UTTypeTagSpecification + + public.filename-extension + + xm + + + + + UTTypeIdentifier + org.ocaml.ocaml-source + UTTypeReferenceURL + http://www.ocaml.org/ + UTTypeTagSpecification + + public.filename-extension + + ml + mll + mly + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + OCaml Interface File + UTTypeIdentifier + org.ocaml.ocaml-interface + UTTypeReferenceURL + http://www.ocaml.org/ + UTTypeTagSpecification + + public.filename-extension + + mli + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Haskell Source File + UTTypeIdentifier + org.haskell.haskell-source + UTTypeReferenceURL + http://www.haskell.org/ + UTTypeTagSpecification + + public.filename-extension + + hs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Literate Haskell Source File + UTTypeIdentifier + org.haskell.literate-haskell-source + UTTypeReferenceURL + http://www.haskell.org/ + UTTypeTagSpecification + + public.filename-extension + + lhs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + scheme Source File + UTTypeIdentifier + org.n8gray.scheme-source + UTTypeTagSpecification + + public.filename-extension + + scm + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + .ini Source File + UTTypeIdentifier + org.n8gray.ini-source + UTTypeTagSpecification + + public.filename-extension + + ini + + public.mime-type + text/x-ini + + + + UTTypeConformsTo + + public.tex + + UTTypeDescription + TeX text file + UTTypeIdentifier public.tex - - UTTypeDescription - TeX text file - UTTypeIdentifier - public.tex - UTTypeTagSpecification - - public.filename-extension - - tex - latex - ltx - texi - ctx - sty - cls - - - - - UTTypeConformsTo - + UTTypeTagSpecification + + public.filename-extension + + tex + latex + ltx + texi + ctx + sty + cls + + + + + UTTypeConformsTo + + public.yaml + + UTTypeDescription + YAML file + UTTypeIdentifier public.yaml - - UTTypeDescription - YAML file - UTTypeIdentifier - public.yaml - UTTypeTagSpecification - - public.filename-extension - - yaml - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Erlang Source File - UTTypeIdentifier - org.erlang.erlang-source - UTTypeTagSpecification - - public.filename-extension - - erl - hrl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Standard ML Source File - UTTypeIdentifier - org.n8gray.standard-ml-source - UTTypeTagSpecification - - public.filename-extension - - sml - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge81g6pq - - UTTypeDescription - SQL Source File - UTTypeIdentifier - org.n8gray.structured-query-language-source - UTTypeTagSpecification - - public.filename-extension - - sql - - - - - UTTypeConformsTo - - public.script - - UTTypeDescription - Diff File - UTTypeIdentifier - org.n8gray.diff-script - UTTypeTagSpecification - - public.filename-extension - - diff - patch - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - CSS File - UTTypeIdentifier - public.css - UTTypeTagSpecification - - public.filename-extension - - css - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Lua Source File - UTTypeIdentifier - org.lua.lua-source - UTTypeTagSpecification - - public.filename-extension - - lua - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Tcl Source File - UTTypeIdentifier - tk.tcl.tcl-source - UTTypeTagSpecification - - public.filename-extension - - tcl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - JSP Source File - UTTypeIdentifier - org.n8gray.jsp-source - UTTypeTagSpecification - - public.filename-extension - - jsp - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - DOS Batch Source File - UTTypeIdentifier - org.n8gray.bat - UTTypeTagSpecification - - public.filename-extension - - bat - cmd - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Adobe Flash ActionScript Source File - UTTypeIdentifier - com.adobe.actionscript - UTTypeTagSpecification - - public.filename-extension - - as - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Lisp Source File - UTTypeIdentifier - org.n8gray.lisp - UTTypeTagSpecification - - public.filename-extension - - sb - lisp - lsp - asd - el - clj - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge80s52 - - UTTypeDescription - Go Source File - UTTypeIdentifier - org.go.source - UTTypeTagSpecification - - public.filename-extension - - go - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - IDL Source File - UTTypeIdentifier - org.n8gray.idl - UTTypeTagSpecification - - public.filename-extension - - pro - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Makefile Source File - UTTypeIdentifier - org.n8gray.makefile - UTTypeTagSpecification - - public.filename-extension - - mk - mak - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Verilog Source File - UTTypeIdentifier - org.n8gray.verilog - UTTypeTagSpecification - - public.filename-extension - - v - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - VHDL Source File - UTTypeIdentifier - org.n8gray.vhdl - UTTypeTagSpecification - - public.filename-extension - - vhdl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - XHTML Source File - UTTypeIdentifier - org.n8gray.xhtml - UTTypeTagSpecification - - public.filename-extension - - xhtml - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - Java Web Installer (XML) - UTTypeIdentifier - org.n8gray.javaInstaller - UTTypeTagSpecification - - public.filename-extension - - jnlp - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Eiffel source code file - UTTypeIdentifier - com.eiffel.source-code - UTTypeTagSpecification - - public.filename-extension - - e - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - EiffelStudio project configuration file - UTTypeIdentifier - com.eiffel.eiffelstudio-project-config - UTTypeTagSpecification - - public.filename-extension - - ecf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - C# Source File - UTTypeIdentifier - com.microsoft.csharp-source - UTTypeReferenceURL - http://www.microsoft.com/ - UTTypeTagSpecification - - public.filename-extension - - cs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Visual Basic Source File - UTTypeIdentifier - com.microsoft.vb-source - UTTypeReferenceURL - http://www.microsoft.com/ - UTTypeTagSpecification - - public.filename-extension - - vb - + UTTypeTagSpecification + + public.filename-extension + + yaml + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Erlang Source File + UTTypeIdentifier + org.erlang.erlang-source + UTTypeTagSpecification + + public.filename-extension + + erl + hrl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Standard ML Source File + UTTypeIdentifier + org.n8gray.standard-ml-source + UTTypeTagSpecification + + public.filename-extension + + sml + + + + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge81g6pq + + UTTypeDescription + SQL Source File + UTTypeIdentifier + org.n8gray.structured-query-language-source + UTTypeTagSpecification + + public.filename-extension + + sql + + + + + UTTypeConformsTo + + public.script + + UTTypeDescription + Diff File + UTTypeIdentifier + org.n8gray.diff-script + UTTypeTagSpecification + + public.filename-extension + + diff + patch + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + CSS File + UTTypeIdentifier + public.css + UTTypeTagSpecification + + public.filename-extension + + css + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Lua Source File + UTTypeIdentifier + org.lua.lua-source + UTTypeTagSpecification + + public.filename-extension + + lua + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Tcl Source File + UTTypeIdentifier + tk.tcl.tcl-source + UTTypeTagSpecification + + public.filename-extension + + tcl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + JSP Source File + UTTypeIdentifier + org.n8gray.jsp-source + UTTypeTagSpecification + + public.filename-extension + + jsp + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + DOS Batch Source File + UTTypeIdentifier + org.n8gray.bat + UTTypeTagSpecification + + public.filename-extension + + bat + cmd + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Adobe Flash ActionScript Source File + UTTypeIdentifier + com.adobe.actionscript + UTTypeTagSpecification + + public.filename-extension + + as + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Lisp Source File + UTTypeIdentifier + org.n8gray.lisp + UTTypeTagSpecification + + public.filename-extension + + sb + lisp + lsp + asd + el + clj + + + + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge80s52 + + UTTypeDescription + Go Source File + UTTypeIdentifier + org.go.source + UTTypeTagSpecification + + public.filename-extension + + go + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + IDL Source File + UTTypeIdentifier + org.n8gray.idl + UTTypeTagSpecification + + public.filename-extension + + pro + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Makefile Source File + UTTypeIdentifier + org.n8gray.makefile + UTTypeTagSpecification + + public.filename-extension + + mk + mak + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Verilog Source File + UTTypeIdentifier + org.n8gray.verilog + UTTypeTagSpecification + + public.filename-extension + + v + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + VHDL Source File + UTTypeIdentifier + org.n8gray.vhdl + UTTypeTagSpecification + + public.filename-extension + + vhdl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + XHTML Source File + UTTypeIdentifier + org.n8gray.xhtml + UTTypeTagSpecification + + public.filename-extension + + xhtml + + + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + Java Web Installer (XML) + UTTypeIdentifier + org.n8gray.javaInstaller + UTTypeTagSpecification + + public.filename-extension + + jnlp + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Eiffel source code file + UTTypeIdentifier + com.eiffel.source-code + UTTypeTagSpecification + + public.filename-extension + + e + + + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + EiffelStudio project configuration file + UTTypeIdentifier + com.eiffel.eiffelstudio-project-config + UTTypeTagSpecification + + public.filename-extension + + ecf + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + C# Source File + UTTypeIdentifier + com.microsoft.csharp-source + UTTypeReferenceURL + http://www.microsoft.com/ + UTTypeTagSpecification + + public.filename-extension + + cs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Visual Basic Source File + UTTypeIdentifier + com.microsoft.vb-source + UTTypeReferenceURL + http://www.microsoft.com/ + UTTypeTagSpecification + + public.filename-extension + + vb + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Ruby on Rails File + UTTypeIdentifier + org.n8gray.railstemplate + UTTypeTagSpecification + + public.filename-extension + + rhtml + erb + rjs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + QLColorCode Test File + UTTypeIdentifier + org.n8gray.bogusextension + UTTypeTagSpecification + + public.filename-extension + + bogus_extension + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Groovy Source Code + UTTypeIdentifier + org.codehaus.groovy-source + UTTypeTagSpecification + + public.filename-extension + + groovy + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Scala Source Code + UTTypeIdentifier + org.scala.source + UTTypeTagSpecification + + public.filename-extension + + scala + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Coldfusion Source Code + UTTypeIdentifier + com.adobe.coldfusion + UTTypeTagSpecification + + public.filename-extension + + cfc + cfm + cfml + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + PDE files + UTTypeIdentifier + org.arduino.source + UTTypeTagSpecification + + public.filename-extension + + pde + ino + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + ASCR files + UTTypeIdentifier + org.applescript.source + UTTypeTagSpecification + + public.filename-extension + + ascr + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + RDF files + UTTypeIdentifier + org.rdf.source + UTTypeTagSpecification + + public.filename-extension + + rdf + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + XUL files + UTTypeIdentifier + org.xul.source + UTTypeTagSpecification + + public.filename-extension + + xul + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + INO files + UTTypeIdentifier + org.arduino.ino-source + UTTypeTagSpecification + + public.filename-extension + + ino + + + + + UTTypeConformsTo + + public.plain-text + + UTTypeDescription + INF files + UTTypeIdentifier + org.microsoft.inf + UTTypeTagSpecification + + public.filename-extension + + inf + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + MF files + UTTypeIdentifier + com.sun.manifest + UTTypeTagSpecification + + public.filename-extension + + mf + + + + + UTTypeConformsTo + + com.sun.java-class + + UTTypeDescription + Java Class + UTTypeIdentifier + com.sun.java-class + UTTypeTagSpecification + + public.filename-extension + + class + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + JavaFX ML + UTTypeIdentifier + com.sun.javafx + UTTypeTagSpecification + + public.filename-extension + + fxml + + + + + UTTypeConformsTo + + public.plain-text + + UTTypeDescription + NFO files + UTTypeIdentifier + org.nfo + UTTypeTagSpecification + + public.filename-extension + + nfo + + + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + ECore files + UTTypeIdentifier + org.omg.ecore + UTTypeTagSpecification + + public.filename-extension + + ecore + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + ATL files + UTTypeIdentifier + org.km3 + UTTypeTagSpecification + + public.filename-extension + + atl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Fish source files + UTTypeIdentifier + org.fish.source + UTTypeTagSpecification + + public.filename-extension + + fish + + + + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge81e62 + + UTTypeDescription + Rust source files + UTTypeIdentifier + org.rust.source + UTTypeTagSpecification + + public.filename-extension + + rs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Coffee source files + UTTypeIdentifier + org.coffee.source + UTTypeTagSpecification + + public.filename-extension + + coffee + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + CSON source files + UTTypeIdentifier + org.cson.source + UTTypeTagSpecification + + public.filename-extension + + cson + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Shell script + UTTypeIdentifier + org.bash.source + UTTypeTagSpecification + + public.filename-extension + + bashrc + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + INNO source files + UTTypeIdentifier + org.inno.source + UTTypeTagSpecification + + public.filename-extension + + iss + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + ASM source files + UTTypeIdentifier + org.asm.source + UTTypeTagSpecification + + public.filename-extension + + s79 + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + KERMETA source files + UTTypeIdentifier + org.kmt.source + UTTypeTagSpecification + + public.filename-extension + + kmt + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + GCC-linked files + UTTypeIdentifier + org.gcc.files + UTTypeTagSpecification + + public.filename-extension + + ld + map + d + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge8007a + + UTTypeDescription + Kotlin Source File + UTTypeIdentifier + org.kotlinlang.source + UTTypeTagSpecification + + public.filename-extension + + kt + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80s6xbqv0gn + + UTTypeDescription + Gradle Source File + UTTypeIdentifier + org.gradle.source + UTTypeTagSpecification + + public.filename-extension + + gradle + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80w5pq + + UTTypeDescription + JetBrain Project File + UTTypeIdentifier + com.jetbrain.source + UTTypeTagSpecification + + public.filename-extension + + iml + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80g2pcqf0a + + UTTypeDescription + CABAL file + UTTypeIdentifier + public.cabal + UTTypeTagSpecification + + public.filename-extension + + cabal + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80u62 + + UTTypeDescription + Haskell file + UTTypeIdentifier + public.haskell + UTTypeTagSpecification + + public.filename-extension + + hs + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80g6u + + UTTypeDescription + Crystal Source File + UTTypeIdentifier + org.crystal-lang.source + UTTypeTagSpecification + + public.filename-extension + + cr + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge81q7pf + + UTTypeDescription + Vue Source File + UTTypeIdentifier + org.vue.source + UTTypeTagSpecification + + public.filename-extension + + vue + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq + + UTTypeDescription + Bazel Source File + UTTypeIdentifier + org.bazel.source + UTTypeTagSpecification + + public.filename-extension + + bazel + bzl + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file + public.xml + + UTTypeDescription + XSD/XQuery/XSL/XML Source File + UTTypeIdentifier + org.xml-tools.source + UTTypeTagSpecification + + public.filename-extension + + xsd + xquery + xml + xsl + + - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Ruby on Rails File - UTTypeIdentifier - org.n8gray.railstemplate - UTTypeTagSpecification - - public.filename-extension - - rhtml - erb - rjs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - QLColorCode Test File - UTTypeIdentifier - org.n8gray.bogusextension - UTTypeTagSpecification - - public.filename-extension - - bogus_extension - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Groovy Source Code - UTTypeIdentifier - org.codehaus.groovy-source - UTTypeTagSpecification - - public.filename-extension - - groovy - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Scala Source Code - UTTypeIdentifier - org.scala.source - UTTypeTagSpecification - - public.filename-extension - - scala - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Coldfusion Source Code - UTTypeIdentifier - com.adobe.coldfusion - UTTypeTagSpecification - - public.filename-extension - - cfc - cfm - cfml - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - PDE files - UTTypeIdentifier - org.arduino.source - UTTypeTagSpecification - - public.filename-extension - - pde - ino - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ASCR files - UTTypeIdentifier - org.applescript.source - UTTypeTagSpecification - - public.filename-extension - - ascr - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - RDF files - UTTypeIdentifier - org.rdf.source - UTTypeTagSpecification - - public.filename-extension - - rdf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - XUL files - UTTypeIdentifier - org.xul.source - UTTypeTagSpecification - - public.filename-extension - - xul - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - INO files - UTTypeIdentifier - org.arduino.ino-source - UTTypeTagSpecification - - public.filename-extension - - ino - - - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - INF files - UTTypeIdentifier - org.microsoft.inf - UTTypeTagSpecification - - public.filename-extension - - inf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - MF files - UTTypeIdentifier - com.sun.manifest - UTTypeTagSpecification - - public.filename-extension - - mf - - - - - UTTypeConformsTo - - com.sun.java-class - - UTTypeDescription - Java Class - UTTypeIdentifier - com.sun.java-class - UTTypeTagSpecification - - public.filename-extension - - class - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - JavaFX ML - UTTypeIdentifier - com.sun.javafx - UTTypeTagSpecification - - public.filename-extension - - fxml - - - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - NFO files - UTTypeIdentifier - org.nfo - UTTypeTagSpecification - - public.filename-extension - - nfo - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - ECore files - UTTypeIdentifier - org.omg.ecore - UTTypeTagSpecification - - public.filename-extension - - ecore - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ATL files - UTTypeIdentifier - org.km3 - UTTypeTagSpecification - - public.filename-extension - - atl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Fish source files - UTTypeIdentifier - org.fish.source - UTTypeTagSpecification - - public.filename-extension - - fish - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge81e62 - - UTTypeDescription - Rust source files - UTTypeIdentifier - org.rust.source - UTTypeTagSpecification - - public.filename-extension - - rs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Coffee source files - UTTypeIdentifier - org.coffee.source - UTTypeTagSpecification - - public.filename-extension - - coffee - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - CSON source files - UTTypeIdentifier - org.cson.source - UTTypeTagSpecification - - public.filename-extension - - cson - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Shell script - UTTypeIdentifier - org.bash.source - UTTypeTagSpecification - - public.filename-extension - - bashrc - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - INNO source files - UTTypeIdentifier - org.inno.source - UTTypeTagSpecification - - public.filename-extension - - iss - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ASM source files - UTTypeIdentifier - org.asm.source - UTTypeTagSpecification - - public.filename-extension - - s79 - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - KERMETA source files - UTTypeIdentifier - org.kmt.source - UTTypeTagSpecification - - public.filename-extension - - kmt - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - GCC-linked files - UTTypeIdentifier - org.gcc.files - UTTypeTagSpecification - - public.filename-extension - - ld - map - d - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge8007a - - UTTypeDescription - Kotlin Source File - UTTypeIdentifier - org.kotlinlang.source - UTTypeTagSpecification - - public.filename-extension - - kt - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80s6xbqv0gn - - UTTypeDescription - Gradle Source File - UTTypeIdentifier - org.gradle.source - UTTypeTagSpecification - - public.filename-extension - - gradle - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80w5pq - - UTTypeDescription - JetBrain Project File - UTTypeIdentifier - com.jetbrain.source - UTTypeTagSpecification - - public.filename-extension - - iml - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80g2pcqf0a - - UTTypeDescription - CABAL file - UTTypeIdentifier - public.cabal - UTTypeTagSpecification - - public.filename-extension - - cabal - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80u62 - - UTTypeDescription - Haskell file - UTTypeIdentifier - public.haskell - UTTypeTagSpecification - - public.filename-extension - - hs - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80g6u - - UTTypeDescription - Crystal Source File - UTTypeIdentifier - org.crystal-lang.source - UTTypeTagSpecification - - public.filename-extension - - cr - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81q7pf - - UTTypeDescription - Vue Source File - UTTypeIdentifier - org.vue.source - UTTypeTagSpecification - - public.filename-extension - - vue - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80e2p4qz0a - dyn.ah62d4rv4ge80e8xq - - UTTypeDescription - Bazel Source File - UTTypeIdentifier - org.bazel.source - UTTypeTagSpecification - - public.filename-extension - - bazel - bzl - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81u65e - dyn.ah62d4rv4ge81u6pzqz3hw - org.vim.xsl-file - public.xml - - UTTypeDescription - XSD/XQuery/XSL/XML Source File - UTTypeIdentifier - org.xml-tools.source - UTTypeTagSpecification - - public.filename-extension - - xsd - xquery - xml - xsl - - - - - + + From 34be2f347b7bed26ac9f75eaaacd6611394f5045 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 8 Sep 2020 16:59:00 +0200 Subject: [PATCH 63/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 4 ++++ QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d4242b..cb3c87d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- Nothing + +## [3.0.2] — 2020-09-08 + ### Added - `xsd`/`xquery`/`xml`/`xsl` support. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index e03c250..29f095b 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -286,9 +286,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.1; + CURRENT_PROJECT_VERSION = 3.0.2; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.1; + MARKETING_VERSION = 3.0.2; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -298,9 +298,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.1; + CURRENT_PROJECT_VERSION = 3.0.2; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.1; + MARKETING_VERSION = 3.0.2; }; name = Release; }; From 182d7a054026dd1c953772eb609ee920a5bcb8e0 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 9 Sep 2020 21:45:34 +0200 Subject: [PATCH 64/95] Fix xquery support --- CHANGELOG.md | 6 + Info.plist | 2531 +++++++++++++------------ QLColorCode.xcodeproj/project.pbxproj | 13 +- 3 files changed, 1283 insertions(+), 1267 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb3c87d..1e996a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Nothing +## [3.0.3] — 2020-09-09 + +### Fixed + +- `xquery` support for forgotten extensions (thanks leo@leostuder.ch). + ## [3.0.2] — 2020-09-08 ### Added diff --git a/Info.plist b/Info.plist index 5fcdeb3..feee48f 100644 --- a/Info.plist +++ b/Info.plist @@ -1,1274 +1,1283 @@ + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeName + + CFBundleTypeRole + QLGenerator + LSItemContentTypes + + public.source-code + public.yaml + public.php-script + com.netscape.javascript-source + com.microsoft.c-sharp + com.microsoft.f-sharp + public.css + com.apple.applescript.script + public.xml + com.apple.property-list + org.tug.tex + com.sun.java-class + org.vim.vim-script + org.tug.lua + public.tex + public.text + public.shell-script + public.c-header + public.objective-c-source + public.c-source + public.csh-script + public.zsh-script + public.python-script + com.apple.property-list + com.apple.xcode.strings-text + dyn.ah62d4rv4ge81g6pq + dyn.ah62d4rv4ge8007a + dyn.ah62d4rv4ge80s6xbqv0gn + dyn.ah62d4rv4ge81g25brvuu + dyn.ah62d4rv4ge80g62 + dyn.ah62d4rv4ge80w5pq + dyn.ah62d4rv4ge80s52 + dyn.ah62d4rv4ge80g2pcqf0a + dyn.ah62d4rv4ge81e62 + dyn.ah62d4rv4ge80u62 + dyn.ah62d4rv4ge80g6u + dyn.ah62d4rv4ge80g3xh + dyn.ah62d4rv4ge81q7pf + dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file + dyn.ah62d4rv4ge81u7k + dyn.ah62d4rv4ge81u6pr + dyn.ah62d4rv4ge81u6k + + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes + C044543D-70A1-46D8-A908-4B8AEA1197A4 + QuickLookGeneratorPluginFactory + + CFPlugInTypes + + 5E2D9680-5022-40FA-B806-43349622E5B9 + C044543D-70A1-46D8-A908-4B8AEA1197A4 + + + CFPlugInUnloadFunction + + QLNeedsToBeRunInMainThread + + QLPreviewHeight + 800 + QLPreviewWidth + 800 + QLSupportsConcurrentRequests + + QLThumbnailMinimumSize + 9 + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Logos Source File + UTTypeIdentifier + com.dhowett.logos + UTTypeTagSpecification + + public.filename-extension + + xm + + + + + UTTypeIdentifier + org.ocaml.ocaml-source + UTTypeReferenceURL + http://www.ocaml.org/ + UTTypeTagSpecification - CFBundleTypeName - - CFBundleTypeRole - QLGenerator - LSItemContentTypes - - public.source-code - public.yaml - public.php-script - com.netscape.javascript-source - com.microsoft.c-sharp - com.microsoft.f-sharp - public.css - com.apple.applescript.script - public.xml - com.apple.property-list - org.tug.tex - com.sun.java-class - org.vim.vim-script - org.tug.lua - public.tex - public.text - public.shell-script - public.c-header - public.objective-c-source - public.c-source - public.csh-script - public.zsh-script - public.python-script - com.apple.property-list - com.apple.xcode.strings-text - dyn.ah62d4rv4ge81g6pq - dyn.ah62d4rv4ge8007a - dyn.ah62d4rv4ge80s6xbqv0gn - dyn.ah62d4rv4ge81g25brvuu - dyn.ah62d4rv4ge80g62 - dyn.ah62d4rv4ge80w5pq - dyn.ah62d4rv4ge80s52 - dyn.ah62d4rv4ge80g2pcqf0a - dyn.ah62d4rv4ge81e62 - dyn.ah62d4rv4ge80u62 - dyn.ah62d4rv4ge80g6u - dyn.ah62d4rv4ge80g3xh - dyn.ah62d4rv4ge81q7pf - dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u - dyn.ah62d4rv4ge80e2p4qz0a - dyn.ah62d4rv4ge80e8xq - dyn.ah62d4rv4ge81u65e - dyn.ah62d4rv4ge81u6pzqz3hw - org.vim.xsl-file + public.filename-extension + + ml + mll + mly - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - C044543D-70A1-46D8-A908-4B8AEA1197A4 - QuickLookGeneratorPluginFactory - - CFPlugInTypes - - 5E2D9680-5022-40FA-B806-43349622E5B9 - - C044543D-70A1-46D8-A908-4B8AEA1197A4 - - - CFPlugInUnloadFunction - - QLNeedsToBeRunInMainThread - - QLPreviewHeight - 800 - QLPreviewWidth - 800 - QLSupportsConcurrentRequests - - QLThumbnailMinimumSize - 9 - UTImportedTypeDeclarations - + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + OCaml Interface File + UTTypeIdentifier + org.ocaml.ocaml-interface + UTTypeReferenceURL + http://www.ocaml.org/ + UTTypeTagSpecification + + public.filename-extension + + mli + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Haskell Source File + UTTypeIdentifier + org.haskell.haskell-source + UTTypeReferenceURL + http://www.haskell.org/ + UTTypeTagSpecification + + public.filename-extension + + hs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Literate Haskell Source File + UTTypeIdentifier + org.haskell.literate-haskell-source + UTTypeReferenceURL + http://www.haskell.org/ + UTTypeTagSpecification + + public.filename-extension + + lhs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + scheme Source File + UTTypeIdentifier + org.n8gray.scheme-source + UTTypeTagSpecification + + public.filename-extension + + scm + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + .ini Source File + UTTypeIdentifier + org.n8gray.ini-source + UTTypeTagSpecification - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Logos Source File - UTTypeIdentifier - com.dhowett.logos - UTTypeTagSpecification - - public.filename-extension - - xm - - - - - UTTypeIdentifier - org.ocaml.ocaml-source - UTTypeReferenceURL - http://www.ocaml.org/ - UTTypeTagSpecification - - public.filename-extension - - ml - mll - mly - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - OCaml Interface File - UTTypeIdentifier - org.ocaml.ocaml-interface - UTTypeReferenceURL - http://www.ocaml.org/ - UTTypeTagSpecification - - public.filename-extension - - mli - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Haskell Source File - UTTypeIdentifier - org.haskell.haskell-source - UTTypeReferenceURL - http://www.haskell.org/ - UTTypeTagSpecification - - public.filename-extension - - hs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Literate Haskell Source File - UTTypeIdentifier - org.haskell.literate-haskell-source - UTTypeReferenceURL - http://www.haskell.org/ - UTTypeTagSpecification - - public.filename-extension - - lhs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - scheme Source File - UTTypeIdentifier - org.n8gray.scheme-source - UTTypeTagSpecification - - public.filename-extension - - scm - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - .ini Source File - UTTypeIdentifier - org.n8gray.ini-source - UTTypeTagSpecification - - public.filename-extension - - ini - - public.mime-type - text/x-ini - - - - UTTypeConformsTo - - public.tex - - UTTypeDescription - TeX text file - UTTypeIdentifier + public.filename-extension + + ini + + public.mime-type + text/x-ini + + + + UTTypeConformsTo + public.tex - UTTypeTagSpecification - - public.filename-extension - - tex - latex - ltx - texi - ctx - sty - cls - - - - - UTTypeConformsTo - - public.yaml - - UTTypeDescription - YAML file - UTTypeIdentifier + + UTTypeDescription + TeX text file + UTTypeIdentifier + public.tex + UTTypeTagSpecification + + public.filename-extension + + tex + latex + ltx + texi + ctx + sty + cls + + + + + UTTypeConformsTo + public.yaml - UTTypeTagSpecification - - public.filename-extension - - yaml - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Erlang Source File - UTTypeIdentifier - org.erlang.erlang-source - UTTypeTagSpecification - - public.filename-extension - - erl - hrl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Standard ML Source File - UTTypeIdentifier - org.n8gray.standard-ml-source - UTTypeTagSpecification - - public.filename-extension - - sml - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge81g6pq - - UTTypeDescription - SQL Source File - UTTypeIdentifier - org.n8gray.structured-query-language-source - UTTypeTagSpecification - - public.filename-extension - - sql - - - - - UTTypeConformsTo - - public.script - - UTTypeDescription - Diff File - UTTypeIdentifier - org.n8gray.diff-script - UTTypeTagSpecification - - public.filename-extension - - diff - patch - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - CSS File - UTTypeIdentifier - public.css - UTTypeTagSpecification - - public.filename-extension - - css - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Lua Source File - UTTypeIdentifier - org.lua.lua-source - UTTypeTagSpecification - - public.filename-extension - - lua - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Tcl Source File - UTTypeIdentifier - tk.tcl.tcl-source - UTTypeTagSpecification - - public.filename-extension - - tcl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - JSP Source File - UTTypeIdentifier - org.n8gray.jsp-source - UTTypeTagSpecification - - public.filename-extension - - jsp - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - DOS Batch Source File - UTTypeIdentifier - org.n8gray.bat - UTTypeTagSpecification - - public.filename-extension - - bat - cmd - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Adobe Flash ActionScript Source File - UTTypeIdentifier - com.adobe.actionscript - UTTypeTagSpecification - - public.filename-extension - - as - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Lisp Source File - UTTypeIdentifier - org.n8gray.lisp - UTTypeTagSpecification - - public.filename-extension - - sb - lisp - lsp - asd - el - clj - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge80s52 - - UTTypeDescription - Go Source File - UTTypeIdentifier - org.go.source - UTTypeTagSpecification - - public.filename-extension - - go - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - IDL Source File - UTTypeIdentifier - org.n8gray.idl - UTTypeTagSpecification - - public.filename-extension - - pro - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Makefile Source File - UTTypeIdentifier - org.n8gray.makefile - UTTypeTagSpecification - - public.filename-extension - - mk - mak - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Verilog Source File - UTTypeIdentifier - org.n8gray.verilog - UTTypeTagSpecification - - public.filename-extension - - v - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - VHDL Source File - UTTypeIdentifier - org.n8gray.vhdl - UTTypeTagSpecification - - public.filename-extension - - vhdl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - XHTML Source File - UTTypeIdentifier - org.n8gray.xhtml - UTTypeTagSpecification - - public.filename-extension - - xhtml - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - Java Web Installer (XML) - UTTypeIdentifier - org.n8gray.javaInstaller - UTTypeTagSpecification - - public.filename-extension - - jnlp - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Eiffel source code file - UTTypeIdentifier - com.eiffel.source-code - UTTypeTagSpecification - - public.filename-extension - - e - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - EiffelStudio project configuration file - UTTypeIdentifier - com.eiffel.eiffelstudio-project-config - UTTypeTagSpecification - - public.filename-extension - - ecf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - C# Source File - UTTypeIdentifier - com.microsoft.csharp-source - UTTypeReferenceURL - http://www.microsoft.com/ - UTTypeTagSpecification - - public.filename-extension - - cs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Visual Basic Source File - UTTypeIdentifier - com.microsoft.vb-source - UTTypeReferenceURL - http://www.microsoft.com/ - UTTypeTagSpecification - - public.filename-extension - - vb - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Ruby on Rails File - UTTypeIdentifier - org.n8gray.railstemplate - UTTypeTagSpecification - - public.filename-extension - - rhtml - erb - rjs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - QLColorCode Test File - UTTypeIdentifier - org.n8gray.bogusextension - UTTypeTagSpecification - - public.filename-extension - - bogus_extension - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Groovy Source Code - UTTypeIdentifier - org.codehaus.groovy-source - UTTypeTagSpecification - - public.filename-extension - - groovy - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Scala Source Code - UTTypeIdentifier - org.scala.source - UTTypeTagSpecification - - public.filename-extension - - scala - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Coldfusion Source Code - UTTypeIdentifier - com.adobe.coldfusion - UTTypeTagSpecification - - public.filename-extension - - cfc - cfm - cfml - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - PDE files - UTTypeIdentifier - org.arduino.source - UTTypeTagSpecification - - public.filename-extension - - pde - ino - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ASCR files - UTTypeIdentifier - org.applescript.source - UTTypeTagSpecification - - public.filename-extension - - ascr - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - RDF files - UTTypeIdentifier - org.rdf.source - UTTypeTagSpecification - - public.filename-extension - - rdf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - XUL files - UTTypeIdentifier - org.xul.source - UTTypeTagSpecification - - public.filename-extension - - xul - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - INO files - UTTypeIdentifier - org.arduino.ino-source - UTTypeTagSpecification - - public.filename-extension - - ino - - - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - INF files - UTTypeIdentifier - org.microsoft.inf - UTTypeTagSpecification - - public.filename-extension - - inf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - MF files - UTTypeIdentifier - com.sun.manifest - UTTypeTagSpecification - - public.filename-extension - - mf - - - - - UTTypeConformsTo - - com.sun.java-class - - UTTypeDescription - Java Class - UTTypeIdentifier - com.sun.java-class - UTTypeTagSpecification - - public.filename-extension - - class - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - JavaFX ML - UTTypeIdentifier - com.sun.javafx - UTTypeTagSpecification - - public.filename-extension - - fxml - - - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - NFO files - UTTypeIdentifier - org.nfo - UTTypeTagSpecification - - public.filename-extension - - nfo - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - ECore files - UTTypeIdentifier - org.omg.ecore - UTTypeTagSpecification - - public.filename-extension - - ecore - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ATL files - UTTypeIdentifier - org.km3 - UTTypeTagSpecification - - public.filename-extension - - atl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Fish source files - UTTypeIdentifier - org.fish.source - UTTypeTagSpecification - - public.filename-extension - - fish - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge81e62 - - UTTypeDescription - Rust source files - UTTypeIdentifier - org.rust.source - UTTypeTagSpecification - - public.filename-extension - - rs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Coffee source files - UTTypeIdentifier - org.coffee.source - UTTypeTagSpecification - - public.filename-extension - - coffee - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - CSON source files - UTTypeIdentifier - org.cson.source - UTTypeTagSpecification - - public.filename-extension - - cson - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Shell script - UTTypeIdentifier - org.bash.source - UTTypeTagSpecification - - public.filename-extension - - bashrc - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - INNO source files - UTTypeIdentifier - org.inno.source - UTTypeTagSpecification - - public.filename-extension - - iss - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ASM source files - UTTypeIdentifier - org.asm.source - UTTypeTagSpecification - - public.filename-extension - - s79 - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - KERMETA source files - UTTypeIdentifier - org.kmt.source - UTTypeTagSpecification - - public.filename-extension - - kmt - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - GCC-linked files - UTTypeIdentifier - org.gcc.files - UTTypeTagSpecification - - public.filename-extension - - ld - map - d - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge8007a - - UTTypeDescription - Kotlin Source File - UTTypeIdentifier - org.kotlinlang.source - UTTypeTagSpecification - - public.filename-extension - - kt - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80s6xbqv0gn - - UTTypeDescription - Gradle Source File - UTTypeIdentifier - org.gradle.source - UTTypeTagSpecification - - public.filename-extension - - gradle - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80w5pq - - UTTypeDescription - JetBrain Project File - UTTypeIdentifier - com.jetbrain.source - UTTypeTagSpecification - - public.filename-extension - - iml - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80g2pcqf0a - - UTTypeDescription - CABAL file - UTTypeIdentifier - public.cabal - UTTypeTagSpecification - - public.filename-extension - - cabal - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80u62 - - UTTypeDescription - Haskell file - UTTypeIdentifier - public.haskell - UTTypeTagSpecification - - public.filename-extension - - hs - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80g6u - - UTTypeDescription - Crystal Source File - UTTypeIdentifier - org.crystal-lang.source - UTTypeTagSpecification - - public.filename-extension - - cr - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81q7pf - - UTTypeDescription - Vue Source File - UTTypeIdentifier - org.vue.source - UTTypeTagSpecification - - public.filename-extension - - vue - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80e2p4qz0a - dyn.ah62d4rv4ge80e8xq - - UTTypeDescription - Bazel Source File - UTTypeIdentifier - org.bazel.source - UTTypeTagSpecification - - public.filename-extension - - bazel - bzl - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81u65e - dyn.ah62d4rv4ge81u6pzqz3hw - org.vim.xsl-file - public.xml - - UTTypeDescription - XSD/XQuery/XSL/XML Source File - UTTypeIdentifier - org.xml-tools.source - UTTypeTagSpecification - - public.filename-extension - - xsd - xquery - xml - xsl - - + + UTTypeDescription + YAML file + UTTypeIdentifier + public.yaml + UTTypeTagSpecification + + public.filename-extension + + yaml + - - + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Erlang Source File + UTTypeIdentifier + org.erlang.erlang-source + UTTypeTagSpecification + + public.filename-extension + + erl + hrl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Standard ML Source File + UTTypeIdentifier + org.n8gray.standard-ml-source + UTTypeTagSpecification + + public.filename-extension + + sml + + + + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge81g6pq + + UTTypeDescription + SQL Source File + UTTypeIdentifier + org.n8gray.structured-query-language-source + UTTypeTagSpecification + + public.filename-extension + + sql + + + + + UTTypeConformsTo + + public.script + + UTTypeDescription + Diff File + UTTypeIdentifier + org.n8gray.diff-script + UTTypeTagSpecification + + public.filename-extension + + diff + patch + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + CSS File + UTTypeIdentifier + public.css + UTTypeTagSpecification + + public.filename-extension + + css + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Lua Source File + UTTypeIdentifier + org.lua.lua-source + UTTypeTagSpecification + + public.filename-extension + + lua + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Tcl Source File + UTTypeIdentifier + tk.tcl.tcl-source + UTTypeTagSpecification + + public.filename-extension + + tcl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + JSP Source File + UTTypeIdentifier + org.n8gray.jsp-source + UTTypeTagSpecification + + public.filename-extension + + jsp + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + DOS Batch Source File + UTTypeIdentifier + org.n8gray.bat + UTTypeTagSpecification + + public.filename-extension + + bat + cmd + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Adobe Flash ActionScript Source File + UTTypeIdentifier + com.adobe.actionscript + UTTypeTagSpecification + + public.filename-extension + + as + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Lisp Source File + UTTypeIdentifier + org.n8gray.lisp + UTTypeTagSpecification + + public.filename-extension + + sb + lisp + lsp + asd + el + clj + + + + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge80s52 + + UTTypeDescription + Go Source File + UTTypeIdentifier + org.go.source + UTTypeTagSpecification + + public.filename-extension + + go + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + IDL Source File + UTTypeIdentifier + org.n8gray.idl + UTTypeTagSpecification + + public.filename-extension + + pro + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Makefile Source File + UTTypeIdentifier + org.n8gray.makefile + UTTypeTagSpecification + + public.filename-extension + + mk + mak + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Verilog Source File + UTTypeIdentifier + org.n8gray.verilog + UTTypeTagSpecification + + public.filename-extension + + v + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + VHDL Source File + UTTypeIdentifier + org.n8gray.vhdl + UTTypeTagSpecification + + public.filename-extension + + vhdl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + XHTML Source File + UTTypeIdentifier + org.n8gray.xhtml + UTTypeTagSpecification + + public.filename-extension + + xhtml + + + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + Java Web Installer (XML) + UTTypeIdentifier + org.n8gray.javaInstaller + UTTypeTagSpecification + + public.filename-extension + + jnlp + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Eiffel source code file + UTTypeIdentifier + com.eiffel.source-code + UTTypeTagSpecification + + public.filename-extension + + e + + + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + EiffelStudio project configuration file + UTTypeIdentifier + com.eiffel.eiffelstudio-project-config + UTTypeTagSpecification + + public.filename-extension + + ecf + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + C# Source File + UTTypeIdentifier + com.microsoft.csharp-source + UTTypeReferenceURL + http://www.microsoft.com/ + UTTypeTagSpecification + + public.filename-extension + + cs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Visual Basic Source File + UTTypeIdentifier + com.microsoft.vb-source + UTTypeReferenceURL + http://www.microsoft.com/ + UTTypeTagSpecification + + public.filename-extension + + vb + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Ruby on Rails File + UTTypeIdentifier + org.n8gray.railstemplate + UTTypeTagSpecification + + public.filename-extension + + rhtml + erb + rjs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + QLColorCode Test File + UTTypeIdentifier + org.n8gray.bogusextension + UTTypeTagSpecification + + public.filename-extension + + bogus_extension + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Groovy Source Code + UTTypeIdentifier + org.codehaus.groovy-source + UTTypeTagSpecification + + public.filename-extension + + groovy + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Scala Source Code + UTTypeIdentifier + org.scala.source + UTTypeTagSpecification + + public.filename-extension + + scala + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Coldfusion Source Code + UTTypeIdentifier + com.adobe.coldfusion + UTTypeTagSpecification + + public.filename-extension + + cfc + cfm + cfml + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + PDE files + UTTypeIdentifier + org.arduino.source + UTTypeTagSpecification + + public.filename-extension + + pde + ino + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + ASCR files + UTTypeIdentifier + org.applescript.source + UTTypeTagSpecification + + public.filename-extension + + ascr + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + RDF files + UTTypeIdentifier + org.rdf.source + UTTypeTagSpecification + + public.filename-extension + + rdf + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + XUL files + UTTypeIdentifier + org.xul.source + UTTypeTagSpecification + + public.filename-extension + + xul + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + INO files + UTTypeIdentifier + org.arduino.ino-source + UTTypeTagSpecification + + public.filename-extension + + ino + + + + + UTTypeConformsTo + + public.plain-text + + UTTypeDescription + INF files + UTTypeIdentifier + org.microsoft.inf + UTTypeTagSpecification + + public.filename-extension + + inf + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + MF files + UTTypeIdentifier + com.sun.manifest + UTTypeTagSpecification + + public.filename-extension + + mf + + + + + UTTypeConformsTo + + com.sun.java-class + + UTTypeDescription + Java Class + UTTypeIdentifier + com.sun.java-class + UTTypeTagSpecification + + public.filename-extension + + class + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + JavaFX ML + UTTypeIdentifier + com.sun.javafx + UTTypeTagSpecification + + public.filename-extension + + fxml + + + + + UTTypeConformsTo + + public.plain-text + + UTTypeDescription + NFO files + UTTypeIdentifier + org.nfo + UTTypeTagSpecification + + public.filename-extension + + nfo + + + + + UTTypeConformsTo + + public.xml + + UTTypeDescription + ECore files + UTTypeIdentifier + org.omg.ecore + UTTypeTagSpecification + + public.filename-extension + + ecore + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + ATL files + UTTypeIdentifier + org.km3 + UTTypeTagSpecification + + public.filename-extension + + atl + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Fish source files + UTTypeIdentifier + org.fish.source + UTTypeTagSpecification + + public.filename-extension + + fish + + + + + UTTypeConformsTo + + public.source-code + dyn.ah62d4rv4ge81e62 + + UTTypeDescription + Rust source files + UTTypeIdentifier + org.rust.source + UTTypeTagSpecification + + public.filename-extension + + rs + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Coffee source files + UTTypeIdentifier + org.coffee.source + UTTypeTagSpecification + + public.filename-extension + + coffee + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + CSON source files + UTTypeIdentifier + org.cson.source + UTTypeTagSpecification + + public.filename-extension + + cson + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + Shell script + UTTypeIdentifier + org.bash.source + UTTypeTagSpecification + + public.filename-extension + + bashrc + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + INNO source files + UTTypeIdentifier + org.inno.source + UTTypeTagSpecification + + public.filename-extension + + iss + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + ASM source files + UTTypeIdentifier + org.asm.source + UTTypeTagSpecification + + public.filename-extension + + s79 + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + KERMETA source files + UTTypeIdentifier + org.kmt.source + UTTypeTagSpecification + + public.filename-extension + + kmt + + + + + UTTypeConformsTo + + public.source-code + + UTTypeDescription + GCC-linked files + UTTypeIdentifier + org.gcc.files + UTTypeTagSpecification + + public.filename-extension + + ld + map + d + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge8007a + + UTTypeDescription + Kotlin Source File + UTTypeIdentifier + org.kotlinlang.source + UTTypeTagSpecification + + public.filename-extension + + kt + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80s6xbqv0gn + + UTTypeDescription + Gradle Source File + UTTypeIdentifier + org.gradle.source + UTTypeTagSpecification + + public.filename-extension + + gradle + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80w5pq + + UTTypeDescription + JetBrain Project File + UTTypeIdentifier + com.jetbrain.source + UTTypeTagSpecification + + public.filename-extension + + iml + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80g2pcqf0a + + UTTypeDescription + CABAL file + UTTypeIdentifier + public.cabal + UTTypeTagSpecification + + public.filename-extension + + cabal + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80u62 + + UTTypeDescription + Haskell file + UTTypeIdentifier + public.haskell + UTTypeTagSpecification + + public.filename-extension + + hs + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80g6u + + UTTypeDescription + Crystal Source File + UTTypeIdentifier + org.crystal-lang.source + UTTypeTagSpecification + + public.filename-extension + + cr + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge81q7pf + + UTTypeDescription + Vue Source File + UTTypeIdentifier + org.vue.source + UTTypeTagSpecification + + public.filename-extension + + vue + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq + + UTTypeDescription + Bazel Source File + UTTypeIdentifier + org.bazel.source + UTTypeTagSpecification + + public.filename-extension + + bazel + bzl + + + + + UTTypeConformsTo + + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file + public.xml + dyn.ah62d4rv4ge81u7k + dyn.ah62d4rv4ge81u6pr + dyn.ah62d4rv4ge81u6k + + UTTypeDescription + XSD/XQuery/XSL/XML Source File + UTTypeIdentifier + org.xml-tools.source + UTTypeTagSpecification + + public.filename-extension + + xsd + xquery + xml + xsl + xu + xqm + xq + + + + + diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 29f095b..dd80670 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -174,6 +174,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + Base, ); mainGroup = 089C166AFE841209C02AAC07 /* QLColorCode */; projectDirPath = ""; @@ -286,9 +287,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.2; + CURRENT_PROJECT_VERSION = 3.0.3; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.2; + MARKETING_VERSION = 3.0.3; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -298,9 +299,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.2; + CURRENT_PROJECT_VERSION = 3.0.3; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.2; + MARKETING_VERSION = 3.0.3; }; name = Release; }; @@ -361,7 +362,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -425,7 +426,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; From e0589a3be8e4bcffa0ea8e661b9c73e545852226 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 9 Sep 2020 21:55:41 +0200 Subject: [PATCH 65/95] Kotlin and Windows Batch support --- CHANGELOG.md | 5 ++++- Info.plist | 20 ++++++++++++++++++++ QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e996a4..5065fb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -- Nothing +### Added + +- `kts` (kotlin) support. +- `bat` (Windows Batch) support. ## [3.0.3] — 2020-09-09 diff --git a/Info.plist b/Info.plist index feee48f..6fe01d2 100644 --- a/Info.plist +++ b/Info.plist @@ -60,6 +60,8 @@ dyn.ah62d4rv4ge81u7k dyn.ah62d4rv4ge81u6pr dyn.ah62d4rv4ge81u6k + dyn.ah62d4rv4ge8007dx + dyn.ah62d4rv4ge80e2py @@ -415,6 +417,7 @@ UTTypeConformsTo public.source-code + dyn.ah62d4rv4ge80e2py UTTypeDescription DOS Batch Source File @@ -1092,6 +1095,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge8007dx + + UTTypeDescription + Kotlin source files + UTTypeIdentifier + org.kotlin.source + UTTypeTagSpecification + + public.filename-extension + + kts + + + UTTypeConformsTo diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index dd80670..fd7c86a 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -287,9 +287,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.3; + CURRENT_PROJECT_VERSION = 3.0.4.dev1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4.dev1; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -299,9 +299,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.3; + CURRENT_PROJECT_VERSION = 3.0.4.dev1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4.dev1; }; name = Release; }; From 120db62ea734e0ab03652440f96a36371153f9fc Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 9 Sep 2020 22:22:36 +0200 Subject: [PATCH 66/95] Lots of small changes (see CHANGELOG.md) --- CHANGELOG.md | 15 +++++++++++++ Info.plist | 31 +++++++++++++++++++++++++++ QLColorCode.xcodeproj/project.pbxproj | 8 +++---- src/colorize.sh | 6 +++++- 4 files changed, 55 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5065fb8..b2ac998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- Nothing + +## [3.1.0] — 2020-09-09 + ### Added - `kts` (kotlin) support. +- `xsh` support. +- `pyc` support (decompilation with `uncompyle6` [has to be in `/usr/local/bin`]) +- `rst` support. +- `perl` support. +- `bats` (Bash Automated Testing System) support. + +### Fixed + +- `fish` support. - `bat` (Windows Batch) support. +- `diff` support. +- `bash` support. ## [3.0.3] — 2020-09-09 diff --git a/Info.plist b/Info.plist index 6fe01d2..737cc23 100644 --- a/Info.plist +++ b/Info.plist @@ -62,6 +62,14 @@ dyn.ah62d4rv4ge81u6k dyn.ah62d4rv4ge8007dx dyn.ah62d4rv4ge80e2py + dyn.ah62d4rv4ge80q4pxra + dyn.ah62d4rv4ge81u65k + dyn.ah62d4rv4ge81a8pd + dyn.ah62d4rv4ge81e65y + public.perl-script + dyn.ah62d4rv4ge80e2pysq + public.patch-file + public.bash-script @@ -331,6 +339,7 @@ UTTypeConformsTo public.script + public.patch-file UTTypeDescription Diff File @@ -962,6 +971,7 @@ UTTypeConformsTo public.source-code + dyn.ah62d4rv4ge80q4pxra UTTypeDescription Fish source files @@ -975,6 +985,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge81u65k + + UTTypeDescription + XSH source files + UTTypeIdentifier + org.xsh.source + UTTypeTagSpecification + + public.filename-extension + + xsh + + + UTTypeConformsTo @@ -1031,6 +1058,8 @@ UTTypeConformsTo public.source-code + dyn.ah62d4rv4ge80e2pysq + public.bash-script UTTypeDescription Shell script @@ -1041,6 +1070,8 @@ public.filename-extension bashrc + bats + bash diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index fd7c86a..4e46d86 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -287,9 +287,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.4.dev1; + CURRENT_PROJECT_VERSION = 3.1.0; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.4.dev1; + MARKETING_VERSION = 3.1.0; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -299,9 +299,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.0.4.dev1; + CURRENT_PROJECT_VERSION = 3.1.0; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.0.4.dev1; + MARKETING_VERSION = 3.1.0; }; name = Release; }; diff --git a/src/colorize.sh b/src/colorize.sh index b08564e..f4a0b57 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -67,6 +67,10 @@ case ${target} in *.rdf | *.xul | *.ecore ) lang=xml ;; + *.pyc ) + lang=python + reader=(/usr/local/bin/uncompyle6 ${target}) + ;; *.ascr | *.scpt ) lang=applescript reader=(/usr/bin/osadecompile ${target}) @@ -99,7 +103,7 @@ case ${target} in lang=py plugin=(--plug-in python_ref_python_org) ;; - *.sh | *.zsh | *.bash | *.csh | *.fish | *.bashrc | *.zshrc ) + *.sh | *.zsh | *.bash | *.csh | *.bashrc | *.zshrc | *.xsh ) lang=sh plugin=(--plug-in bash_functions) ;; From 0e3f014a578f33c43a6186a5adc7f9f39fec08ea Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 9 Sep 2020 22:40:57 +0200 Subject: [PATCH 67/95] Lots of fixes (thanks @meissnem) --- CHANGELOG.md | 7 ++++++- Info.plist | 20 +++++++++++++++++++- QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2ac998..136a7e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -- Nothing +### Fixed + +- `java` support. +- `C++` support. +- `Objective-C++` support. +- Others took [here](https://github.com/meissnem/QLColorCode/blob/master/Info.plist). ## [3.1.0] — 2020-09-09 diff --git a/Info.plist b/Info.plist index 737cc23..4b9e8ca 100644 --- a/Info.plist +++ b/Info.plist @@ -25,6 +25,7 @@ com.apple.property-list org.tug.tex com.sun.java-class + com.sun.java-source org.vim.vim-script org.tug.lua public.tex @@ -33,10 +34,21 @@ public.c-header public.objective-c-source public.c-source + public.c-plus-plus-source + public.c-plus-plus-header + public.objective-c-plus-plus-source + public.assembly-source + com.apple.rez-source + public.mig-source + public.swift-source + public.pascal-source + com.apple.symbol-export public.csh-script public.zsh-script + com.apple.terminal.shell-script + com.apple.terminal.session + com.apple.terminal.settings public.python-script - com.apple.property-list com.apple.xcode.strings-text dyn.ah62d4rv4ge81g6pq dyn.ah62d4rv4ge8007a @@ -70,6 +82,12 @@ dyn.ah62d4rv4ge80e2pysq public.patch-file public.bash-script + com.apple.xcode.bash-script + com.apple.xcode.csh-script + com.apple.xcode.ksh-script + com.apple.xcode.tcsh-script + com.apple.xcode.yacc-source + com.apple.xcode.zsh-script diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 4e46d86..7d637e3 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -287,9 +287,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.1.0; + CURRENT_PROJECT_VERSION = "3.1.1.dev1 "; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.1.0; + MARKETING_VERSION = 3.1.1.dev1; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -299,9 +299,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.1.0; + CURRENT_PROJECT_VERSION = "3.1.1.dev1 "; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.1.0; + MARKETING_VERSION = 3.1.1.dev1; }; name = Release; }; From 2355f19a6efb429733a500f5adafda2cff6c5071 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 9 Sep 2020 22:42:31 +0200 Subject: [PATCH 68/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 4 ++++ QLColorCode.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 136a7e4..e5f9466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- NOTHING + +## [3.1.1] — 2020-09-09 + ### Fixed - `java` support. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 7d637e3..d303608 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -287,9 +287,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "3.1.1.dev1 "; + CURRENT_PROJECT_VERSION = 3.1.1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.1.1.dev1; + MARKETING_VERSION = 3.1.1; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -299,9 +299,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "3.1.1.dev1 "; + CURRENT_PROJECT_VERSION = 3.1.1; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.1.1.dev1; + MARKETING_VERSION = 3.1.1; }; name = Release; }; From c252b2bd9e6130e3f8f15991c6ac5a263981ce40 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Thu, 10 Sep 2020 14:36:03 +0200 Subject: [PATCH 69/95] Update gitignore --- .gitignore | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 145 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 0204c43..f6c8351 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,146 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/macos +# Edit at https://www.toptal.com/developers/gitignore?templates=macos + +### macOS ### +# General .DS_Store -graphics -build -highlight -highlight-* -release -QLColorCode.xcodeproj/project.xcworkspace -QLColorCode.xcodeproj/xcuserdata +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# End of https://www.toptal.com/developers/gitignore/api/macos + +# Created by https://www.toptal.com/developers/gitignore/api/xcode +# Edit at https://www.toptal.com/developers/gitignore?templates=xcode + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Gcc Patch +/*.gcno + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.toptal.com/developers/gitignore/api/xcode + +# Created by https://www.toptal.com/developers/gitignore/api/objective-c +# Edit at https://www.toptal.com/developers/gitignore?templates=objective-c + +### Objective-C ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +# CocoaPods +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# Pods/ +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# fastlane +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +### Objective-C Patch ### + +# End of https://www.toptal.com/developers/gitignore/api/objective-c + +release/ From be96695accaadf44742f80501abcdfe5f7ec148d Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Sun, 13 Sep 2020 23:29:29 +0200 Subject: [PATCH 70/95] Support ruby, lisp and automake files --- CHANGELOG.md | 6 +++++- Info.plist | 6 ++++++ src/colorize.sh | 11 ++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f9466..ee80225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -- NOTHING +### Added + +- `ruby` support. +- `lisp` support. +- `automake` support. ## [3.1.1] — 2020-09-09 diff --git a/Info.plist b/Info.plist index 4b9e8ca..a7721f1 100644 --- a/Info.plist +++ b/Info.plist @@ -14,6 +14,7 @@ LSItemContentTypes public.source-code + public.ruby-script public.yaml public.php-script com.netscape.javascript-source @@ -78,6 +79,11 @@ dyn.ah62d4rv4ge81u65k dyn.ah62d4rv4ge81a8pd dyn.ah62d4rv4ge81e65y + dyn.ah62d4rv4ge80n5a + dyn.ah62d4rv4ge80w5u + dyn.ah62d4rv4ge81k + dyn.ah62d4rv4ge80c5k + dyn.ah62d4rv4ge80c3dtqq public.perl-script dyn.ah62d4rv4ge80e2pysq public.patch-file diff --git a/src/colorize.sh b/src/colorize.sh index f4a0b57..ce6a266 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -88,6 +88,12 @@ case ${target} in *.m ) lang=objc ;; + *.am | *.in ) + lang=make + ;; + *.mod ) + lang=go + ;; *.pch | *.h ) if grep -q "@interface" <(${target}) &> /dev/null; then lang=objc @@ -103,7 +109,7 @@ case ${target} in lang=py plugin=(--plug-in python_ref_python_org) ;; - *.sh | *.zsh | *.bash | *.csh | *.bashrc | *.zshrc | *.xsh ) + *.sh | *.zsh | *.bash | *.csh | *.bashrc | *.zshrc | *.xsh | *.bats ) lang=sh plugin=(--plug-in bash_functions) ;; @@ -117,6 +123,9 @@ case ${target} in *.kmt ) lang=scala ;; + *.adoc ) + lang=asciidoc + ;; * ) lang=${target##*.} ;; From 567d3ab4ccf99cca537cc6b674258e9228d1b459 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Fri, 18 Sep 2020 10:06:17 +0200 Subject: [PATCH 71/95] Update settigns with the latest XCode --- QLColorCode.xcodeproj/project.pbxproj | 7 +++++-- .../xcshareddata/xcschemes/Package.xcscheme | 2 +- .../xcshareddata/xcschemes/Travis.xcscheme | 6 +----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index d303608..afa9935 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 53; objects = { /* Begin PBXAggregateTarget section */ @@ -166,7 +166,8 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1200; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.2"; @@ -330,6 +331,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; @@ -397,6 +399,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES; CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; diff --git a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme index dd87327..7d3600e 100644 --- a/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme +++ b/QLColorCode.xcodeproj/xcshareddata/xcschemes/Package.xcscheme @@ -1,6 +1,6 @@ - - - - Date: Mon, 21 Sep 2020 13:28:14 +0200 Subject: [PATCH 72/95] Fix #64 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc45217..1663016 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,10 @@ Setting the font size (default is `10`): defaults write org.n8gray.QLColorCode fontSizePoints 9 -Setting the color style (default is `edit-xcode`, see [all available themes](http://www.andre-simon.de/doku/highlight/theme-samples.php)): +Setting the color style for `light` and `dark` mode (see [all available themes](http://www.andre-simon.de/doku/highlight/theme-samples.php)): - defaults write org.n8gray.QLColorCode hlTheme ide-xcode + defaults write org.n8gray.QLColorCode lightTheme solarized-light + defaults write org.n8gray.QLColorCode darkTheme solarized-dark Setting the thumbnail color style (deactivated by default): From c8b793b4dc15ba9c3783aacbefed991770e26227 Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Sun, 6 Dec 2020 06:22:34 -0500 Subject: [PATCH 73/95] Include Highlight in the bundle * Should build on systems with either MacPorts or Homebrew * colorize.sh: specify resource directory as data path to highlight * Common: only use highlight in the bundle * Add highlight and lua submodules * Apply patches target (runs before building Lua) * Add note about building * Fix CI * Remove check for BUILD_STYLE * readme: add note about installation from MacPorts --- .gitmodules | 6 + .travis.yml | 7 +- QLColorCode.xcodeproj/project.pbxproj | 340 +++++++++++++++++++++++++- README.md | 9 +- hl/apply-patches.sh | 11 + hl/highlight | 1 + hl/highlight.patch | 24 ++ hl/lua | 1 + hl/lua.hpp | 9 + hl/lua.patch | 17 ++ src/Common.m | 21 +- src/colorize.sh | 6 +- 12 files changed, 423 insertions(+), 29 deletions(-) create mode 100644 .gitmodules create mode 100755 hl/apply-patches.sh create mode 160000 hl/highlight create mode 100644 hl/highlight.patch create mode 160000 hl/lua create mode 100644 hl/lua.hpp create mode 100644 hl/lua.patch diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d9ed053 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "hl/highlight"] + path = hl/highlight + url = https://gitlab.com/saalen/highlight.git +[submodule "hl/lua"] + path = hl/lua + url = https://github.com/lua/lua.git diff --git a/.travis.yml b/.travis.yml index e384eea..b8ab0cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +addons: + homebrew: + packages: + - boost language: objective-c -xcode_project: QLColorCode.xcodeproj -xcode_scheme: Travis +script: set -o pipefail && xcodebuild -project QLColorCode.xcodeproj -scheme Travis build | xcpretty diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index afa9935..c7fd927 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -19,10 +19,26 @@ name = Package; productName = Package; }; + 26BACA63257CF90200486D28 /* Apply patches */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 26BACA67257CF90200486D28 /* Build configuration list for PBXAggregateTarget "Apply patches" */; + buildPhases = ( + 26BACA66257CF90200486D28 /* ShellScript */, + ); + dependencies = ( + ); + name = "Apply patches"; + productName = Package; + }; /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ 0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; }; + 26BACA53257CF04E00486D28 /* plugins in Resources */ = {isa = PBXBuildFile; fileRef = 26BACA52257CF04A00486D28 /* plugins */; }; + 26BACA54257CF04E00486D28 /* filetypes.conf in Resources */ = {isa = PBXBuildFile; fileRef = 26BACA51257CF01B00486D28 /* filetypes.conf */; }; + 26BACA58257CF06200486D28 /* highlight in Resources */ = {isa = PBXBuildFile; fileRef = 26BACA57257CF06200486D28 /* highlight */; }; + 26BACA5C257CF17400486D28 /* themes in Resources */ = {isa = PBXBuildFile; fileRef = 26BACA5B257CF17400486D28 /* themes */; }; + 26BACA60257CF60700486D28 /* langDefs in Resources */ = {isa = PBXBuildFile; fileRef = 26BACA5F257CF60600486D28 /* langDefs */; }; EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */ = {isa = PBXBuildFile; fileRef = EA43671615F6BF9C009DA6C0 /* colorize.sh */; }; EA43671D15F6BF9C009DA6C0 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = EA43671715F6BF9C009DA6C0 /* Common.h */; }; EA43671E15F6BF9C009DA6C0 /* Common.m in Sources */ = {isa = PBXBuildFile; fileRef = EA43671815F6BF9C009DA6C0 /* Common.m */; }; @@ -42,6 +58,27 @@ remoteGlobalIDString = 8D57630D048677EA00EA77CD; remoteInfo = QLColorCode; }; + 26BAC9C4257CE96D00486D28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 26BAC9AB257CE89900486D28; + remoteInfo = highlight; + }; + 26BAC9C6257CE97100486D28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 26BAC9BC257CE93200486D28; + remoteInfo = lua; + }; + 26BACA6E257CF94500486D28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 26BACA63257CF90200486D28; + remoteInfo = "Apply patches"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -59,6 +96,11 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 26BACA51257CF01B00486D28 /* filetypes.conf */ = {isa = PBXFileReference; lastKnownFileType = text; name = filetypes.conf; path = hl/highlight/filetypes.conf; sourceTree = ""; }; + 26BACA52257CF04A00486D28 /* plugins */ = {isa = PBXFileReference; lastKnownFileType = folder; name = plugins; path = hl/highlight/plugins; sourceTree = ""; }; + 26BACA57257CF06200486D28 /* highlight */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = highlight; path = hl/highlight/src/highlight; sourceTree = ""; }; + 26BACA5B257CF17400486D28 /* themes */ = {isa = PBXFileReference; lastKnownFileType = folder; name = themes; path = hl/highlight/themes; sourceTree = ""; }; + 26BACA5F257CF60600486D28 /* langDefs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = langDefs; path = hl/highlight/langDefs; sourceTree = ""; }; 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLColorCode.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; }; EA43671615F6BF9C009DA6C0 /* colorize.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = colorize.sh; path = src/colorize.sh; sourceTree = ""; }; EA43671715F6BF9C009DA6C0 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Common.h; path = src/Common.h; sourceTree = ""; }; @@ -86,6 +128,11 @@ 089C166AFE841209C02AAC07 /* QLColorCode */ = { isa = PBXGroup; children = ( + 26BACA5F257CF60600486D28 /* langDefs */, + 26BACA5B257CF17400486D28 /* themes */, + 26BACA57257CF06200486D28 /* highlight */, + 26BACA52257CF04A00486D28 /* plugins */, + 26BACA51257CF01B00486D28 /* filetypes.conf */, EACE3C6924E8D93800B58A51 /* CHANGELOG.md */, EA43672C15F6C1B8009DA6C0 /* COPYING */, EAE9D2CB169E2B3500A67B2F /* README.md */, @@ -138,6 +185,39 @@ }; /* End PBXHeadersBuildPhase section */ +/* Begin PBXLegacyTarget section */ + 26BAC9AB257CE89900486D28 /* highlight */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "-j9 cli"; + buildConfigurationList = 26BAC9AC257CE89900486D28 /* Build configuration list for PBXLegacyTarget "highlight" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = hl/highlight; + dependencies = ( + 26BAC9C7257CE97100486D28 /* PBXTargetDependency */, + ); + name = highlight; + passBuildSettingsInEnvironment = 1; + productName = highlight; + }; + 26BAC9BC257CE93200486D28 /* lua */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "-j9 $(ACTION)"; + buildConfigurationList = 26BAC9BD257CE93200486D28 /* Build configuration list for PBXLegacyTarget "lua" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = hl/lua; + dependencies = ( + 26BACA6F257CF94500486D28 /* PBXTargetDependency */, + ); + name = lua; + passBuildSettingsInEnvironment = 1; + productName = lua; + }; +/* End PBXLegacyTarget section */ + /* Begin PBXNativeTarget section */ 8D57630D048677EA00EA77CD /* QLColorCode */ = { isa = PBXNativeTarget; @@ -153,6 +233,7 @@ buildRules = ( ); dependencies = ( + 26BAC9C5257CE96D00486D28 /* PBXTargetDependency */, ); name = QLColorCode; productInstallPath = /Library/QuickLook; @@ -168,6 +249,14 @@ attributes = { BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1200; + TargetAttributes = { + 26BAC9AB257CE89900486D28 = { + CreatedOnToolsVersion = 12.2; + }; + 26BAC9BC257CE93200486D28 = { + CreatedOnToolsVersion = 12.2; + }; + }; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QLColorCode" */; compatibilityVersion = "Xcode 3.2"; @@ -183,6 +272,9 @@ targets = ( 8D57630D048677EA00EA77CD /* QLColorCode */, 0E0E34E90D0097020086C1E6 /* Package */, + 26BAC9AB257CE89900486D28 /* highlight */, + 26BAC9BC257CE93200486D28 /* lua */, + 26BACA63257CF90200486D28 /* Apply patches */, ); }; /* End PBXProject section */ @@ -192,6 +284,11 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 26BACA60257CF60700486D28 /* langDefs in Resources */, + 26BACA5C257CF17400486D28 /* themes in Resources */, + 26BACA58257CF06200486D28 /* highlight in Resources */, + 26BACA53257CF04E00486D28 /* plugins in Resources */, + 26BACA54257CF04E00486D28 /* filetypes.conf in Resources */, EA43671C15F6BF9C009DA6C0 /* colorize.sh in Resources */, EACE3C6A24E8D93800B58A51 /* CHANGELOG.md in Resources */, EA43673015F6C1B8009DA6C0 /* COPYING in Resources */, @@ -213,7 +310,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/zsh -x"; - shellScript = "# shell script goes here\nif [ $BUILD_STYLE != \"Release\" ]; then\n echo \"Error: Must use Release build style\"\n exit 1\nfi\n\ncd $PROJECT_DIR\nmkdir -vp release\ncd release\npkgDir=QLColorCode-$CURRENT_PROJECT_VERSION\nrm -rf $pkgDir\nmkdir $pkgDir\ncp -rp $TARGET_BUILD_DIR/*.qlgenerator $pkgDir\ncp ../ReadMe.txt $pkgDir\ncp ../LICENSE.txt $pkgDir\ncp ../ChangeLog.txt $pkgDir\n# For some reason Xcode has been producing world-writable output on occasion\nchmod -R o-w $pkgDir\ntar cvzf $pkgDir.tgz $pkgDir\nopen $PROJECT_DIR/release"; + shellScript = "# shell script goes here\ncd $PROJECT_DIR\nmkdir -vp release\ncd release\npkgDir=QLColorCode-$CURRENT_PROJECT_VERSION\nrm -rf $pkgDir\nmkdir $pkgDir\ncp -rp $TARGET_BUILD_DIR/*.qlgenerator $pkgDir\ncp ../ReadMe.txt $pkgDir\ncp ../LICENSE.txt $pkgDir\ncp ../ChangeLog.txt $pkgDir\n# For some reason Xcode has been producing world-writable output on occasion\nchmod -R o-w $pkgDir\ntar cvzf $pkgDir.tgz $pkgDir\nopen $PROJECT_DIR/release\n"; }; 0E1280381061C3EA0078EC05 /* Reset quicklookd */ = { isa = PBXShellScriptBuildPhase; @@ -230,6 +327,19 @@ shellScript = "qlmanage -r\n"; showEnvVarsInLog = 0; }; + 26BACA66257CF90200486D28 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cd hl\n./apply-patches.sh\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -252,6 +362,21 @@ target = 8D57630D048677EA00EA77CD /* QLColorCode */; targetProxy = 0E0E34ED0D0097280086C1E6 /* PBXContainerItemProxy */; }; + 26BAC9C5257CE96D00486D28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 26BAC9AB257CE89900486D28 /* highlight */; + targetProxy = 26BAC9C4257CE96D00486D28 /* PBXContainerItemProxy */; + }; + 26BAC9C7257CE97100486D28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 26BAC9BC257CE93200486D28 /* lua */; + targetProxy = 26BAC9C6257CE97100486D28 /* PBXContainerItemProxy */; + }; + 26BACA6F257CF94500486D28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 26BACA63257CF90200486D28 /* Apply patches */; + targetProxy = 26BACA6E257CF94500486D28 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -283,6 +408,192 @@ }; name = Release; }; + 26BAC9AD257CE89900486D28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_STYLE = Automatic; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = EU5R2QY9HJ; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 26BAC9AE257CE89900486D28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = EU5R2QY9HJ; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 26BAC9BE257CE93200486D28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_STYLE = Automatic; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = EU5R2QY9HJ; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 26BAC9BF257CE93200486D28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = EU5R2QY9HJ; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 26BACA68257CF90200486D28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + INFOPLIST_FILE = "Package copy-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + }; + name = Debug; + }; + 26BACA69257CF90200486D28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + INFOPLIST_FILE = "Package copy-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + ZERO_LINK = NO; + }; + name = Release; + }; 2CA3261F0896AD4900168862 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -451,6 +762,33 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 26BAC9AC257CE89900486D28 /* Build configuration list for PBXLegacyTarget "highlight" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 26BAC9AD257CE89900486D28 /* Debug */, + 26BAC9AE257CE89900486D28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 26BAC9BD257CE93200486D28 /* Build configuration list for PBXLegacyTarget "lua" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 26BAC9BE257CE93200486D28 /* Debug */, + 26BAC9BF257CE93200486D28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 26BACA67257CF90200486D28 /* Build configuration list for PBXAggregateTarget "Apply patches" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 26BACA68257CF90200486D28 /* Debug */, + 26BACA69257CF90200486D28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 2CA3261E0896AD4900168862 /* Build configuration list for PBXNativeTarget "QLColorCode" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/README.md b/README.md index 1663016..6836fd5 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,17 @@ This is a Quick Look plug-in that renders source code with syntax highlighting, using the [Highlight library](http://www.andre-simon.de). -To install Highlight, [download the library manually](http://www.andre-simon.de/zip/download.php), or use Homebrew `brew install highlight` - To install the plug-in, just drag it to `~/Library/QuickLook`. You may need to create that folder if it doesn't already exist. -Alternative, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cask), +Alternatively, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cask), install with `brew cask install qlcolorcode`. +Also available on MacPorts: `port install QLColorCode`. + +To build the project, you must have Boost headers on your system in +`/opt/local/include` or `/usr/local/include`. + ## Settings If you want to configure `QLColorCode`, there are several `defaults` commands that could be useful: diff --git a/hl/apply-patches.sh b/hl/apply-patches.sh new file mode 100755 index 0000000..0d2eb96 --- /dev/null +++ b/hl/apply-patches.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" +cd "$DIR" +for i in lua highlight +do + pushd "$i" + git checkout . || true + patch -p1 < "../${i}.patch" + popd +done diff --git a/hl/highlight b/hl/highlight new file mode 160000 index 0000000..e55d1fd --- /dev/null +++ b/hl/highlight @@ -0,0 +1 @@ +Subproject commit e55d1fd5949cc5dc4444a1b9cbbb6a0ab1a93a3f diff --git a/hl/highlight.patch b/hl/highlight.patch new file mode 100644 index 0000000..b3e4afd --- /dev/null +++ b/hl/highlight.patch @@ -0,0 +1,24 @@ +diff --git a/src/makefile b/src/makefile +index 9d0a08e..0a7a833 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -43,8 +43,8 @@ ifeq (${LUA_TEST},1) + LUA_PKG_NAME=lua + endif + +-LUA_CFLAGS=$(shell pkg-config --cflags ${LUA_PKG_NAME}) +-LUA_LIBS=$(shell pkg-config --libs ${LUA_PKG_NAME}) ++LUA_CFLAGS=-I../../lua -I../.. ++LUA_LIBS=../../lua/liblua.a + + # luajit lib + # LUA_LIBS=$(shell pkg-config --libs luajit) +@@ -75,7 +75,7 @@ LDFLAGS = -ldl + #LDFLAGS = ${LDFLAGS} -s + #LDFLAGS= -Wl,--as-needed + +-CXX_COMPILE=${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS} ++CXX_COMPILE=${CXX} ${CFLAGS} -c -I /opt/local/include -I /usr/local/include -I ${INCLUDE_DIR} ${LUA_CFLAGS} + + # Data directories (data dir, configuration file dir) + CXX_DIR=-DHL_DATA_DIR=\"${HL_DATA_DIR}\" -DHL_CONFIG_DIR=\"${HL_CONFIG_DIR}\" diff --git a/hl/lua b/hl/lua new file mode 160000 index 0000000..9d067ab --- /dev/null +++ b/hl/lua @@ -0,0 +1 @@ +Subproject commit 9d067ab73b6befa0a5418f1df35c711f6c6918b3 diff --git a/hl/lua.hpp b/hl/lua.hpp new file mode 100644 index 0000000..ec417f5 --- /dev/null +++ b/hl/lua.hpp @@ -0,0 +1,9 @@ +// lua.hpp +// Lua header files for C++ +// <> not supplied automatically because Lua also compiles as C++ + +extern "C" { +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" +} diff --git a/hl/lua.patch b/hl/lua.patch new file mode 100644 index 0000000..23b2174 --- /dev/null +++ b/hl/lua.patch @@ -0,0 +1,17 @@ +diff --git a/makefile b/makefile +index 9e537dcc..d275b809 100644 +--- a/makefile ++++ b/makefile +@@ -60,9 +60,9 @@ LOCAL = $(TESTS) $(CWARNS) + + + # enable Linux goodies +-MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE +-MYLDFLAGS= $(LOCAL) -Wl,-E +-MYLIBS= -ldl -lreadline ++MYCFLAGS= $(LOCAL) -std=c99 ++MYLDFLAGS= $(LOCAL) ++MYLIBS= -ldl + + + CC= gcc diff --git a/src/Common.m b/src/Common.m index 8b57741..1b8290b 100644 --- a/src/Common.m +++ b/src/Common.m @@ -73,25 +73,6 @@ NSMutableDictionary *env = [NSMutableDictionary dictionaryWithDictionary: [[NSProcessInfo processInfo] environment]]; - NSString *path = [env objectForKey: @"PATH"]; - NSString *newPath = [path stringByAppendingString: @":/opt/local/bin:/usr/local/bin:/usr/local/sbin"]; - [env setObject: newPath forKey: @"PATH"]; - - // Try to find highlight location - NSString *highlightPath = [[defaults persistentDomainForName:myDomain] valueForKey:@"pathHL"]; - if (highlightPath == nil) { - NSUserDefaults *userDefaults = [[NSUserDefaults alloc] init]; - NSData* data = runTask(@"which highlight", env, status); - highlightPath = [[[[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding] autorelease] stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]; - if (*status == 0 && [highlightPath hasPrefix: @"/"] && [highlightPath hasSuffix: @"highlight"]) { // i.e. highlightPath looks like the actual path - NSMutableDictionary *newDefaults = [NSMutableDictionary dictionaryWithObject:highlightPath forKey:@"pathHL"]; - [newDefaults addEntriesFromDictionary: [defaults persistentDomainForName:myDomain]]; - [userDefaults setPersistentDomain: newDefaults forName:myDomain]; - [userDefaults synchronize]; - } - [userDefaults release]; - } - [env addEntriesFromDictionary:[NSDictionary dictionaryWithObjectsAndKeys: #ifdef DEBUG @"1", @"qlcc_debug", @@ -103,7 +84,7 @@ @"edit-xcode", @"hlTheme", // @"-lz -j 3 -t 4 --kw-case=capitalize ", @"extraHLFlags", @"-t 4 ", @"extraHLFlags", - @"/opt/local/bin/highlight", @"pathHL", + [rsrcEsc stringByAppendingString:@"/highlight"], @"pathHL", @"", @"maxFileSize", @"UTF-8", @"textEncoding", @"UTF-8", @"webkitTextEncoding", nil]]; diff --git a/src/colorize.sh b/src/colorize.sh index ce6a266..8392a12 100755 --- a/src/colorize.sh +++ b/src/colorize.sh @@ -138,11 +138,11 @@ go4it () { debug "Generating the preview" if [ "${thumb}" = "1" ]; then - ${reader} | head -n 100 | head -c 20000 | ${cmd} ${cmdOpts} && exit 0 + ${reader} | head -n 100 | head -c 20000 | ${cmd} -D "${rsrcDir}" ${cmdOpts} && exit 0 elif [ -n "${maxFileSize}" ]; then - ${reader} | head -c ${maxFileSize} | ${cmd} -T "${target}" ${cmdOpts} && exit 0 + ${reader} | head -c ${maxFileSize} | ${cmd} -D "${rsrcDir}" -T "${target}" ${cmdOpts} && exit 0 else - ${reader} | ${cmd} -T "${target}" ${cmdOpts} && exit 0 + ${reader} | ${cmd} -D "${rsrcDir}" -T "${target}" ${cmdOpts} && exit 0 fi } From 8d453886db7077935c1b0ece5eb0b4426d5c998c Mon Sep 17 00:00:00 2001 From: Adam Bulgatz Date: Sun, 25 Oct 2020 16:34:42 -0500 Subject: [PATCH 74/95] Add powershell to info.plist Add powershell "dyn.ah62d4rv4ge81a63v" to info.plist --- Info.plist | 1 + 1 file changed, 1 insertion(+) diff --git a/Info.plist b/Info.plist index a7721f1..6db60fa 100644 --- a/Info.plist +++ b/Info.plist @@ -94,6 +94,7 @@ com.apple.xcode.tcsh-script com.apple.xcode.yacc-source com.apple.xcode.zsh-script + dyn.ah62d4rv4ge81a63v From 3fda23d311c8e9664d9197a5f640ea61427f7eb9 Mon Sep 17 00:00:00 2001 From: Adam Bulgatz Date: Sun, 25 Oct 2020 16:52:58 -0500 Subject: [PATCH 75/95] Added UTImportedTypeDeclarations for PowerShell --- Info.plist | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Info.plist b/Info.plist index 6db60fa..49bf9b1 100644 --- a/Info.plist +++ b/Info.plist @@ -1354,6 +1354,23 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge81a63v + + UTTypeDescription + PowerShell + UTTypeIdentifier + org.powershell.source + UTTypeTagSpecification + + public.filename-extension + + ps1 + + + From 1b7e0ca6fc1153fbc552a6e556ab2f17f616c2c9 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 15 Dec 2020 20:45:51 +0100 Subject: [PATCH 76/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 43 +++++++++++++++++---------- QLColorCode.xcodeproj/project.pbxproj | 8 ++--- hl/highlight | 2 +- hl/lua | 2 +- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee80225..653091b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,29 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) and this project adheres to +[Semantic Versioning](http://semver.org/spec/v2.0.0.html). + ## [Unreleased] +- NOTHING + +## [4.0.0] — 2020-12-15 + +**Big Sur support via integrated Lua and Highlight! +Thanks to @tatsh for his amazing work!** + ### Added - `ruby` support. - `lisp` support. - `automake` support. +- `powershell` support (thanks @abulgatz). + +### Fixed + +- CI (thanks @tatsh). ## [3.1.1] — 2020-09-09 @@ -35,7 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed -- `fish` support. +- `fish` support. - `bat` (Windows Batch) support. - `diff` support. - `bash` support. @@ -70,7 +83,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `jad` support. - ## [3.0.0] — 2020-08-16 ### Added @@ -93,7 +105,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added -- Option to preview file as `RTF` (thanks @silum). +- Option to preview file as `RTF` (thanks @silum). - `Kotlin/Gradle` (thanks @sonique6784). - `C#/Scala` support. - `reduce_filesize` plugin by default. @@ -172,14 +184,12 @@ First version of Anthony GELIBERT. ### Added -- Added qlcc_debug option. To enable, use: - `defaults write org.n8gray.qlcolorcode qlcc_debug 1` -To disable, use: - `defaults delete org.n8gray.qlcolorcode qlcc_debug` +- Added qlcc_debug option. To enable, use: `defaults write org.n8gray.qlcolorcode qlcc_debug 1` To disable, use: + `defaults delete org.n8gray.qlcolorcode qlcc_debug` ### Changed -- Stop redirecting `stdout` of `colorize.sh` to `stdin`. Error output will appear in the console instead of the preview. +- Stop redirecting `stdout` of `colorize.sh` to `stdin`. Error output will appear in the console instead of the preview. ### Fixed @@ -189,13 +199,14 @@ To disable, use: ### Added -- A note about conflict with Xcode 3.2's source code QL plugin. If you're having problems with QLCC on Snow Leopard please read it! +- A note about conflict with Xcode 3.2's source code QL plugin. If you're having problems with QLCC on Snow Leopard + please read it! - Support for `Scala`, `Groovy`, `Interactive Data Language`, and `Coldfusion`. - Build for `x86_64` in addition to `i386` and `ppc`. ### Changed -- Upgrade `highlight` from `2.6.6` to `2.12` -- This was long overdue. It's nice not to have to patch highlight anymore! +- Upgrade `highlight` from `2.6.6` to `2.12` -- This was long overdue. It's nice not to have to patch highlight anymore! ### Removed @@ -209,7 +220,9 @@ To disable, use: ### Added -- Enabled "safe" plain-text handling. In other words, files like foo.txt will be supported, but not files without extensions. The only way to handle extensionless files is to handle -everything-. This can be done, but it requires a more defensive style of operation. +- Enabled "safe" plain-text handling. In other words, files like foo.txt will be supported, but not files without + extensions. The only way to handle extensionless files is to handle -everything-. This can be done, but it requires a + more defensive style of operation. - Support for `textEncoding` option to set encoding for highlight portion of renderer, with default `UTF-8`. - Support for `webkitTextEncoding` option to set encoding for webkit portion of renderer, with default `UTF-8`. - Support for `.cs`, `.el`, `.jnlp` (xml), `.e` (eiffel), and `.vb`. @@ -222,7 +235,7 @@ To disable, use: ### Added -- `Actionscript`, `Lisp`, `IDL`, `Verilog`, `VHDL`, `XHTML` (any others I forgot?). +- `Actionscript`, `Lisp`, `IDL`, `Verilog`, `VHDL`, `XHTML` (any others I forgot?). - `.cls` and `.sty` as LaTeX extensions. - `maxFileSize` option to keep us from hanging on huge files. @@ -270,7 +283,7 @@ To disable, use: ### Changed -- Switched from Pygments to Highlight. This should increase speed-and-language coverage. +- Switched from Pygments to Highlight. This should increase speed-and-language coverage. - Changed `.tex` `UTI` to agree with TeXShop's. - (Try to) let the system pick a different plugin if ours fails. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index c7fd927..ec87af3 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "2.1.1+dev"; + CURRENT_PROJECT_VERSION = 4.0.0; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -675,7 +675,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.1; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = "2.1.1+dev"; + CURRENT_PROJECT_VERSION = 4.0.0; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -740,7 +740,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 10.15; + MACOSX_DEPLOYMENT_TARGET = 11.1; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; diff --git a/hl/highlight b/hl/highlight index e55d1fd..ecf5d4a 160000 --- a/hl/highlight +++ b/hl/highlight @@ -1 +1 @@ -Subproject commit e55d1fd5949cc5dc4444a1b9cbbb6a0ab1a93a3f +Subproject commit ecf5d4aa1341908a6b191a47d67e735197dc430d diff --git a/hl/lua b/hl/lua index 9d067ab..e2ea3b3 160000 --- a/hl/lua +++ b/hl/lua @@ -1 +1 @@ -Subproject commit 9d067ab73b6befa0a5418f1df35c711f6c6918b3 +Subproject commit e2ea3b31c94bb3e1da27c233661cb2a16699c685 From 0599aec16798f884df9b602dbd0e4f011d0c04c9 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 15 Dec 2020 20:55:03 +0100 Subject: [PATCH 77/95] Bump version number --- QLColorCode.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index ec87af3..48a3e45 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.0.0; + CURRENT_PROJECT_VERSION = "4.0.1+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 4.0.0; + CURRENT_PROJECT_VERSION = "4.0.1+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From 8138cf7d60d04c542fcddda762af94a7ff91f35c Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Tue, 15 Dec 2020 20:59:21 +0100 Subject: [PATCH 78/95] Fix #70: Add TF support --- CHANGELOG.md | 4 +++- Info.plist | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 653091b..25e0e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a ## [Unreleased] -- NOTHING +### Added + +- `tf` support. ## [4.0.0] — 2020-12-15 diff --git a/Info.plist b/Info.plist index 49bf9b1..06eb805 100644 --- a/Info.plist +++ b/Info.plist @@ -95,6 +95,8 @@ com.apple.xcode.yacc-source com.apple.xcode.zsh-script dyn.ah62d4rv4ge81a63v + dyn.ah62d4rv4ge81k3x0qf3hg + dyn.ah62d4rv4ge81k3u @@ -1306,6 +1308,25 @@ + + UTTypeConformsTo + + dyn.ah62d4rv4ge81k3x0qf3hg + dyn.ah62d4rv4ge81k3u + + UTTypeDescription + TensorFlow files + UTTypeIdentifier + org.tf.source + UTTypeTagSpecification + + public.filename-extension + + tfvars + tf + + + UTTypeConformsTo From e72babf8aa61287f0e297875fac5d830b9cc43f3 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 16 Dec 2020 09:07:00 +0100 Subject: [PATCH 79/95] Fix CI settings by setting deployment target 11.0 --- CHANGELOG.md | 4 ++++ QLColorCode.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25e0e91..250fb03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a - `tf` support. +### Fixed + +- CI (thanks @jeffbyrnes). + ## [4.0.0] — 2020-12-15 **Big Sur support via integrated Lua and Highlight! diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 48a3e45..c402c1d 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -675,7 +675,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 11.1; + MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -740,7 +740,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 11.1; + MACOSX_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; From 499b9f520e7fea6d6bbf9aa71e2b9ce0b7f68e6e Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 16 Dec 2020 09:10:59 +0100 Subject: [PATCH 80/95] Fix CI settings by setting deployment target 10.15 --- QLColorCode.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index c402c1d..751ec82 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -675,7 +675,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; @@ -740,7 +740,7 @@ GCC_WARN_UNUSED_PARAMETER = NO; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.n8gray.qlcolorcode; PRODUCT_NAME = QLColorCode; From 5b04e64cd14deffb22aca4c08aa6e73060018f9a Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 16 Dec 2020 09:16:59 +0100 Subject: [PATCH 81/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 4 ++++ QLColorCode.xcodeproj/project.pbxproj | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 250fb03..73c6d65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a ## [Unreleased] +- NOTHING + +## [4.0.1] — 2020-12-16 + ### Added - `tf` support. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 751ec82..5cc1a60 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "4.0.1+dev"; + CURRENT_PROJECT_VERSION = 4.0.1; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = "4.0.1+dev"; + CURRENT_PROJECT_VERSION = 4.0.1; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From 4c6e4258bc4fb8108ba84f15a3dbed24bdaa70d5 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 16 Dec 2020 13:32:34 +0100 Subject: [PATCH 82/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 6 ++++++ QLColorCode.xcodeproj/project.pbxproj | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73c6d65..1fd8d18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a - NOTHING +## [4.0.2] — 2020-12-16 + +### Fixed + +- Version number in the final binary. + ## [4.0.1] — 2020-12-16 ### Added diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 5cc1a60..a8b9797 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -599,9 +599,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.1.1; + CURRENT_PROJECT_VERSION = 4.0.2; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.1.1; + MARKETING_VERSION = 4.0.2; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -611,9 +611,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 3.1.1; + CURRENT_PROJECT_VERSION = 4.0.2; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 3.1.1; + MARKETING_VERSION = 4.0.2; }; name = Release; }; @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.0.1; + CURRENT_PROJECT_VERSION = 4.0.2; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 4.0.1; + CURRENT_PROJECT_VERSION = 4.0.2; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From a906cab3dd422c9a78a869f9bc24ce72e0c35fb1 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 16 Dec 2020 13:47:47 +0100 Subject: [PATCH 83/95] Update README --- README.md | 105 +++++++++++++++++++++++------------------------------- 1 file changed, 44 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 6836fd5..76ecd5e 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,23 @@ **Original project:** -This is a Quick Look plug-in that renders source code with syntax highlighting, -using the [Highlight library](http://www.andre-simon.de). +This is a Quick Look plug-in that renders source code with syntax highlighting, using the +[Highlight library](http://www.andre-simon.de). -To install the plug-in, just drag it to `~/Library/QuickLook`. -You may need to create that folder if it doesn't already exist. +To install the plug-in, just drag it to `~/Library/QuickLook`. You may need to create that folder if it doesn't already +exist. -Alternatively, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cask), -install with `brew cask install qlcolorcode`. +Alternatively, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cask), install with +`brew cask install qlcolorcode`. Also available on [MacPorts](https://www.macports.org): `port install QLColorCode`. -Also available on MacPorts: `port install QLColorCode`. - -To build the project, you must have Boost headers on your system in -`/opt/local/include` or `/usr/local/include`. +**To build the project, you must have Boost headers on your system in `/opt/local/include` or `/usr/local/include`.** ## Settings If you want to configure `QLColorCode`, there are several `defaults` commands that could be useful: -Setting the text encoding (default is `UTF-8`). Two settings are required. The first sets Highlight's encoding, the second sets Webkit's: +Setting the text encoding (default is `UTF-8`). Two settings are required. The first sets Highlight's encoding, the +second sets Webkit's: defaults write org.n8gray.QLColorCode textEncoding UTF-16 defaults write org.n8gray.QLColorCode webkitTextEncoding UTF-16 @@ -35,7 +33,8 @@ Setting the font size (default is `10`): defaults write org.n8gray.QLColorCode fontSizePoints 9 -Setting the color style for `light` and `dark` mode (see [all available themes](http://www.andre-simon.de/doku/highlight/theme-samples.php)): +Setting the color style for `light` and `dark` mode (see +[all available themes](http://www.andre-simon.de/doku/highlight/theme-samples.php)): defaults write org.n8gray.QLColorCode lightTheme solarized-light defaults write org.n8gray.QLColorCode darkTheme solarized-dark @@ -48,7 +47,7 @@ Setting the maximum size (in bytes, deactivated by default) for previewed files: defaults write org.n8gray.QLColorCode maxFileSize 1000000 -Setting any extra command-line flags for Highlight (see below): +zSetting any extra command-line flags for Highlight (see below): defaults write org.n8gray.QLColorCode extraHLFlags '-l -W' @@ -83,13 +82,8 @@ Here are some useful 'highlight' command-line flags (from the man page): --kw-case= control case of case insensitive keywords -**Warning:** my fork uses an external `Highlight`. It will attempt to find `highlight` on your `PATH` (so it should work out of the box for Homebrew and MacPorts), but if it can't find it, it'll use `/opt/local/bin/highlight` (MacPorts default). This can be changed: - - defaults write org.n8gray.QLColorCode pathHL /path/to/your/highlight - -It is also possible to have the HTML preview converted to RTF. Using RTF -allows the contents of the file to be displayed instead of an icon -- similar -to QLStephen. +It is also possible to have the HTML preview converted to RTF. Using RTF allows the contents of the file to be displayed +instead of an icon -- similar to QLStephen. defaults write org.n8gray.QLColorCode rtfRender true @@ -110,7 +104,7 @@ QLColorCode decompiles some formats: QLColorCode enables some Highlight plug-ins : -- In all languages: `outhtml_codefold` and `reduce_filesize`. +- In all languages: `outhtml_codefold` and `reduce_filesize`. - Java (sources and classes): `java_library`. - C/C++: `cpp_syslog`, `cpp_ref_cplusplus_com` and `cpp_ref_local_includes`. - Perl: `perl_ref_perl_org`. @@ -120,63 +114,52 @@ QLColorCode enables some Highlight plug-ins : #### Handled languages -Highlight can handle lots and lots of languages, but this plug-in will only be -invoked for file types that the OS knows are type "source-code". Since the OS -only knows about a limited number of languages, I've added Universal Type -Identifier (UTI) declarations for several "interesting" languages. If I've -missed your favorite language, take a look at the Info.plist file inside the -plug-in bundle and look for the UTImportedTypeDeclarations section. I -haven't added all the languages that Highlight can handle because it's rumored -that having two conflicting UTI declarations for the same file extension can -cause problems. Note that if you do edit the Info.plist file you need to -nudge the system to tell it something has changed. Moving the plug-in to the -desktop then back to its installed location should do the trick. - -As an aside, by changing colorize.sh you can use this plug-in to render any file -type that you can convert to HTML. Have fun, and let me know if you do anything -cool! +Highlight can handle lots and lots of languages, but this plug-in will only be invoked for file types that the OS knows +are type "source-code". Since the OS only knows about a limited number of languages, I've added Universal Type +Identifier (UTI) declarations for several "interesting" languages. If I've missed your favorite language, take a look at +the Info.plist file inside the plug-in bundle and look for the UTImportedTypeDeclarations section. I haven't added all +the languages that Highlight can handle because it's rumored that having two conflicting UTI declarations for the same +file extension can cause problems. Note that if you do edit the Info.plist file you need to nudge the system to tell it +something has changed. Moving the plug-in to the desktop then back to its installed location should do the trick. + +As an aside, by changing colorize.sh you can use this plug-in to render any file type that you can convert to HTML. Have +fun, and let me know if you do anything cool! ##### Adding Language Types -If QLColorCode doesn't display PHP and JavaScript code properly, their types may -need to be added to Info.plist. Finding the right type string to use is the -tricky part. Getting the type strings and getting Info.plist edits to take effect -is easy by following the steps below, which explain how to add support for PHP: +If QLColorCode doesn't display PHP and JavaScript code properly, their types may need to be added to Info.plist. Finding +the right type string to use is the tricky part. Getting the type strings and getting Info.plist edits to take effect is +easy by following the steps below, which explain how to add support for PHP: 1. In Terminal.app (or any shell prompt), enter the command: - ``` bash - mdls -name kMDItemContentType /full/path/to/file.php - ``` +```bash +mdls -name kMDItemContentType /full/path/to/file.php +``` - Use the path to any PHP file. The response will be: +Use the path to any PHP file. The response will be: - ``` txt - kMDItemContentType = "public.php-script" - ``` +```txt +kMDItemContentType = "public.php-script" +``` - The string `public.php-script` is the type string needed in a later step. +The string `public.php-script` is the type string needed in a later step. 2. Again at a shell prompt, enter the command: - ``` bash - open ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist - ``` +```bash +open ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist +``` - This will open Info.plist in Xcode.app. +This will open Info.plist in Xcode.app. 3. In Xcode.app's edit window for Info.plist, go to: - Document types > Item 0 > Document Content Type UTIs +`Document types > Item 0 > Document Content Type UTIs` - (If the editor is showing raw keys, that's: - CFBundleDocumentTypes > Item 0 > LSItemContentTypes) +(If the editor is showing raw keys, that's: CFBundleDocumentTypes > Item 0 > LSItemContentTypes) 4. Add an item for `public.php-script`, the type string found in the first step. 5. Save the updated Info.plist file. -6. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode extension, restart QuickLook, or restart the Finder, but it wouldn't be surprising that some users might need to do so.) - -The Info.plist included with this version of QLColorCode already contains types -for PHP and JavaScript code, but these steps show how easy it is to add other -types. (Maybe somebody will develop a Preference Pane for QLColorCode to make -this even easier.) +6. Try it in Finder. (It's usually unnecessary to move/return the QLColorCode extension, restart QuickLook, or restart + the Finder, but it wouldn't be surprising that some users might need to do so.) From e943875aa7646212cf5aa0397b4a4c81daefab82 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Thu, 17 Dec 2020 09:52:00 +0100 Subject: [PATCH 84/95] Add XSL support --- CHANGELOG.md | 4 +++- Info.plist | 2 ++ QLColorCode.xcodeproj/project.pbxproj | 12 ++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fd8d18..5809a08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a ## [Unreleased] -- NOTHING +### Added + +- `xsl` support. ## [4.0.2] — 2020-12-16 diff --git a/Info.plist b/Info.plist index 06eb805..ca2f568 100644 --- a/Info.plist +++ b/Info.plist @@ -97,6 +97,7 @@ dyn.ah62d4rv4ge81a63v dyn.ah62d4rv4ge81k3x0qf3hg dyn.ah62d4rv4ge81k3u + dyn.ah62d4rv4ge81u65q @@ -1356,6 +1357,7 @@ dyn.ah62d4rv4ge81u7k dyn.ah62d4rv4ge81u6pr dyn.ah62d4rv4ge81u6k + dyn.ah62d4rv4ge81u65q UTTypeDescription XSD/XQuery/XSL/XML Source File diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index a8b9797..1fb8f4a 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -599,9 +599,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4.0.2; + CURRENT_PROJECT_VERSION = "4.0.3+dev"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.0.2; + MARKETING_VERSION = "4.0.3+dev"; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -611,9 +611,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4.0.2; + CURRENT_PROJECT_VERSION = "4.0.3+dev"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.0.2; + MARKETING_VERSION = "4.0.3+dev"; }; name = Release; }; @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.0.2; + CURRENT_PROJECT_VERSION = "4.0.3+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 4.0.2; + CURRENT_PROJECT_VERSION = "4.0.3+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From a2a277a9b4ae970b60f594cbe0c2a2829a9d5161 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Thu, 17 Dec 2020 11:26:10 +0100 Subject: [PATCH 85/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 4 ++++ QLColorCode.xcodeproj/project.pbxproj | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5809a08..bc3e180 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a ## [Unreleased] +- NOTHING + +## [4.0.3] — 2020-12-17 + ### Added - `xsl` support. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 1fb8f4a..01b42bf 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -599,9 +599,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "4.0.3+dev"; + CURRENT_PROJECT_VERSION = 4.0.3; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = "4.0.3+dev"; + MARKETING_VERSION = 4.0.3; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -611,9 +611,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "4.0.3+dev"; + CURRENT_PROJECT_VERSION = 4.0.3; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = "4.0.3+dev"; + MARKETING_VERSION = 4.0.3; }; name = Release; }; @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "4.0.3+dev"; + CURRENT_PROJECT_VERSION = 4.0.3; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = "4.0.3+dev"; + CURRENT_PROJECT_VERSION = 4.0.3; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From 835aa2324e56760edcaa248b9229a887feef0d9e Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Thu, 17 Dec 2020 11:32:36 +0100 Subject: [PATCH 86/95] Update CHANGELOG --- CHANGELOG.md | 6 +++++- QLColorCode.xcodeproj/project.pbxproj | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc3e180..9eebd4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a - NOTHING +### Changed + +- Compilation of `highlight`/`lua` (thanks @Tatsh). + ## [4.0.3] — 2020-12-17 ### Added @@ -63,7 +67,7 @@ Thanks to @tatsh for his amazing work!** - `kts` (kotlin) support. - `xsh` support. -- `pyc` support (decompilation with `uncompyle6` [has to be in `/usr/local/bin`]) +- `pyc` support (decompilation with `uncompyle6` [has to be in `/usr/local/bin`]). - `rst` support. - `perl` support. - `bats` (Bash Automated Testing System) support. diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 01b42bf..d2c300c 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -599,9 +599,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4.0.3; + CURRENT_PROJECT_VERSION = "4.1.0+dev"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.0.3; + MARKETING_VERSION = "4.1.0+dev"; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -611,9 +611,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4.0.3; + CURRENT_PROJECT_VERSION = "4.1.0+dev"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.0.3; + MARKETING_VERSION = "4.1.0+dev"; }; name = Release; }; @@ -650,7 +650,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.0.3; + CURRENT_PROJECT_VERSION = "4.1.0+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -717,7 +717,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 4.0.3; + CURRENT_PROJECT_VERSION = "4.1.0+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From 139f38e6b02f20841701893752cf6deb19d8c1bd Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Thu, 17 Dec 2020 04:03:09 -0500 Subject: [PATCH 87/95] No patching submodules --- QLColorCode.xcodeproj/project.pbxproj | 130 +++++++++++--------------- README.md | 4 + hl/apply-patches.sh | 11 --- hl/highlight.patch | 24 ----- hl/lua.patch | 17 ---- 5 files changed, 61 insertions(+), 125 deletions(-) delete mode 100755 hl/apply-patches.sh delete mode 100644 hl/highlight.patch delete mode 100644 hl/lua.patch diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index d2c300c..2b050d7 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -19,16 +19,16 @@ name = Package; productName = Package; }; - 26BACA63257CF90200486D28 /* Apply patches */ = { + 26653B3A258B55350021CDD8 /* Copy lua.hpp */ = { isa = PBXAggregateTarget; - buildConfigurationList = 26BACA67257CF90200486D28 /* Build configuration list for PBXAggregateTarget "Apply patches" */; + buildConfigurationList = 26653B3B258B55350021CDD8 /* Build configuration list for PBXAggregateTarget "Copy lua.hpp" */; buildPhases = ( - 26BACA66257CF90200486D28 /* ShellScript */, + 26653B41258B55390021CDD8 /* ShellScript */, ); dependencies = ( ); - name = "Apply patches"; - productName = Package; + name = "Copy lua.hpp"; + productName = "Copy lua.hpp"; }; /* End PBXAggregateTarget section */ @@ -58,6 +58,13 @@ remoteGlobalIDString = 8D57630D048677EA00EA77CD; remoteInfo = QLColorCode; }; + 26653B42258B55570021CDD8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089C1669FE841209C02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 26653B3A258B55350021CDD8; + remoteInfo = "Copy lua.hpp"; + }; 26BAC9C4257CE96D00486D28 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 089C1669FE841209C02AAC07 /* Project object */; @@ -72,13 +79,6 @@ remoteGlobalIDString = 26BAC9BC257CE93200486D28; remoteInfo = lua; }; - 26BACA6E257CF94500486D28 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 089C1669FE841209C02AAC07 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 26BACA63257CF90200486D28; - remoteInfo = "Apply patches"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -114,16 +114,6 @@ EAE9D2CB169E2B3500A67B2F /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; /* End PBXFileReference section */ -/* Begin PBXFrameworksBuildPhase section */ - 8D576313048677EA00EA77CD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - /* Begin PBXGroup section */ 089C166AFE841209C02AAC07 /* QLColorCode */ = { isa = PBXGroup; @@ -188,7 +178,7 @@ /* Begin PBXLegacyTarget section */ 26BAC9AB257CE89900486D28 /* highlight */ = { isa = PBXLegacyTarget; - buildArgumentsString = "-j9 cli"; + buildArgumentsString = "-j9 cli LUA_LIBS=../../lua/liblua.a 'CXX_COMPILE=clang++ -Wall -O2 -std=c++11 -D_FILE_OFFSET_BITS=64 -c -I /opt/local/include -I /usr/local/include -I ./include -I ../../lua'"; buildConfigurationList = 26BAC9AC257CE89900486D28 /* Build configuration list for PBXLegacyTarget "highlight" */; buildPhases = ( ); @@ -196,6 +186,7 @@ buildWorkingDirectory = hl/highlight; dependencies = ( 26BAC9C7257CE97100486D28 /* PBXTargetDependency */, + 26653B43258B55570021CDD8 /* PBXTargetDependency */, ); name = highlight; passBuildSettingsInEnvironment = 1; @@ -203,14 +194,13 @@ }; 26BAC9BC257CE93200486D28 /* lua */ = { isa = PBXLegacyTarget; - buildArgumentsString = "-j9 $(ACTION)"; + buildArgumentsString = "-j9 $(ACTION) MYCFLAGS=-std=c99 MYLDFLAGS= MYLIBS=-ldl"; buildConfigurationList = 26BAC9BD257CE93200486D28 /* Build configuration list for PBXLegacyTarget "lua" */; buildPhases = ( ); buildToolPath = /usr/bin/make; buildWorkingDirectory = hl/lua; dependencies = ( - 26BACA6F257CF94500486D28 /* PBXTargetDependency */, ); name = lua; passBuildSettingsInEnvironment = 1; @@ -226,7 +216,6 @@ 8D57630E048677EA00EA77CD /* Headers */, 8D57630F048677EA00EA77CD /* Resources */, 8D576311048677EA00EA77CD /* Sources */, - 8D576313048677EA00EA77CD /* Frameworks */, 0ECBBA6F0CFCA39E00416538 /* Copy to Library */, 0E1280381061C3EA0078EC05 /* Reset quicklookd */, ); @@ -250,6 +239,9 @@ BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 1200; TargetAttributes = { + 26653B3A258B55350021CDD8 = { + CreatedOnToolsVersion = 12.3; + }; 26BAC9AB257CE89900486D28 = { CreatedOnToolsVersion = 12.2; }; @@ -274,7 +266,7 @@ 0E0E34E90D0097020086C1E6 /* Package */, 26BAC9AB257CE89900486D28 /* highlight */, 26BAC9BC257CE93200486D28 /* lua */, - 26BACA63257CF90200486D28 /* Apply patches */, + 26653B3A258B55350021CDD8 /* Copy lua.hpp */, ); }; /* End PBXProject section */ @@ -327,18 +319,22 @@ shellScript = "qlmanage -r\n"; showEnvVarsInLog = 0; }; - 26BACA66257CF90200486D28 /* ShellScript */ = { + 26653B41258B55390021CDD8 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( ); + outputFileListPaths = ( + ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd hl\n./apply-patches.sh\n"; + shellScript = "cp hl/lua.hpp hl/lua/lua.hpp\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -362,6 +358,11 @@ target = 8D57630D048677EA00EA77CD /* QLColorCode */; targetProxy = 0E0E34ED0D0097280086C1E6 /* PBXContainerItemProxy */; }; + 26653B43258B55570021CDD8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 26653B3A258B55350021CDD8 /* Copy lua.hpp */; + targetProxy = 26653B42258B55570021CDD8 /* PBXContainerItemProxy */; + }; 26BAC9C5257CE96D00486D28 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 26BAC9AB257CE89900486D28 /* highlight */; @@ -372,11 +373,6 @@ target = 26BAC9BC257CE93200486D28 /* lua */; targetProxy = 26BAC9C6257CE97100486D28 /* PBXContainerItemProxy */; }; - 26BACA6F257CF94500486D28 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 26BACA63257CF90200486D28 /* Apply patches */; - targetProxy = 26BACA6E257CF94500486D28 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -408,6 +404,24 @@ }; name = Release; }; + 26653B3C258B55350021CDD8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = EU5R2QY9HJ; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 26653B3D258B55350021CDD8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = EU5R2QY9HJ; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; 26BAC9AD257CE89900486D28 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -564,36 +578,6 @@ }; name = Release; }; - 26BACA68257CF90200486D28 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_FILE = "Package copy-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - RUN_CLANG_STATIC_ANALYZER = YES; - }; - name = Debug; - }; - 26BACA69257CF90200486D28 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - INFOPLIST_FILE = "Package copy-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - RUN_CLANG_STATIC_ANALYZER = YES; - ZERO_LINK = NO; - }; - name = Release; - }; 2CA3261F0896AD4900168862 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -762,29 +746,29 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 26BAC9AC257CE89900486D28 /* Build configuration list for PBXLegacyTarget "highlight" */ = { + 26653B3B258B55350021CDD8 /* Build configuration list for PBXAggregateTarget "Copy lua.hpp" */ = { isa = XCConfigurationList; buildConfigurations = ( - 26BAC9AD257CE89900486D28 /* Debug */, - 26BAC9AE257CE89900486D28 /* Release */, + 26653B3C258B55350021CDD8 /* Debug */, + 26653B3D258B55350021CDD8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 26BAC9BD257CE93200486D28 /* Build configuration list for PBXLegacyTarget "lua" */ = { + 26BAC9AC257CE89900486D28 /* Build configuration list for PBXLegacyTarget "highlight" */ = { isa = XCConfigurationList; buildConfigurations = ( - 26BAC9BE257CE93200486D28 /* Debug */, - 26BAC9BF257CE93200486D28 /* Release */, + 26BAC9AD257CE89900486D28 /* Debug */, + 26BAC9AE257CE89900486D28 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 26BACA67257CF90200486D28 /* Build configuration list for PBXAggregateTarget "Apply patches" */ = { + 26BAC9BD257CE93200486D28 /* Build configuration list for PBXLegacyTarget "lua" */ = { isa = XCConfigurationList; buildConfigurations = ( - 26BACA68257CF90200486D28 /* Debug */, - 26BACA69257CF90200486D28 /* Release */, + 26BAC9BE257CE93200486D28 /* Debug */, + 26BAC9BF257CE93200486D28 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/README.md b/README.md index 76ecd5e..7043405 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ Alternatively, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-c **To build the project, you must have Boost headers on your system in `/opt/local/include` or `/usr/local/include`.** +Note that the build may fail if you have a version of `liblua.a` in a library +path such as `/usr/local/lib`. In that case, temporarily uninstall Lua using +the appropriate package manager. + ## Settings If you want to configure `QLColorCode`, there are several `defaults` commands that could be useful: diff --git a/hl/apply-patches.sh b/hl/apply-patches.sh deleted file mode 100755 index 0d2eb96..0000000 --- a/hl/apply-patches.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -set -e -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" -cd "$DIR" -for i in lua highlight -do - pushd "$i" - git checkout . || true - patch -p1 < "../${i}.patch" - popd -done diff --git a/hl/highlight.patch b/hl/highlight.patch deleted file mode 100644 index b3e4afd..0000000 --- a/hl/highlight.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/makefile b/src/makefile -index 9d0a08e..0a7a833 100644 ---- a/src/makefile -+++ b/src/makefile -@@ -43,8 +43,8 @@ ifeq (${LUA_TEST},1) - LUA_PKG_NAME=lua - endif - --LUA_CFLAGS=$(shell pkg-config --cflags ${LUA_PKG_NAME}) --LUA_LIBS=$(shell pkg-config --libs ${LUA_PKG_NAME}) -+LUA_CFLAGS=-I../../lua -I../.. -+LUA_LIBS=../../lua/liblua.a - - # luajit lib - # LUA_LIBS=$(shell pkg-config --libs luajit) -@@ -75,7 +75,7 @@ LDFLAGS = -ldl - #LDFLAGS = ${LDFLAGS} -s - #LDFLAGS= -Wl,--as-needed - --CXX_COMPILE=${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS} -+CXX_COMPILE=${CXX} ${CFLAGS} -c -I /opt/local/include -I /usr/local/include -I ${INCLUDE_DIR} ${LUA_CFLAGS} - - # Data directories (data dir, configuration file dir) - CXX_DIR=-DHL_DATA_DIR=\"${HL_DATA_DIR}\" -DHL_CONFIG_DIR=\"${HL_CONFIG_DIR}\" diff --git a/hl/lua.patch b/hl/lua.patch deleted file mode 100644 index 23b2174..0000000 --- a/hl/lua.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/makefile b/makefile -index 9e537dcc..d275b809 100644 ---- a/makefile -+++ b/makefile -@@ -60,9 +60,9 @@ LOCAL = $(TESTS) $(CWARNS) - - - # enable Linux goodies --MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE --MYLDFLAGS= $(LOCAL) -Wl,-E --MYLIBS= -ldl -lreadline -+MYCFLAGS= $(LOCAL) -std=c99 -+MYLDFLAGS= $(LOCAL) -+MYLIBS= -ldl - - - CC= gcc From 1134d60752fd2f39a33322b3b521ab12d12d1fc7 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Thu, 17 Dec 2020 11:36:33 +0100 Subject: [PATCH 88/95] Bump version numbers and update according CHANGELOG --- CHANGELOG.md | 2 ++ QLColorCode.xcodeproj/project.pbxproj | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eebd4a..945913f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/fr/1.0.0/) a - NOTHING +## [4.1.0] — 2020-12-17 + ### Changed - Compilation of `highlight`/`lua` (thanks @Tatsh). diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 2b050d7..4517d20 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -583,9 +583,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "4.1.0+dev"; + CURRENT_PROJECT_VERSION = 4.1.0; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = "4.1.0+dev"; + MARKETING_VERSION = 4.1.0; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -595,9 +595,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = "4.1.0+dev"; + CURRENT_PROJECT_VERSION = 4.1.0; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = "4.1.0+dev"; + MARKETING_VERSION = 4.1.0; }; name = Release; }; @@ -634,7 +634,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = "4.1.0+dev"; + CURRENT_PROJECT_VERSION = 4.1.0; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -701,7 +701,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = "4.1.0+dev"; + CURRENT_PROJECT_VERSION = 4.1.0; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From 04a30771706054b1d1e1150ca0e2aa7ed165a152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AB=E3=83=AF=E3=83=AA=E3=83=9F=E4=BA=BA=E5=BD=A2?= Date: Mon, 21 Dec 2020 16:12:00 +0900 Subject: [PATCH 89/95] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7043405..c91ada3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ To install the plug-in, just drag it to `~/Library/QuickLook`. You may need to c exist. Alternatively, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-cask), install with -`brew cask install qlcolorcode`. Also available on [MacPorts](https://www.macports.org): `port install QLColorCode`. +`brew install --cask qlcolorcode`. Also available on [MacPorts](https://www.macports.org): `port install QLColorCode`. **To build the project, you must have Boost headers on your system in `/opt/local/include` or `/usr/local/include`.** From 59fc5dc59713e1482ef3f300b2a087a55e745fd1 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 30 Dec 2020 16:54:38 +0100 Subject: [PATCH 90/95] Update PLIST file --- Info.plist | 1532 +++++----------------------------------------------- 1 file changed, 142 insertions(+), 1390 deletions(-) diff --git a/Info.plist b/Info.plist index ca2f568..2960ed6 100644 --- a/Info.plist +++ b/Info.plist @@ -1,1399 +1,151 @@ - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeName - - CFBundleTypeRole - QLGenerator - LSItemContentTypes - - public.source-code - public.ruby-script - public.yaml - public.php-script - com.netscape.javascript-source - com.microsoft.c-sharp - com.microsoft.f-sharp - public.css - com.apple.applescript.script - public.xml - com.apple.property-list - org.tug.tex - com.sun.java-class - com.sun.java-source - org.vim.vim-script - org.tug.lua - public.tex - public.text - public.shell-script - public.c-header - public.objective-c-source - public.c-source - public.c-plus-plus-source - public.c-plus-plus-header - public.objective-c-plus-plus-source - public.assembly-source - com.apple.rez-source - public.mig-source - public.swift-source - public.pascal-source - com.apple.symbol-export - public.csh-script - public.zsh-script - com.apple.terminal.shell-script - com.apple.terminal.session - com.apple.terminal.settings - public.python-script - com.apple.xcode.strings-text - dyn.ah62d4rv4ge81g6pq - dyn.ah62d4rv4ge8007a - dyn.ah62d4rv4ge80s6xbqv0gn - dyn.ah62d4rv4ge81g25brvuu - dyn.ah62d4rv4ge80g62 - dyn.ah62d4rv4ge80w5pq - dyn.ah62d4rv4ge80s52 - dyn.ah62d4rv4ge80g2pcqf0a - dyn.ah62d4rv4ge81e62 - dyn.ah62d4rv4ge80u62 - dyn.ah62d4rv4ge80g6u - dyn.ah62d4rv4ge80g3xh - dyn.ah62d4rv4ge81q7pf - dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u - dyn.ah62d4rv4ge80e2p4qz0a - dyn.ah62d4rv4ge80e8xq - dyn.ah62d4rv4ge81u65e - dyn.ah62d4rv4ge81u6pzqz3hw - org.vim.xsl-file - dyn.ah62d4rv4ge81u7k - dyn.ah62d4rv4ge81u6pr - dyn.ah62d4rv4ge81u6k - dyn.ah62d4rv4ge8007dx - dyn.ah62d4rv4ge80e2py - dyn.ah62d4rv4ge80q4pxra - dyn.ah62d4rv4ge81u65k - dyn.ah62d4rv4ge81a8pd - dyn.ah62d4rv4ge81e65y - dyn.ah62d4rv4ge80n5a - dyn.ah62d4rv4ge80w5u - dyn.ah62d4rv4ge81k - dyn.ah62d4rv4ge80c5k - dyn.ah62d4rv4ge80c3dtqq - public.perl-script - dyn.ah62d4rv4ge80e2pysq - public.patch-file - public.bash-script - com.apple.xcode.bash-script - com.apple.xcode.csh-script - com.apple.xcode.ksh-script - com.apple.xcode.tcsh-script - com.apple.xcode.yacc-source - com.apple.xcode.zsh-script - dyn.ah62d4rv4ge81a63v - dyn.ah62d4rv4ge81k3x0qf3hg - dyn.ah62d4rv4ge81k3u - dyn.ah62d4rv4ge81u65q - - - - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - C044543D-70A1-46D8-A908-4B8AEA1197A4 - QuickLookGeneratorPluginFactory - - CFPlugInTypes - - 5E2D9680-5022-40FA-B806-43349622E5B9 + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes - C044543D-70A1-46D8-A908-4B8AEA1197A4 - - - CFPlugInUnloadFunction - - QLNeedsToBeRunInMainThread - - QLPreviewHeight - 800 - QLPreviewWidth - 800 - QLSupportsConcurrentRequests - - QLThumbnailMinimumSize - 9 - UTImportedTypeDeclarations - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Logos Source File - UTTypeIdentifier - com.dhowett.logos - UTTypeTagSpecification - - public.filename-extension - - xm - - - - - UTTypeIdentifier - org.ocaml.ocaml-source - UTTypeReferenceURL - http://www.ocaml.org/ - UTTypeTagSpecification - - public.filename-extension - - ml - mll - mly - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - OCaml Interface File - UTTypeIdentifier - org.ocaml.ocaml-interface - UTTypeReferenceURL - http://www.ocaml.org/ - UTTypeTagSpecification - - public.filename-extension - - mli - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Haskell Source File - UTTypeIdentifier - org.haskell.haskell-source - UTTypeReferenceURL - http://www.haskell.org/ - UTTypeTagSpecification - - public.filename-extension - - hs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Literate Haskell Source File - UTTypeIdentifier - org.haskell.literate-haskell-source - UTTypeReferenceURL - http://www.haskell.org/ - UTTypeTagSpecification - - public.filename-extension - - lhs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - scheme Source File - UTTypeIdentifier - org.n8gray.scheme-source - UTTypeTagSpecification - - public.filename-extension - - scm - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - .ini Source File - UTTypeIdentifier - org.n8gray.ini-source - UTTypeTagSpecification - - public.filename-extension - - ini - - public.mime-type - text/x-ini - - - - UTTypeConformsTo - - public.tex - - UTTypeDescription - TeX text file - UTTypeIdentifier - public.tex - UTTypeTagSpecification - - public.filename-extension - - tex - latex - ltx - texi - ctx - sty - cls - - - - - UTTypeConformsTo - - public.yaml - - UTTypeDescription - YAML file - UTTypeIdentifier - public.yaml - UTTypeTagSpecification - - public.filename-extension - - yaml - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Erlang Source File - UTTypeIdentifier - org.erlang.erlang-source - UTTypeTagSpecification - - public.filename-extension - - erl - hrl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Standard ML Source File - UTTypeIdentifier - org.n8gray.standard-ml-source - UTTypeTagSpecification - - public.filename-extension - - sml - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge81g6pq - - UTTypeDescription - SQL Source File - UTTypeIdentifier - org.n8gray.structured-query-language-source - UTTypeTagSpecification - - public.filename-extension - - sql - - - - - UTTypeConformsTo - - public.script - public.patch-file - - UTTypeDescription - Diff File - UTTypeIdentifier - org.n8gray.diff-script - UTTypeTagSpecification - - public.filename-extension - - diff - patch - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - CSS File - UTTypeIdentifier - public.css - UTTypeTagSpecification - - public.filename-extension - - css - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Lua Source File - UTTypeIdentifier - org.lua.lua-source - UTTypeTagSpecification - - public.filename-extension - - lua - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Tcl Source File - UTTypeIdentifier - tk.tcl.tcl-source - UTTypeTagSpecification - - public.filename-extension - - tcl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - JSP Source File - UTTypeIdentifier - org.n8gray.jsp-source - UTTypeTagSpecification - - public.filename-extension - - jsp - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge80e2py - - UTTypeDescription - DOS Batch Source File - UTTypeIdentifier - org.n8gray.bat - UTTypeTagSpecification - - public.filename-extension - - bat - cmd - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Adobe Flash ActionScript Source File - UTTypeIdentifier - com.adobe.actionscript - UTTypeTagSpecification - - public.filename-extension - - as - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Lisp Source File - UTTypeIdentifier - org.n8gray.lisp - UTTypeTagSpecification - - public.filename-extension - - sb - lisp - lsp - asd - el - clj - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge80s52 - - UTTypeDescription - Go Source File - UTTypeIdentifier - org.go.source - UTTypeTagSpecification - - public.filename-extension - - go - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - IDL Source File - UTTypeIdentifier - org.n8gray.idl - UTTypeTagSpecification - - public.filename-extension - - pro - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Makefile Source File - UTTypeIdentifier - org.n8gray.makefile - UTTypeTagSpecification - - public.filename-extension - - mk - mak - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Verilog Source File - UTTypeIdentifier - org.n8gray.verilog - UTTypeTagSpecification - - public.filename-extension - - v - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - VHDL Source File - UTTypeIdentifier - org.n8gray.vhdl - UTTypeTagSpecification - - public.filename-extension - - vhdl - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - XHTML Source File - UTTypeIdentifier - org.n8gray.xhtml - UTTypeTagSpecification - - public.filename-extension - - xhtml - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - Java Web Installer (XML) - UTTypeIdentifier - org.n8gray.javaInstaller - UTTypeTagSpecification - - public.filename-extension - - jnlp - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Eiffel source code file - UTTypeIdentifier - com.eiffel.source-code - UTTypeTagSpecification - - public.filename-extension - - e - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - EiffelStudio project configuration file - UTTypeIdentifier - com.eiffel.eiffelstudio-project-config - UTTypeTagSpecification - - public.filename-extension - - ecf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - C# Source File - UTTypeIdentifier - com.microsoft.csharp-source - UTTypeReferenceURL - http://www.microsoft.com/ - UTTypeTagSpecification - - public.filename-extension - - cs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Visual Basic Source File - UTTypeIdentifier - com.microsoft.vb-source - UTTypeReferenceURL - http://www.microsoft.com/ - UTTypeTagSpecification - public.filename-extension - - vb + CFBundleTypeName + + CFBundleTypeRole + QLGenerator + LSItemContentTypes + + dyn.ah62d4rv4ge81q4pr + public.source-code + public.ruby-script + public.yaml + public.php-script + com.netscape.javascript-source + com.microsoft.c-sharp + com.microsoft.f-sharp + public.css + com.apple.applescript.script + public.xml + com.apple.property-list + org.tug.tex + com.sun.java-class + com.sun.java-source + org.vim.vim-script + org.tug.lua + public.tex + public.text + public.shell-script + public.c-header + public.objective-c-source + public.c-source + public.c-plus-plus-source + public.c-plus-plus-header + public.objective-c-plus-plus-source + public.assembly-source + com.apple.rez-source + public.mig-source + public.swift-source + public.pascal-source + com.apple.symbol-export + public.csh-script + public.zsh-script + com.apple.terminal.shell-script + com.apple.terminal.session + com.apple.terminal.settings + public.python-script + com.apple.xcode.strings-text + dyn.ah62d4rv4ge81g6pq + dyn.ah62d4rv4ge8007a + dyn.ah62d4rv4ge80s6xbqv0gn + dyn.ah62d4rv4ge81g25brvuu + dyn.ah62d4rv4ge80g62 + dyn.ah62d4rv4ge80w5pq + dyn.ah62d4rv4ge80s52 + dyn.ah62d4rv4ge80g2pcqf0a + dyn.ah62d4rv4ge81e62 + dyn.ah62d4rv4ge80u62 + dyn.ah62d4rv4ge80g6u + dyn.ah62d4rv4ge80g3xh + dyn.ah62d4rv4ge81q7pf + dyn.ah62d4rv4ge81a6xtsbw1e7dmqz3u + dyn.ah62d4rv4ge80e2p4qz0a + dyn.ah62d4rv4ge80e8xq + dyn.ah62d4rv4ge81u65e + dyn.ah62d4rv4ge81u6pzqz3hw + org.vim.xsl-file + dyn.ah62d4rv4ge81u7k + dyn.ah62d4rv4ge81u6pr + dyn.ah62d4rv4ge81u6k + dyn.ah62d4rv4ge8007dx + dyn.ah62d4rv4ge80e2py + dyn.ah62d4rv4ge80q4pxra + dyn.ah62d4rv4ge81u65k + dyn.ah62d4rv4ge81a8pd + dyn.ah62d4rv4ge81e65y + dyn.ah62d4rv4ge80n5a + dyn.ah62d4rv4ge80w5u + dyn.ah62d4rv4ge81k + dyn.ah62d4rv4ge80c5k + dyn.ah62d4rv4ge80c3dtqq + public.perl-script + dyn.ah62d4rv4ge80e2pysq + public.patch-file + public.bash-script + com.apple.xcode.bash-script + com.apple.xcode.csh-script + com.apple.xcode.ksh-script + com.apple.xcode.tcsh-script + com.apple.xcode.yacc-source + com.apple.xcode.zsh-script + dyn.ah62d4rv4ge81a63v + dyn.ah62d4rv4ge81k3x0qf3hg + dyn.ah62d4rv4ge81k3u + dyn.ah62d4rv4ge81u65q + dyn.ah62d4rv4ge80w5xm + dyn.ah62d4rv4ge8023pxsq + dyn.ah62d4rv4ge80g55sq2 - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Ruby on Rails File - UTTypeIdentifier - org.n8gray.railstemplate - UTTypeTagSpecification - - public.filename-extension - - rhtml - erb - rjs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - QLColorCode Test File - UTTypeIdentifier - org.n8gray.bogusextension - UTTypeTagSpecification - - public.filename-extension - - bogus_extension - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Groovy Source Code - UTTypeIdentifier - org.codehaus.groovy-source - UTTypeTagSpecification - - public.filename-extension - - groovy - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Scala Source Code - UTTypeIdentifier - org.scala.source - UTTypeTagSpecification - - public.filename-extension - - scala - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Coldfusion Source Code - UTTypeIdentifier - com.adobe.coldfusion - UTTypeTagSpecification - - public.filename-extension - - cfc - cfm - cfml - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - PDE files - UTTypeIdentifier - org.arduino.source - UTTypeTagSpecification - - public.filename-extension - - pde - ino - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ASCR files - UTTypeIdentifier - org.applescript.source - UTTypeTagSpecification - - public.filename-extension - - ascr - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - RDF files - UTTypeIdentifier - org.rdf.source - UTTypeTagSpecification - - public.filename-extension - - rdf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - XUL files - UTTypeIdentifier - org.xul.source - UTTypeTagSpecification - - public.filename-extension - - xul - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - INO files - UTTypeIdentifier - org.arduino.ino-source - UTTypeTagSpecification - - public.filename-extension - - ino - - - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - INF files - UTTypeIdentifier - org.microsoft.inf - UTTypeTagSpecification - - public.filename-extension - - inf - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - MF files - UTTypeIdentifier - com.sun.manifest - UTTypeTagSpecification - - public.filename-extension - - mf - - - - - UTTypeConformsTo - - com.sun.java-class - - UTTypeDescription - Java Class - UTTypeIdentifier - com.sun.java-class - UTTypeTagSpecification - - public.filename-extension - - class - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - JavaFX ML - UTTypeIdentifier - com.sun.javafx - UTTypeTagSpecification - - public.filename-extension - - fxml - - - - - UTTypeConformsTo - - public.plain-text - - UTTypeDescription - NFO files - UTTypeIdentifier - org.nfo - UTTypeTagSpecification - - public.filename-extension - - nfo - - - - - UTTypeConformsTo - - public.xml - - UTTypeDescription - ECore files - UTTypeIdentifier - org.omg.ecore - UTTypeTagSpecification - - public.filename-extension - - ecore - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ATL files - UTTypeIdentifier - org.km3 - UTTypeTagSpecification - - public.filename-extension - - atl - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge80q4pxra - - UTTypeDescription - Fish source files - UTTypeIdentifier - org.fish.source - UTTypeTagSpecification - - public.filename-extension - - fish - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81u65k - - UTTypeDescription - XSH source files - UTTypeIdentifier - org.xsh.source - UTTypeTagSpecification - - public.filename-extension - - xsh - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge81e62 - - UTTypeDescription - Rust source files - UTTypeIdentifier - org.rust.source - UTTypeTagSpecification - - public.filename-extension - - rs - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - Coffee source files - UTTypeIdentifier - org.coffee.source - UTTypeTagSpecification - - public.filename-extension - - coffee - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - CSON source files - UTTypeIdentifier - org.cson.source - UTTypeTagSpecification - - public.filename-extension - - cson - - - - - UTTypeConformsTo - - public.source-code - dyn.ah62d4rv4ge80e2pysq - public.bash-script - - UTTypeDescription - Shell script - UTTypeIdentifier - org.bash.source - UTTypeTagSpecification - - public.filename-extension - - bashrc - bats - bash - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - INNO source files - UTTypeIdentifier - org.inno.source - UTTypeTagSpecification - - public.filename-extension - - iss - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - ASM source files - UTTypeIdentifier - org.asm.source - UTTypeTagSpecification - - public.filename-extension - - s79 - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - KERMETA source files - UTTypeIdentifier - org.kmt.source - UTTypeTagSpecification - - public.filename-extension - - kmt - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge8007dx - - UTTypeDescription - Kotlin source files - UTTypeIdentifier - org.kotlin.source - UTTypeTagSpecification - - public.filename-extension - - kts - - - - - UTTypeConformsTo - - public.source-code - - UTTypeDescription - GCC-linked files - UTTypeIdentifier - org.gcc.files - UTTypeTagSpecification - - public.filename-extension - - ld - map - d - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge8007a - - UTTypeDescription - Kotlin Source File - UTTypeIdentifier - org.kotlinlang.source - UTTypeTagSpecification - - public.filename-extension - - kt - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80s6xbqv0gn - - UTTypeDescription - Gradle Source File - UTTypeIdentifier - org.gradle.source - UTTypeTagSpecification - - public.filename-extension - - gradle - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80w5pq - - UTTypeDescription - JetBrain Project File - UTTypeIdentifier - com.jetbrain.source - UTTypeTagSpecification - - public.filename-extension - - iml - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80g2pcqf0a - - UTTypeDescription - CABAL file - UTTypeIdentifier - public.cabal - UTTypeTagSpecification - - public.filename-extension - - cabal - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80u62 - - UTTypeDescription - Haskell file - UTTypeIdentifier - public.haskell - UTTypeTagSpecification - - public.filename-extension - - hs - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80g6u - - UTTypeDescription - Crystal Source File - UTTypeIdentifier - org.crystal-lang.source - UTTypeTagSpecification - - public.filename-extension - - cr - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81q7pf - - UTTypeDescription - Vue Source File - UTTypeIdentifier - org.vue.source - UTTypeTagSpecification - - public.filename-extension - - vue - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81k3x0qf3hg - dyn.ah62d4rv4ge81k3u - - UTTypeDescription - TensorFlow files - UTTypeIdentifier - org.tf.source - UTTypeTagSpecification - - public.filename-extension - - tfvars - tf - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge80e2p4qz0a - dyn.ah62d4rv4ge80e8xq - - UTTypeDescription - Bazel Source File - UTTypeIdentifier - org.bazel.source - UTTypeTagSpecification - - public.filename-extension - - bazel - bzl - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81u65e - dyn.ah62d4rv4ge81u6pzqz3hw - org.vim.xsl-file - public.xml - dyn.ah62d4rv4ge81u7k - dyn.ah62d4rv4ge81u6pr - dyn.ah62d4rv4ge81u6k - dyn.ah62d4rv4ge81u65q - - UTTypeDescription - XSD/XQuery/XSL/XML Source File - UTTypeIdentifier - org.xml-tools.source - UTTypeTagSpecification - - public.filename-extension - - xsd - xquery - xml - xsl - xu - xqm - xq - - - - - UTTypeConformsTo - - dyn.ah62d4rv4ge81a63v - - UTTypeDescription - PowerShell - UTTypeIdentifier - org.powershell.source - UTTypeTagSpecification - - public.filename-extension - - ps1 - - - - - + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + C044543D-70A1-46D8-A908-4B8AEA1197A4 + QuickLookGeneratorPluginFactory + + CFPlugInTypes + + 5E2D9680-5022-40FA-B806-43349622E5B9 + + C044543D-70A1-46D8-A908-4B8AEA1197A4 + + + CFPlugInUnloadFunction + + QLNeedsToBeRunInMainThread + + QLPreviewHeight + 800 + QLPreviewWidth + 800 + QLSupportsConcurrentRequests + + QLThumbnailMinimumSize + 17 + From a9ee1dddbc1c9eac50d999c4d675985568c961aa Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 30 Dec 2020 16:55:31 +0100 Subject: [PATCH 91/95] Bump version number --- QLColorCode.xcodeproj/project.pbxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index 4517d20..f04f296 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -583,9 +583,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4.1.0; + CURRENT_PROJECT_VERSION = "4.1.1+dev"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.1.0; + MARKETING_VERSION = "4.1.1+dev"; OTHER_CFLAGS = "-DDEBUG"; }; name = Debug; @@ -595,9 +595,9 @@ buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 4.1.0; + CURRENT_PROJECT_VERSION = "4.1.1+dev"; MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 4.1.0; + MARKETING_VERSION = "4.1.1+dev"; }; name = Release; }; @@ -634,7 +634,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 4.1.0; + CURRENT_PROJECT_VERSION = "4.1.1+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -701,7 +701,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 4.1.0; + CURRENT_PROJECT_VERSION = "4.1.1+dev"; DEAD_CODE_STRIPPING = YES; DSTROOT = "/export/tmp/$(PROJECT_NAME).dst"; ENABLE_STRICT_OBJC_MSGSEND = YES; From e4554440da5253c696277d138f6b255a19d1e24e Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 30 Dec 2020 16:55:45 +0100 Subject: [PATCH 92/95] Remove useless settings --- QLColorCode.xcodeproj/project.pbxproj | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index f04f296..db203f5 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -379,28 +379,16 @@ 0E0E34EA0D0097020086C1E6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ENABLE_OBJC_WEAK = YES; - COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - PRODUCT_NAME = Package; - RUN_CLANG_STATIC_ANALYZER = YES; + PRODUCT_NAME = QLColorCode; }; name = Debug; }; 0E0E34EB0D0097020086C1E6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ENABLE_OBJC_WEAK = YES; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - PRODUCT_NAME = Package; - RUN_CLANG_STATIC_ANALYZER = YES; - ZERO_LINK = NO; + PRODUCT_NAME = QLColorCode; }; name = Release; }; From d5ab9cb403e8752be66c75075a9afec7ffbe5410 Mon Sep 17 00:00:00 2001 From: Anthony Gelibert Date: Wed, 30 Dec 2020 16:56:16 +0100 Subject: [PATCH 93/95] Minor cleanings --- src/Common.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Common.m b/src/Common.m index 1b8290b..f8a6eb6 100644 --- a/src/Common.m +++ b/src/Common.m @@ -56,11 +56,11 @@ return targetCFS; } + NSData *colorizeURL(CFBundleRef bundle, CFURLRef url, int *status, int thumbnail) { NSData *output = NULL; CFURLRef rsrcDirURL = CFBundleCopyResourcesDirectoryURL(bundle); - //n8log(@"rsrcDirURL = %@", CFURLGetString(rsrcDirURL)); NSString *rsrcEsc = pathOfURL(rsrcDirURL); CFRelease(rsrcDirURL); n8log(@"url = %@", url); @@ -89,6 +89,7 @@ @"UTF-8", @"textEncoding", @"UTF-8", @"webkitTextEncoding", nil]]; + [env addEntriesFromDictionary:[defaults persistentDomainForName:myDomain]]; // Change hlTheme according to system's darkmode setting. From bf8ddb47e4d2afd4f7ed37779be459b89d3cc48c Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Sun, 24 Jan 2021 07:47:11 -0500 Subject: [PATCH 94/95] Fix include path order; update readme --- QLColorCode.xcodeproj/project.pbxproj | 2 +- README.md | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/QLColorCode.xcodeproj/project.pbxproj b/QLColorCode.xcodeproj/project.pbxproj index db203f5..91aadb5 100644 --- a/QLColorCode.xcodeproj/project.pbxproj +++ b/QLColorCode.xcodeproj/project.pbxproj @@ -178,7 +178,7 @@ /* Begin PBXLegacyTarget section */ 26BAC9AB257CE89900486D28 /* highlight */ = { isa = PBXLegacyTarget; - buildArgumentsString = "-j9 cli LUA_LIBS=../../lua/liblua.a 'CXX_COMPILE=clang++ -Wall -O2 -std=c++11 -D_FILE_OFFSET_BITS=64 -c -I /opt/local/include -I /usr/local/include -I ./include -I ../../lua'"; + buildArgumentsString = "-j9 cli LUA_LIBS=../../lua/liblua.a 'CXX_COMPILE=clang++ -Wall -O2 -std=c++11 -D_FILE_OFFSET_BITS=64 -c -I ../../lua -I /opt/local/include -I /usr/local/include -I ./include'"; buildConfigurationList = 26BAC9AC257CE89900486D28 /* Build configuration list for PBXLegacyTarget "highlight" */; buildPhases = ( ); diff --git a/README.md b/README.md index c91ada3..dd96b57 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,6 @@ Alternatively, if you use [Homebrew Cask](https://github.com/caskroom/homebrew-c **To build the project, you must have Boost headers on your system in `/opt/local/include` or `/usr/local/include`.** -Note that the build may fail if you have a version of `liblua.a` in a library -path such as `/usr/local/lib`. In that case, temporarily uninstall Lua using -the appropriate package manager. - ## Settings If you want to configure `QLColorCode`, there are several `defaults` commands that could be useful: From 18765d8f0dacc9d0b8f01b5e296004b06b974f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Wed, 7 Jul 2021 19:12:32 -0300 Subject: [PATCH 95/95] Minor proposal (line 54) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd96b57..cf458e5 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ zSetting any extra command-line flags for Highlight (see below): defaults write org.n8gray.QLColorCode extraHLFlags '-l -W' -Here are some useful 'highlight' command-line flags (from the man page): +Here are some useful 'highlight' command-line flags (from the main page): -F, --reformat=