Ports applications are not shown to Mac Application menu

Bradley Giesbrecht brad at pixilla.com
Sat Aug 21 16:23:01 PDT 2010

On Aug 21, 2010, at 4:16 PM, Bradley Giesbrecht wrote:

> On Aug 21, 2010, at 3:28 PM, Ryan Schmidt wrote:
>> On Aug 20, 2010, at 14:16, C. Santos wrote:
>>> I suppose that the same idea would be applied to claws-mail but I  
>>> don't feel comfortable to give it a try myself, I mean, to create  
>>> a patch.
>> It looks like for claws-mail it's not so straightforward because  
>> when you run claws-mail from the command line, it does not put an  
>> icon in the dock. It's not an Aqua application at all, in fact;  
>> it's an X11 application. So creating a double-clickable icon for it  
>> is not as simple as it was for bzflag (that I know of).
>> For X11 apps though you can put a shortcut into the Applications  
>> menu inside the X11 application. Once you open X11.app, choose  
>> Customize from the Applications menu in the menu bar to add  
>> additional programs, like claws-mail, to that menu.
> I created one that is working on my system. Just for fun I used the  
> our makeicns program to create a nice icon.
> I can contribute the diff to the claws-mail port OR we could create  
> claws-mail-launcher kinda like mysql5-server where all it does is  
> build the launcher app.
> Ryan: What do you think?

My only real interest aside from helping others is making use of  
makeicns which I think is a really cool tool.

Here is the launcher app stuff. The Info.plist and ClawsMail.sh could  
be add to the files dir.

set my_app ClawsMail
post-build {
     xinstall -d ${worksrcpath}/macports
     system "echo '#!/bin/sh' > ${worksrcpath}/macports/${my_app}.sh"
     system "echo '${prefix}/bin/claws-mail > /dev/null 2>&1 &' >> $ 
     system "makeicns -in ${worksrcpath}/${name}-128x128.png -out $ 
     system "echo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' > $ 
     system "echo '<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN 
\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">' >> $ 
     system "echo '<plist version=\"1.0\">' >> ${worksrcpath}/macports/ 
     system "echo '<dict>' >> ${worksrcpath}/macports/Info.plist"
     system "echo '  <key>CFBundleExecutable</key>' >> ${worksrcpath}/ 
     system "echo '  <string>${my_app}.sh</string>' >> ${worksrcpath}/ 
     system "echo '  <key>CFBundleIconFile</key>' >> ${worksrcpath}/ 
     system "echo '  <string>${my_app}.icns</string>' >> $ 
     system "echo '</dict>' >> ${worksrcpath}/macports/Info.plist"
     system "echo '</plist>' >> ${worksrcpath}/macports/Info.plist"

post-destroot {
     xinstall -d ${destroot}${applications_dir}/${my_app}.app/Contents/ 
     xinstall -d ${destroot}${applications_dir}/${my_app}.app/Contents/ 
     xinstall -m 755 ${worksrcpath}/macports/${my_app}.sh \
     xinstall -m 755 ${worksrcpath}/macports/${my_app}.icns \
     xinstall -m 644 ${worksrcpath}/macports/${my_app}.icns \
     xinstall -m 644 ${worksrcpath}/macports/Info.plist \

More information about the macports-users mailing list