Porting a GTK+ App to Mac OSX - macos

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?

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.

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?

Isn't using jhbuild a bit overkill ? Wouldn't a Mac OS X GTK bundle from gtk.org be enough ? I think it provides pkg-config as the Win32 version provides it. Jhbuild is interesting if you have tons of dependencies to build, or want to build GTK yourself, but from what I understand, you just want to port a GTK application...

Related

how to install dev libraries in windows?

Very noob question, from a user used to Linux and switched to Win.
I'm building a project as a library in Qt, and I am missing libsqlite3. Normally on Linux I'd install it via sudo apt install libsqlite3, but how can I do it in Windows?
I'm using MSVC2019 tools for building my app.
thank you!

Where is Qt Maintenance Tool in Homebrew

I have installed Qt with Homebrew. Everything is working fine for Desktop Application Development. But I do not find Maintenance Tool. Do I need to install that separately with brew ?
It does not exist, since homebrew tries to be a package manager like they exist on linux environtments. Just like cygwin/msys2 for windows. So they provide one qt build and that's it.
You can still install the official binary distribution from Qt which contains the Maintenance Tool. You can think of the Maintenance Tool as Qt's internal package manager, that can install official Qt binaries.

Can we run xcowsay on mac OSX? If yes, how?

I have currently switched to mac from linux and am missing xcowsay
xcoway requires X, for linux that is x11 for mac you will ned toinstall Xquartz.
According to http://www.doof.me.uk/2008/03/04/xcowsay-on-os-x/, xcowsay is suported in mac since 2008.
Download and install XQuartz from https://www.xquartz.org/. Then download and compile xcowsay from https://github.com/nickg/xcowsay/
I had to install XQuartz on Mac OS X and build from source.
I used homebrew to install the dependencies and cloned from the source at https://github.com/nickg/xcowsay/. I ran into an issue with autoreconf finding the autopoint command from gettext. Adding the gettext bin folder to my path solved it.
See steps below
brew install autoconf gettext gdk-pixbuf gtk+
export PATH="/usr/local/opt/gettext/bin:$PATH"
./configure
make
make install
You should look at Homebrew for OSX.
cowsay is available via the homebrew package manager. I do not see the X-Server version of cowsay.
https://github.com/Homebrew/legacy-homebrew/blob/master/Library/Formula/cowsay.rb

Installing Bakefile in Mac osx 10.11

I have been trying to install bakefile(v0.2.9) in mac osx 10.11. Whenever I try to install bakefile using the dmg file I get The installation failed.The installer could not install the software because there was no software found to install error.
I even tried building it from the source code(v1.2.5.1 from github). I built it using the sudo make command.However sudo make install command throws No rule to make target install.
Is there any other way to install bakefile in macosx 10.11?
Edit :
Finally I managed to install the bakefile 0.2.9 in osx 10.11. I can't use the latest version as it does not supports the bakefile we have been using in our projects.
Though the installation is successful,I get the segmentation fault 11 when I try to build the bakefiles(.bkl). Some of the forums suggested that the problem could be associated with python 2.7. I followed all the steps needed to resolve the issue. But none of them helped.
I have been using python 2.7.11. How can I avoid this segmentation fault?
I advice against using the legacy 0.2.9 version.
I even tried building it from the source code(v1.2.5.1 from github).
You didn’t, that’s the problem — you tried to build a very different version, 0.2.9 != 1.2.5.1. The relation between these two branches is explained at http://bakefile.org — they are incompatible and different.
If you want to build 0.2.9 from sources, you need to download and build 0.2.9.
If you want to use the 1.x version, you can download packaged “binary” version, as explained at https://github.com/vslavik/bakefile
P.S. You don’t need to, and shouldn’t, use sudo when installing somewhere you typically have access to, such as /usr/local on OS X.

How to install openCV library on Mac OS X 10.6.8

I am new to openCV. How do I install this library on Mac OS X 10.6.8 and how do I include it in Xcode?
Start with one thing at a time:
Install OpenCV
Setup an XCode project
The easiest way is to install OpenCV is via MacPorts.
Make sure you've installed XCode's Command Line Tools first!
sudo port install opencv
note that you can also use ports variants (to add extra features e.g. python and QT support)
sudo port install opencv +qt4 +python27
As of very recently there should also be OpenNI support in MacPorts.
The other option is to build from source using Terminal. You'd also need CMake on top of XCode Command Line Tools
Regarding using OpenCV in XCode, it's a matter of making a c++ project and setting up the header and library search paths for the projects. If you use Macports those would be /opt/local/include/ and /opt/local/lib

Resources