# domain. To the extent possible under law, the author of this file
# waives all copyright and related or neighboring rights to it.
# domain. To the extent possible under law, the author of this file
# waives all copyright and related or neighboring rights to it.
# These are like 30MB, don't download them every time.
.PRECIOUS: $(nwjs-pattern)
$(nwjs-pattern):
# These are like 30MB, don't download them every time.
.PRECIOUS: $(nwjs-pattern)
$(nwjs-pattern):
- mkdir -p $(@D)
- wget -O $@ http://dl.nwjs.io/v$(*F)/$(@F) || ($(RM) $@ && exit 1)
+ $(MKDIR) '$(@D)'
+# HTTP-only - https://github.com/nwjs/nw.js/issues/3393
+ wget -O '$@'.inprogress 'http://dl.nwjs.io/v$(*F)/$(@F)'
+ mv '$@'.inprogress "$@"
nwjs-archives = $(foreach p,$(nwjs-platforms),$(call nwjs,$(p)))
nwjs-archives = $(foreach p,$(nwjs-platforms),$(call nwjs,$(p)))
mv $(@D)/$(notdir $(2:.tar.gz=)) $(@:.tar.gz=)/nw
cp -a $1 $(@:.tar.gz=)/nw/package.nw
cp -a tools/nw-linux-wrapper $(@:.tar.gz=)/`echo $(notdir $1) | sed -E 's/_.+//'`
mv $(@D)/$(notdir $(2:.tar.gz=)) $(@:.tar.gz=)/nw
cp -a $1 $(@:.tar.gz=)/nw/package.nw
cp -a tools/nw-linux-wrapper $(@:.tar.gz=)/`echo $(notdir $1) | sed -E 's/_.+//'`
%-linux-x64.tar.gz: %.nw $(call nwjs,linux-x64.tar.gz)
$(call nwjs-package-linux,$<,$(word 2,$^))
%-linux-x64.tar.gz: %.nw $(call nwjs,linux-x64.tar.gz)
$(call nwjs-package-linux,$<,$(word 2,$^))
mv $(@D)/$(notdir $(2:.zip=)) $(@:.zip=)
$(RM) $(@:.zip=)/nwjc.exe
$(UNZIP) -p $< $(call nwjs-icon,$<) > $(@D)/icon.ico
mv $(@D)/$(notdir $(2:.zip=)) $(@:.zip=)
$(RM) $(@:.zip=)/nwjc.exe
$(UNZIP) -p $< $(call nwjs-icon,$<) > $(@D)/icon.ico
-$(nwjs-prefix)dxwebsetup.exe:
- wget -O $@ http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe
+$(nwjsdir)dxwebsetup.exe:
+ wget -O $@ https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe
+
+distclean::
+ $(RM) $(nwjs-archives)
+ $(RM) $(nwjs-directx)
+ $(RM) $(nwjsdir)dxwebsetup.exe