Automatically generate document icons

Document icons are generated using the makeicns program and a Python
script.  Note that the script uses PyObjC and hence requires Mac OS X
10.5 or later (on earlier systems a blank icon will be used for all
document types).

This patch also adds more filetypes to Info.plist.

Integration into Xcode project by Bjorn Winckler
<bjorn.winckler@gmail.com> with the help of Keith Hubbard
<keith@bangj.com>
This commit is contained in:
Nico Weber
2008-12-23 20:19:33 +01:00
committed by Bjorn Winckler
parent 48874c704b
commit a5be20ba89
24 changed files with 2928 additions and 114 deletions
+2
View File
@@ -3,6 +3,8 @@
src/MacVim/MacVim.xcodeproj/*.mode1
src/MacVim/MacVim.xcodeproj/*.mode1v3
src/MacVim/MacVim.xcodeproj/*.pbxuser
src/MacVim/icons/makeicns/*.o
src/MacVim/icons/makeicns/makeicns
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.mode1
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.pbxuser
src/MacVim/PSMTabBarControl/build
+627 -32
View File
@@ -5,6 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<!-- See http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/utilist/chapter_4_section_1.html#//apple_ref/doc/uid/TP40001319-CH205-CHDIJFGJ for a list of UTIs -->
<array>
<dict>
<key>CFBundleTypeExtensions</key>
@@ -12,7 +13,7 @@
<string>vim</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm</string>
<string>MacVim-vim</string>
<key>CFBundleTypeName</key>
<string>Vim Script File</string>
<key>CFBundleTypeRole</key>
@@ -25,9 +26,10 @@
<array>
<string>txt</string>
<string>text</string>
<string>utf8</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-txt</string>
<string>MacVim-txt</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/plain</string>
@@ -43,9 +45,14 @@
<key>CFBundleTypeExtensions</key>
<array>
<string>tex</string>
<string>sty</string>
<string>cls</string>
<string>ltx</string>
<string>ins</string>
<string>dtx</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-tex</string>
<string>MacVim-tex</string>
<key>CFBundleTypeName</key>
<string>TeX File</string>
<key>CFBundleTypeRole</key>
@@ -59,7 +66,7 @@
<string>h</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-h</string>
<string>MacVim-h</string>
<key>CFBundleTypeName</key>
<string>C Header Source File</string>
<key>CFBundleTypeRole</key>
@@ -76,6 +83,8 @@
<array>
<string>pch</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-h</string>
<key>CFBundleTypeName</key>
<string>C Precompiled Header Source File</string>
<key>CFBundleTypeRole</key>
@@ -96,6 +105,8 @@
<string>hxx</string>
<string>h++</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-h</string>
<key>CFBundleTypeName</key>
<string>C++ Header Source File</string>
<key>CFBundleTypeRole</key>
@@ -108,6 +119,8 @@
<array>
<string>pch++</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-h</string>
<key>CFBundleTypeName</key>
<string>C++ Precompiled Header Source File</string>
<key>CFBundleTypeRole</key>
@@ -125,7 +138,7 @@
<string>c</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-c</string>
<string>MacVim-c</string>
<key>CFBundleTypeName</key>
<string>C Source File</string>
<key>CFBundleTypeRole</key>
@@ -142,6 +155,8 @@
<array>
<string>m</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-m</string>
<key>CFBundleTypeName</key>
<string>Objective-C Source File</string>
<key>CFBundleTypeRole</key>
@@ -158,6 +173,8 @@
<array>
<string>mm</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-mm</string>
<key>CFBundleTypeName</key>
<string>Objective-C++ Source File</string>
<key>CFBundleTypeRole</key>
@@ -178,6 +195,8 @@
<string>cxx</string>
<string>c++</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-cpp</string>
<key>CFBundleTypeName</key>
<string>C++ Source File</string>
<key>CFBundleTypeRole</key>
@@ -229,7 +248,7 @@
<string>jav</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-java</string>
<string>MacVim-java</string>
<key>CFBundleTypeName</key>
<string>Java Source File</string>
<key>CFBundleTypeRole</key>
@@ -314,9 +333,13 @@
<array>
<string>f</string>
<string>for</string>
<string>fpp</string>
<string>f77</string>
<string>f90</string>
<string>f95</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-f</string>
<key>CFBundleTypeName</key>
<string>Fortran Source File</string>
<key>CFBundleTypeRole</key>
@@ -366,10 +389,19 @@
<key>CFBundleTypeExtensions</key>
<array>
<string>html</string>
<string>phtml</string>
<string>shtml</string>
<string>xhtml</string>
<string>htm</string>
<string>pht</string>
<string>sht</string>
<string>xht</string>
<string>phtm</string>
<string>shtm</string>
<string>xhtm</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-html</string>
<string>MacVim-html</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/html</string>
@@ -389,9 +421,14 @@
<key>CFBundleTypeExtensions</key>
<array>
<string>xml</string>
<string>rss</string>
<string>tld</string>
<string>pt</string>
<string>cpt</string>
<string>dtml</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-xml</string>
<string>MacVim-xml</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/xml</string>
@@ -411,9 +448,12 @@
<key>CFBundleTypeExtensions</key>
<array>
<string>js</string>
<string>htc</string>
<string>jscript</string>
<string>javascript</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-js</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/javascript</string>
@@ -430,42 +470,123 @@
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Perl source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>sh</string>
<string>command</string>
<string>csh</string>
<string>pl</string>
<string>pm</string>
<string>py</string>
<string>rb</string>
<string>rbw</string>
<string>php</string>
<string>php3</string>
<string>php4</string>
<string>ph3</string>
<string>ph4</string>
<string>phtml</string>
<string>applescript</string>
<string>pod</string>
<string>perl</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm-sh</string>
<string>MacVim-perl</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/x-perl-script</string>
<string>text/x-python-script</string>
<string>text/ruby-script</string>
<string>text/php</string>
</array>
<key>CFBundleTypeName</key>
<string>Script File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
<key>LSItemContentTypes</key>
<array>
<string>public.script</string>
<string>public.perl-script</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Python source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>py</string>
<string>rpy</string>
<string>cpy</string>
<string>python</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-py</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/x-python-script</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.python-script</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>PHP source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>php</string>
<string>php3</string>
<string>php4</string>
<string>php5</string>
<string>ph3</string>
<string>ph4</string>
<string>phtml</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-php</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/php</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.php-script</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Ruby source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>rb</string>
<string>rbw</string>
<string>rbx</string>
<string>rjs</string>
<string>rxml</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-rb</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/ruby-script</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.ruby-script</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Shell script</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>sh</string>
<string>csh</string>
<string>command</string>
<string>ss</string>
<string>bashrc</string>
<string>bash_profile</string>
<string>bash_login</string>
<string>profile</string>
<string>bash_logout</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-bash</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.shell-script</string>
</array>
</dict>
<dict>
@@ -491,7 +612,7 @@
<string>diff</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>doc-bm</string>
<string>MacVim-patch</string>
<key>CFBundleTypeName</key>
<string>Patch File</string>
<key>CFBundleTypeRole</key>
@@ -527,11 +648,485 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>AppleScript source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>applescript</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-applescript</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.applescript.text</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>ActionScript source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>as</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-as</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>ASP document</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>asp</string>
<string>asa</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-asp</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>ASP.NET document</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>aspx</string>
<string>ascx</string>
<string>asmx</string>
<string>ashx</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-asp</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>BibTeX bibliography</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>bib</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-bib</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>C# source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>cs</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-cs</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Context Free Design Grammar</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>cfdg</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-csfg</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Comma separated values</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>csv</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-csv</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Tab separated values</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>tsv</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-tsv</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>CGI script</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>cgi</string>
<string>fcgi</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-cgi</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Configuration file</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>cfg</string>
<string>conf</string>
<string>config</string>
<string>htaccess</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-cfg</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Cascading style sheet</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>css</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-css</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Document Type Definition</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>dtd</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-dtd</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Dylan source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>dylan</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-dylan</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Erlang source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>erl</string>
<string>hrl</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-erl</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>F-Script source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>fscript</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-fscript</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Haskell source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>hs</string>
<string>lhs</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-hs</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Include file</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>inc</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-inc</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>iCalendar schedule</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>ics</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-ics</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>MS Windows initialization file</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>ini</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-ini</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Io source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>io</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-io</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>BeanShell script</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>bsh</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-bsh</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Java properties file</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>properties</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-properties</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Java Server Page</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>jsp</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-jsp</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>LISP source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>lisp</string>
<string>cl</string>
<string>l</string>
<string>lsp</string>
<string>mud</string>
<string>el</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-lisp</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Log file</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>log</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-log</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Mediawiki document</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>wiki</string>
<string>wikipedia</string>
<string>mediawiki</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-wiki</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>PostScript source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>ps</string>
<string>eps</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-ps</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<!--<dict>
<key>CFBundleTypeName</key>
<string>Property list</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>dict</string>
<string>plist</string>
<string>scriptSuite</string>
<string>scriptTerminology</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-plist</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>-->
<dict>
<key>CFBundleTypeName</key>
<string>Scheme source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>scm</string>
<string>sch</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-sch</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>SQL source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>sql</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-sql</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Tcl source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>tcl</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-tcl</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>XSL stylesheet</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>xsl</string>
<string>xslt</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-xsl</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Electronic business card</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>vcf</string>
<string>vcard</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-vcf</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Visual Basic source</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>vb</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-vb</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>YAML document</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>yaml</string>
<string>yml</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-yaml</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>GTD document</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>gtd</string>
<string>gtdlog</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>MacVim-gtd</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>vim_gloss</string>
<string>MacVim</string>
<key>CFBundleIdentifier</key>
<string>org.vim.MacVim</string>
<key>CFBundleInfoDictionaryVersion</key>
+53 -82
View File
@@ -12,8 +12,8 @@
0395A95A0D74D47B00881434 /* Integration.png in Resources */ = {isa = PBXBuildFile; fileRef = 0395A9590D74D47B00881434 /* Integration.png */; };
0395A9BF0D75D02400881434 /* AuthorizedShellCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 0395A9BE0D75D02400881434 /* AuthorizedShellCommand.m */; };
0395A9C30D75D04D00881434 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0395A9C20D75D04D00881434 /* Security.framework */; };
0395AA780D76E77800881434 /* Info in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0395AA770D76E77800881434 /* Info */; };
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0395AA210D76E22700881434 /* Edit in ODBEditor.bundle */; };
0395AA780D76E77800881434 /* Info in Copy ODBEditor */ = {isa = PBXBuildFile; fileRef = 0395AA770D76E77800881434 /* Info */; };
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in Copy ODBEditor */ = {isa = PBXBuildFile; fileRef = 0395AA210D76E22700881434 /* Edit in ODBEditor.bundle */; };
1D09AB420C6A4D520045497E /* MMTypesetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D09AB400C6A4D520045497E /* MMTypesetter.m */; };
1D0E051C0BA5F83800B6049E /* Colors.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1D0E051B0BA5F83800B6049E /* Colors.plist */; };
1D145C7F0E5227CE00691AA0 /* MMTextViewHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D145C7E0E5227CE00691AA0 /* MMTextViewHelper.m */; };
@@ -28,28 +28,18 @@
1D3D19120CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190E0CA690FF0004A0A5 /* DejaVuSansMono-BoldOblique.ttf */; };
1D3D19130CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D190F0CA690FF0004A0A5 /* DejaVuSansMono-Oblique.ttf */; };
1D3D19140CA690FF0004A0A5 /* DejaVuSansMono.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D3D19100CA690FF0004A0A5 /* DejaVuSansMono.ttf */; };
1D493D580C5247BF00AB718C /* Vim in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D493D570C5247BF00AB718C /* Vim */; };
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
1D493D580C5247BF00AB718C /* Vim in Copy Executables */ = {isa = PBXBuildFile; fileRef = 1D493D570C5247BF00AB718C /* Vim */; };
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
1D6008830E96886D003763F0 /* FindAndReplace.nib in Resources */ = {isa = PBXBuildFile; fileRef = 1D6008820E96886D003763F0 /* FindAndReplace.nib */; };
1D60088B0E96A0B2003763F0 /* MMFindReplaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D60088A0E96A0B2003763F0 /* MMFindReplaceController.m */; };
1D71ACB40BC702AB002F2B60 /* doc-bm-c.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACA90BC702AB002F2B60 /* doc-bm-c.icns */; };
1D71ACB50BC702AC002F2B60 /* doc-bm-h.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAA0BC702AB002F2B60 /* doc-bm-h.icns */; };
1D71ACB60BC702AC002F2B60 /* doc-bm-html.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAB0BC702AB002F2B60 /* doc-bm-html.icns */; };
1D71ACB70BC702AC002F2B60 /* doc-bm-java.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAC0BC702AB002F2B60 /* doc-bm-java.icns */; };
1D71ACB80BC702AC002F2B60 /* doc-bm-php.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAD0BC702AB002F2B60 /* doc-bm-php.icns */; };
1D71ACB90BC702AC002F2B60 /* doc-bm-pl.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAE0BC702AB002F2B60 /* doc-bm-pl.icns */; };
1D71ACBA0BC702AC002F2B60 /* doc-bm-sh.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACAF0BC702AB002F2B60 /* doc-bm-sh.icns */; };
1D71ACBB0BC702AC002F2B60 /* doc-bm-tex.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB00BC702AB002F2B60 /* doc-bm-tex.icns */; };
1D71ACBC0BC702AC002F2B60 /* doc-bm-txt.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB10BC702AB002F2B60 /* doc-bm-txt.icns */; };
1D71ACBD0BC702AC002F2B60 /* doc-bm-xml.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB20BC702AB002F2B60 /* doc-bm-xml.icns */; };
1D71ACBE0BC702AC002F2B60 /* doc-bm.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D71ACB30BC702AB002F2B60 /* doc-bm.icns */; };
1D7F74580E4CE1AE003225C6 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D7F74570E4CE1AE003225C6 /* Sparkle.framework */; };
1D7F745B0E4CE1CD003225C6 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1D7F74570E4CE1AE003225C6 /* Sparkle.framework */; };
1D7F745B0E4CE1CD003225C6 /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 1D7F74570E4CE1AE003225C6 /* Sparkle.framework */; };
1D80591F0E1185EA001699D1 /* Miscellaneous.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D80591D0E1185EA001699D1 /* Miscellaneous.m */; };
1D80FBD40CBBD3B700102A1C /* MMFullscreenWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D80FBD00CBBD3B700102A1C /* MMFullscreenWindow.m */; };
1D80FBD60CBBD3B700102A1C /* MMVimView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D80FBD20CBBD3B700102A1C /* MMVimView.m */; };
1D80FBE40CBBD6F200102A1C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D80FBE30CBBD6F200102A1C /* Carbon.framework */; };
1D9918490D299F9900A96335 /* MMAtsuiTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D9918470D299F9900A96335 /* MMAtsuiTextView.m */; };
1D9C60520EF79C0C0034AD44 /* MacVim.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1D9C602E0EF79C0C0034AD44 /* MacVim.icns */; };
1DCD00BF0E50B2B700460166 /* Attention.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00AA0E50B2B700460166 /* Attention.png */; };
1DCD00C00E50B2B700460166 /* Copy.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00AB0E50B2B700460166 /* Copy.png */; };
1DCD00C10E50B2B700460166 /* Cut.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00AC0E50B2B700460166 /* Cut.png */; };
@@ -72,18 +62,17 @@
1DCD00D20E50B2B700460166 /* TagJump.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00BD0E50B2B700460166 /* TagJump.png */; };
1DCD00D30E50B2B700460166 /* Undo.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DCD00BE0E50B2B700460166 /* Undo.png */; };
1DD04DEC0C529C5E006CDC2B /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 1DD04DEB0C529C5E006CDC2B /* Credits.rtf */; };
1DD0C20C0C60FFB4008CD84A /* gvimrc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1DD0C20A0C60FF9A008CD84A /* gvimrc */; };
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DD0C20A0C60FF9A008CD84A /* gvimrc */; };
1DD3D51E0D82D4C9006E4320 /* ibeam.png in Resources */ = {isa = PBXBuildFile; fileRef = 1DD3D51D0D82D4C9006E4320 /* ibeam.png */; };
1DD66ECE0C803D3600EBDAB3 /* MMApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DD66ECC0C803D3600EBDAB3 /* MMApplication.m */; };
1DD703B90BA9D15D008679E9 /* vim_gloss.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1DD703B80BA9D15D008679E9 /* vim_gloss.icns */; };
1DD704310BA9F9C2008679E9 /* SpecialKeys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DD704300BA9F9C2008679E9 /* SpecialKeys.plist */; };
1DD9F5E50C85D60500E8D5A5 /* SystemColors.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */; };
1DE3F8E70D50F80500052B9E /* Preferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = 1DE3F8E50D50F80500052B9E /* Preferences.nib */; };
1DE3F8EB0D50F84600052B9E /* MMPreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE3F8E90D50F84600052B9E /* MMPreferenceController.m */; };
1DE608B40C587FDA0055263D /* runtime in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1DE602470C587FD10055263D /* runtime */; };
1DE608B40C587FDA0055263D /* runtime in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DE602470C587FD10055263D /* runtime */; };
1DE8CC620C5E2AAD003F56E3 /* Actions.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1DE8CC610C5E2AAD003F56E3 /* Actions.plist */; };
1DE9B9500D341AB8008FEDD4 /* MMWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE9B94E0D341AB8008FEDD4 /* MMWindow.m */; };
1DED78600C6DE43D0079945F /* vimrc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
@@ -130,48 +119,52 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
0395AA790D76E77800881434 /* CopyFiles */ = {
0395AA790D76E77800881434 /* Copy ODBEditor */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "Edit in ODBEditor";
dstSubfolderSpec = 7;
files = (
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in CopyFiles */,
0395AA780D76E77800881434 /* Info in CopyFiles */,
0395AAAD0D76E94000881434 /* Edit in ODBEditor.bundle in Copy ODBEditor */,
0395AA780D76E77800881434 /* Info in Copy ODBEditor */,
);
name = "Copy ODBEditor";
runOnlyForDeploymentPostprocessing = 0;
};
1D0DCAD80BA3604D00B6CCFA /* CopyFiles */ = {
1D0DCAD80BA3604D00B6CCFA /* Copy Executables */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 6;
files = (
1D493D580C5247BF00AB718C /* Vim in CopyFiles */,
1D493D580C5247BF00AB718C /* Vim in Copy Executables */,
);
name = "Copy Executables";
runOnlyForDeploymentPostprocessing = 0;
};
1D9EB2840C366D7B0074B739 /* CopyFiles */ = {
1D9EB2840C366D7B0074B739 /* Copy Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
1D7F745B0E4CE1CD003225C6 /* Sparkle.framework in CopyFiles */,
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in CopyFiles */,
1D7F745B0E4CE1CD003225C6 /* Sparkle.framework in Copy Frameworks */,
1D493DBA0C52534300AB718C /* PSMTabBarControl.framework in Copy Frameworks */,
);
name = "Copy Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
1DE608B80C58807F0055263D /* CopyFiles */ = {
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = vim;
dstSubfolderSpec = 7;
files = (
1DED78600C6DE43D0079945F /* vimrc in CopyFiles */,
1DD0C20C0C60FFB4008CD84A /* gvimrc in CopyFiles */,
1DE608B40C587FDA0055263D /* runtime in CopyFiles */,
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */,
1DD0C20C0C60FFB4008CD84A /* gvimrc in Copy Vim Runtime Files */,
1DE608B40C587FDA0055263D /* runtime in Copy Vim Runtime Files */,
);
name = "Copy Vim Runtime Files";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
@@ -215,17 +208,6 @@
1D6008820E96886D003763F0 /* FindAndReplace.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = FindAndReplace.nib; sourceTree = "<group>"; };
1D6008890E96A0B2003763F0 /* MMFindReplaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMFindReplaceController.h; sourceTree = "<group>"; };
1D60088A0E96A0B2003763F0 /* MMFindReplaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMFindReplaceController.m; sourceTree = "<group>"; };
1D71ACA90BC702AB002F2B60 /* doc-bm-c.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-c.icns"; sourceTree = "<group>"; };
1D71ACAA0BC702AB002F2B60 /* doc-bm-h.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-h.icns"; sourceTree = "<group>"; };
1D71ACAB0BC702AB002F2B60 /* doc-bm-html.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-html.icns"; sourceTree = "<group>"; };
1D71ACAC0BC702AB002F2B60 /* doc-bm-java.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-java.icns"; sourceTree = "<group>"; };
1D71ACAD0BC702AB002F2B60 /* doc-bm-php.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-php.icns"; sourceTree = "<group>"; };
1D71ACAE0BC702AB002F2B60 /* doc-bm-pl.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-pl.icns"; sourceTree = "<group>"; };
1D71ACAF0BC702AB002F2B60 /* doc-bm-sh.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-sh.icns"; sourceTree = "<group>"; };
1D71ACB00BC702AB002F2B60 /* doc-bm-tex.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-tex.icns"; sourceTree = "<group>"; };
1D71ACB10BC702AB002F2B60 /* doc-bm-txt.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-txt.icns"; sourceTree = "<group>"; };
1D71ACB20BC702AB002F2B60 /* doc-bm-xml.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm-xml.icns"; sourceTree = "<group>"; };
1D71ACB30BC702AB002F2B60 /* doc-bm.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "doc-bm.icns"; sourceTree = "<group>"; };
1D7F74570E4CE1AE003225C6 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
1D80591D0E1185EA001699D1 /* Miscellaneous.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Miscellaneous.m; sourceTree = "<group>"; };
1D8059220E118663001699D1 /* Miscellaneous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Miscellaneous.h; sourceTree = "<group>"; };
@@ -236,6 +218,7 @@
1D80FBE30CBBD6F200102A1C /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
1D9918460D299F9900A96335 /* MMAtsuiTextView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMAtsuiTextView.h; sourceTree = "<group>"; };
1D9918470D299F9900A96335 /* MMAtsuiTextView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMAtsuiTextView.m; sourceTree = "<group>"; };
1D9C602E0EF79C0C0034AD44 /* MacVim.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = MacVim.icns; path = icons/MacVim.icns; sourceTree = "<group>"; };
1DCD00AA0E50B2B700460166 /* Attention.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Attention.png; path = Toolbar/Attention.png; sourceTree = "<group>"; };
1DCD00AB0E50B2B700460166 /* Copy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Copy.png; path = Toolbar/Copy.png; sourceTree = "<group>"; };
1DCD00AC0E50B2B700460166 /* Cut.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Cut.png; path = Toolbar/Cut.png; sourceTree = "<group>"; };
@@ -262,7 +245,6 @@
1DD3D51D0D82D4C9006E4320 /* ibeam.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ibeam.png; sourceTree = "<group>"; };
1DD66ECB0C803D3600EBDAB3 /* MMApplication.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MMApplication.h; sourceTree = "<group>"; };
1DD66ECC0C803D3600EBDAB3 /* MMApplication.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MMApplication.m; sourceTree = "<group>"; };
1DD703B80BA9D15D008679E9 /* vim_gloss.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = vim_gloss.icns; sourceTree = "<group>"; };
1DD704300BA9F9C2008679E9 /* SpecialKeys.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SpecialKeys.plist; sourceTree = "<group>"; };
1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SystemColors.plist; sourceTree = "<group>"; };
1DE3F8E60D50F80500052B9E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Preferences.nib; sourceTree = "<group>"; };
@@ -442,27 +424,6 @@
name = Products;
sourceTree = "<group>";
};
1DCE78490C460C6C006305A6 /* Icons */ = {
isa = PBXGroup;
children = (
1D71ACA90BC702AB002F2B60 /* doc-bm-c.icns */,
1D71ACAA0BC702AB002F2B60 /* doc-bm-h.icns */,
1D71ACAB0BC702AB002F2B60 /* doc-bm-html.icns */,
1D71ACAC0BC702AB002F2B60 /* doc-bm-java.icns */,
1D71ACAD0BC702AB002F2B60 /* doc-bm-php.icns */,
1D71ACAE0BC702AB002F2B60 /* doc-bm-pl.icns */,
1D71ACAF0BC702AB002F2B60 /* doc-bm-sh.icns */,
1D71ACB00BC702AB002F2B60 /* doc-bm-tex.icns */,
1D71ACB10BC702AB002F2B60 /* doc-bm-txt.icns */,
1D71ACB20BC702AB002F2B60 /* doc-bm-xml.icns */,
1D71ACB30BC702AB002F2B60 /* doc-bm.icns */,
0395A8A90D72D88B00881434 /* General.png */,
0395A9590D74D47B00881434 /* Integration.png */,
1DD703B80BA9D15D008679E9 /* vim_gloss.icns */,
);
name = Icons;
sourceTree = "<group>";
};
1DE602460C587F760055263D /* Vim Resources */ = {
isa = PBXGroup;
children = (
@@ -517,12 +478,14 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
1D9C602E0EF79C0C0034AD44 /* MacVim.icns */,
1D6008820E96886D003763F0 /* FindAndReplace.nib */,
0395A8A90D72D88B00881434 /* General.png */,
0395A9590D74D47B00881434 /* Integration.png */,
1D22374A0E45DF4800E6FFFF /* Advanced.png */,
BD9DF09F0DB2BA020025C97C /* PlugInView.nib */,
1DD3D51D0D82D4C9006E4320 /* ibeam.png */,
1D0F11480D58C77800D5DA09 /* Font */,
1DCE78490C460C6C006305A6 /* Icons */,
1DE9726C0C48050600F96A9F /* Toolbar */,
1DD9F5E40C85D60500E8D5A5 /* SystemColors.plist */,
1DE8CC610C5E2AAD003F56E3 /* Actions.plist */,
@@ -560,10 +523,11 @@
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
1D0DCAD80BA3604D00B6CCFA /* CopyFiles */,
1D9EB2840C366D7B0074B739 /* CopyFiles */,
1DE608B80C58807F0055263D /* CopyFiles */,
0395AA790D76E77800881434 /* CopyFiles */,
1D0DCAD80BA3604D00B6CCFA /* Copy Executables */,
1D9EB2840C366D7B0074B739 /* Copy Frameworks */,
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */,
0395AA790D76E77800881434 /* Copy ODBEditor */,
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */,
);
buildRules = (
);
@@ -629,19 +593,7 @@
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
1D0E051C0BA5F83800B6049E /* Colors.plist in Resources */,
1DD703B90BA9D15D008679E9 /* vim_gloss.icns in Resources */,
1DD704310BA9F9C2008679E9 /* SpecialKeys.plist in Resources */,
1D71ACB40BC702AB002F2B60 /* doc-bm-c.icns in Resources */,
1D71ACB50BC702AC002F2B60 /* doc-bm-h.icns in Resources */,
1D71ACB60BC702AC002F2B60 /* doc-bm-html.icns in Resources */,
1D71ACB70BC702AC002F2B60 /* doc-bm-java.icns in Resources */,
1D71ACB80BC702AC002F2B60 /* doc-bm-php.icns in Resources */,
1D71ACB90BC702AC002F2B60 /* doc-bm-pl.icns in Resources */,
1D71ACBA0BC702AC002F2B60 /* doc-bm-sh.icns in Resources */,
1D71ACBB0BC702AC002F2B60 /* doc-bm-tex.icns in Resources */,
1D71ACBC0BC702AC002F2B60 /* doc-bm-txt.icns in Resources */,
1D71ACBD0BC702AC002F2B60 /* doc-bm-xml.icns in Resources */,
1D71ACBE0BC702AC002F2B60 /* doc-bm.icns in Resources */,
1DD04DEC0C529C5E006CDC2B /* Credits.rtf in Resources */,
1DE8CC620C5E2AAD003F56E3 /* Actions.plist in Resources */,
1DD9F5E50C85D60500E8D5A5 /* SystemColors.plist in Resources */,
@@ -677,11 +629,30 @@
1DCD00D20E50B2B700460166 /* TagJump.png in Resources */,
1DCD00D30E50B2B700460166 /* Undo.png in Resources */,
1D6008830E96886D003763F0 /* FindAndReplace.nib in Resources */,
1D9C60520EF79C0C0034AD44 /* MacVim.icns in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Make Document Icons";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Clear deployment target, else the python script always thinks we're building on Tiger\nunset MACOSX_DEPLOYMENT_TARGET\n\n# Generate the icons (redirect stderr to ignore warnings)\ncd $PROJECT_DIR/icons/\nmake OUTDIR=$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH 2> /dev/null\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
.PHONY: clean
OUTDIR ?= .
$(OUTDIR)/MacVim-generic.icns: make_icons.py vim-noshadow-512.png
$(MAKE) -C makeicns
/usr/bin/python make_icons.py $(OUTDIR)
clean:
$(MAKE) -C makeicns clean
rm -f $(OUTDIR)/MacVim-*.icns
+206
View File
@@ -0,0 +1,206 @@
# Creates a document icon from an app icon and an optional text.
# The font is not quite right, use this script to create a document icon
# for 'PDF' and compare the D with the D in Preview's pdf.icns
# http://www.macresearch.org/cocoa-scientists-part-xx-python-scriptersmeet-cocoa
import os
import sys
try:
from Foundation import *
from AppKit import *
dont_create = False
except:
dont_create = True # most likely because we're on tiger
# icon types
LARGE = 0 # 512, 128, 32, 16; about 96kB
SMALL = 1 # 128, 32, 16; about 36kB
LINK = 2 # Create link to generic icon; 4kB (== smallest block size on HFS+)
# path to makeicns binary
MAKEICNS = 'makeicns/makeicns'
# List of icons to create
GENERIC_ICON_NAME = 'MacVim-generic'
vimIcons = {
GENERIC_ICON_NAME: [u'', LARGE],
'MacVim-vim': [u'VIM', LARGE],
'MacVim-txt': [u'TXT', SMALL],
'MacVim-tex': [u'TEX', SMALL],
'MacVim-h': [u'H', SMALL],
'MacVim-c': [u'C', SMALL],
'MacVim-m': [u'M', SMALL],
'MacVim-mm': [u'MM', SMALL],
'MacVim-cpp': [u'C\uff0b\uff0b', SMALL], # fullwidth plusses
'MacVim-java': [u'JAVA', SMALL],
'MacVim-f': [u'FTRAN', SMALL],
'MacVim-html': [u'HTML', SMALL],
'MacVim-xml': [u'XML', SMALL],
'MacVim-js': [u'JS', SMALL],
'MacVim-perl': [u'PERL', SMALL],
'MacVim-py': [u'PYTHON', SMALL],
'MacVim-php': [u'PHP', SMALL],
'MacVim-rb': [u'RUBY', SMALL],
'MacVim-bash': [u'SH', SMALL],
'MacVim-patch': [u'DIFF', SMALL],
'MacVim-applescript': [u'\uf8ffSCPT', SMALL], # apple sign
'MacVim-as': [u'FLASH', LINK],
'MacVim-asp': [u'ASP', LINK],
'MacVim-bib': [u'BIB', LINK],
'MacVim-cs': [u'C#', LINK],
'MacVim-csfg': [u'CFDG', LINK], #D
'MacVim-csv': [u'CSV', LINK],
'MacVim-tsv': [u'TSV', LINK],
'MacVim-cgi': [u'CGI', LINK],
'MacVim-cfg': [u'CFG', LINK],
'MacVim-css': [u'CSS', SMALL],
'MacVim-dtd': [u'DTD', LINK],
'MacVim-dylan': [u'DYLAN', LINK],
'MacVim-erl': [u'ERLANG', SMALL],
'MacVim-fscript': [u'FSCPT', SMALL],
'MacVim-hs': [u'HS', SMALL],
'MacVim-inc': [u'INC', LINK],
'MacVim-ics': [u'ICS', SMALL],
'MacVim-ini': [u'INI', LINK],
'MacVim-io': [u'IO', LINK],
'MacVim-bsh': [u'BSH', LINK], #D
'MacVim-properties': [u'PROP', LINK],
'MacVim-jsp': [u'JSP', SMALL],
'MacVim-lisp': [u'LISP', SMALL],
'MacVim-log': [u'LOG', SMALL],
'MacVim-wiki': [u'WIKI', SMALL],
'MacVim-ps': [u'PS', LINK],
#'MacVim-plist': [u'PLIST', SMALL],
'MacVim-sch': [u'SCHEME', SMALL],
'MacVim-sql': [u'SQL', SMALL],
'MacVim-tcl': [u'TCL', SMALL],
'MacVim-xsl': [u'XSL', LINK],
'MacVim-vcf': [u'VCARD', SMALL],
'MacVim-vb': [u'VBASIC', LINK],
'MacVim-yaml': [u'YAML', SMALL],
'MacVim-gtd': [u'GTD', LINK], #D
}
# Resources
BACKGROUND = '/System/Library/CoreServices/CoreTypes.bundle/' + \
'Contents/Resources/GenericDocumentIcon.icns' # might require leopard?
APPICON = 'vim-noshadow-512.png'
#APPICON = 'vim-noshadow-no-v-512.png'
def createIcon(outname, text, iconname=APPICON, bgname=BACKGROUND):
# Prepare input images
bg = NSImage.alloc().initWithContentsOfFile_(bgname)
if not bg:
print 'Failed to load', bgname
sys.exit(1)
icon = NSImage.alloc().initWithContentsOfFile_(iconname)
if not icon:
print 'Failed to load', iconname
sys.exit(1)
# Prepare text format
style = NSMutableParagraphStyle.new()
style.setParagraphStyle_(NSParagraphStyle.defaultParagraphStyle())
style.setAlignment_(NSCenterTextAlignment)
# http://developer.apple.com/documentation/Cocoa/Conceptual/AttributedStrings/Articles/standardAttributes.html#//apple_ref/doc/uid/TP40004903
fontname = 'LucidaGrande-Bold'
attribs = {
NSParagraphStyleAttributeName: style,
NSParagraphStyleAttributeName: style,
NSFontAttributeName: NSFont.fontWithName_size_(fontname, 72.0),
NSKernAttributeName: -1.0, # tighten font a bit
NSForegroundColorAttributeName: NSColor.colorWithDeviceWhite_alpha_(
0.34, 1)
}
if not attribs[NSFontAttributeName]:
print 'Failed to load font', fontname
sys.exit(1)
# Draw!
bg.lockFocus()
w, h = 289, 289
icon.drawInRect_fromRect_operation_fraction_(
(((512-w)/2 + 1, 405 - h), (w, h)),
NSZeroRect, NSCompositeSourceOver, 1.0)
text.drawInRect_withAttributes_( ((0, 7), (512, 119)), attribs)
bg.unlockFocus()
# Save
# http://www.cocoadev.com/index.pl?NSImageToJPEG (this is retarded)
tmp = NSBitmapImageRep.imageRepWithData_(bg.TIFFRepresentation())
png = tmp.representationUsingType_properties_(NSPNGFileType, None)
png.writeToFile_atomically_(outname, True)
TMPFILE = 'make_icons_tmp.png'
def main():
srcdir = os.getcwd()
if len(sys.argv) > 1:
os.chdir(sys.argv[1])
appIcon = os.path.join(srcdir, APPICON)
makeIcns = os.path.join(srcdir, MAKEICNS)
if dont_create:
print "PyObjC not found, only using a stock icon for document icons."
import shutil
shutil.copyfile(BACKGROUND, '%s.icns' % GENERIC_ICON_NAME)
for name in vimIcons:
if name == GENERIC_ICON_NAME: continue
icnsName = '%s.icns' % name
if os.access(icnsName, os.F_OK):
os.remove(icnsName)
os.symlink('%s.icns' % GENERIC_ICON_NAME, icnsName)
return
# Make us not crash
# http://www.cocoabuilder.com/archive/message/cocoa/2008/8/6/214964
NSApplicationLoad()
#createIcon('test.png',
#NSString.stringWithString_(u'PDF'), iconname='preview.icns')
if not os.access(makeIcns, os.X_OK):
print 'Cannot find makeicns at', makeIcns
return
# create LARGE and SMALL icons first...
for name, t in vimIcons.iteritems():
text, size = t
if size == LINK: continue
print name
icnsName = '%s.icns' % name
createIcon(TMPFILE, NSString.stringWithString_(text), appIcon)
if size == LARGE:
os.system('%s -512 %s -128 %s -32 %s -16 %s -out %s' % (makeIcns,
TMPFILE, TMPFILE, TMPFILE, TMPFILE, icnsName))
elif size == SMALL:
os.system('%s -128 %s -32 %s -16 %s -out %s' % (makeIcns,
TMPFILE, TMPFILE, TMPFILE, icnsName))
# ...create links later (to make sure the link targets exist)
for name, t in vimIcons.iteritems():
text, size = t
if size != LINK: continue
print name
icnsName = '%s.icns' % name
# remove old version of icns
if os.access(icnsName, os.F_OK):
os.remove(icnsName)
os.symlink('%s.icns' % GENERIC_ICON_NAME, icnsName)
if __name__ == '__main__':
try:
main()
finally:
if os.access(TMPFILE, os.F_OK):
os.remove(TMPFILE)
+186
View File
@@ -0,0 +1,186 @@
// IconFamily.h
// IconFamily class interface
// by Troy Stephens, Thomas Schnitzer, David Remahl, Nathan Day, Ben Haller, Sven Janssen, Peter Hosey, Conor Dearden, Elliot Glaysher, and Dave MacLachlan
// version 0.9.3
//
// Project Home Page:
// http://iconfamily.sourceforge.net/
//
// Problems, shortcomings, and uncertainties that I'm aware of are flagged with "NOTE:". Please address bug reports, bug fixes, suggestions, etc. to the project Forums and bug tracker at https://sourceforge.net/projects/iconfamily/
/*
Copyright (c) 2001-2006 Troy N. Stephens
Portions Copyright (c) 2007 Google Inc.
Use and distribution of this source code is governed by the MIT License, whose terms are as follows.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
// This class is a Cocoa/Objective-C wrapper for the Mac OS X Carbon API's
// "icon family" data type. Its main purpose is to enable Cocoa applications
// to easily create custom file icons from NSImage instances, and thus take
// advantage of Mac OS X's new larger RGBA "thumbnail" icon format to provide
// richly detailed thumbnail previews of the files' contents.
//
// Using IconFamily, this becomes as simple as:
//
// id iconFamily = [IconFamily iconFamilyWithThumbnailsOfImage:anImage];
// [iconFamily setAsCustomIconForFile:anExistingFile];
//
// You can also write an icon family to an .icns file using the -writeToFile:
// method.
@interface IconFamily : NSObject
{
IconFamilyHandle hIconFamily;
}
// Convenience methods. These use the corresponding -init... methods to return
// an autoreleased IconFamily instance.
+ (IconFamily*) iconFamily;
+ (IconFamily*) iconFamilyWithContentsOfFile:(NSString*)path;
+ (IconFamily*) iconFamilyWithIconOfFile:(NSString*)path;
+ (IconFamily*) iconFamilyWithIconFamilyHandle:(IconFamilyHandle)hNewIconFamily;
+ (IconFamily*) iconFamilyWithSystemIcon:(int)fourByteCode;
+ (IconFamily*) iconFamilyWithThumbnailsOfImage:(NSImage*)image;
+ (IconFamily*) iconFamilyWithThumbnailsOfImage:(NSImage*)image usingImageInterpolation:(NSImageInterpolation)imageInterpolation;
// Initializes as a new, empty IconFamily. This is IconFamily's designated
// initializer method.
- init;
// Initializes an IconFamily by loading the contents of an .icns file.
- initWithContentsOfFile:(NSString*)path;
// Initializes an IconFamily from an existing Carbon IconFamilyHandle.
- initWithIconFamilyHandle:(IconFamilyHandle)hNewIconFamily;
// Initializes an IconFamily by loading the Finder icon that's assigned to a
// file.
- initWithIconOfFile:(NSString*)path;
// Initializes an IconFamily by referencing a standard system icon.
- initWithSystemIcon:(int)fourByteCode;
// Initializes an IconFamily by creating its elements from a resampled
// NSImage. The second form of this method allows you to specify the degree
// of antialiasing to be used in resampling the image, by passing in one of
// the NSImageInterpolation... constants that are defined in
// NSGraphicsContext.h. The first form of this initializer simply calls the
// second form with imageInterpolation set to NSImageInterpolationHigh, which
// produces highly smoothed thumbnails.
- initWithThumbnailsOfImage:(NSImage*)image;
- initWithThumbnailsOfImage:(NSImage*)image usingImageInterpolation:(NSImageInterpolation)imageInterpolation;
// Writes the icon family to an .icns file.
- (BOOL) writeToFile:(NSString*)path;
// Sets the image data for one of the icon family's elements from an
// NSBitmapImageRep. The "elementType" parameter must be one of the icon
// family element types listed below, and the format of the "bitmapImageRep"
// must match the corresponding requirements specified below. Regardless of
// the elementType, the bitmapImageRep must also be non-planar and have 8 bits
// per sample.
//
// elementType dimensions format
// ------------------- ---------- ---------------------------------------
// kIconServices512PixelDataARGB 512 x 512 32-bit RGBA, 32-bit RGB, or 24-bit RGB
// kIconServices256PixelDataARGB 256 x 256 32-bit RGBA, 32-bit RGB, or 24-bit RGB
// kThumbnail32BitData 128 x 128 32-bit RGBA, 32-bit RGB, or 24-bit RGB
// kThumbnail8BitMask 128 x 128 32-bit RGBA or 8-bit intensity
// kLarge32BitData 32 x 32 32-bit RGBA, 32-bit RGB, or 24-bit RGB
// kLarge8BitMask 32 x 32 32-bit RGBA or 8-bit intensity
// kLarge1BitMask 32 x 32 32-bit RGBA, 8-bit intensity, or 1-bit
// kSmall32BitData 16 x 16 32-bit RGBA, 32-bit RGB, or 24-bit RGB
// kSmall8BitMask 16 x 16 32-bit RGBA or 8-bit intensity
// kSmall1BitMask 16 x 16 32-bit RGBA, 8-bit intensity, or 1-bit
//
// When an RGBA image is supplied to set a "Mask" element, the mask data is
// taken from the image's alpha channel.
//
// NOTE: Setting an IconFamily's kLarge1BitMask seems to damage the IconFamily
// for some as yet unknown reason. (If you then assign the icon family
// as a file's custom icon using -setAsCustomIconForFile:, the custom
// icon doesn't appear for the file in the Finder.) However, both
// custom icon display and mouse-click hit-testing in the Finder seem to
// work fine when we only set the other four elements (thus keeping the
// existing kLarge1BitMask from the valid icon family from which we
// initialized the IconFamily via -initWithContentsOfFile:, since
// IconFamily's -init method is currently broken...), so it seems safe
// to just leave the kLarge1BitMask alone.
- (BOOL) setIconFamilyElement:(OSType)elementType
fromBitmapImageRep:(NSBitmapImageRep*)bitmapImageRep;
// Gets the image data for one of the icon family's elements as a new, 32-bit
// RGBA NSBitmapImageRep. The specified elementType should be one of
// kIconServices512PixelDataARGB, kIconServices256PixelDataARGB,
// kThumbnail32BitData, kLarge32BitData, or kSmall32BitData.
//
// The returned NSBitmapImageRep will have the corresponding 8-bit mask data
// in its alpha channel, or a fully opaque alpha channel if the icon family
// has no 8-bit mask data for the specified alpha channel.
//
// Returns nil if the requested element cannot be retrieved (e.g. if the
// icon family has no such 32BitData element).
- (NSBitmapImageRep*) bitmapImageRepWithAlphaForIconFamilyElement:(OSType)elementType;
// Creates and returns an NSImage that contains the icon family's various
// elements as its NSImageReps.
- (NSImage*) imageWithAllReps;
// NOTE: Planned method -- not yet implemented.
//
// Gets the image data for one of the icon family's elements as a new
// NSBitmapImageRep. The specified elementType should be one of
// kThumbnail32BitData, kThumbnail8BitMask, kLarge32BitData, kLarge8BitMask,
// kLarge1BitMask, kSmall32BitData, kSmall8BitMask, or kSmall1BitMask.
// - (NSBitmapImageRep*) bitmapImageRepForIconFamilyElement:(OSType)elementType;
// Writes the icon family to the resource fork of the specified file as its
// kCustomIconResource, and sets the necessary Finder bits so the icon will
// be displayed for the file in Finder views.
- (BOOL) setAsCustomIconForFile:(NSString*)path;
- (BOOL) setAsCustomIconForFile:(NSString*)path withCompatibility:(BOOL)compat;
// Same as the -setAsCustomIconForFile:... methods, but for folders (directories).
- (BOOL) setAsCustomIconForDirectory:(NSString*)path;
- (BOOL) setAsCustomIconForDirectory:(NSString*)path withCompatibility:(BOOL)compat;
// Removes the custom icon (if any) from the specified file's resource fork,
// and clears the necessary Finder bits for the file. (Note that this is a
// class method, so you don't need an instance of IconFamily to invoke it.)
+ (BOOL) removeCustomIconFromFile:(NSString*)path;
@end
// Methods for interfacing with the Carbon Scrap Manager (analogous to and
// interoperable with the Cocoa Pasteboard).
@interface IconFamily (ScrapAdditions)
+ (BOOL) canInitWithScrap;
+ (IconFamily*) iconFamilyWithScrap;
- initWithScrap;
- (BOOL) putOnScrap;
@end
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
CFLAGS = -fpascal-strings -O2
.PHONY: clean dist
makeicns: makeicns.o IconFamily.o NSString+CarbonFSRefCreation.o
g++ -o makeicns $^ -O2 \
-framework Foundation -framework AppKit -framework Carbon
clean:
rm -rf makeicns.o IconFamily.o NSString+CarbonFSRefCreation.o
dist: makeicns
rm -rf makeicns-1.0.zip
zip makeicns-1.0.zip Makefile makeicns.m IconFamily.m IconFamily.h \
NSString+CarbonFSRefCreation.m NSString+CarbonFSRefCreation.h \
makeicns
@@ -0,0 +1,25 @@
/*
Copyright (c) 2001-2006 Troy N. Stephens
Use and distribution of this source code is governed by the MIT License, whose terms are as follows.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#import <Foundation/Foundation.h>
#import <Carbon/Carbon.h>
@interface NSString (CarbonFSRefCreation)
// Fills in the given FSRef struct so it specifies the file whose path is in this string.
// If the file doesn't exist, and "createFile" is YES, this method will attempt to create
// an empty file with the specified path. (The caller should insure that the directory
// the file is to be placed in already exists.)
- (BOOL) getFSRef:(FSRef*)fsRef createFileIfNecessary:(BOOL)createFile;
@end
@@ -0,0 +1,58 @@
/*
Copyright (c) 2001-2006 Troy N. Stephens
Use and distribution of this source code is governed by the MIT License, whose terms are as follows.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#import "NSString+CarbonFSRefCreation.h"
@implementation NSString (CarbonFSRefCreation)
- (BOOL) getFSRef:(FSRef*)fsRef createFileIfNecessary:(BOOL)createFile
{
NSFileManager* fileManager = [NSFileManager defaultManager];
CFURLRef urlRef;
Boolean gotFSRef;
// Check whether the file exists already. If not, create an empty file if requested.
if (![fileManager fileExistsAtPath:self]) {
if (createFile) {
if (![@"" writeToFile:self atomically:YES]) {
return NO;
}
} else {
return NO;
}
}
// Create a CFURL with the specified POSIX path.
urlRef = CFURLCreateWithFileSystemPath( kCFAllocatorDefault,
(CFStringRef) self,
kCFURLPOSIXPathStyle,
FALSE /* isDirectory */ );
if (urlRef == NULL) {
// printf( "** Couldn't make a CFURLRef for the file.\n" );
return NO;
}
// Try to create an FSRef from the URL. (If the specified file doesn't exist, this
// function will return false, but if we've reached this code we've already insured
// that the file exists.)
gotFSRef = CFURLGetFSRef( urlRef, fsRef );
CFRelease( urlRef );
if (!gotFSRef) {
// printf( "** Couldn't get an FSRef for the file.\n" );
return NO;
}
return YES;
}
@end
+168
View File
@@ -0,0 +1,168 @@
// makeicns
// Converts images to Apple's icns format.
// Written by nicolasweber@gmx.de, released under MIT license.
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#include "IconFamily.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
// This is defined in 10.5 and beyond in IconStorage.h
enum {
kIconServices512PixelDataARGB = 'ic09' /* non-premultiplied 512x512 ARGB bitmap*/
};
#endif
#define VERSION "1.0 (20081122)"
void usage() {
fprintf(stderr,
"makeicns v%s\n\n", VERSION);
fprintf(stderr,
"Usage: makeicns [k1=v1] [k2=v2] ...\n\n");
fprintf(stderr,
"Keys and values include:\n");
fprintf(stderr,
" 512: Name of input image for 512x512 variant of icon\n");
fprintf(stderr,
" 256: Name of input image for 256x256 variant of icon\n");
fprintf(stderr,
" 128: Name of input image for 128x128 variant of icon\n");
fprintf(stderr,
" 32: Name of input image for 32x32 variant of icon\n");
fprintf(stderr,
" 16: Name of input image for 16x16 variant of icon\n");
fprintf(stderr,
" in: Name of input image for all variants not having an explicit name\n");
fprintf(stderr,
" out: Name of output file, defaults to first nonempty input name,\n"
" but with icns extension\n\n");
fprintf(stderr,
"Examples:\n\n"
" icns -512 image.png -32 image.png\n"
" Creates image.icns with only a 512x512 and a 32x32 variant.\n\n"
" icns -in myfile.jpg -32 otherfile.png -out outfile.icns\n"
" Creates outfile.icns with sizes 512, 256, 128, and 16 containing data\n"
" from myfile.jpg and with size 32 containing data from otherfile.png.\n");
exit(1);
}
NSBitmapImageRep* getBitmapImageRepOfSize(NSImage* img, int size) {
// Don't resample if it's not necessary
NSEnumerator* e = [[img representations] objectEnumerator];
NSImageRep* ir;
while ((ir = [e nextObject])) {
if (![ir isKindOfClass:[NSBitmapImageRep class]]) continue;
NSBitmapImageRep* br = (NSBitmapImageRep*)ir;
//NSLog(@"%@", br);
if ([br pixelsWide] == size && [br pixelsHigh] == size
&& ([[br colorSpaceName] isEqualToString:NSDeviceRGBColorSpace]
|| [[br colorSpaceName] isEqualToString:NSCalibratedRGBColorSpace])
&& ([br bitsPerPixel] == 24 || [br bitsPerPixel] == 32)
)
return br;
}
NSLog(@"Resampling for size %d", size);
NSBitmapImageRep* r = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
pixelsWide:size
pixelsHigh:size
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bitmapFormat:0
bytesPerRow:0
bitsPerPixel:0];
[NSGraphicsContext saveGraphicsState];
NSGraphicsContext* context = [NSGraphicsContext
graphicsContextWithBitmapImageRep:r];
[context setShouldAntialias:YES];
[context setImageInterpolation:NSImageInterpolationHigh];
[NSGraphicsContext setCurrentContext:context];
[img drawInRect:NSMakeRect(0, 0, size, size)
fromRect:NSZeroRect
operation:NSCompositeCopy
fraction:1.0];
[NSGraphicsContext restoreGraphicsState];
return r;
}
int main(int argc, char* argv[]) {
int i;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSApplicationLoad();
struct {
NSString* paramName;
OSType type, mask;
int size;
NSString* inputName;
} inputs[] = {
{ @"512", kIconServices512PixelDataARGB, 0, 512, nil },
{ @"256", kIconServices256PixelDataARGB, 0, 256, nil },
{ @"128", kThumbnail32BitData, kThumbnail8BitMask, 128, nil },
{ @"32", kLarge32BitData, kLarge8BitMask, 32, nil },
{ @"16", kSmall32BitData, kSmall8BitMask, 16, nil },
};
const int N = sizeof(inputs)/sizeof(inputs[0]);
// Process arguments -- Thanks Greg!
//http://unixjunkie.blogspot.com/2006/07/command-line-processing-in-cocoa.html
NSUserDefaults* args = [NSUserDefaults standardUserDefaults];
BOOL foundInputParam = NO;
NSString* outputName = [args stringForKey:@"out"];
NSString* defaultIn = [args stringForKey:@"in"];
for (i = 0; i < N; ++i) {
inputs[i].inputName = [args stringForKey:inputs[i].paramName];
if (inputs[i].inputName == nil)
inputs[i].inputName = defaultIn;
foundInputParam = foundInputParam || inputs[i].inputName != nil;
// Create default output name if necessary
if (outputName == nil && inputs[i].inputName != nil)
outputName = [[inputs[i].inputName stringByDeletingPathExtension]
stringByAppendingPathExtension:@"icns"];
}
if (!foundInputParam)
usage();
// Create output
IconFamily* output = [IconFamily iconFamily];
for (i = 0; i < N; ++i) {
if (inputs[i].inputName == nil) continue;
NSImage* img = [[[NSImage alloc] initWithContentsOfFile:inputs[i].inputName]
autorelease];
NSBitmapImageRep* rep = getBitmapImageRepOfSize(img, inputs[i].size);
[output setIconFamilyElement:inputs[i].type fromBitmapImageRep:rep];
if (inputs[i].mask != 0)
[output setIconFamilyElement:inputs[i].mask fromBitmapImageRep:rep];
}
// Write output
if ([output writeToFile:outputName])
NSLog(@"Wrote output file \"%@\"", outputName);
else
NSLog(@"Failed to write \"%@\"", outputName);
[pool drain];
return 0;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB