]> git.sesse.net Git - vlc/commitdiff
macosx: really fixed packaging of the Mozilla/Safari plugin
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 4 Feb 2009 22:41:02 +0000 (23:41 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 4 Feb 2009 22:42:24 +0000 (23:42 +0100)
Note that it will try to use the X11 vout right now, so you won't get any visible video output

projects/macosx/framework/Pre-Compile.sh
projects/mozilla/Makefile.am
projects/mozilla/vlcplugin.cpp

index 27dd6c8b5f11682eae3c94283d8f6e1e4b431e99..48e4a6e66caba01560f819487d2e07fca8c3cacf 100644 (file)
@@ -10,8 +10,14 @@ if test "${ACTION}" = ""; then
     # Debug --
 # Hack to use that script with the current VLC-release.app
 elif test "${ACTION}" = "release-makefile"; then
-    TARGET_BUILD_DIR="${build_dir}"
+    echo "running Pre-Compile.sh in release-makefile mode"
+
     FULL_PRODUCT_NAME="${PRODUCT}"
+    if [ "$FULL_PRODUCT_NAME" = "VLC-Plugin.plugin" ] ; then
+        TARGET_BUILD_DIR="${src_dir}"
+    else
+        TARGET_BUILD_DIR="${build_dir}"
+    fi
     CONTENTS_FOLDER_PATH="${FULL_PRODUCT_NAME}/Contents/MacOS"
     VLC_BUILD_DIR="${build_dir}"
     VLC_SRC_DIR="${src_dir}"
@@ -97,10 +103,10 @@ if test "${ACTION}" = "build"; then
         install_library "${VLC_BUILD_DIR}/bin/${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"
+#    elif [ "$FULL_PRODUCT_NAME" = "VLC-Plugin.plugin" ] ; then
+#        install_library "${VLC_BUILD_DIR}/projects/mozilla/.libs/${prefix}npvlc.${suffix}" "${target}" "bin" "@loader_path/lib"
+#        mv ${target}/npvlc.${suffix} "${target}/VLC\ Plugin"
+#        chmod +x "${target}/VLC\ Plugin"
     fi
 
     ##########################
@@ -150,15 +156,24 @@ if test "${ACTION}" = "build"; then
 
     ##########################
     # Build the share folder
-    echo "Building share folder..."
-    pbxcp="/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -resolve-src-symlinks"
-    mkdir -p ${target_share}
-    $pbxcp ${VLC_SRC_DIR}/share/lua ${target_share}
+    if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
+        echo "Building share folder..."
+        pbxcp="/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -resolve-src-symlinks"
+        mkdir -p ${target_share}
+        $pbxcp ${VLC_SRC_DIR}/share/lua ${target_share}
+    else
+        echo "Share folder not needed for this product"
+    fi 
+    
 
     ##########################
     # Exporting headers
-    echo "Exporting headers..."
-    mkdir -p ${target_include}/vlc
-    $pbxcp ${VLC_SRC_DIR}/include/vlc/*.h ${target_include}/vlc
+    if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
+        echo "Exporting headers..."
+        mkdir -p ${target_include}/vlc
+        $pbxcp ${VLC_SRC_DIR}/include/vlc/*.h ${target_include}/vlc
+    else
+        echo "Headers not needed for this product"
+    fi
 
 fi
index 3c9720f1803a870f99e74378b29d7e74c34788a4..6f1bab8b9180aa2fab50f3fa8843128d976dd0d1 100644 (file)
@@ -104,15 +104,16 @@ endef
 
 VLC\ Plugin.plugin: npvlc.rsrc $(lib_LTLIBRARIES)
        rm -Rf "$@"
-       $(INSTALL) -d "$@/Contents/MacOS/lib"
-       $(INSTALL) -d "$@/Contents/Resources"
-       $(INSTALL) .libs/npvlc.dylib "$@/Contents/MacOS/VLC Plugin"
-       dylib="$@/Contents/MacOS/VLC Plugin"; $(FIXEXECPATH);
-       $(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"
-   ACTION="release-makefile" PRODUCT="VLC Plugin.plugin" src_dir=$(srcdir) build_dir=$(top_builddir) sh $(srcdir)/projects/macosx/framework/Pre-Compile.sh
+       $(INSTALL) -d "VLC-Plugin.plugin/Contents/MacOS/lib"
+       $(INSTALL) -d "VLC-Plugin.plugin/Contents/Resources"
+       ACTION="release-makefile" PRODUCT="VLC-Plugin.plugin" src_dir=$(srcdir) build_dir=$(top_builddir) sh ../macosx/framework/Pre-Compile.sh
+       $(INSTALL) .libs/npvlc.dylib "VLC-Plugin.plugin/Contents/MacOS/VLC Plugin"
+       dylib="VLC-Plugin.plugin/Contents/MacOS/VLC Plugin"; $(FIXEXECPATH);
+       $(INSTALL) npvlc.rsrc "VLC-Plugin.plugin/Contents/Resources/VLC Plugin.rsrc"
+       cp -r "$(top_srcdir)/extras/package/macosx/plugin/English.lproj" "VLC-Plugin.plugin/Contents/Resources/"
+       cp -r "$(top_builddir)/extras/package/macosx/plugin/English.lproj" "VLC-Plugin.plugin/Contents/Resources/"
+       $(INSTALL) "$(top_builddir)/extras/package/macosx/plugin/Info.plist" "VLC-Plugin.plugin/Contents/Info.plist"
+       mv "VLC-Plugin.plugin" "VLC Plugin.plugin"
 
 # uncomment if dependencies on XPCOM libs is sought
 #      if test -d "$(MOZILLA_SDK_PATH)/lib"; then \
index ec52f29917a82f73f3f26e3d558e8dd761af82c3..239684ddfe20e5c0563b11616a96f94041f099cf 100644 (file)
@@ -87,9 +87,8 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
 
     /* locate VLC module path */
 #ifdef XP_MACOSX
-    ppsz_argv[ppsz_argc++] = "--plugin-path";
-    ppsz_argv[ppsz_argc++] = "/Library/Internet Plug-Ins/VLC Plugin.plugin/"
-                             "Contents/MacOS/modules";
+    ppsz_argv[ppsz_argc++] = "--plugin-path=/Library/Internet\\ Plug-Ins/VLC\\ Plugin.plugin/Contents/MacOS/modules";
+    ppsz_argv[ppsz_argc++] = "--vout=macosx";
 #elif defined(XP_WIN)
     HKEY h_key;
     DWORD i_type, i_data = MAX_PATH + 1;
@@ -118,8 +117,7 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
     ppsz_argv[ppsz_argc++] = "--no-stats";
     ppsz_argv[ppsz_argc++] = "--no-media-library";
     ppsz_argv[ppsz_argc++] = "--ignore-config";
-    ppsz_argv[ppsz_argc++] = "--intf";
-    ppsz_argv[ppsz_argc++] = "dummy";
+    ppsz_argv[ppsz_argc++] = "--intf=dummy";
 
     const char *progid = NULL;