-# Contrib *.dll's
- cp $(srcdir)/extras/contrib/lib/*.dll "vlc-$(VERSION)/" || true
-
-#Enable DEP and ASLR for all the binaries
-if USE_PEFLAGS
- find $(win32_destdir) -type f -name '*.dll' -print -o -name '*.exe' -print | while read i; do \
- $(PEFLAGS) --dynamicbase=true --nxcompat=true "$$i" ; \
- done
-endif
-
-# Copy the lua scripts (HTTP)
-if BUILD_LUA
- mkdir -p "$(win32_lua_destdir)/http/images"
- mkdir -p "$(win32_lua_destdir)/http/requests"
- mkdir -p "$(win32_lua_destdir)/http/js"
- mkdir -p "$(win32_lua_destdir)/http/dialogs"
- cp $(srcdir)/share/lua/http/*.html $(win32_lua_destdir)/http/
- unix2dos $(win32_lua_destdir)/http/*.html
- cp $(srcdir)/share/lua/http/.hosts $(win32_lua_destdir)/http/
- unix2dos $(win32_lua_destdir)/http/.hosts
- cp $(srcdir)/share/lua/http/*.css $(win32_lua_destdir)/http/
- unix2dos $(win32_lua_destdir)/http/*.css
- cp $(srcdir)/share/lua/http/js/*.js $(win32_lua_destdir)/http/js/
- unix2dos $(win32_lua_destdir)/http/js/*.js
- cp $(srcdir)/share/lua/http/dialogs/* $(win32_lua_destdir)/http/dialogs/
- unix2dos $(win32_lua_destdir)/http/dialogs/*
- cp $(srcdir)/share/lua/http/dialogs/.hosts $(win32_lua_destdir)/http/dialogs/
- unix2dos $(win32_lua_destdir)/http/dialogs/.hosts
- cp $(srcdir)/share/lua/http/*.ico $(win32_lua_destdir)/http/
- cp $(srcdir)/share/lua/http/images/*.png $(win32_lua_destdir)/http/images/
- cp $(srcdir)/share/lua/http/requests/*.xml $(win32_lua_destdir)/http/requests/
- unix2dos $(win32_lua_destdir)/http/requests/*.xml
- cp $(srcdir)/share/lua/http/requests/readme $(win32_lua_destdir)/http/requests/readme.txt
- unix2dos $(win32_lua_destdir)/http/requests/readme.txt
-endif
-
-if BUILD_LUA
-#Lua Scripts
- $(INSTALL) -d $(win32_lua_destdir)
- for i in $(srcdir)/share/lua/*.* ; do \
- $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/`basename $${i}` ; \
- done
- $(INSTALL) -d $(win32_lua_destdir)/playlist
- for i in $(srcdir)/share/lua/playlist/*.* ; do \
- $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/playlist/`basename $${i}` ; \
- done
- $(INSTALL) -d $(win32_lua_destdir)/meta
- for i in $(srcdir)/share/lua/meta/*.* ; do \
- $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/meta/`basename $${i}` ; \
- done
- $(INSTALL) -d $(win32_lua_destdir)/intf
- for i in $(srcdir)/share/lua/intf/*.* ; do \
- $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/intf/`basename $${i}` ; \
- done
- $(INSTALL) -d $(win32_lua_destdir)/intf/modules
- for i in $(srcdir)/share/lua/intf/modules/*.* ; do \
- $(INSTALL) -m 644 -- "$${i}" $(win32_lua_destdir)/intf/modules/`basename $${i}` ; \
- done
-endif
-
-# Copy the http files
-if BUILD_HTTPD
- mkdir -p "$(win32_http_destdir)/images"
- mkdir -p "$(win32_http_destdir)/requests"
- mkdir -p "$(win32_http_destdir)/js"
- mkdir -p "$(win32_http_destdir)/dialogs"
- cp $(srcdir)/share/http/*.html $(win32_http_destdir)/
- unix2dos $(win32_http_destdir)/*.html
- cp $(srcdir)/share/http/.hosts $(win32_http_destdir)/
- unix2dos $(win32_http_destdir)/.hosts
- cp $(srcdir)/share/http/*.css $(win32_http_destdir)/
- unix2dos $(win32_http_destdir)/*.css
- cp $(srcdir)/share/http/js/*.js $(win32_http_destdir)/js/
- unix2dos $(win32_http_destdir)/js/*.js
- cp $(srcdir)/share/http/dialogs/* $(win32_http_destdir)/dialogs/
- unix2dos $(win32_http_destdir)/dialogs/*
- cp $(srcdir)/share/http/dialogs/.hosts $(win32_http_destdir)/dialogs/
- unix2dos $(win32_http_destdir)/dialogs/.hosts
- cp $(srcdir)/share/http/*.ico $(win32_http_destdir)/
- cp $(srcdir)/share/http/images/*.png $(win32_http_destdir)/images/
- cp $(srcdir)/share/http/requests/*.xml $(win32_http_destdir)/requests/
- unix2dos $(win32_http_destdir)/requests/*.xml
- cp $(srcdir)/share/http/requests/readme $(win32_http_destdir)/requests/readme.txt
- unix2dos $(win32_http_destdir)/requests/readme.txt
-
-endif
-
-if BUILD_SKINS
-# Skins
- mkdir -p $(win32_destdir)/skins/fonts
- for i in $(srcdir)/share/skins2/fonts/*.*; do \
- cp -- "$$i" $(win32_destdir)/skins/fonts/ || true ; \
- done
- for i in $(top_builddir)/share/skins2/*.*; do \
- cp -- "$$i" $(win32_destdir)/skins/ || true ; \
- done
- cp -- $(srcdir)/share/skins2/skin.catalog $(win32_destdir)/skins/ || true ;
- cp -- $(srcdir)/share/skins2/skin.dtd $(win32_destdir)/skins/ || true ;
-endif
-
-if BUILD_OSDMENU
-#OSD Menu
- mkdir -p "$(win32_destdir)/osdmenu"
- cp $(srcdir)/share/osdmenu/*.* "$(win32_destdir)/osdmenu"
- for dir in default default/selected default/selection default/volume ;do \
- mkdir -p "$(win32_destdir)/osdmenu/$$dir"; \
- for file in $(srcdir)/share/osdmenu/$${dir}/*.png;do \
- cp -- "$$file" "$(win32_destdir)/osdmenu/$$dir"; \
- done; \
- done
- unix2dos $(win32_destdir)/osdmenu/*.cfg;
- 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
-
-# SDK
- mkdir -p "$(win32_destdir)/sdk.tmp"
- mkdir -p "$(win32_destdir)/sdk"
- d=$$(pwd) && \
- cd src && \
- make install DESTDIR="$$d/vlc-$(VERSION)/sdk.tmp"
- cd vlc-$(VERSION) && mv sdk.tmp/$(prefix)/* sdk/
- find vlc-$(VERSION)/sdk.tmp -type d | sort -r | xargs rmdir
- rm -Rf vlc-$(VERSION)/sdk/bin
-
-#strip exe and main dll
-package-win-common-strip: package-win32-base-debug
- @if test -e "$(win32_debugdir)"; then \
- echo "Error: please remove $(win32_debugdir), it is in the way"; \
- false; \
- else \
- echo "OK."; mkdir -p "$(win32_debugdir)"; \
- fi
- for i in "" vlc-$(VERSION)/*$(LIBEXT) ; \
- 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
-
-#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-all "$$i" ; \
- $(OBJCOPY) --add-gnu-debuglink="$$i.dbg" "$$i" ; \
- mv "$$i.dbg" "$(win32_debugdir)"; \
- fi ; done
-
-package-win32-base-exe: package-win32-base
-# Create package
- rm -Rf $(win32_destdir)/sdk
- 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)/vlc.win32.nsi"
-
-package-win32-base-zip: package-win32-base
-# Create package
- rm -f -- vlc-$(VERSION)-win32.zip
- zip -r -9 vlc-$(VERSION)-win32.zip vlc-$(VERSION)
-
-package-win32-base-debug-zip: package-win32-base-debug
-# Create package
- rm -f -- vlc-$(VERSION)-win32-debug.zip
- zip -r -9 vlc-$(VERSION)-win32-debug.zip vlc-$(VERSION)
-
-package-win32-base-7zip: package-win32-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-win32-base-debug
-# Create package
- 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-$(VERSION)-win32-debug.7z vlc-$(VERSION)
-
-package-win32-exe: package-win32-base package-win32-base-exe
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-win32-zip: package-win32-base-zip
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-win32-debug-zip: package-win32-base-debug-zip
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-win32-7zip: package-win32-base-7zip
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-win32-debug-7zip: package-win32-base-debug-7zip
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-win32-no-clean: package-win32-base-zip package-win32-base-7zip package-win32-base-exe
-
-package-win32: package-win32-no-clean
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-win32-debug: package-win32-base-debug-zip package-win32-base-debug-7zip
-# Clean up
- rm -Rf $(win32_destdir)
-
-package-wince-base: package-win-common package-win-common-strip
-
-package-wince-base-zip:
-# Create package
- zip -r vlc-$(VERSION)-wince.zip vlc-$(VERSION)
-
-package-wince: package-wince-base package-wince-base-zip
-# Clean up
- rm -Rf $(win32_destdir)
-
-
-#####################################################################
-## BeOS ##
-#####################################################################
-package-beos:
-# Check that tmp isn't in the way
- @if test -e $(srcdir)/tmp; then \
- echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
- false ; \
- else \
- echo "OK." ; mkdir $(srcdir)/tmp ; \
- fi
-
-# Copy relevant files
- mkdir -p $(srcdir)/tmp/vlc
- cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
- THANKS NEWS tmp/vlc/
-
-# Create debug package
- xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc
- find $(srcdir)/tmp/vlc -exec mimeset -f {} \;
- mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-$(VERSION)
- (cd $(srcdir)/tmp && zip -9 -r vlc-$(VERSION)-BeOS-debug.zip vlc-$(VERSION) )
- mv $(srcdir)/tmp/vlc-$(VERSION)-BeOS-debug.zip $(srcdir)/
- mv $(srcdir)/tmp/vlc-$(VERSION) $(srcdir)/tmp/vlc
-
-# Create normal package
- $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc
- find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
- --strip-debug --strip-unneeded "{}" \;
- xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc
- find $(srcdir)/tmp/vlc -exec mimeset -f {} \;
- mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-$(VERSION)
- (cd $(srcdir)/tmp && zip -9 -r vlc-$(VERSION)-BeOS.zip vlc-$(VERSION) )
- mv $(srcdir)/tmp/vlc-$(VERSION)-BeOS.zip $(srcdir)/
-
-# Clean up
- rm -Rf $(srcdir)/tmp
-
-#########################################################################
-## 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"; \
- else \
- cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app"; \
- fi
- mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies/ && \
- mkdir -p $(top_builddir)/vlc-$(VERSION)/.background/ && \
- cp $(srcdir)/AUTHORS $(srcdir)/COPYING $(srcdir)/README $(srcdir)/THANKS $(srcdir)/NEWS $(top_builddir)/vlc-$(VERSION)/Goodies/ && \
- cp -R $(srcdir)/extras/package/macosx/Delete_Preferences.app $(top_builddir)/vlc-$(VERSION)/Goodies/Delete\ VLC\ Preferences.app && \
- cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf && \
- cp $(srcdir)/extras/package/macosx/Resources/about_bg.png $(top_builddir)/vlc-$(VERSION)/.background/background.png
- cp -L $(top_builddir)/ChangeLog $(top_builddir)/vlc-$(VERSION)/Goodies/
-
-# Place a link to the application folder
- ln -s /Applications $(top_builddir)/vlc-$(VERSION)/Applications
-
-# Create disk image (temporarily taken from the 0.8.6-bugfix branch to provide reliable NBs)
- echo "Creating disk image"
- rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
- hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
- "$(top_builddir)/vlc-$(VERSION).dmg" -scrub
- echo "Disk image creation completed:"
- ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
-
-# Create disk image
-# echo "Creating disk image"
-# rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
-# hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" \
-# "$(top_builddir)/vlc-$(VERSION).dmg" -format UDRW \
-# -scrub -imagekey zlib-level=9 -attach
-
-# Make sure the root window of the dmg will pop up when the dmg is mounted.
-# Note: We dont mount in /Volumes to be sure we won't collide with an other
-# finder mounted dmg with the same name.
-# echo "Make sure the root window of the dmg will pop up when the dmg is mounted"
-# mkdir -p $(top_builddir)/vlcmnt
-# hdiutil attach -nokernel -readwrite -noverify -noautoopen -private "$(top_builddir)/vlc-$(VERSION).dmg" -mountpoint "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
-# bless --folder "$(top_builddir)/vlcmnt/vlc-$(VERSION)/" --openfolder "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
-# sleep 1 # Make sure operation completes
-# cd "$(srcdir)"
-
-# Unmount the image now
-# hdiutil detach "$(top_builddir)/vlcmnt/vlc-$(VERSION)"
-# rm -R $(top_builddir)/vlcmnt
-
-# Make sure the image is not writable
-# Note: We can't directly create a read only dmg as we do the bless stuff
- echo "Make the disk image read-only"
- mv "$(top_builddir)/vlc-$(VERSION).dmg" "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
- hdiutil convert "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -format UDBZ -o "$(top_builddir)/vlc-$(VERSION).dmg"
- rm "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
-
-# We are done
- echo "Disk image creation completed:"
- ls -la "$(top_builddir)/vlc-$(VERSION).dmg" ; echo
-
-# Clean up
- rm -Rf "$(top_builddir)/vlc-$(VERSION)"
-
-package-macosx-zip: VLC-release.app
- rm -Rf $(top_builddir)/vlc-$(VERSION)
- mkdir -p $(top_builddir)/vlc-$(VERSION)
- cp -R $(top_builddir)/VLC-release.app $(top_builddir)/vlc-$(VERSION)/VLC.app
- mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
- for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
- cp $(srcdir)/$$i $(top_builddir)/vlc-$(VERSION)/Goodies; \
- done
- cp -R $(srcdir)/extras/package/macosx/Delete_Preferences.app \
- $(top_builddir)/vlc-$(VERSION)/Goodies
- cp $(srcdir)/extras/package/macosx/README.MacOSX.rtf \
- $(top_builddir)/vlc-$(VERSION)/Read\ Me.rtf
- zip -r $(top_builddir)/vlc-$(VERSION).zip $(top_builddir)/vlc-$(VERSION)
- rm -Rf $(top_builddir)/vlc-$(VERSION)
-
-package-macosx-framework-zip:
- rm -Rf $(top_builddir)/vlckit-$(VERSION)
- mkdir -p $(top_builddir)/vlckit-$(VERSION)
- cp -R $(srcdir)/projects/macosx/framework/build/Debug/VLCKit.framework \
- $(top_builddir)/vlckit-$(VERSION)/VLCKit.framework
- mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies
- for i in AUTHORS COPYING ChangeLog README THANKS NEWS; do \
- cp $(srcdir)/$$i $(top_builddir)/vlckit-$(VERSION)/Goodies; \
- done
- zip -r $(top_builddir)/vlckit-$(VERSION).zip $(top_builddir)/vlckit-$(VERSION)
- rm -Rf $(top_builddir)/vlc-$(VERSION)
-
-package-macosx-plugin:
-if BUILD_MOZILLA
-# Create Installer
- rm -rf "$(top_builddir)/macosx-plugin-instdata/"; true
- mkdir -p "$(top_builddir)/macosx-plugin-instdata"
- rm -f "$(top_builddir)/projects/mozilla/VLC Plugin.plugin/Contents/MacOS/modules/libmacosx_plugin.dylib"
- cp -R "$(top_builddir)/projects/mozilla/VLC Plugin.plugin" "$(top_builddir)/macosx-plugin-instdata"
- rm -rf "$(top_builddir)/VLC Internet Plug-In.pkg"
- export PACKAGEMAKER=
- if test -x /Developer/Tools/packagemaker; then \
- export PACKAGEMAKER=/Developer/Tools/packagemaker; \
- fi; \
- if test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then \
- export PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; \
- fi; \
- $${PACKAGEMAKER} -build -ds -p "$(top_builddir)/VLC Internet Plug-In.pkg" \
- -f "$(top_builddir)/macosx-plugin-instdata" \
- -i "$(top_builddir)/extras/package/macosx/plugin/InstallerInfo.plist" \
- -d "$(top_srcdir)/extras/package/macosx/plugin/InstallerDescription.plist"; true
- rm -rf "$(top_builddir)/macosx-plugin-instdata/"
-
-# Create disk image
- rm -f "$(top_builddir)/vlc-plugin-$(VERSION).dmg"; true
- rm -rf "$(top_builddir)/vlc-plugin-$(VERSION)/"; true
- mkdir -p "$(top_builddir)/vlc-plugin-$(VERSION)/"
- mv "$(top_builddir)/VLC Internet Plug-In.pkg" "$(top_builddir)/vlc-plugin-$(VERSION)/"
- hdiutil create -srcfolder "$(top_builddir)/vlc-plugin-$(VERSION)" \
- "$(top_builddir)/vlc-plugin-$(VERSION).dmg" -format UDBZ \
- -scrub -imagekey zlib-level=9
- echo "Disk image creation completed:"
- rm -rf "$(top_builddir)/vlc-plugin-$(VERSION)"
-endif
-
-package-translations:
- @if test -e "$(srcdir)/vlc-translations-$(VERSION)"; then \
- echo "Error: please remove $(srcdir)/vlc-translations-$(VERSION), it is in the way"; \
- false; \
- else \
- echo "OK."; mkdir -p "$(srcdir)/vlc-translations-$(VERSION)"; \
- fi
-# Copy translations
- cat $(top_srcdir)/po/LINGUAS | while read i; do \
- cp "$(srcdir)/po/$${i}.po" \
- "$(srcdir)/vlc-translations-$(VERSION)/$${i}.po" \
- || true ; \
- done
- cp "$(srcdir)/doc/translations.txt" \
- "$(srcdir)/vlc-translations-$(VERSION)/README.txt"
-
- echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo " echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo " exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
- echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
-
- $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
- | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz