After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 587843 - Macintosh OSX Quartz Build & Integration Patches
Macintosh OSX Quartz Build & Integration Patches
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
git-master
Other Mac OS
: Normal enhancement
: ---
Assigned To: Charles Day
Andreas Köhler
Depends on:
Blocks:
 
 
Reported: 2009-07-05 23:57 UTC by John Ralls
Modified: 2018-06-29 22:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adjust configure.in for building gnucash with GTK-Quartz (2.44 KB, patch)
2009-07-06 00:00 UTC, John Ralls
needs-work Details | Review
Adds gnucash-setup-env-osx.in (2.64 KB, patch)
2009-07-06 00:08 UTC, John Ralls
committed Details | Review
Integrate the gnucash menu with the mac menubar (4.45 KB, patch)
2009-07-06 00:11 UTC, John Ralls
none Details | Review
Patches binreloc.c to use ige-mac-integration bundle info to find resources (4.92 KB, patch)
2009-07-06 00:13 UTC, John Ralls
committed Details | Review
Corrected patch to configure.in for MacPorts with Quartz (2.56 KB, patch)
2009-07-11 07:07 UTC, John Ralls
committed Details | Review
Fix automake error in original (4.33 KB, patch)
2009-07-12 01:13 UTC, John Ralls
committed Details | Review

Description John Ralls 2009-07-05 23:57:23 UTC
I have the following 4 patches, which I will attach immediately: 
 * gnc-configure.patch -- permits building Gnucash cleanly against MacOSX, sets up build environment to enable/disable the other features automatically
 * gnc-setup-env.patch -- provides (and installs when appropriate) a special gnucash-setup-env for OSX
 * gnc-menu-integration.patch -- integrates the gnucash menus into the MacOSX menubar
 * gnc-binreloc.patch -- Permits binreloc to work from inside a MacOSX application bundle.

Note that gnc-configure.patch is a prerequisite for the other 3. GnuCash will build and launch correctly from the commandline with only the first 2 applied (if built within the GTK-OSX environment. Menu integration works from either the command line or from an app bundle. Binreloc only works when gnucash is installed in an app bundle.

Regards,
John Ralls
Comment 1 John Ralls 2009-07-06 00:00:54 UTC
Created attachment 137897 [details] [review]
Adjust configure.in for building gnucash with GTK-Quartz

Adds detection of GTK Quartz, disables detection of X11/Xlib.h, sets up build environment for ige-mac-integration if ige-mac-integration.pc is in the pkgconfig path.
Comment 2 John Ralls 2009-07-06 00:08:22 UTC
Created attachment 137898 [details] [review]
Adds gnucash-setup-env-osx.in

Adds a new file to src/bin, gnc-setup-env-osx.in, which sets up the environment for running Gnucash when it's built with GTK-OSX. The Makefile is modified to use @GNUCASH-SETUP-ENV@ to select which template file to use. An additional substitution is provided to the gnucash-setup-env make script fragment to set the path correctly in the gtk-osx environment.
Comment 3 John Ralls 2009-07-06 00:11:06 UTC
Created attachment 137899 [details] [review]
Integrate the gnucash menu with the mac menubar

Uses the ige-mac-integration library from GTK-OSX to integrate the Gnucash menus and standard shortcuts with the MacOSX menubar, relocating the About, Preferences, and Quit menu items to the GnuCash menu.
Comment 4 John Ralls 2009-07-06 00:13:57 UTC
Created attachment 137900 [details] [review]
Patches binreloc.c to use ige-mac-integration bundle info to find resources

Just like it says above.
One note on this one: It's necessary to call g_type_init() as part of _br_find_exe because binreloc is called before gtk is initialized. Seems to work harmlessly.
Comment 5 Charles Day 2009-07-09 17:52:14 UTC
I applied the patch to configure.in and now I get the following during the configure step:

checking for dlsym... yes
checking for dlerror... yes
../repos/configure: line 17716: 10.x: command not found
checking for darwin... checking For GDK-Quartz... yes
checking for ige-mac-integration... no
Package ige-mac-integration was not found in the pkg-config search path. Perhaps you should add the directory containing `ige-mac-integration.pc' to the PKG_CONFIG_PATH environment variable No package 'ige-mac-integration' found
configure: error: Library requirements (ige-mac-integration) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

The bit about "10.x: command not found" looks like a typo, as the line is supposed to be a comment but is missing the leading '#'.

However, requiring ige-mac-integration (which I don't have) seems wrong. We ought to be able to build without it. All of my GDK/GTK stuff was built with MacPorts, if that provides any clues.
Comment 6 John Ralls 2009-07-11 07:07:32 UTC
Created attachment 138231 [details] [review]
Corrected patch to configure.in for MacPorts with Quartz

Revise the original gnc-configure.patch to define a C macro GDK_QUARTZ and to simply report that ige-mac-integration wasn't found instead of erroring out.
Comment 7 John Ralls 2009-07-12 01:13:59 UTC
Created attachment 138256 [details] [review]
Fix automake error in original

Removed an extraneous test around -lX11 made obsolete by the changes to gnc-configure.patch
Comment 8 Charles Day 2009-07-13 20:43:03 UTC
Committed patches in r18205-18208.
Comment 9 John Ralls 2018-06-29 22:24:04 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=587843. Please update any external references or bookmarks.