Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Combe <ycombe@src.gnome.org>2007-03-22 13:02:00 (GMT)
committer Yves Combe <ycombe@src.gnome.org>2007-03-22 13:02:00 (GMT)
commit5aab6396aee5dc1e7059726c77a679bbfbb4ebdd (patch)
treeba18b88ca47e805b826b88cbf4c53b4071ec31c5
parentb17ea5076d4bf734ac53ad699ba47de4ff94b724 (diff)
reloc gtk libs for osx bundle. TODO: fix for no osx.
svn path=/trunk/; revision=2536
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.am11
-rw-r--r--configure.in6
-rw-r--r--src/gcompris/gcompris-nsbundle.m2
4 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 07f0f47..9f9f2ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;