bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] New MacOS packages


From: Michael Petch
Subject: Re: [Bug-gnubg] New MacOS packages
Date: Wed, 12 Aug 2009 00:36:05 -0600
User-agent: Microsoft-Entourage/12.20.0.090605

On 11/08/09 11:13 PM, "Mueller Achim" <address@hidden> wrote:

> Hi folks,
> 
> after a long while I started compiling gnubg on MacOS again. Actually
> I wanted to wait until Snow Leopard will be published but I saw a lot
> of new features and also a request on the list.
> 
> I'm using updated macports for the libraries. One question is still
> remaining: Does someone know how to enable a neat little icon in the
> program folder? There is at least one issue here because gnubg needs a
> terminal window to start.
> 
> In case no one can answer my question I'll upload two updated packages
> (one without, one with the libraries) in a few days.
> 

The only way I know of to get  an icon to appear is to create a proper OS/X
"Application" bundle. Take any MAC application in your Application folder
(for example) and hold control and click on it (right mouse button
equivalent) and click "Show Package contents". That will bring up a
directory tree inside of the Application package.

So what good is this for? Because it is this MAC Application bundle that
defines Icons, program that gets launched, environment settings etc.

In 2006 I created an experimental release of Gnugb that was in a standard
bundle. Attached you will find a small tarball with a basic Gnubg Bundle
that launches X windows (On Tiger/Leopard X11 isn't automagically launched)
and then launche the gnubg binary.

Save the attached tarball, and then open extract the tarball (To your
dekstop will be fine for now but it can be anywhere). It should magically
appear as a bastardized Backgammon board on the desktop (Graphics are not a
strong suit). Don't double click it just yet. Click Control-Mouseclick on
the Gnubg app icon and click "Show package contents".

A finder should open, navigate into Contents/Resources directory.

Basically all you need to know is that the icon in this bundle is in
Contents/Resources/droplet.icns . You should see the icon appear in the
folder. It must be an ICNS file format (Google, there are a number of apps
to create Mac ICNS files). Just replace it with a nice icon. The script that
gets launched when you double click the app ultimately ends up being
Contents/Resources/launcher.sh . If you open this up and edit it you will
find its a Bash script that launches X windows and then launches Gnubg. I
just created this basic package but you should only have to modify
launcher.sh so that the line:

PROGRAM=/opt/bin/gnubg

Points to wherever you intend to have people install the Gnubg binary to
(/sw or /opt depending on the ports system you use).

Once you edit launcher.sh with the location of the gnubg binary you should
now be able to double click the Gnubg application on the desktop and it will
launch X windows and then launch Gnubg. You should be able to drag the Gnubg
icon into the dock as any normal MAC application. When launchign Xwindows
apps, the X11 app should appear in the Dock before gnubg launches. This
method has a few peculiarities but Xwindows doesn't exactly play as nicely
in OS/X but this should be good enough (I had a lot of positive feedback
that it was fine)

This should at least get you started as a template. Any questions or
concerns feel free to ask. Of course an application bundle like this can be
put into a DMG file for distribution or added to a package installer program
(Vise etc).





Attachment: Gnubg.app.bz2
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]