GTK/GDK on OSX

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GTK/GDK on OSX

H. William Welliver III-2
I’m running into some build problems on OSX. It seems that the GTK
module assumes that if a system is NT that gdkwin.h is used and
otherwise gdkx.h is used. Unfortunately, it seems that on some builds of
GTK/GDK for OS X, neither of those is correct and that gdkquartz.h
should be used. I’m guessing that some configure tests are needed to
determine which of the 3 files is actually present. However a quick look
at configure.in leaves me unsure how best to include that. Anyone with
more expertise in the GTK module’s inner workings care to weigh in?

Bill
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK/GDK on OSX

Chris Angelico
On Sun, Mar 12, 2017 at 3:51 AM, H William Wellliver III
<[hidden email]> wrote:
> I’m running into some build problems on OSX. It seems that the GTK module
> assumes that if a system is NT that gdkwin.h is used and otherwise gdkx.h is
> used. Unfortunately, it seems that on some builds of GTK/GDK for OS X,
> neither of those is correct and that gdkquartz.h should be used. I’m
> guessing that some configure tests are needed to determine which of the 3
> files is actually present. However a quick look at configure.in leaves me
> unsure how best to include that. Anyone with more expertise in the GTK
> module’s inner workings care to weigh in?
>

I'm far from an expert on either the module or configure.in, but I did
some experimentation. The result is in branch
rosuav/support-gdk-quartz, and it adds three header file probes to the
configuration. Then, since three-way logic is a lot more verbose than
two-way, I've removed it from all the places where it's currently
done, and put it into pgtk.h (which they all include). This will
probably slow down compilation slightly, but AFAIK it shouldn't have
any run-time significance.

Can you test it on OSX? And ideally Windows?

ChrisA
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK/GDK on OSX

H. William Welliver III-2
Thanks for taking a stab at it, Chris. I will have a look this
weekend... just got a fresh OSX VM running so I can test things out
pretty easily.

Getting a build attempt on Windows is possible but may take me a few
days to get the build environment running on my new build machine. Stay
tuned.

Bill

On 2017-03-13 19:06, Chris Angelico wrote:

> I'm far from an expert on either the module or configure.in, but I did
> some experimentation. The result is in branch
> rosuav/support-gdk-quartz, and it adds three header file probes to the
> configuration. Then, since three-way logic is a lot more verbose than
> two-way, I've removed it from all the places where it's currently
> done, and put it into pgtk.h (which they all include). This will
> probably slow down compilation slightly, but AFAIK it shouldn't have
> any run-time significance.
>
> Can you test it on OSX? And ideally Windows?
>
> ChrisA
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK/GDK on OSX

Chris Angelico
On Sat, Mar 18, 2017 at 3:55 AM, H William Wellliver III
<[hidden email]> wrote:
> Thanks for taking a stab at it, Chris. I will have a look this weekend...
> just got a fresh OSX VM running so I can test things out pretty easily.
>
> Getting a build attempt on Windows is possible but may take me a few days to
> get the build environment running on my new build machine. Stay tuned.
>

Just rebased the rosuav/support-gdk-quartz branch onto current 8.1
(trivial since there'd been no changes to GTK2) so you'll get a
forced-update warning when you grab this.

I would *love* to see an easy way to get Pike installed on a Mac with
full GTK2 support. Does it (will it) require manual installation of
XQuartz first?

ChrisA
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK/GDK on OSX

H. William Welliver III-2
I think I have a fix for the compile problem on OSX. I should be able to
get something committed later today.

I got my Windows build VM up and running so hopefully will have time to
test on Windows tomorrow.

It appears that the GTK shipped with homebrew uses the GDK-quartz
implementation. I'm not sure if that means the GTK they ship is Quartz
or X11. If I get some time I'll take a look.

To get a truly all-in-one installer, you'd probably need to compile
against static libraries. I've done that with some of the basic
prerequisites, and it's not hard if the --enable-static configure option
is working. GTK is a bit more of an octopus so it would probably take
more effort. And the GTK-Quartz library would need to work for what you
want (I believe that it is not feature complete.).

Bill

>
> Just rebased the rosuav/support-gdk-quartz branch onto current 8.1
> (trivial since there'd been no changes to GTK2) so you'll get a
> forced-update warning when you grab this.
>
> I would *love* to see an easy way to get Pike installed on a Mac with
> full GTK2 support. Does it (will it) require manual installation of
> XQuartz first?
>
> ChrisA
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK/GDK on OSX

H. William Welliver III-2
In reply to this post by Chris Angelico
Looks like there are some X11isms in the source code as well (such as
use of GDK_DISPLAY() on non-NT systems) that will need to be dealt with.
I may take a look at them at some point if no one else gets to it first.

Bill

On 2017-03-22 09:51, Chris Angelico wrote:

>
> Just rebased the rosuav/support-gdk-quartz branch onto current 8.1
> (trivial since there'd been no changes to GTK2) so you'll get a
> forced-update warning when you grab this.
>
> I would *love* to see an easy way to get Pike installed on a Mac with
> full GTK2 support. Does it (will it) require manual installation of
> XQuartz first?
>
> ChrisA
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GTK/GDK on OSX

Chris Angelico
On Thu, Mar 23, 2017 at 8:06 AM, H William Wellliver III
<[hidden email]> wrote:
> Looks like there are some X11isms in the source code as well (such as use of
> GDK_DISPLAY() on non-NT systems) that will need to be dealt with. I may take
> a look at them at some point if no one else gets to it first.
>
> Bill

I'd be happy to look into it if I could test on Windows. But the last
time I tried to set up a Windows VM for building Pike, I got massively
tangled and lost (partly because it's been well over a decade since I
did any major C/C++ dev on Windows).

ChrisA
Loading...