X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Buildscr;h=7ca4eb7f50b42a74a749c38fe3c44ca08d1c8cda;hb=510f49e405e71ba5c97875e7a019364e1ef5fac9;hp=c7e32302cb390001096137f57196287371b5c5ef;hpb=e6059f18d49410beaab5aa0679a7467ce021fdc1;p=PuTTY.git diff --git a/Buildscr b/Buildscr index c7e32302..7ca4eb7f 100644 --- a/Buildscr +++ b/Buildscr @@ -35,7 +35,7 @@ module putty ifeq "$(RELEASE)" "" set Ndate $(!builddate) ifneq "$(Ndate)" "" in . do echo $(Ndate) | perl -pe 's/(....)(..)(..)/$$1-$$2-$$3/' > date ifneq "$(Ndate)" "" read Date date -set Epoch 15860 # update this at every release +set Epoch 16214 # update this at every release ifneq "$(Ndate)" "" in . do echo $(Ndate) | perl -ne 'use Time::Local; /(....)(..)(..)/ and print timegm(0,0,0,$$3,$$2-1,$$1) / 86400 - $(Epoch)' > days ifneq "$(Ndate)" "" read Days days @@ -80,12 +80,14 @@ ifneq "$(PRERELEASE)" "" set Autoconfver $(PRERELEASE)~pre$(Ndate).$(vcsid) ifneq "$(SNAPSHOT)" "" set Autoconfver $(Lastver)-$(Date).$(vcsid) ifeq "$(RELEASE)$(PRERELEASE)$(SNAPSHOT)" "" set Autoconfver Custom.$(Date).$(vcsid) -# Set up the filename for the Windows installer (minus extension, +# Set up the filenames for the Windows installer (minus extension, # which goes on later). -ifneq "$(RELEASE)" "" set Ifilename putty-$(RELEASE)-installer -ifneq "$(PRERELEASE)" "" set Ifilename putty-$(PRERELEASE)-pre$(Ndate)-installer -ifneq "$(SNAPSHOT)" "" set Ifilename putty-$(Date)-installer -ifeq "$(RELEASE)$(PRERELEASE)$(SNAPSHOT)" "" set Ifilename putty-custom-$(Date)-installer +ifneq "$(RELEASE)" "" set Isuffix $(RELEASE)-installer +ifneq "$(PRERELEASE)" "" set Isuffix $(PRERELEASE)-pre$(Ndate)-installer +ifneq "$(SNAPSHOT)" "" set Isuffix $(Date)-installer +ifeq "$(RELEASE)$(PRERELEASE)$(SNAPSHOT)" "" set Isuffix custom-$(Date)-installer +set Ifilename32 putty-$(Isuffix) +set Ifilename64 putty-64bit-$(Isuffix) # Set up the version string for the Windows installer. ifneq "$(RELEASE)" "" set Iversion $(RELEASE) @@ -124,6 +126,7 @@ ifneq "$(SNAPSHOT)" "" in putty do echo '$#define SNAPSHOT' >> version.h in putty do echo '$#define TEXTVER "$(Textver)"' >> version.h in putty do echo '$#define SSHVER "$(Sshver)"' >> version.h in putty do echo '$#define BINARY_VERSION $(Winvercommas)' >> version.h +in putty do echo '$#define SOURCE_COMMIT "$(vcsfullid)"' >> version.h # Set up the extra arguments for the main Windows nmake command. The # user can define XFLAGS and MAKEARGS on the bob command line, to pass @@ -158,8 +161,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 @@ -174,14 +179,15 @@ delegate windows # exit codes on whim.) in putty/doc with htmlhelp do/win hhc putty.hhp & type putty.chm >nul - # Build the WiX MSI installer. - in putty/windows with wix do/win candle -dBuilddir=build32\ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj + # Build a WiX MSI installer, for each of build32 and build64. + in putty/windows with wix do/win candle -arch x86 -dWin64=no -dBuilddir=build32\ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer32.msi + in putty/windows with wix do/win candle -arch x64 -dWin64=yes -dBuilddir=build64\ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer64.msi - # Build the old Inno Setup installer. + # Build the old Inno Setup installer, for 32-bit only. in putty/windows with innosetup do/win iscc putty.iss # Sign the installers. - ifneq "$(winsigncode)" "" in putty/windows do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/putty/ -n "PuTTY Installer" installer.msi Output/installer.exe + ifneq "$(winsigncode)" "" in putty/windows do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/putty/ -n "PuTTY Installer" installer32.msi installer64.msi Output/installer.exe # Finished Windows builds. return putty/windows/buildold/*.exe @@ -191,7 +197,8 @@ delegate windows return putty/windows/build64/*.exe return putty/windows/build64/*.map return putty/doc/putty.chm - return putty/windows/installer.msi + return putty/windows/installer32.msi + return putty/windows/installer64.msi return putty/windows/Output/installer.exe enddelegate in putty/doc do make mostlyclean @@ -208,8 +215,9 @@ deliver putty/windows/build32/*.exe putty/w32/$@ deliver putty/windows/build32/putty.zip putty/w32/$@ deliver putty/windows/build64/*.exe putty/w64/$@ deliver putty/windows/build64/putty.zip putty/w64/$@ -deliver putty/windows/installer.msi putty/w32/$(Ifilename).msi -deliver putty/windows/Output/installer.exe putty/w32/$(Ifilename).exe +deliver putty/windows/installer32.msi putty/w32/$(Ifilename32).msi +deliver putty/windows/installer64.msi putty/w64/$(Ifilename64).msi +deliver putty/windows/Output/installer.exe putty/w32/$(Ifilename32).exe deliver putty/doc/puttydoc.zip putty/$@ deliver putty/doc/putty.chm putty/$@ deliver putty/doc/putty.hlp putty/$@ @@ -245,5 +253,5 @@ in-dest putty do echo "AddType application/octet-stream .chm" >> .htaccess in-dest putty do echo "AddType application/octet-stream .hlp" >> .htaccess in-dest putty do echo "AddType application/octet-stream .cnt" >> .htaccess in-dest putty do set -- putty*.tar.gz; for k in '' .gpg; do echo RedirectMatch temp '(.*/)'putty.tar.gz$$k\$$ '$$1'"$$1$$k" >> .htaccess; done -# And one in the w32 directory, providing links for the installers. -in-dest putty/w32 do for ext in msi exe; do set -- putty*installer.$$ext; for k in '' .gpg; do echo RedirectMatch temp '(.*/)'putty-installer.$$ext$$k\$$ '$$1'"$$1$$k" >> .htaccess; done; done +# And one in each binary directory, providing links for the installers. +in-dest putty do for params in "w32 putty-installer" "w64 putty-64bit-installer"; do (set -- $$params; subdir=$$1; installername=$$2; cd $$subdir && for ext in msi exe; do set -- putty*installer.$$ext; if test -f $$1; then for k in '' .gpg; do echo RedirectMatch temp '(.*/)'$${installername}.$$ext$$k\$$ '$$1'"$$1$$k" >> .htaccess; done; fi; done); done