# $Id$ # # Build nsis installers. # srcdir=../src VERSION=$(shell /usr/share/pba-cbs/sh/get_deb_version.sh $(srcdir)) INSTALLER32=fancylogview-$(VERSION)-setup-x86.exe INSTALLER64=fancylogview-$(VERSION)-setup-x64.exe INSTALLERS=$(INSTALLER32) $(INSTALLER64) NSIFILES=$(addsuffix .nsi,$(basename $(INSTALLERS))) DESTDIR=$(shell pwd)/install-root # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 w32pcdir = /usr/i686-w64-mingw32/lib/pkgconfig w64pcdir = /usr/x86_64-w64-mingw32/lib/pkgconfig all: $(INSTALLERS) %.exe: %.nsi makensis $< %.rcc: $(srcdir)/%.qrc rcc -binary $< -o $@ build-mingw32: PKG_CONFIG_LIBDIR=$(w32pcdir) make -C ../build/mingw32/release install-mingw32: build-mingw32 PKG_CONFIG_LIBDIR=$(w32pcdir) make -C ../build/mingw32/release DESTDIR=$(DESTDIR) install build-mingw64: PKG_CONFIG_LIBDIR=$(w64pcdir) make -C ../build/mingw64/release install-mingw64: build-mingw64 PKG_CONFIG_LIBDIR=$(w64pcdir) make -C ../build/mingw64/release DESTDIR=$(DESTDIR) install fancylogview-$(VERSION)-setup-x86.nsi: $(srcdir)/fancylogview.nsi fancylogview.rcc install-mingw32 sed -e 's/__VERSION__/$(VERSION)/g' -e 's/__ARCHITECTURE__/x86/g' -e 's/__ARCHTRIPLET__/i686-w64-mingw32/g' -e 's/__PROGRAMFILES__/PROGRAMFILES/g' -e 's/__REGVIEW__/32/g' -e 's/__LIBGCCDLL__/libgcc_s_sjlj-1.dll/g' < $< > $@ fancylogview-$(VERSION)-setup-x64.nsi: $(srcdir)/fancylogview.nsi fancylogview.rcc install-mingw64 sed -e 's/__VERSION__/$(VERSION)/g' -e 's/__ARCHITECTURE__/x64/g' -e 's/__ARCHTRIPLET__/x86_64-w64-mingw32/g' -e 's/__PROGRAMFILES__/PROGRAMFILES64/g' -e 's/__REGVIEW__/64/g' -e 's/__LIBGCCDLL__/libgcc_s_seh-1.dll/g' < $< > $@ deploy: all scp $(INSTALLER32) builder@download.clazzes.org:/var/www/htdocs/download.clazzes.org/fancylogview scp $(INSTALLER64) builder@download.clazzes.org:/var/www/htdocs/download.clazzes.org/fancylogview clean: make -C ../build/mingw32/release clean make -C ../build/mingw64/release clean rm -rf ./install-root rm -rf fancylogview.rcc rm -rf $(NSIFILES) $(INSTALLERS)