node-webkit-version ?= 0.10.2
node-webkit-prefix ?= node-webkit/
+node-webkit-directx = $(addprefix $(node-webkit-prefix),d3dcompiler_43.dll d3dcompiler_46.dll)
node-webkit = $(node-webkit-prefix)node-webkit-v$(firstword $(value node-webkit-version-$1) $(node-webkit-version))-$1
mkdir -p $(@:.tar.gz=)
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/-[^-]+$$//'`
+ cp -a tools/nw-linux-wrapper $(@:.tar.gz=)/`echo $(notdir $1) | sed -E 's/_.+//'`
$(RM) $(@:.tar.gz=)/nw/nwsnapshot
mv $(@:.tar.gz=)/nw/credits.html $(@:.tar.gz=)/nw/node-webkit\ credits.html
tar -czf $@ -C $(@D) $(@F:.tar.gz=)
$(RM) $(@D)/icon.ico
mv $(@:.zip=)/credits.html $(@:.zip=)/node-webkit\ credits.html
cp -a $< $(@:.zip=)/package.nw
- mv $(@:.zip=)/nw.exe $(@:.zip=)/`echo $(notdir $1) | sed -E 's/-[^-]+$$/.exe/'`
+ cp -a $(node-webkit-directx) $(@:.zip=)
+ mv $(@:.zip=)/nw.exe $(@:.zip=)/`echo $(notdir $1) | sed -E 's/_.+/.exe/'`
cd $(@D) && $(ZIP) -r $(@F) $(@F:.zip=)
$(RM) -r $(@:.zip=)
endef
-%-win-ia32.zip: %.nw $(call node-webkit,win-ia32.zip)
+%-win-ia32.zip: %.nw $(call node-webkit,win-ia32.zip) $(node-webkit-directx)
$(call node-webkit-package-win,$<,$(word 2,$^))
+
+$(node-webkit-directx):
+ wget -O $@ 'https://github.com/cefsharp/cef-binary/raw/1e51255cf77d267899bf7834768b8774affaad2d/cef_binary_3.y.z_windows32/Release/'$(notdir $@)
+
+$(node-webkit-prefix)dxwebsetup.exe:
+ wget -O $@ http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe