r19000 - gnucash/trunk/src/bin - Revive gnucash-setup-env on OSX/Quartz.

Geert Janssens gjanssens at code.gnucash.org
Tue Apr 6 07:03:23 EDT 2010


Author: gjanssens
Date: 2010-04-06 07:03:23 -0400 (Tue, 06 Apr 2010)
New Revision: 19000
Trac: http://svn.gnucash.org/trac/changeset/19000

Added:
   gnucash/trunk/src/bin/gnucash-setup-env-osx.in
Modified:
   gnucash/trunk/src/bin/Makefile.am
   gnucash/trunk/src/bin/environment-osx.in
Log:
Revive gnucash-setup-env on OSX/Quartz.
This fixes the OSX issues caused by the introduction of 
the environment config file.

Modified: gnucash/trunk/src/bin/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/Makefile.am	2010-04-06 02:19:25 UTC (rev 18999)
+++ gnucash/trunk/src/bin/Makefile.am	2010-04-06 11:03:23 UTC (rev 19000)
@@ -38,10 +38,11 @@
 config_DATA = environment
 
 if PLATFORM_OSX_QUARTZ
-PRE_RUN = if test -z \"\$$DBUS_SESSION_BUS_ADDRESS\"; then\n\
-    eval \`dbus-launch --sh-syntax --exit-with-session --config-file=${PREFIX}/etc/dbus-1/session.conf\`\nfi\n
+PRE_RUN = '. @-BIN_DIR-@/gnucash_setup_env'
+PLATFORM_FILES = gnucash-setup-env
 else
 PRE_RUN =
+PLATFORM_FILES =
 endif
 
 gnucash: gnucash.in ${top_builddir}/config.status Makefile
@@ -72,6 +73,24 @@
 	mv $@.tmp $@
 	chmod u+x $@
 
+if PLATFORM_OSX_QUARTZ
+gnucash-setup-env: gnucash-setup-env-osx.in ${top_builddir}/config.status Makefile
+	rm -f $@.tmp
+	sed < $< > $@.tmp \
+	    -e 's#@-BIN_DIR-@#${bindir}#g' \
+	    -e 's#@-GNC_DBD_DIR-@#${GNC_DBD_DIR}#g' \
+	    -e 's#@-GNC_STANDARD_REPORTS_DIR-@#${GNC_SHAREDIR}/guile-modules/gnucash/report/standard-reports#g' \
+	    -e 's#@-GNC_GUILE_MODULE_DIR-@#${GNC_SHAREDIR}/guile-modules#g' \
+	    -e 's#@-GNC_SCM_INSTALL_DIR-@#${GNC_SCM_INSTALL_DIR}#g' \
+	    -e 's#@-GNC_LIB_INSTALLDIR-@#${libdir}#' \
+	    -e 's#@-GNC_PKGLIB_INSTALLDIR-@#${pkglibdir}#g' \
+	    -e "s#@-TOP_SRC_DIR-@#`pwd`/${top_srcdir}#g" \
+	    -e 's#@-PATH_SEPARATOR-@#${PATH_SEPARATOR}#g' \
+	    -e 's#@-PREFIX-@#${prefix}#g'
+	mv $@.tmp $@
+	chmod u+x $@
+endif
+
 environment: ${GNUCASH_ENVIRONMENT}.in ${top_builddir}/config.status Makefile
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
@@ -92,7 +111,7 @@
 	mv $@.tmp $@
 	chmod u+x $@
 
-CLEANFILES = $(BUILT_SOURCES) gnucash gnucash-valgrind gnucash-gdb environment
+CLEANFILES = $(BUILT_SOURCES) gnucash gnucash-valgrind gnucash-gdb environment ${PLATFORM_FILES}
 
 # We handle gnucash scripts in a somewhat unexpected way, but we do
 # this so that a user who doesn't necessarily have the right
@@ -129,7 +148,8 @@
 	gnucash-gdb.in \
 	environment.in \
 	environment-win32.in \
-	environment-osx.in
+	environment-osx.in \
+	${PLATFORM_FILES}
 
 ## Gnucash scripts -- real code is in overrides, these just get you there.
 ${gnc_common_scripts}: generate-gnc-script ${top_builddir}/config.status

Modified: gnucash/trunk/src/bin/environment-osx.in
===================================================================
--- gnucash/trunk/src/bin/environment-osx.in	2010-04-06 02:19:25 UTC (rev 18999)
+++ gnucash/trunk/src/bin/environment-osx.in	2010-04-06 11:03:23 UTC (rev 19000)
@@ -11,21 +11,24 @@
 # - packaging/win32/install.sh
 
 [Variables]
-GUILE_WARN_DEPRECATED=no
-XDG_CONFIG_DIRS=@-PREFIX-@/etc/xdg
-XDG_DATA_DIRS=@-PREFIX-@/share
+# All settings are commented out for now. This requires more testing
+# on the interaction with the OSX bundle launcher script.
+# Until then these parameters remain set via gnucash-setup-env
+#GUILE_WARN_DEPRECATED=no
+#XDG_CONFIG_DIRS=@-PREFIX-@/etc/xdg
+#XDG_DATA_DIRS=@-PREFIX-@/share
 
-PATH=@-BIN_DIR-@;{PATH}
-GNC_MODULE_PATH=@-GNC_PKGLIB_INSTALLDIR-@;{GNC_MODULE_PATH}
+#PATH=@-BIN_DIR-@;{PATH}
+#GNC_MODULE_PATH=@-GNC_PKGLIB_INSTALLDIR-@;{GNC_MODULE_PATH}
 
-EXTRA_PATH={EXTRA_PATH};@-GNC_GUILE_MODULE_DIR-@;@-GNC_SCM_INSTALL_DIR-@
-GUILE_LOAD_PATH={EXTRA_PATH};{GUILE_LOAD_PATH}
+#EXTRA_PATH={EXTRA_PATH};@-GNC_GUILE_MODULE_DIR-@;@-GNC_SCM_INSTALL_DIR-@
+#GUILE_LOAD_PATH={EXTRA_PATH};{GUILE_LOAD_PATH}
 
-EXTRA_LIBS={GNC_MODULE_PATH};/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/
-EXTRA_LIBS={EXTRA_LIBS};@-GNC_LIB_INSTALLDIR-@;@-GNC_PKGLIB_INSTALLDIR-@
-LD_LIBRARY_PATH={EXTRA_LIBS};${LD_LIBRARY_PATH}
-DYLD_LIBRARY_PATH={EXTRA_LIBS};${DYLD_LIBRARY_PATH}
+#EXTRA_LIBS={GNC_MODULE_PATH};/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/
+#EXTRA_LIBS={EXTRA_LIBS};@-GNC_LIB_INSTALLDIR-@;@-GNC_PKGLIB_INSTALLDIR-@
+#LD_LIBRARY_PATH={EXTRA_LIBS};${LD_LIBRARY_PATH}
+#DYLD_LIBRARY_PATH={EXTRA_LIBS};${DYLD_LIBRARY_PATH}
 
-GNC_DBD_DIR=@-GNC_DBD_DIR-@
-GNC_STANDARD_REPORTS_DIR=@-GNC_STANDARD_REPORTS_DIR-@
-GNC_DOT_DIR={HOME}/Library/Application Support/Gnucash
\ No newline at end of file
+#GNC_DBD_DIR=@-GNC_DBD_DIR-@
+#GNC_STANDARD_REPORTS_DIR=@-GNC_STANDARD_REPORTS_DIR-@
+#GNC_DOT_DIR={HOME}/Library/Application Support/Gnucash
\ No newline at end of file

Copied: gnucash/trunk/src/bin/gnucash-setup-env-osx.in (from rev 18990, gnucash/trunk/src/bin/gnucash-setup-env-osx.in)
===================================================================
--- gnucash/trunk/src/bin/gnucash-setup-env-osx.in	                        (rev 0)
+++ gnucash/trunk/src/bin/gnucash-setup-env-osx.in	2010-04-06 11:03:23 UTC (rev 19000)
@@ -0,0 +1,41 @@
+# If you make any changes here, you should probably also change the equivalent sections
+# in packaging/win32/gnucash.iss.in, packaging/win32/install.sh and src/bin/gnucash-setup-env.in
+
+PATH="@-BIN_DIR-@:${PATH}"
+export PATH
+XDG_CONFIG_DIRS=@-PREFIX-@/etc/xdg
+export XDG_CONFIG_DIRS
+XDG_DATA_DIRS=@-PREFIX-@/share
+export XDG_DATA_DIRS
+
+
+GUILE_WARN_DEPRECATED="no"
+export GUILE_WARN_DEPRECATED
+
+GNC_MODULE_PATH="@-GNC_PKGLIB_INSTALLDIR-@:${GNC_MODULE_PATH}"
+
+EXTRA_PATH="${EXTRA_PATH}:@-GNC_GUILE_MODULE_DIR-@"
+EXTRA_PATH="${EXTRA_PATH}:@-GNC_SCM_INSTALL_DIR-@"
+GUILE_LOAD_PATH="${EXTRA_PATH}:${GUILE_LOAD_PATH}"
+
+EXTRA_LIBS="${GNC_MODULE_PATH}"
+EXTRA_LIBS="${EXTRA_LIBS}:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/"
+EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_LIB_INSTALLDIR-@"
+EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_PKGLIB_INSTALLDIR-@"
+
+LD_LIBRARY_PATH="${EXTRA_LIBS}:${LD_LIBRARY_PATH}"
+DYLD_LIBRARY_PATH="${EXTRA_LIBS}:${DYLD_LIBRARY_PATH}"
+GNC_DBD_DIR="@-GNC_DBD_DIR-@"
+GNC_STANDARD_REPORTS_DIR="@-GNC_STANDARD_REPORTS_DIR-@"
+
+export GNC_MODULE_PATH
+export GUILE_LOAD_PATH
+export LD_LIBRARY_PATH
+export DYLD_LIBRARY_PATH
+export GNC_DBD_DIR
+export GNC_STANDARD_REPORTS_DIR
+export GNC_DOT_DIR="$HOME/Library/Application Support/Gnucash"
+
+if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
+    eval `dbus-launch --sh-syntax --exit-with-session --config-file=@-PREFIX-@/etc/dbus-1/session.conf`
+fi



More information about the gnucash-changes mailing list