# # Build nsis installers. # srcdir=../src VERSION=$(shell /usr/share/pba-cbs/sh/get_deb_version.sh $(srcdir)) INSTALLERS=pba-helloworld-portable-$(VERSION)-setup-x86.exe pba-helloworld-portable-$(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 pba-helloworld-portable-$(VERSION)-setup-x86.nsi: $(srcdir)/pba-helloworld-portable-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' < $< > $@ pba-helloworld-portable-$(VERSION)-setup-x64.nsi: $(srcdir)/pba-helloworld-portable-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/pba-helloworld-portable.upload scp -p $(INSTALLERS) root@www.clazzes.org:/tmp/pba-helloworld-portable.upload/ ssh root@www.clazzes.org mv /tmp/pba-helloworld-portable.upload/*.exe /var/www/htdocs/download.clazzes.org/pba-helloworld-portable/ ssh root@www.clazzes.org rm -rf /tmp/pba-helloworld-portable.upload