diff --git a/Buildscr b/Buildscr index 9ea88a84..a476ff75 100644 --- a/Buildscr +++ b/Buildscr @@ -160,8 +160,10 @@ delegate windows # Build the original binaries. in putty/windows with visualstudio do/win mkdir buildold && nmake -f Makefile.vc BUILDDIR=buildold\ $(Makeargs) all cleantestprogs - # Build the VS2015 binaries. - in putty/windows with visualstudio2015_32bit do/win mkdir build32 && nmake -f Makefile.vc BUILDDIR=build32\ $(Makeargs) all cleantestprogs + # Build the VS2015 binaries. For the 32-bit ones, we set a subsystem + # version of 5.01, which allows the resulting files to still run on + # Windows XP. + in putty/windows with visualstudio2015_32bit do/win mkdir build32 && nmake -f Makefile.vc BUILDDIR=build32\ SUBSYSVER=,5.01 $(Makeargs) all cleantestprogs in putty/windows with visualstudio2015_64bit do/win mkdir build64 && nmake -f Makefile.vc BUILDDIR=build64\ $(Makeargs) all cleantestprogs # Code-sign the binaries, if the local bob config provides a script diff --git a/mkfiles.pl b/mkfiles.pl index 3e42c734..4a2b3b4d 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -676,7 +676,7 @@ if (defined $makefiles{'vc'}) { print "$objlines[$i]\n"; } print "<<\n"; - print "\tlink \$(LFLAGS) \$(XLFLAGS) -out:\$(BUILDDIR)$prog.exe -map:\$(BUILDDIR)$prog.map -nologo -subsystem:$subsys \@$inlinefilename\n\n"; + print "\tlink \$(LFLAGS) \$(XLFLAGS) -out:\$(BUILDDIR)$prog.exe -map:\$(BUILDDIR)$prog.map -nologo -subsystem:$subsys\$(SUBSYSVER) \@$inlinefilename\n\n"; } foreach $d (&deps("\$(BUILDDIR)X.obj", "\$(BUILDDIR)X.res", $dirpfx, "\\", "vc")) { $extradeps = $forceobj{$d->{obj_orig}} ? ["*.c","*.h","*.rc"] : [];