Wireshark-dev: Re: [Wireshark-dev] Windows build broken in r52812 (for building GTK)
From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Thu, 24 Oct 2013 11:25:34 -0700
On 10/24/13 7:25 AM, Joerg Mayer wrote:
> On Thu, Oct 24, 2013 at 04:07:25PM +0200, Joerg Mayer wrote:
>> On Thu, Oct 24, 2013 at 09:36:43AM -0400, mmann78@xxxxxxxxxxxx wrote:
>>> Moving sctp_stat.c to the "independent" ui directory causes <gtk/gtk.h> to not be found, causing a bunch of compile errors.  Cursory glance says makefiles (.nmake) should be setup to have the necessary GTK include directories as part of the build, but apparently not.
>>
>>
>> Wrong approach: Stuff that requires <gtk/gtk.h> does not belong into the
>> ui/ directory but in the ui/gtk/ directory. So either the file should be
>> moved back into ui/gtk/ or the dependency on gtk should be removed.
> 
> All other dependencies on ui/gtk/ have to go as well.
> 
> See for example commit
> ------------------------------------------------------------------------
> r52542 | gerald | 2013-10-11 19:20:50 +0200 (Fr, 11 Okt 2013) | 7 lines
> 
> Remove GTK+ and global cfile dependencies from file_dlg_win32.c.
> 
> Move the declaration of set_last_open_dir() to ui/util.h. It still
> has separate GTK+ and Qt implemenations. We might want to move it to
> ui/util.c at some point. Remove a lot of unnecessary GTK+ includes.
> Remove most of the references to the global cfile while we're at it.
> 
> ------------------------------------------------------------------------

My usual process for porting common UI code has been to "svn cp" a file
containing UI-independent code from the gtk directory to the ui
directory, then delete as needed from the old and new locations so as to
preserve SVN history. tap-tcp-stream.[ch] in r51538 shows an example of
this:

http://anonsvn.wireshark.org/viewvc?view=revision&revision=51538


Semi-related note: The SCTP Chunk Counter uses the parameter dialog
(tap_param_dlg.[ch]). If anyone happens to beat me to it, *please* use a
single combined dialog instead of separate filter input + statistics
output dialogs. I always feel like Wireshark is asking me to take a
short survey on display filters when I'm trying to view stats.