Wireshark-bugs: [Wireshark-bugs] [Bug 6702] New: Patch to support latest GTK+ MAC OS X integrati

Date: Thu, 29 Dec 2011 23:10:28 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6702

           Summary: Patch to support latest GTK+ MAC OS X integration
           Product: Wireshark
           Version: unspecified
          Platform: Other
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Enhancement
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: jyoung@xxxxxxx


Build Information:
Version 1.7.1 (SVN Rev 40322 from /trunk)

Copyright 1998-2011 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with GTK+ 2.24.6, with Cairo 1.10.2, with Pango 1.28.4, with
GLib 2.28.8, with libpcap (version unknown), with libz 1.2.3, without POSIX
capabilities, without SMI, without c-ares, without ADNS, without Lua, with
Python 2.6.1, without GnuTLS, without Gcrypt, with MIT Kerberos, without GeoIP,
without PortAudio, without AirPcap.

Running on Mac OS 10.6.8 (Darwin 10.8.0), with locale en_US.UTF-8, with libpcap
version 1.0.0, with libz 1.2.3.

Built using gcc 4.2.1 (Apple Inc. build 5666) (dot 3).

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.

--
Attached are two patches that will allow Wireshark to be built on Mac OS X 10.6
or Mac OS X 10.7 using the latest GTK+ MAC OSX integration modules hosted at
www.gtk.org.   

The patch is submitted in two versions: Option 1 and Option 2.   

The Option 1 patch is preferred.

Option 1 is a simpler patch set at the expense of abandoning support for the
older igemacintegration in favor of the newer macigeintegration.  

Option 2 is a more complex patch set that attempts to continue support for the
(now obsolete?) igemacintegration in addition to the newer macigeintegration.

Both patches modify the following files:

  acinclude.m4
  gtk/drag_and_drop.c
  gtk/main.c
  gtk/main_menubar.c
  autogen.sh

The modification to acinclude.m4 adds a new test in the
AC_WIRESHARK_OSX_INTEGRATION_CHECK section to first look for the library
gtkmacintegration.  "gtkmacintegration" is the new internal name for GTK+ MAC
OSX library after the project was moved to www.gtk.org.  Previously this
library was known as igemacintegration.

The patches to the three gtk/*.c files update the conditional #include
<gtkmacintegration/gtkosxapplication.h> to use the new folder name.   The
Option 1 patch will break any build environment that expects to find the
gtkosapplication.h file in the older igemacintegration folder.  The Option 2
patch will attempt to allow older (pre-www.gtk.org hosted) GTK OSX jhbuild
environments to still work.  In addition the patch includes updates to
gtk/main.c and gtk/main_menubar.c for a more standard looking App menu.

The two patches include a dubious hack to autogen.sh to insure that the
libtoolize included with the jhbuild environment is used instead of the
glibtoolize included with the OSX's XCode.   Wireshark will fail to build under
jhbuild if the OSX glibtoolize tool is used.  If glibtool/glibtoolize are in
fact needed to build the traditional X client based Wireshark on OSX then a
different/better libtoolize workaround will be needed within autogen.sh.

Info about about GTK+ MAC OSX is available at:

  http://www.gtk.org/download/macos.php

GTK+ MAC OSX integration uses the OSX jhbuild environment.  Steps to setting up
the OSX jhbuild environment are documented at:

  http://live.gnome.org/GTK%2B/OSX/Building

Please pay particular attention to the prerequisites; git is required.   

To avoid potentially "polluting" one's standard OSX userid environment, it may
be useful to setup the OSX jhbuild environment under a different OSX userid.

The initial gtk-osx-build-setup.sh script will install the python based jhbuild
script into $HOME/.local/bin.   It is recommended to add this new folder to
your $PATH or add an appropriate alias to launch jhbuild when needed.   

Once the gtk-osx-build-setup script has finished, the newly installed jhbuild
script must itself be used three times (with different parameters) to bootstrap
itself and to retrieve additional core modules that will be needed before on
can build Wireshark.  

Once the jhbuild environment has been installed it is pretty easy to build
Wireshark with the new GTK+ OSX.   Building Wireshark is most easily
accomplished using the "jhbuild shell".   Simply enter "jhbuild shell".   The
jhbuild shell will augment the environment to put the bin folder for its
version of tools (such as libtool, etc) earlier into $PATH.   Once you are in
the "jhbuild shell" simply cd to the wireshark source folder and follow the
standard ./autogen.sh; ./configure; make process. 

You will have to enable the Wireshark "MAC OS X style" User Interface
preference to have a typical looking Wireshark App specific Menu bar. 

The latest OSX jhbuild based Wireshark is now very stable.  There are some
issues with keyboard accelerators but the use of the App menu and more native
looking file dialogs will likely be appreciated by many who might try this
approach to building a more OSX native looking Wireshark.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.