[vlc-devel] [PATCH] Fix mozilla packaging for windows

Rafaël Carré rafael.carre at gmail.com
Tue Oct 12 22:41:58 CEST 2010


build-npapi is a dep of package-win32-base-exe and not
package-win-common, because i don't think the mozilla plugin builds for
windows CE

Assumes we always want to build & package mozilla plugin
---
 Makefile.am                           |   18 +++++++++---------
 extras/package/npapi.am               |    5 ++++-
 extras/package/win32/vlc.win32.nsi.in |    5 +----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index b7404af..56fe4aa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -796,7 +796,6 @@ if BUILD_OSDMENU
 		rm -f -- "$$file.tmp"; \
 	done
 endif
-	cp $(top_srcdir)/extras/mozilla/src/npvlc.dll.manifest $(win32_destdir)
 if BUILD_ACTIVEX
 	cp $(top_srcdir)/projects/activex/axvlc.dll.manifest $(win32_destdir)
 endif
@@ -820,7 +819,6 @@ if USE_PEFLAGS
 	find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -print -o -name '*$(EXEEXT)' -print \) -exec $(PEFLAGS) --dynamicbase=true --nxcompat=true {} \;
 endif
 
-# 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 \
@@ -831,26 +829,28 @@ package-win-base: package-win-common
 	  fi ; \
 	done
 
-package-win32-webplugin-common: package-win-base build-win-npapi
+package-win32-webplugin-common: package-win-base build-npapi
 	mkdir -p "$(win32_xpi_destdir)/plugins"
 	find $(destdir) -maxdepth 4 -name "*$(LIBEXT)" -exec cp {} "$(win32_xpi_destdir)/" \;
-	cp $(top_srcdir)/extras/mozilla/src/npvlc.dll.manifest "$(win32_xpi_destdir)/plugins"
+	cp $(top_srcdir)/npapi-vlc/src/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)/extras/mozilla/src/install.rdf "$(win32_xpi_destdir)"
+package-win32-xpi: package-win32-webplugin-common build-npapi
+	cp $(top_builddir)/npapi-vlc/src/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)/extras/mozilla/src/manifest.json "$(win32_xpi_destdir)"
+package-win32-crx: package-win32-webplugin-common build-npapi
+	cp $(top_builddir)/npapi-vlc/src/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
+package-win32-base-exe: package-win-base build-npapi
 # Script installer
+	cp "$(top_builddir)/npapi-vlc/installed/lib/npvlc.dll" "$(win32_destdir)/"
+	cp "$(top_builddir)/npapi-vlc/src/npvlc.dll.manifest" "$(win32_destdir)/"
 	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"
diff --git a/extras/package/npapi.am b/extras/package/npapi.am
index 26900d7..ea2cced 100644
--- a/extras/package/npapi.am
+++ b/extras/package/npapi.am
@@ -16,6 +16,7 @@ stamp-npapi-autogen: stamp-npapi-fetch
 stamp-npapi-configure: stamp-npapi-autogen
 	cd npapi-vlc && \
 	$(SHELL) ./configure \
+		--prefix=/ \
 		--host=$(host_alias) --build=$(build_alias) \
 		--with-mozilla-sdk-path="../$(srcdir)/extras/contrib/hosts/$(host_alias)/gecko-sdk" \
 		CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" \
@@ -27,4 +28,6 @@ stamp-npapi-configure: stamp-npapi-autogen
 
 stamp-npapi-build: stamp-npapi-configure
 	cd npapi-vlc && \
-	$(MAKE) $(MAKEFLAGS) all
+	$(MAKE) $(MAKEFLAGS) all && \
+	$(MAKE) $(MAKEFLAGS) DESTDIR="$(abs_builddir)/npapi-vlc/installed" install
+	touch $@
diff --git a/extras/package/win32/vlc.win32.nsi.in b/extras/package/win32/vlc.win32.nsi.in
index 3b24f8e..2128624 100644
--- a/extras/package/win32/vlc.win32.nsi.in
+++ b/extras/package/win32/vlc.win32.nsi.in
@@ -21,7 +21,6 @@
 !define MUI_LANGDLL_REGISTRY_VALUENAME "Language"
 
 @BUILD_ACTIVEX_TRUE@ !define INSTALL_ACTIVEX
- at BUILD_MOZILLA_TRUE@ !define INSTALL_MOZILLA
 
 @FILE_LIBVLCCORE_DLL@
 @FILE_LIBVLC_DLL@
@@ -601,7 +600,6 @@ Section $Name_Section02b SEC02b
     "$INSTDIR\vlc.exe" ""
 SectionEnd
 
-!ifdef INSTALL_MOZILLA
 Section /o $Name_Section03 SEC03
   SectionIn 3
 
@@ -618,7 +616,6 @@ Section /o $Name_Section03 SEC03
   WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
   WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
 SectionEnd
-!endif
 
 !ifdef INSTALL_ACTIVEX
 Section $Name_Section04 SEC04
@@ -753,7 +750,7 @@ SectionEnd
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
- at BUILD_MOZILLA_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
+  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
 @BUILD_ACTIVEX_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
   !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
-- 
1.7.3.1





More information about the vlc-devel mailing list