# # Build nsis installers. # srcdir=../src VERSION=$(shell /usr/share/pba-cbs/sh/get_deb_version.sh $(srcdir)) INSTALLERS=fancypkcs11-$(VERSION)-setup-x86.exe fancypkcs11-$(VERSION)-setup-x64.exe NSIFILES=$(addsuffix .nsi,$(basename $(INSTALLERS))) DESTDIR=$(shell pwd)/install-root WIN32BUILDDIR=../build/win32/release WIN64BUILDDIR=../build/win64/release all: $(INSTALLERS) %.exe: %.nsi makensis $< clean-win32: make -C $(WIN32BUILDDIR) clean build-win32: make -C $(WIN32BUILDDIR) install-win32: build-win32 make -C $(WIN32BUILDDIR) DESTDIR=$(DESTDIR) install-bin build-win64: make -C $(WIN64BUILDDIR) install-win64: build-win64 make -C $(WIN64BUILDDIR) DESTDIR=$(DESTDIR) install-bin fancypkcs11-$(VERSION)-setup-x86.nsi: $(srcdir)/fancypkcs11-setup.nsi install-win32 sed -e 's/__VERSION__/$(VERSION)/g' -e 's/__SRCDIR__/..\/src/g' -e 's/__ARCHITECTURE__/x86/g' -e 's/__ARCHTRIPLET__/i686-w64-mingw32/g' -e 's/__PROGRAMFILES__/PROGRAMFILES/g' -e 's/__REGVIEW__/32/g' < $< > $@ fancypkcs11-$(VERSION)-setup-x64.nsi: $(srcdir)/fancypkcs11-setup.nsi install-win64 sed -e 's/__VERSION__/$(VERSION)/g' -e 's/__SRCDIR__/..\/src/g' -e 's/__ARCHITECTURE__/x64/g' -e 's/__ARCHTRIPLET__/x86_64-w64-mingw32/g' -e 's/__PROGRAMFILES__/PROGRAMFILES64/g' -e 's/__REGVIEW__/64/g' < $< > $@ clean: make -C $(WIN32BUILDDIR) clean make -C $(WIN64BUILDDIR) clean rm -rf ./install-root rm -rf $(NSIFILES) $(INSTALLERS) deploy: all chmod 0755 $(INSTALLERS) ssh root@www.clazzes.org mkdir -pv /tmp/fancypkcs11.upload scp -p $(INSTALLERS) root@www.clazzes.org:/tmp/fancypkcs11.upload/ ssh root@www.clazzes.org mv /tmp/fancypkcs11.upload/*.exe /var/www/htdocs/download.clazzes.org/fancypkcs11/ ssh root@www.clazzes.org rm -rf /tmp/fancypkcs11.upload