mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] Static library support for GTK+


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] Static library support for GTK+
Date: Fri, 25 Nov 2011 11:06:48 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Matthias Gehre schrieb:
> I have attached the not-so-clean patch I currently use for the mingw part.
> On the part of my 'big' dll, I use the code
> https://github.com/lightspark/lightspark/blob/master/src/compat.cpp#L115
> (Line 115 and below)
> to call the DllMain's in question.

Thanks for your contribution!

To make it clear: The whole GTK+ support in mingw-cross-env
is a big nasty hack, written by myself just so it runs a
simple hello-world program. I wonder if it works for bigger
projects anyway.

So feel free to propose any stuff that makes it work better
for you.

Also, feel free to clean up this mess. Ideally, we'd produce
clean patches that work with static as well as dynamic GTK+
builds. The GTK+ guys are quite open to static linking, although
they don't put any effort into that themselves. The only reason
my patches didn't make it into GTK+ is because they are ad-hoc
and dirty.

Any improvements are welcome!


Back to your patch: Would you mind cleaning it up a bit? I think
that separation between

* src/*.mk files
* build stuff (patches for configure.ac etc.), and
* code stuff (patches for *.h, *.c, etc.)

would already help to review it. For instance, your patch
contains a quite hidden change to src/glib.mk:

-    $(MAKE) -C '$(1)/glib'    -j '$(JOBS)' install bin_PROGRAMS= 
sbin_PROGRAMS= noinst_PROGRAMS=
+    $(MAKE) -C '$(1)/glib'    -j '$(JOBS)' install

It would be good to know the reason for that change.

> And one cannot call gtk functions on win32 from different threads then
> the gtk_main() thread, which also gave me some headache.

Isn't that always the case, with any GUI framework?

For instance, in Qt you're also supposed to do
GUI stuff only in the main thread, and nowhere else.

However, low-level Qt stuff (and I guess low-level glib stuff)
is also allowed from multiple threads. This is usually
used to send signals from the other threads to the
main threads or vice versa, for progress information,
calculation results, etc.


Greets,
Volker

-- 
Volker Grabsch
---<<(())>>---



reply via email to

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