-#strip all plugins dll
-package-win32-base: package-win-common-strip
- for i in "" $(win32_destdir)/plugins/*$(LIBEXT) ; \
- do if test -n "$$i" ; then \
- $(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \
- $(OBJCOPY) --strip-debug "$$i" ; \
- $(OBJCOPY) --add-gnu-debuglink="$$i.dbg" "$$i" ; \
- mv "$$i.dbg" "$(win32_debugdir)"; \
- fi ; done
-
-package-win32-base-exe: package-win32-base
+# Strip DLLs
+package-win-base: package-win-common
+ find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -or -name '*$(EXEEXT)' \) | while read i; \
+ do if test -n "$$i" ; then \
+ $(OBJCOPY) --only-keep-debug "$$i" "$$i.dbg"; \
+ $(OBJCOPY) --strip-all "$$i" ; \
+ $(OBJCOPY) --add-gnu-debuglink="$$i.dbg" "$$i" ; \
+ mv "$$i.dbg" "$(win32_debugdir)"; \
+ fi ; \
+ done
+
+package-win32-webplugin-common: package-win-base
+ mkdir -p "$(win32_xpi_destdir)/plugins"
+ find $(destdir) -maxdepth 4 -name "*$(LIBEXT)" -exec cp {} "$(win32_xpi_destdir)/" \;
+ cp $(top_srcdir)/projects/mozilla/npvlc.dll.manifest "$(win32_xpi_destdir)/plugins"
+ cp "$(top_srcdir)/extras/package/win32/libvlc.dll.manifest" "$(win32_xpi_destdir)/plugins"
+ cp -r $(win32_destdir)/plugins/ "$(win32_xpi_destdir)/plugins"
+ rm -rf "$(win32_xpi_destdir)/plugins/plugins/*qt*"
+ rm -rf "$(win32_xpi_destdir)/plugins/plugins/*skins*"
+
+package-win32-xpi: package-win32-webplugin-common
+ cp $(top_builddir)/projects/mozilla/install.rdf "$(win32_xpi_destdir)"
+ cd $(win32_xpi_destdir) && zip -r "../vlc-$(VERSION).xpi" install.rdf plugins
+
+package-win32-crx: package-win32-webplugin-common
+ cp $(top_builddir)/projects/mozilla/manifest.json "$(win32_xpi_destdir)"
+ crxmake --pack-extension "$(win32_xpi_destdir)" \
+ --extension-output "$(win32_destdir)/vlc-$(VERSION).crx" --ignore-file install.rdf
+
+package-win32-base-exe: package-win-base
+# Script installer
+ cp "$(top_builddir)/extras/package/win32/vlc.win32.nsi" "$(win32_destdir)/"
+ cp "$(top_builddir)/extras/package/win32/spad.nsi" "$(win32_destdir)/"
+ mkdir "$(win32_destdir)/languages"
+ cp $(srcdir)/extras/package/win32/languages/*.nsh "$(win32_destdir)/languages/"
+# Copy the UAC NSIS plugin
+ mkdir -p "$(win32_destdir)/NSIS"
+ cp "$(top_srcdir)/extras/package/win32/UAC.nsh" "$(win32_destdir)/NSIS"
+ cp "$(top_srcdir)/extras/package/win32/UAC.dll" "$(win32_destdir)/NSIS"
+