08/07/14

Installing a GTK application (homebank) on Mac OS (Maverick)

Homebank is a really nice utility for managing the family budget. I wanted to install it on mac, but I had to hack a bit the standard installation to have an application integrated in the mac as the others. These instructions may be useful for any other GTK application built on mac!

Download macports from http://www.macports.org/install.php Install it.

Install the command line tools, together with Xcode, for instance via:

$ xcode-select --install

choosing Install Xcode.

You have to run Xcode in order to complete its installation. 

At this point you could directly install homebank, but I personally don't like to build these applications over X11. We follow a different path, allowing to bypass X11.

Edit the file /opt/local/etc/macports/variants.conf and add the following four lines:

+no_static
+no_x11
-x11
+quartz

We can finally install homebank:

$ sudo port install homebank

To make it nicer, i downloaded the aurora theme

$ sudo port install gtk2-aurora

Homebank can now be executed from the commandline

$ homebank

However, in order to make homebank (or any other exec) to be launched as a mac application (and included in Launchpad), we have to use Automator, which can be found in the Applications folder.

Open it, and build a new automation with "Run a script" which redirect to the executable of the application.
To know where the application is you can do

$ which homebank

Put the result in the automation. Then export it as a file in the Applications folder.

Finally, to change the icon with a correct, download a nice one, then convert that using e.g. http://iconverticons.com/online/ and save it as ICNS. Once you download the icon, open the properties of the file in the Application folder, drag the icon on the uppest left small icon and this will change accordingly.

That's all folks!

Nessun commento:

Posta un commento