From e4f87af174807e07eaeec606f5ad9f53ca65ac0f Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 27 Aug 2017 09:44:17 -0400 Subject: Updated Info.plist such that Textadept appears in the "Open With..." menu. Thanks to Franck Guadagnini. --- scripts/gen_plist.lua | 118 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 90 insertions(+), 28 deletions(-) (limited to 'scripts') diff --git a/scripts/gen_plist.lua b/scripts/gen_plist.lua index f217f2cc..d9e319b4 100755 --- a/scripts/gen_plist.lua +++ b/scripts/gen_plist.lua @@ -27,47 +27,107 @@ local xml = {[[ CFBundleDevelopmentRegion English - CFBundleDocumentTypes - ]]} + CFBundleDocumentTypes]]} +xml[#xml + 1] = [[ + + + CFBundleTypeName + Textadept document + CFBundleTypeRole + Editor + LSItemContentTypes + + com.apple.property-list + com.apple.applescript.text + com.apple.xcode.commands + com.apple.xcode.csh-script + com.apple.xcode.ksh-script + com.apple.xcode.lex-source + com.apple.xcode.make-script + com.apple.xcode.mig-source + com.apple.xcode.tcsh-script + com.apple.xcode.yacc-source + com.apple.xcode.zsh-script + com.apple.xml-property-list + com.netscape.javascript-source + com.sun.java-source]] for i = 1, #languages do lang, exts = languages[i], extensions[languages[i]] if #exts > 0 then - xml[#xml + 1] = "\t\t" - xml[#xml + 1] = "\t\t\tCFBundleTypeExtensions" - xml[#xml + 1] = "\t\t\t" - for j = 1, #exts do - xml[#xml + 1] = "\t\t\t\t"..exts[j].."" - end - xml[#xml + 1] = "\t\t\t" - xml[#xml + 1] = "\t\t\tCFBundleTypeName" - xml[#xml + 1] = "\t\t\t"..lang.." source" - xml[#xml + 1] = "\t\t\tCFBundleTypeRole" - xml[#xml + 1] = "\t\t\tEditor" - xml[#xml + 1] = "\t\t" + xml[#xml + 1] = "\t\t\t\tcom.textadept."..lang:gsub(' ', '-').. + "-source" end end xml[#xml + 1] = [[ - - CFBundleTypeExtensions - - * + net.daringfireball.markdown + public.c-header + public.c-plus-plus-header + public.c-plus-plus-source + public.c-source + public.csh-script + public.css + public.html + public.lex-source + public.mig-source + public.objective-c-plus-plus-source + public.objective-c-source + public.perl-script + public.php-script + public.plain-text + public.python-script + public.rtf + public.ruby-script + public.script + public.shell-script + public.source-code + public.text + public.utf16-external-plain-text + public.utf16-plain-text + public.utf8-plain-text + public.xml - CFBundleTypeName - Document - CFBundleTypeRole - Editor CFBundleTypeName - Document - CFBundleTypeOSTypes + Anything + CFBundleTypeRole + Viewer + LSItemContentTypes - **** + public.data + public.text - CFBundleTypeRole - Editor + UTImportedTypeDeclarations + ]] +for i = 1, #languages do + lang, exts = languages[i], extensions[languages[i]] + if #exts > 0 then + xml[#xml + 1] = "\t\t" + xml[#xml + 1] = "\t\t\tUTTypeTagSpecification" + xml[#xml + 1] = "\t\t\t" + xml[#xml + 1] = "\t\t\t\tpublic.filename-extension" + xml[#xml + 1] = "\t\t\t\t" + for j = 1, #exts do + xml[#xml + 1] = "\t\t\t\t\t"..exts[j].."" + end + xml[#xml + 1] = "\t\t\t\t" + xml[#xml + 1] = "\t\t\t" + xml[#xml + 1] = "\t\t\tUTTypeDescription" + xml[#xml + 1] = "\t\t\t"..lang.." source" + xml[#xml + 1] = "\t\t\tUTTypeIdentifier" + xml[#xml + 1] = "\t\t\tcom.textadept."..lang:gsub(' ', '-').. + "-source" + xml[#xml + 1] = "\t\t\tUTTypeConformsTo" + xml[#xml + 1] = "\t\t\t" + xml[#xml + 1] = "\t\t\t\tpublic.source-code" + xml[#xml + 1] = "\t\t\t" + xml[#xml + 1] = "\t\t" + end +end +xml[#xml + 1] = [[ + CFBundleExecutable textadept_osx CFBundleIconFile @@ -83,7 +143,9 @@ xml[#xml + 1] = [[ CFBundleSignature ???? CFBundleVersion - 8.5 + 9.5beta + CFBundleShortVersionString + 9.5 beta NSHighResolutionCapable -- cgit v1.2.3