diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Makefile.am | 11 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | src/gcompris/gcompris-nsbundle.m | 2 |
4 files changed, 22 insertions, 6 deletions
@@ -1,3 +1,12 @@ +2007-03-22 Yves Combe <yves@ycombe.net> + + reloc gtk libs in osx bundle. + TODO: fix in GNUstep case. + + * Makefile.am: + * configure.in: + * src/gcompris/gcompris-nsbundle.m: + 2007-03-20 Yves Combe <yves@ycombe.net> Small correction diff --git a/Makefile.am b/Makefile.am index 654f3e9..f12afbd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,17 +101,20 @@ BUNDLE_EXEC_DIR=$(BUNDLE_APPDIR) endif if WITH_NSBUNDLE -nsbundle: +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) -# check info.plist instead. + for f in $$(otool -L $(BUNDLE_EXEC_DIR)/$(BUNDLE_NAME) | grep $(prefix) | sed -e 's,^.*$(prefix)/\(.*.dylib\).*$$,\1,' ); do \ + ls -L $(prefix)/$$f; \ + cp -Lv $(prefix)/$$f $(BUNDLE_EXEC_DIR)/$(NSBUNDLE_GTK_DIR)/$f ;\ + install_name_tool -change $(prefix)/$$f @executable_path/$(NSBUNDLE_GTK_DIR)/$$f $(BUNDLE_EXEC_DIR)/$(BUNDLE_NAME) ; \ + done; endif diff --git a/configure.in b/configure.in index eb4d081..81595ff 100644 --- a/configure.in +++ b/configure.in @@ -59,6 +59,7 @@ AC_ARG_ENABLE(nsbundle, NSBUNDLE_CPPFLAGS= NSBUNDLE_LDFLAGS= +NSBUNDLE_GTK_DIR= #check header for nsbundle if test "x$nsbundle" = "xyes"; then @@ -71,6 +72,7 @@ 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 " AC_LANG_POP([Objective C]) else @@ -85,7 +87,8 @@ if test "x$nsbundle" = "xyes"; then fi CPPFLAGS="$saved_CPPFLAGS" NSBUNDLE_CPPFLAGS=" -I$GNUSTEP_SYSTEM_ROOT/Library/Headers " - NSBUNDLE_LDFLAGS="-rdynamic -fgnu-runtime -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lgnustep-base" + NSBUNDLE_GTK_DIR="GTK" + NSBUNDLE_LDFLAGS="-rdynamic -fgnu-runtime -L$GNUSTEP_SYSTEM_ROOT/Library/Libraries -lgnustep-base -Wl,-rpath=\\\$\$ORIGIN/$NSBUNDLE_GTK_DIR " AC_LANG_POP([Objective C]) fi AC_DEFINE_UNQUOTED(NSBUNDLE, 1, [ Define to 1 to use NSBundle for relocation (OSX/GNUstep) ]) @@ -98,6 +101,7 @@ _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 diff --git a/src/gcompris/gcompris-nsbundle.m b/src/gcompris/gcompris-nsbundle.m index 9b0550d..f4df908 100644 --- a/src/gcompris/gcompris-nsbundle.m +++ b/src/gcompris/gcompris-nsbundle.m @@ -12,7 +12,7 @@ gchar *gcompris_nsbundle_resource(void) printf("NSBundle resourcePath %s\n", resourcePath); - RELEASE(pool); + [pool release]; return resourcePath; #else return NULL; |