[vlc-devel] commit: mowilla: Fix webplugin distribution on Mac OS X. (Pierre d' Herbemont )

git version control git at videolan.org
Sun Aug 10 14:43:30 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Aug 10 14:45:55 2008 +0200| [68930bbc3161c18184af873db4b495f8514c3a55] | committer: Pierre d'Herbemont 

mowilla: Fix webplugin distribution on Mac OS X.

Please test, as I don't build mozilla.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68930bbc3161c18184af873db4b495f8514c3a55
---

 Makefile.am                              |    2 +-
 projects/macosx/framework/Pre-Compile.sh |   13 ++++++----
 projects/mozilla/Makefile.am             |   38 +----------------------------
 3 files changed, 11 insertions(+), 42 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c6a9fe2..f43e120 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -472,7 +472,7 @@ VLC-release.app: vlc
 	          $(top_builddir)/VLC-release.app; \
 	rm -Rf $(top_builddir)/tmp
 	$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
-	ACTION="VLC-release.app" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/projects/macosx/framework/Pre-Compile.sh
+	PRODUCT="VLC-release.app" ACTION="release-makefile" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/projects/macosx/framework/Pre-Compile.sh
 	$(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/playlist
 	for i in $(srcdir)/share/lua/playlist/*.* ; do \
 	  $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/lua/playlist/`basename $${i}` ; \
diff --git a/projects/macosx/framework/Pre-Compile.sh b/projects/macosx/framework/Pre-Compile.sh
index b921a92..5eb6503 100644
--- a/projects/macosx/framework/Pre-Compile.sh
+++ b/projects/macosx/framework/Pre-Compile.sh
@@ -8,16 +8,15 @@ if test "${ACTION}" = ""; then
     ACTION="build"
     rm -fr ${FULL_PRODUCT_NAME}
     # Debug --
-fi
-
 # Hack to use that script with the current VLC-release.app
-if test "${ACTION}" = "VLC-release.app"; then
+elif test "${ACTION}" = "release-makefile"; then
     TARGET_BUILD_DIR="${build_dir}"
-    FULL_PRODUCT_NAME="VLC-release.app"
+    FULL_PRODUCT_NAME="${PRODUCT}"
     CONTENTS_FOLDER_PATH="${FULL_PRODUCT_NAME}/Contents/MacOS"
     VLC_BUILD_DIR="${build_dir}"
     VLC_SRC_DIR="${src_dir}"
     ACTION="build"
+    RELEASE_MAKEFILE="yes"
 fi
 
 if test "${ACTION}" = "build"; then    
@@ -98,6 +97,10 @@ if test "${ACTION}" = "build"; then
         install_library "${VLC_BUILD_DIR}/src/${prefix}vlc" "${target}" "bin" "@loader_path/lib"
         mv ${target}/vlc ${target}/VLC
         chmod +x ${target}/VLC
+    elif [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
+        install_library "${VLC_BUILD_DIR}/src/${prefix}npvlc.${suffix}" "${target}" "bin" "@loader_path/lib"
+        mv ${target}/npvlc.${suffix} "${target}/VLC Plugin.plugin"
+        chmod +x "${target}/VLC Plugin.plugin"
     fi
 
     ##########################
@@ -118,7 +121,7 @@ if test "${ACTION}" = "build"; then
     mkdir -p ${target_lib}
     mkdir -p ${target_modules}
 
-    if [ "$FULL_PRODUCT_NAME" != "VLC-release.app" ] ; then
+    if [ "$RELEASE_MAKEFILE" != "yes" ] ; then
         pushd `pwd` > /dev/null
         cd ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}
 
diff --git a/projects/mozilla/Makefile.am b/projects/mozilla/Makefile.am
index 25e0df2..9c3dfd5 100644
--- a/projects/mozilla/Makefile.am
+++ b/projects/mozilla/Makefile.am
@@ -105,47 +105,13 @@ endef
 VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES)
 	rm -Rf "$@"
 	$(INSTALL) -d "$@/Contents/MacOS/lib"
-	$(INSTALL) ".libs/npvlc.dylib" "$@/Contents/MacOS/VLC Plugin"
-	$(INSTALL) -d "$(srcdir)/$@/Contents/MacOS/lib"; \
-	install_name_tool -change "$(libdir)/libvlccore.0.dylib" \
-	    "@executable_path/lib/libvlccore.dylib" \
-	    "$@/Contents/MacOS/VLC Plugin"
-	install_name_tool -change "$(libdir)/libvlc.2.dylib" \
-	    "@executable_path/lib/libvlc.dylib" \
-	    "$@/Contents/MacOS/VLC Plugin"
-	$(INSTALL) "$(top_builddir)/src/.libs/libvlccore.0.dylib" \
-	    "$@/Contents/MacOS/lib/libvlccore.dylib"
-	$(INSTALL) "$(top_builddir)/src/.libs/libvlc.2.dylib" \
-	    "$@/Contents/MacOS/lib/libvlc.dylib"
-	install_name_tool -change "$(libdir)/libvlccore.0.dylib" \
-	    "@executable_path/lib/libvlccore.dylib" \
-	    "$@/Contents/MacOS/lib/libvlc.dylib"
-	dylib="$@/Contents/MacOS/VLC Plugin"; $(FIXEXECPATH) ;
-	dylib="$@/Contents/MacOS/lib/libvlccore.dylib"; $(FIXEXECPATH) ;
-	dylib="$@/Contents/MacOS/lib/libvlc.dylib"; $(FIXEXECPATH) ;
 	$(INSTALL) -d "$@/Contents/Resources"
 	$(INSTALL) npvlc.rsrc "$@/Contents/Resources/VLC Plugin.rsrc"
 	cp -r "$(top_srcdir)/extras/package/macosx/plugin/English.lproj" "$@/Contents/Resources/"
 	cp -r "$(top_builddir)/extras/package/macosx/plugin/English.lproj" "$@/Contents/Resources/"
 	$(INSTALL) "$(top_builddir)/extras/package/macosx/plugin/Info.plist" "$@/Contents/Info.plist"
-	$(INSTALL) -d "$@/Contents/MacOS/modules"
-	find $(top_srcdir)/modules/ -name '*_plugin.$(LIBEXT)' | \
-	while read i; do \
-	  if test -n "$$i" ; then \
-	    dylib="$@/Contents/MacOS/modules/`basename $$i`"; \
-	    $(INSTALL) "$$i" "$$dylib"; \
-	    install_name_tool -change "$(libdir)/libvlccore.0.dylib" \
-	        "@executable_path/lib/libvlccore.dylib" "$$dylib"; \
-	    $(FIXEXECPATH) ; \
-	  fi ; \
-	done
-	if test -d $(top_srcdir)/extras/contrib/vlc-lib; then \
-	  for i in $(top_srcdir)/extras/contrib/vlc-lib/*.dylib ; do \
-	    dylib="$@/Contents/MacOS/lib/`basename $${i}`" ; \
-	    $(INSTALL) -m 644 "$${i}" "$$dylib" ; \
-	    $(FIXEXECPATH); \
-	  done ; \
-	fi
+   ACTION="release-makefile" PRODUCT="VLC Plugin.plugin" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/projects/macosx/framework/Pre-Compile.sh
+
 # uncomment if dependencies on XPCOM libs is sought
 #	if test -d "$(MOZILLA_SDK_PATH)/lib"; then \
 #	  for i in "$(MOZILLA_SDK_PATH)"/lib/*.dylib ; do \




More information about the vlc-devel mailing list