GNOME Bugzilla – Bug 587843
Macintosh OSX Quartz Build & Integration Patches
Last modified: 2018-06-29 22:24:04 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
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.
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.
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.
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.
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.
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.
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
Committed patches in r18205-18208.
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.