-
-# XXX: this rule is probably only useful to you if you have exactly
-# the same setup as the maintaner(s).
-#
-
-############################################################################
-## Win ##
-############################################################################
-destdir=$(prefix)
-win32_destdir=$(top_builddir)/vlc-$(VERSION)
-win32_debugdir=$(top_builddir)/symbols-$(VERSION)
-win32_xpi_destdir=$(win32_destdir)/vlc-plugin
-
-if HAVE_WIN64
-build-npapi:
- touch $@
-
-build-activex:
- touch $@
-else
-if HAVE_WINCE
-build-npapi:
- touch $@
-
-build-activex:
- touch $@
-else
-if HAVE_WIN32
-include extras/package/npapi.am
-include extras/package/activex.am
-endif
-endif
-endif
-
-#Win-common is for win32 and wince
-package-win-common: install build-npapi build-activex
-# Check that tmp isn't in the way
- @if test -e "$(win32_destdir)"; then \
- echo "Error: please remove $(win32_destdir), it is in the way"; \
- false; \
- elif test -e "$(win32_debugdir)"; then \
- echo "Error: please remove $(win32_debugdir), it is in the way"; \
- false; \
- else \
- echo "Debug dir OK."; mkdir -p "$(win32_debugdir)"; \
- echo "Dest dir OK."; mkdir -p "$(win32_destdir)"; \
- fi
-
-# Executables, major libs+manifests
- find $(destdir) -maxdepth 4 \( -name "*$(LIBEXT)" -o -name "*$(EXEEXT)" \) -exec cp {} "$(win32_destdir)/" \;
- for file in $(top_srcdir)/extras/package/win32/vlc$(EXEEXT).manifest \
- $(top_srcdir)/extras/package/win32/libvlc$(LIBEXT).manifest; \
- do cp $$file "$(win32_destdir)/" ; done;
-
-# Text files and clean them
- for file in AUTHORS THANKS ; \
- do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(win32_destdir)/$${file}.txt" ; done;
- for file in NEWS COPYING README; \
- do cp "$(srcdir)/$$file" "$(win32_destdir)/$${file}.txt"; done
-
-# Necessary icon
- cp $(srcdir)/share/icons/vlc.ico $(win32_destdir)
-
-# Locales
- -cp -r $(destdir)/share/locale $(win32_destdir)
-
-# Plugins
- cp -r $(destdir)/lib/vlc/plugins $(win32_destdir)
-
-if BUILD_LUA
- mkdir -p $(win32_destdir)/lua
- cp -r $(destdir)/lib/vlc/lua/* $(win32_destdir)/lua
- cp -r $(destdir)/share/vlc/lua/* $(win32_destdir)/lua
-endif
-
-if BUILD_SKINS
- cp -r $(destdir)/share/vlc/skins2 $(win32_destdir)/skins
-endif
-if BUILD_OSDMENU
- cp -r $(destdir)/share/vlc/osdmenu "$(win32_destdir)/osdmenu"
- for file in $(win32_destdir)/osdmenu/*.cfg; do \
- sed 's%share/osdmenu%osdmenu%g' "$$file" > "$$file.tmp" || exit $$? ; \
- sed 's%/%\\%g' "$$file.tmp" > "$$file" || exit$$? ; \
- rm -f -- "$$file.tmp"; \
- done
-endif
-if !HAVE_WIN64
-if !HAVE_WINCE
- cp "$(top_builddir)/activex-vlc/src/axvlc.dll.manifest" "$(win32_destdir)/"
- cp "$(top_builddir)/activex-vlc/installed/lib/axvlc.dll" "$(win32_destdir)/"
- cp "$(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest" "$(win32_destdir)/"
- cp "$(top_builddir)/npapi-vlc/installed/lib/npvlc.dll" "$(win32_destdir)/"
-endif
-endif
-
-# SDK
- mkdir -p "$(win32_destdir)/sdk/lib"
- cp -r $(destdir)/include "$(win32_destdir)/sdk"
- cp -r $(destdir)/lib/pkgconfig "$(win32_destdir)/sdk/lib"
- for file in libvlc.dll.a libvlc.la libvlccore.dll.a libvlccore.la; do \
- cp -rv $(destdir)/lib/$$file "$(win32_destdir)/sdk/lib"; done
-if !HAVE_WIN64
-if !HAVE_WINCE
- mkdir -p "$(win32_destdir)/sdk/activex"
- cp $(top_builddir)/activex-vlc/README $(win32_destdir)/sdk/activex/README.TXT
- cp $(top_builddir)/activex-vlc/src/test.html $(win32_destdir)/sdk/activex/
-endif
-endif
-
- find $(win32_destdir) -type f \( -name "*xml" -or -name "*html" -or -name '*js' -or -name '*css' -or -name '*hosts' -or -iname '*txt' -or -name '*.cfg' -or -name '*.lua' \) -exec $(U2D) {} \;
-
-#Enable DEP and ASLR for all the binaries
-if USE_PEFLAGS
- find $(win32_destdir) -type f \( -name '*$(LIBEXT)' -print -o -name '*$(EXEEXT)' -print \) -exec $(PEFLAGS) --dynamicbase=true --nxcompat=true {} \;
-endif
- find $(win32_destdir)/plugins/ -type f \( -name '*.a' -or -name '*.la' \) -exec rm -rvf {} \;
-
-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)/" \;
-if !HAVE_WIN64
- cp $(top_builddir)/npapi-vlc/npapi/npvlc.dll.manifest "$(win32_xpi_destdir)/plugins"
-endif
- 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
-if !HAVE_WIN64
- cp $(top_builddir)/npapi-vlc/npapi/install.rdf "$(win32_xpi_destdir)"
- cd $(win32_xpi_destdir) && zip -r "../vlc-$(VERSION).xpi" install.rdf plugins
-endif
-
-package-win32-crx: package-win32-webplugin-common
-if !HAVE_WIN64
- cp $(top_builddir)/npapi-vlc/npapi/manifest.json "$(win32_xpi_destdir)"
- crxmake --pack-extension "$(win32_xpi_destdir)" \
- --extension-output "$(win32_destdir)/vlc-$(VERSION).crx" --ignore-file install.rdf
-endif
-
-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"
-
-# Create package
- if makensis -VERSION >/dev/null 2>&1; then \
- MAKENSIS="makensis"; \
- elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
- MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis"; \
- elif [ -x "$(PROGRAMFILES)/NSIS/makensis" ]; then \
- MAKENSIS="$(PROGRAMFILES)/NSIS/makensis"; \
- elif wine --version >/dev/null 2>&1; then \
- MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"; \
- else \
- echo 'Error: cannot locate makensis tool'; exit 1; \
- fi; \
- eval "$$MAKENSIS $(win32_destdir)/spad.nsi"; \
- eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"
-
-package-win32-base-zip: package-win-base
-# Create package
- rm -f -- vlc-$(VERSION)-win32.zip
- zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION)
-
-package-win32-base-debug-zip: package-win-common
-# Create package
- rm -f -- vlc-$(VERSION)-win32-debug.zip
- zip -r -9 vlc-$(VERSION)-win32-debug.zip vlc-$(VERSION)
-
-package-win32-base-7zip: package-win-base
-# Create package
- 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32.7z vlc-$(VERSION)
-
-package-win32-base-debug-7zip: package-win-common
-# Create package
- 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32-debug.7z vlc-$(VERSION)
-
-package-win32-cleanup:
- rm -Rf $(win32_destdir) $(win32_debugdir)
-
-package-win32-exe: package-win-base package-win32-base-exe package-win32-cleanup
-
-package-win32-zip: package-win32-base-zip package-win32-cleanup
-
-package-win32-debug-zip: package-win32-base-debug-zip package-win32-cleanup
-
-package-win32-7zip: package-win32-base-7zip package-win32-cleanup
-
-package-win32-debug-7zip: package-win32-base-debug-7zip package-win32-cleanup
-
-package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe package-win32-xpi
-
-package-win32: package-win32-no-clean package-win32-cleanup
-
-package-win32-debug: package-win32-base-debug-zip package-win32-base-debug-7zip package-win32-cleanup
-
-
-#######
-# WinCE
-#######
-package-wince-base: package-win-base
-
-package-wince-base-zip: package-wince-base
-# Create package
- rm -f -- vlc-$(VERSION)-wince.zip
- zip -r -9 vlc-$(VERSION)-wince.zip vlc-$(VERSION)
-
-package-wince: package-wince-base-zip package-win32-cleanup
-
-
-#########################################################################
-## MacOS X ##
-#########################################################################
-package-macosx: VLC-release.app ChangeLog
-# Check that the temporary location isn't in the way
- @if test -e "$(top_builddir)/vlc-$(VERSION)/"; then \
- rm -Rf "$(top_builddir)/vlc-$(VERSION)/" ; \
- fi
-
- echo "Create package directory: vlc-$(VERSION)/";
- mkdir -p "$(top_builddir)/vlc-$(VERSION)/";
-
-# Copy relevant files
- @if test -e "$(top_builddir)/VLC-release.app/"; then \
- cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \