[gcompris/gcomprixogoo] Cleanup, removed old way of doing MacOSX Bundles.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Cleanup, removed old way of doing MacOSX Bundles.
- Date: Thu, 1 Apr 2010 23:20:52 +0000 (UTC)
commit 93dd0828b390e5d9d15a89667e3b3a5ac944b0fa
Author: Bruno Coudoin <bruno ordinateur-de-bruno-coudoin local>
Date: Tue Mar 30 02:19:08 2010 +0200
Cleanup, removed old way of doing MacOSX Bundles.
Makefile.am | 113 ----------------------
configure.ac | 23 +----
src/gcompris/gcompris-nsbundle.h | 1 -
src/gcompris/gcompris-nsbundle.m | 196 --------------------------------------
src/gcompris/gcompris.c | 25 +----
5 files changed, 8 insertions(+), 350 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6801f54..f5d18bf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -96,116 +96,3 @@ all-local:
ACLOCAL_AMFLAGS = -I m4
-
-if OS_MACOSX
-BUNDLE_RESOURCES_DIR=$(BUNDLE_APPDIR)/Contents/Resources
-BUNDLE_EXEC_DIR=$(BUNDLE_APPDIR)/Contents/MacOS
-else
-BUNDLE_RESOURCES_DIR=$(BUNDLE_APPDIR)/Resources
-BUNDLE_EXEC_DIR=$(BUNDLE_APPDIR)
-endif
-
-if WITH_NSBUNDLE
-
-ETC_PANGO=etc/pango
-ETC_GTK=etc/gtk-2.0
-GTK_CONF_FILES=gtk.immodules gdk-pixbuf.loaders im-multipress.conf
-PANGO_CONF_FILES=pango.modules
-FONTCONFIG_PATH=etc/fonts
-GTK_MODULES_PATH=lib/gtk-2.0
-PANGO_MODULES_PATH=lib/pango
-EXTERN_BIN= gnuchess gnucap
-PYTHON_MODULES_PATH_ORIG=lib/python$(PYTHON_VERSION)
-PYTHON_MODULES_PATH_DEST=lib/python
-PLIST=Info.plist
-ICON=gcompris.png
-
-FCT_CP_TAR=function cp_tar { \
- $(INSTALL) -d $$2 ; \
- (cd $$1 ; tar cf - $$3 * )| ( cd $$2; tar xf -) ; \
- }
-
-FCT_LDD_CP=function ldd_cp { \
- for f in $$(ldd $$1 | grep $$2 | eval "sed -e 's,^.*$$2/\(.*\) (.*$$,\1,' " ); do \
- if test ! -f $$3/$$f ; then \
- echo $(INSTALL_D) $$2/$$f $$3/$$f ; \
- $(INSTALL_D) $$2/$$f $$3/$$f ;\
- ldd_cp $$3/$$f $$2 $$3;\
- fi \
- done ; }
-
-FCT_OTOOL_CP=function otool_cp { \
- for f in $$(otool -L $$1 | grep $$2 | eval "sed -e 's,^.*$$2/\(.*.dylib\).*$$,\1,' " ); do \
- echo install_name_tool -change $$2/$$f @executable_path$$4/$$f $$1;\
- install_name_tool -change $$2/$$f @executable_path$$4/$$f $$1 ; \
- if test ! -f $$3/$$f ; then \
- echo "$(INSTALL) -d $$(dirname $$3/$$f)"; \
- echo "$(INSTALL) $$2/$$f $$3/$$f "; \
- $(INSTALL) -d $$(dirname $$3/$$f); \
- $(INSTALL) $$2/$$f $$3/$$f ;\
- echo "install_name_tool -id @executable_path$$4/$$f $$3/$$f";\
- install_name_tool -id @executable_path$$4/$$f $$3/$$f;\
- otool_cp $$3/$$f $$2 $$3 $$4 ;\
- fi \
- done; \
- }
-
-if OS_MACOSX
-INSTALL_D=function install_d { $(INSTALL) -d $$(dirname $$2); $(INSTALL) $$1 $$2 ;}; install_d
-else
-INSTALL_D=$(INSTALL) -D
-endif
-
-nsbundle:
- $(INSTALL) -d $(BUNDLE_RESOURCES_DIR)
- $(INSTALL) -d $(BUNDLE_EXEC_DIR)
- $(INSTALL) -d $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)
- make install prefix=$(BUNDLE_RESOURCES_DIR) \
- exec_prefix=$(BUNDLE_RESOURCES_DIR) \
- bindir=$(BUNDLE_EXEC_DIR) \
- PYTHON_PLUGIN_DIR=$(BUNDLE_RESOURCES_DIR)/share/gcompris/python
- mv $(BUNDLE_EXEC_DIR)/gcompris $(BUNDLE_EXEC_DIR)/$(BUNDLE_NAME)
-if OS_MACOSX
- $(FCT_OTOOL_CP); otool_cp $(BUNDLE_EXEC_DIR)/$(BUNDLE_NAME) $(prefix) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR) $(NSBUNDLE_GTK_DIR)
-else
- $(FCT_LDD_CP); ldd_cp $(BUNDLE_EXEC_DIR)/$(BUNDLE_NAME) $(prefix) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)
-endif
- $(INSTALL) -d $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(ETC_GTK)
-#sed -e 's,$(prefix),@{prefix},g' $(prefix)/$(ETC_PANGO)/pangorc > $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(ETC_PANGO)/pangord
- for f in $(GTK_CONF_FILES); do\
- sed -e 's,$(prefix),@{prefix},g' $(prefix)/$(ETC_GTK)/$$f > $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(ETC_GTK)/$$f ;\
- done
- $(INSTALL) -d $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(ETC_PANGO)
- for f in $(PANGO_CONF_FILES); do\
- sed -e 's,$(prefix),@{prefix},g' $(prefix)/$(ETC_PANGO)/$$f > $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(ETC_PANGO)/$$f ;\
- done
- $(INSTALL) $(top_srcdir)/macosx/pangorc $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(ETC_PANGO)/pangorc
- $(INSTALL) -d $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(FONTCONFIG_PATH)
- $(FCT_CP_TAR); cp_tar $(prefix)/$(FONTCONFIG_PATH) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(FONTCONFIG_PATH)
- $(INSTALL) macosx/fonts.conf $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(FONTCONFIG_PATH)
- $(FCT_CP_TAR); cp_tar $(prefix)/$(GTK_MODULES_PATH) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(GTK_MODULES_PATH) "--exclude include"
- $(FCT_CP_TAR); cp_tar $(prefix)/$(PANGO_MODULES_PATH) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(PANGO_MODULES_PATH)
- $(FCT_CP_TAR); cp_tar $(prefix)/$(PYTHON_MODULES_PATH_ORIG) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/$(PYTHON_MODULES_PATH_DEST)
- for f in $(EXTERN_BIN); do \
- $(INSTALL_D) $(prefix)/bin/$$f $(BUNDLE_RESOURCES_DIR)/bin/$$f; \
- done
-if OS_MACOSX
- $(INSTALL) $(top_srcdir)/macosx/Info.plist $(BUNDLE_RESOURCES_DIR)/../
- $(INSTALL) $(top_srcdir)/macosx/PkgInfo $(BUNDLE_RESOURCES_DIR)/../
- $(INSTALL) $(top_srcdir)/macosx/GCompris.icns $(BUNDLE_RESOURCES_DIR)/
- $(FCT_OTOOL_CP) ; for s in $$(find $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR)/ -name '*.so') ; do \
- otool_cp $$s $(prefix) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR) $(NSBUNDLE_GTK_DIR) ; \
- done
- $(FCT_OTOOL_CP) ; for s in $$(find $(BUNDLE_RESOURCES_DIR) -name '*.so') ; do \
- otool_cp $$s $(prefix) $(BUNDLE_EXEC_DIR)$(NSBUNDLE_GTK_DIR) $(NSBUNDLE_GTK_DIR) ; \
- done
- echo WARNING ! I suppose SDL Framewroks installed in /Library/Frameworks
- $(FCT_CP_TAR); cp_tar /Library/Frameworks/SDL.framework $(BUNDLE_EXEC_DIR)/../Frameworks/SDL.framework
- $(FCT_CP_TAR); cp_tar /Library/Frameworks/SDL_mixer.framework $(BUNDLE_EXEC_DIR)/../Frameworks/SDL_mixer.framework
-else
- $(INSTALL) $(top_srcdir)/macosx/gcompris.png $(BUNDLE_RESOURCES_DIR)/
- $(INSTALL) $(top_srcdir)/macosx/Info-gnustep.plist $(BUNDLE_RESOURCES_DIR)/
-endif
-
-endif
-
diff --git a/configure.ac b/configure.ac
index f8e45f7..29dbd22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,10 +87,6 @@ AC_ARG_ENABLE(nsbundle,
[Turn on nsbundle packaging (needs Cocoa/GNUstep)]),
nsbundle="$enableval", nsbundle="no")
-NSBUNDLE_CPPFLAGS=
-NSBUNDLE_LDFLAGS=
-NSBUNDLE_GTK_DIR=
-
#check header for nsbundle
if test "x$nsbundle" = "xyes"; then
AC_PROG_OBJC([gcc])
@@ -102,8 +98,6 @@ if test "x$nsbundle" = "xyes"; then
if test "x$NSFoundation" = "x$no"; then
AC_MSG_ERROR([You need development tools to use nsbundle. Make sure XCode is installed." ])
fi
- NSBUNDLE_GTK_DIR="/../GTK"
- NSBUNDLE_LDFLAGS="-framework Cocoa "
OBJCFLAGS="$OBJCFLAGS $CFLAGS"
AC_LANG_POP([Objective C])
@@ -119,35 +113,22 @@ if test "x$nsbundle" = "xyes"; then
fi
CPPFLAGS="$saved_CPPFLAGS"
OBJCFLAGS="$OBJCFLAGS $CFLAGS -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fconstant-string-class=NSConstantString -I$GNUSTEP_SYSTEM_ROOT/Library/Headers "
- NSBUNDLE_GTK_DIR="/GTK"
- NSBUNDLE_LDFLAGS="-rdynamic -fgnu-runtime -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lgnustep-base -lgnustep-gui -Wl,-rpath=\\\$\$ORIGIN/$NSBUNDLE_GTK_DIR/lib "
AC_LANG_POP([Objective C])
fi
- AC_DEFINE_UNQUOTED(NSBUNDLE, 1, [ Define to 1 to use NSBundle for relocation (OSX/GNUstep) ])
- AC_DEFINE_UNQUOTED(NSBUNDLE_GTK_DIR, "$NSBUNDLE_GTK_DIR", [ Define to 1 to use NSBundle for relocation (OSX/GNUstep) ])
else
-OBJC=$CC
-AC_SUBST(OBJC)
+ OBJC=$CC
+ AC_SUBST(OBJC)
fi
_AM_DEPENDENCIES([OBJC])
-AC_SUBST(NSBUNDLE_CPPFLAGS)
-AC_SUBST(NSBUNDLE_LDFLAGS)
-AC_SUBST(NSBUNDLE_GTK_DIR)
-
-# Todo: add a AC_ARG_WITH to allow change.
bundlename=GCompris
-
-
nsbundledir=$(pwd)"/$bundlename.app"
BUNDLE_APPDIR="$nsbundledir"
BUNDLE_NAME="$bundlename"
AC_SUBST(BUNDLE_APPDIR)
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
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 9893a52..8dedbbf 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -28,7 +28,7 @@
#ifdef WIN32
// WIN32
-#elif NSBUNDLE
+#elif MAC_INTEGRATION
// MACOSX
#else
#include <X11/Xlib.h>
@@ -53,11 +53,6 @@
#include "binreloc.h"
-/* for NSBUNDLE */
-#ifdef NSBUNDLE
-//#include "gcompris-nsbundle.h"
-#endif
-
/* get the default database name */
#define DEFAULT_DATABASE "gcompris_sqlite.db"
@@ -77,7 +72,7 @@ gchar * exec_prefix = NULL;
static void quit_cb (GtkWidget *widget, gpointer data);
static void map_cb (GtkWidget *widget, gpointer data);
#ifdef WIN32
-#elif NSBUNDLE
+#elif MAC_INTEGRATION
#else
static gboolean _realize_callback (GtkWidget *widget, GdkEventExpose *event,
gpointer data);
@@ -650,7 +645,7 @@ gc_set_default_background(GooCanvasItem *parent)
* Sugar requires properties to be set before the windows is realized
*/
#ifdef WIN32
-#elif NSBUNDLE
+#elif MAC_INTEGRATION
#else
static gboolean
_realize_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
@@ -817,7 +812,7 @@ static void setup_window ()
gtk_window_set_default_size(GTK_WINDOW(window), BOARDWIDTH, BOARDHEIGHT);
gtk_window_set_wmclass(GTK_WINDOW(window), "gcompris", "GCompris");
#ifdef WIN32
-#elif NSBUNDLE
+#elif MAC_INTEGRATION
#else
g_signal_connect (GTK_OBJECT (window), "realize",
G_CALLBACK (_realize_callback), NULL);
@@ -1098,8 +1093,8 @@ void gc_fullscreen_set(gboolean state)
// WARNING: Doing this is required on Windows
// but keep the window hidden on GNU/Linux
gtk_widget_hide ( window );
-#elif NSBUNDLE
- // WARNING: Doing this is required on Windows
+#elif MAC_INTEGRATION
+ // WARNING: Doing this is required on MacOSX
// but keep the window hidden on GNU/Linux
gtk_widget_hide ( window );
#else
@@ -1115,7 +1110,6 @@ void gc_fullscreen_set(gboolean state)
gtk_window_move ( GTK_WINDOW ( window ), 0, 0 );
GdkScreen *screen = gtk_window_get_screen ( GTK_WINDOW ( window ) );
- printf("%d // %d\n", gdk_screen_get_width (screen), gdk_screen_get_height (screen) );
gtk_window_resize ( GTK_WINDOW ( window ),
gdk_screen_get_width (screen),
gdk_screen_get_height (screen) );
@@ -1234,14 +1228,7 @@ static void load_properties ()
g_error_free (error);
}
- /* usefull for OSX bundle app */
- /* FIXME exec_prefix should be put in properties */
- /* usefull for OSX bundle app */
- //#ifdef NSBUNDLE
- // exec_prefix = gcompris_nsbundle_resource ();
- //#else
exec_prefix = gbr_find_exe_dir(NULL);
- //#endif
g_warning("exec_prefix %s\n", (exec_prefix==NULL ? "NONE" : exec_prefix));
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]