Creating application bundles (was: Re: free42)

Rainer Müller raimue at macports.org
Sun Feb 22 11:33:52 PST 2009


Martin Krischik wrote:
> Am 01.02.2009 um 22:34 schrieb Ryan Schmidt:
[...]
>> It looks like these .command files are wrapper scripts around the  
>> real program. Wrapper scripts are fine; I do it in the wine port  
>> too. But I suggest you change it in this way:
>> )1) Install the wrapper script as ${prefix}/bin/free42. Install the  
>> real binary in ${prefix}/libexec/${name}/free42. That way anyone who  
>> just types "free42" in the Terminal access your wrapper too.
> 
> Start via Terminal is what I want to avoid. I find I rather sad that
> so few applications provide start-up via application icon. The command
> file was a first attempt to provide easy access to the application.
> Not perfect yet - I am still working on it.
> 
>>> 2) If you want to make the program available in ${applications_dir},  
>>> make a minimal application bundle. See for example the post-destroot  
>>> section of the port lbreakout2.
>> 
>> That's the way to go indeed.

I already began working on a port group to support something like this
some time ago. See ticket #14557 [1]. I am trying to create .app bundles
with minimal effort. I uploaded a preliminary port group which resembles
the commands being used in tuxmath, lbreakout2 and maybe others.

If the binary has the same name as the port, all you need is to add
'PortGroup appbundle 1.0' to your port and it will automatically create
an .app bundle at ${applications_dir}.

But it does not provide all the features I would like to see, for
example custom icons. It seems like that absolutely requires a
Info.plist for them. We could use a XML template and replace some values
in the port group on destroot.

I am currently using platform macosx, would this be valid on all darwin
variants? I see other ports defining this for darwin.

Rainer

[1] https://trac.macports.org/ticket/14557


More information about the macports-dev mailing list