Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting a GTK+ App to Mac OSX

Tags:

macos

gtk

porting

I have a GTK+ Application (ready with Autotools) which i have developed on my Linux box. Now I need to port this one to OSX. I have successfully installed jhbuild, which in turn installed GTK+ and stuff on the Mac (10.5.8)

I just don't know what to do next. Trying to ./configure && make && make install (on my app copied to the Mac) fails since pkg-config is not installed on the Mac.

Do I really need to write a jhbuild moduleset in order to compile this app? I need two libraries as well: libxml2 and libsoup-2.4. Will jhbuild tae care for integrating them...?!

My question now is: What is the simplest way to port a GTK+ Application to OSX and is there a tutorial or how-to on it?

like image 313
hannenz Avatar asked Apr 19 '12 14:04

hannenz


2 Answers

I recommend installing Homebrew which is a command line package manager for mac. Once installed open terminal and run brew install pkg-config to install pkg-config then brew install gtk+ and/or brew install gtk+3 to install gtk+ 2 or 3 respectively. After that is done you should be able to compile with your makefiles.

like image 115
Samantha Catania Avatar answered Nov 07 '22 14:11

Samantha Catania


Are you sure that jhbuild installed GTK? Did you do

jhbuild bootstrap
jhbuild build meta-gtk-osx-bootstrap
jhbuild build meta-gtk-osx-core

as instructed on the "GTK OSX Building" page? If you did this, then pkg-config is definitely installed, because those packages wouldn't have built without it.

Are you building your application from within the jhbuild environment? i.e. did you do

jhbuild shell

before trying to build your application?

like image 2
ptomato Avatar answered Nov 07 '22 13:11

ptomato