[gcompris/gcomprixogoo] Improved MacOSX integration. Uncomplete yet.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Improved MacOSX integration. Uncomplete yet.
- Date: Wed, 24 Mar 2010 21:28:49 +0000 (UTC)
commit f640dc495b77924677a3a94ab8ed7da1c5d13bbc
Author: Bruno Coudoin <bruno ordinateur-de-bruno-coudoin local>
Date: Mon Mar 22 00:51:59 2010 +0100
Improved MacOSX integration. Uncomplete yet.
configure.ac | 118 ++++++++++++++++++++++--------------
macosx/gcompris.bundle | 133 +++++++++++++++++++++++++++++++++++++++++
src/goocanvas/src/Makefile.am | 2 -
3 files changed, 204 insertions(+), 49 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b879424..879d95c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@ AM_GLIB_GNU_GETTEXT
GTK_REQUIRED=2.12.0
LIBRSVG_REQUIRED=2.26.0
-LIBXML_REQUIRED=2.6.13
+LIBXML_REQUIRED=2.6.16
dnl
dnl Start of pkg-config checks
@@ -56,7 +56,7 @@ PKG_CHECK_MODULES(GCOMPRIS, \
gtk+-2.0 >= $GTK_REQUIRED \
librsvg-2.0 >= $LIBRSVG_REQUIRED \
libxml-2.0 >= $LIBXML_REQUIRED \
- gthread-2.0)
+ gthread-2.0 )
AC_SUBST(GCOMPRIS_CFLAGS)
AC_SUBST(GCOMPRIS_LIBS)
@@ -78,17 +78,6 @@ AC_MSG_RESULT([$native_osx])
AM_CONDITIONAL(OS_MACOSX, test "$native_osx" = yes)
-### --------------------------------------------------------------------------
-### Check to see if GDK uses the quartz backend and if we can use
-### MacOSX integration
-_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
-AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
-if test "x$_gdk_tgt" = xquartz; then
- PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration)
- AC_SUBST(IGE_MAC_LIBS)
- AC_SUBST(IGE_MAC_CFLAGS)
-fi
-
# nsbundle default is no even for osx
nsbundle="no"
@@ -117,6 +106,7 @@ if test "x$nsbundle" = "xyes"; then
NSBUNDLE_LDFLAGS="-framework Cocoa "
OBJCFLAGS="$OBJCFLAGS $CFLAGS"
AC_LANG_POP([Objective C])
+
else
AC_LANG_PUSH([Objective C])
saved_CPPFLAGS="$CPPFLAGS"
@@ -158,6 +148,17 @@ AC_SUBST(BUNDLE_NAME)
AM_CONDITIONAL(WITH_NSBUNDLE, test "$nsbundle" = yes)
+### --------------------------------------------------------------------------
+### Check to see if GDK uses the quartz backend and if we can use
+### MacOSX integration
+_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
+AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
+if test "x$_gdk_tgt" = xquartz; then
+ PKG_CHECK_MODULES(IGE_MAC, ige-mac-integration)
+ AC_SUBST(IGE_MAC_LIBS)
+ AC_SUBST(IGE_MAC_CFLAGS)
+ AC_DEFINE_UNQUOTED(MAC_INTEGRATION, 1, [Integrate in the OSX Menu])
+fi
# Provide relocatable API from autopackage
# From http://autopackage.org/docs/binreloc/
@@ -292,66 +293,88 @@ dnl
dnl === DIRECTORY DEFINITIONS ===
dnl
-if test "x$platform_win32" = "xno" ; then
+if test "x$platform_win32" = "xyes" ; then
+ DATADIRNAME="share"
- dnl Set PACKAGE_LOCALE_DIR in config.h.
- AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${myprefix}/${DATADIRNAME}/locale", [GCompris locale directory])
+ dnl Set PACKAGE_LOCALE_DIR in config.h for WINDOWS
+ AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "../${DATADIRNAME}/locale", [GCompris locale directory])
dnl Set PACKAGE_DATA_DIR
PACKAGE_DATA_DIR="boards"
AC_SUBST(PACKAGE_DATA_DIR)
- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${myprefix}/${DATADIRNAME}", [GCompris data directory])
-
- dnl Set PACKAGE_HELP_DIR
- PACKAGE_HELP_DIR="${myprefix}/${DATADIRNAME}/${PACKAGE}/help"
- AC_SUBST(PACKAGE_HELP_DIR)
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "../${DATADIRNAME}", [GCompris data directory])
dnl Plugin Directory
- my_libdir=`eval echo "${libdir}"`
- AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "${my_libdir}", [Gcompris plugins directory])
- plugindir=$libdir/gcompris
+ AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "../${DATADIRNAME}", [Gcompris plugins directory])
+ plugindir=${myprefix}/${DATADIRNAME}/gcompris
AC_SUBST(plugindir)
dnl Python plugin Directory
- PYTHON_PLUGIN_DIR="${myprefix}/${DATADIRNAME}/${PACKAGE}/python"
+ PYTHON_PLUGIN_DIR="${myprefix}/${DATADIRNAME}/gcompris/python"
AC_SUBST(PYTHON_PLUGIN_DIR)
dnl System GCompris config directory
- AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_DIR, "/etc", [System GCompris config directory])
+ AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_DIR, "etc", [System GCompris config directory])
-else
+ dnl Test for gnuchess
+ AC_DEFINE_UNQUOTED(GNUCHESS, "gnuchess.exe", Defines where GNU Chess resides on the system)
+
+elif test "x$nsbundle" = "xyes" ; then
DATADIRNAME="share"
dnl Set PACKAGE_LOCALE_DIR in config.h for WINDOWS
- AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "../${DATADIRNAME}/locale", [GCompris locale directory])
+ AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "../Resources/${DATADIRNAME}/locale", [GCompris locale directory])
dnl Set PACKAGE_DATA_DIR
PACKAGE_DATA_DIR="boards"
AC_SUBST(PACKAGE_DATA_DIR)
- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "../${DATADIRNAME}", [GCompris data directory])
-
- dnl Set PACKAGE_HELP_DIR
- PACKAGE_HELP_DIR="${myprefix}/${DATADIRNAME}/gnome/help/gcompris"
- AC_SUBST(PACKAGE_HELP_DIR)
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "../Resources/${DATADIRNAME}", [GCompris data directory])
dnl Plugin Directory
- AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "../${DATADIRNAME}", [Gcompris plugins directory])
+ AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "../Resources/${DATADIRNAME}", [Gcompris plugins directory])
plugindir=${myprefix}/${DATADIRNAME}/gcompris
AC_SUBST(plugindir)
dnl Python plugin Directory
- PYTHON_PLUGIN_DIR="${myprefix}/${DATADIRNAME}/gcompris/python"
+ PYTHON_PLUGIN_DIR="../Resources/${DATADIRNAME}/gcompris/python"
AC_SUBST(PYTHON_PLUGIN_DIR)
-fi
+ dnl System GCompris config directory
+ AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_DIR, "../Resources/etc", [System GCompris config directory])
+
+ dnl Test for gnuchess
+ AC_DEFINE_UNQUOTED(GNUCHESS, "../Resources/bin/gnuchess", Defines where GNU Chess resides on the system)
+
+else
+ dnl Set PACKAGE_LOCALE_DIR in config.h.
+ AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${myprefix}/${DATADIRNAME}/locale", [GCompris locale directory])
+
+ dnl Set PACKAGE_DATA_DIR
+ PACKAGE_DATA_DIR="boards"
+ AC_SUBST(PACKAGE_DATA_DIR)
+ AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${myprefix}/${DATADIRNAME}", [GCompris data directory])
+
+ dnl Plugin Directory
+ my_libdir=`eval echo "${libdir}"`
+ AC_DEFINE_UNQUOTED(PACKAGE_CLIB_DIR, "${my_libdir}", [Gcompris plugins directory])
+ plugindir=$libdir/gcompris
+ AC_SUBST(plugindir)
+
+ dnl Python plugin Directory
+ PYTHON_PLUGIN_DIR="${myprefix}/${DATADIRNAME}/${PACKAGE}/python"
+ AC_SUBST(PYTHON_PLUGIN_DIR)
-dnl Test for gnuchess
-AC_PATH_PROGS(GNUCHESS, gnuchess gnome-gnuchess, no, [/usr/bin:/usr/games:/usr/local/bin:$PATH])
+ dnl System GCompris config directory
+ AC_DEFINE_UNQUOTED(SYSTEM_CONFIG_DIR, "/etc", [System GCompris config directory])
+
+ dnl Test for gnuchess
+ AC_PATH_PROGS(GNUCHESS, gnuchess gnome-gnuchess, no, [/usr/bin:/usr/games:/usr/local/bin:$PATH])
+ if test x$GNUCHESS = xno; then
+ AC_MSG_ERROR(Couldn't find gnuchess, please install the gnuchess package version 5 or above)
+ fi
+ AC_DEFINE_UNQUOTED(GNUCHESS, "$GNUCHESS", Defines where GNU Chess resides on the system)
-if test x$GNUCHESS = xno; then
- AC_MSG_ERROR(Couldn't find gnuchess, please install the gnuchess package version 5 or above)
fi
-AC_DEFINE_UNQUOTED(GNUCHESS, "$GNUCHESS", Defines where GNU Chess resides on the system)
AC_PATH_PROG(TEXINFO, makeinfo,no)
if test x$TEXINFO = xno; then
@@ -443,18 +466,19 @@ AM_CONDITIONAL([SUGAR], [test x$with_sugar = xyes])
dnl check for python
AC_ARG_WITH(python,AC_HELP_STRING(
[--with-python=path],
- [set the path for python]), python_path=$withval, python_path=no)
+ [set the path for python]), python_path=$withval, python_path=not)
if test x$python_path = xno ; then
build_python_plugin="no"
else
-if test x$python_path != xno ; then
+if test x$python_path != xnot ; then
PYTHON=$python_path
fi
AM_PATH_PYTHON
AM_CHECK_PYTHON_HEADERS( [build_python_plugin="yes"], [build_python_plugin="no"] )
+
fi
dnl Finally output the required python variables and automake defines.
@@ -508,10 +532,10 @@ else
dnl AM_CHECK_PYMOD(gnomecanvas,,,AC_MSG_ERROR([*** gnome.canvas or gnomecanvas installed but not visible from python ]))
dnl fi
-dnl if test x$with_sqlite = xyes; then
-dnl AM_CHECK_PYMOD(pysqlite2,,,AC_MSG_ERROR([*** pysqlite2 missing ]))
-dnl REQUIRE_PYTHON="$REQUIRE_PYTHON python-sqlite2"
-dnl fi
+ if test x$with_sqlite = xyes; then
+ AM_CHECK_PYMOD(pysqlite2,,,AC_MSG_ERROR([*** pysqlite2 missing ]))
+ REQUIRE_PYTHON="$REQUIRE_PYTHON python-sqlite2"
+ fi
else
AC_MSG_WARN([py-build-only: Skipping python modules dependancies])
diff --git a/macosx/gcompris.bundle b/macosx/gcompris.bundle
new file mode 100644
index 0000000..6b54f09
--- /dev/null
+++ b/macosx/gcompris.bundle
@@ -0,0 +1,133 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<app-bundle>
+
+ <meta>
+ <!-- Where to pick up the GTK+ installation, icon themes,
+ etc. Note that "${env:JHBUILD_PREFIX}" is evaluated to the
+ value of the environment variable JHBUILD_PREFIX. You can
+ define additional prefixes and refer to them in paths
+ throughout this file on the form "${prefix:name}". This is
+ useful for installing certain libraries or even the
+ application itself separately. Note that JHBUILD_PREFIX is
+ defined by jhbuild, so it you are not using jhbuild you can
+ either define your own or just hardcode the path here.
+ -->
+ <prefix name="default">${env:JHBUILD_PREFIX}</prefix>
+
+ <!-- The project directory is the default location of the created
+ app. If you leave out the path, the current directory is
+ used. Note the usage of an environment variable here again.
+ -->
+ <destination overwrite="yes">${env:HOME}/Desktop</destination>
+
+ <image>
+ <!-- Not implemented yet (DMG image). -->
+ </image>
+
+ <!-- Comment this out to keep the install names in binaries -->
+ <run-install-name-tool/>
+
+ <!-- Optionally specify a launcher script to use. If the
+ application sets up everything needed itself, like
+ environment variable, linker paths, etc, a launcher script is
+ not needed. If the source path is left out, the default
+ script will be used.
+ -->
+ <launcher-script>${project}/launcher.sh</launcher-script >
+
+ <!-- Not implemented: Optional runtime, could be python or mono
+ for example.
+ -->
+ <!--runtime copy="yes">/usr/bin/python</runtime-->
+ </meta>
+
+ <!-- The special macro "${project}" refers to the directory where
+ this bundle file is located. The application name and bundle
+ identifier are taken from the plist file.
+ -->
+ <plist>${project}/Info.plist</plist>
+
+ <main-binary>${prefix}/bin/gcompris</main-binary>
+
+ <!-- Copy in GTK+ modules. Note the use of the
+ "${pkg:module:variable}" macro, which evaluates to a pkg-config
+ variable in the specified module. Note that any libraries that
+ binaries link to are also copied in automatically.
+ -->
+ <binary>
+ ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so
+ </binary>
+
+ <binary>
+ ${prefix}/bin/gnuchess
+ </binary>
+
+ <binary>
+ ${prefix}/bin/gnucap
+ </binary>
+
+ <!-- Copy in GTK+ theme engines. Dunno why this is a dupe of
+ modules, but that's why it's commented out. >
+ <binary>
+ ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so
+ </binary -->
+
+ <!-- Translation filenames, one for each program or library that you
+ want to copy in to the bundle. The "dest" attribute is
+ optional, as usual. Bundler will find all translations of that
+ library/program under the indicated directory and copy them.-->
+ <translations dest="${bundle}/Contents/Resources" name="gcompris">
+ ${prefix}/share/locale
+ </translations>
+
+ <translations dest="${bundle}/Contents/Resources" name="gtk20">
+ ${prefix}/share/locale
+ </translations>
+
+
+ <!-- Data to copy in, usually Glade/UI files, images, sounds files
+ etc. The destination inside the bundle can be specified if the
+ files should end up at a different location, by using the
+ "dest" property. The destination must then start with the macro
+ "${bundle}", which refers to the bundle root directory.
+ -->
+ <data>
+ ${prefix}/share/gcompris
+ </data>
+
+ <!-- Copy in the themes data. You may want to trim this to save space
+ in your bundle. -->
+ <data>
+ ${prefix}/share/themes
+ </data>
+
+ <!-- Copy icons. Note that the .icns file is an Apple format which
+ contains up to 4 sizes of icon. You can use
+ /Developer/Applications/Utilities/Icon Composer.app to import
+ artwork and create the file. -->
+ <data dest="${bundle}/Contents/Resources">
+ ${project}/GCompris.icns
+ </data>
+
+ <!-- This is where theme commands go. You can copy them in from your
+ theme of choice if they provide and example, or you can just
+ change the source path. -->
+
+ <data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc">
+ ${project}/gtkrc
+ </data>
+
+ <!-- Icon themes to copy. The "icons" property can be either of
+ "auto", "all", or "none". All or none should be
+ self-explanatory, while auto means that the script will try to
+ figure out which icons are needed. This is done by getting all
+ the strings from all copied binaries, and matching them against
+ icon names. To be safe, you should use "all". "none" is useful
+ if you want just the index.theme file but no icons, mostly
+ needed for the "hicolor" base theme.
+ >
+ <icon-theme icons="auto">
+ Tango
+ </icon-theme -->
+
+</app-bundle>
diff --git a/src/goocanvas/src/Makefile.am b/src/goocanvas/src/Makefile.am
index 9a22b86..4a9f877 100644
--- a/src/goocanvas/src/Makefile.am
+++ b/src/goocanvas/src/Makefile.am
@@ -4,8 +4,6 @@ INCLUDES = \
-DG_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
- -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
- -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DG_LOG_DOMAIN=\"GooCanvas\" \
@GCOMPRIS_CFLAGS@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]