X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Buildscr;h=863f01bd31df7d8d009a00528c0762707bc81128;hb=145ecf611238c4f1e39d89d3eee40319a2c54fe8;hp=c9420658aa749040bbe614e6ffb45216dee15fb5;hpb=d0e9630e1c2f880bb7cb7ae107685bd1a6d189c4;p=PuTTY.git diff --git a/Buildscr b/Buildscr index c9420658..863f01bd 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 15746 # update this at every release +set Epoch 15860 # 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,11 +80,12 @@ 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. -ifneq "$(RELEASE)" "" set Ifilename putty-$(RELEASE)-installer.exe -ifneq "$(PRERELEASE)" "" set Ifilename putty-$(PRERELEASE)-pre$(Ndate)-installer.exe -ifneq "$(SNAPSHOT)" "" set Ifilename putty-$(Date)-installer.exe -ifeq "$(RELEASE)$(PRERELEASE)$(SNAPSHOT)" "" set Ifilename putty-custom-$(Date)-installer.exe +# Set up the filename 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 # Set up the version string for the Windows installer. ifneq "$(RELEASE)" "" set Iversion $(RELEASE) @@ -148,25 +149,42 @@ in putty/windows do perl -i~ -pe 'BEGIN{$$a=shift@ARGV;}s/^(VersionInfoVersion=) # Windowsify LICENCE, since it's going in the Windows installer. in putty do perl -i~ -pe 'y/\015//d;s/$$/\015/' LICENCE +# Some gratuitous theming for the MSI installer UI. +in putty/icons do make +in putty do convert -size 164x312 'gradient:blue-white' -distort SRT -90 -swirl 180 \( -size 329x312 canvas:white \) +append \( icons/putty-48.png -geometry +28+24 \) -composite \( icons/pscp-48.png -geometry +88+96 \) -composite \( icons/puttygen-48.png -geometry +28+168 \) -composite \( icons/pageant-48.png -geometry +88+240 \) -composite windows/msidialog.bmp +in putty do convert -size 493x58 canvas:white \( icons/putty-48.png -geometry +440+5 \) -composite windows/msibanner.bmp + delegate windows - # FIXME: Cygwin alternative? - in putty/windows do/win vcvars32 && nmake -f Makefile.vc $(Makeargs) + # Build the main binaries. + in putty/windows with visualstudio do/win nmake -f Makefile.vc $(Makeargs) all cleantestprogs + # Code-sign the binaries, if the local bob config provides a script # to do so. We assume here that the script accepts an -i option to # provide a 'more info' URL, and an optional -n option to provide a # program name, and that it can take multiple .exe filename # arguments and sign them all in place. ifneq "$(winsigncode)" "" in putty/windows do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/putty/ *.exe + # Ignore exit code from hhc, in favour of seeing whether the .chm # file was created. (Yuck; but hhc appears to return non-zero # exit codes on whim.) - in putty/doc do/win hhc putty.hhp & type putty.chm >nul - in putty/windows do/win iscc putty.iss - ifneq "$(winsigncode)" "" in putty/windows do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/putty/ -n "PuTTY Installer" Output/setup.exe + 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 -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj + + # Build the old Inno Setup installer. + 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 + + # Finished Windows builds. return putty/windows/*.exe return putty/windows/*.map return putty/doc/putty.chm - return putty/windows/Output/setup.exe + return putty/windows/installer.msi + return putty/windows/Output/installer.exe enddelegate in putty/doc do make mostlyclean in putty/doc do make $(Docmakever) @@ -176,7 +194,8 @@ in putty/doc do zip puttydoc.zip *.html # Deliver the actual PuTTY release directory into a subdir `putty'. deliver putty/windows/*.exe putty/x86/$@ deliver putty/windows/putty.zip putty/x86/$@ -deliver putty/windows/Output/setup.exe putty/x86/$(Ifilename) +deliver putty/windows/installer.msi putty/x86/$(Ifilename).msi +deliver putty/windows/Output/installer.exe putty/x86/$(Ifilename).exe deliver putty/doc/puttydoc.zip putty/$@ deliver putty/doc/putty.chm putty/$@ deliver putty/doc/putty.hlp putty/$@ @@ -210,5 +229,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 x86 directory, providing a link for the installer. -in-dest putty/x86 do set -- putty*installer.exe; for k in '' .gpg; do echo RedirectMatch temp '(.*/)'putty-installer.exe$$k\$$ '$$1'"$$1$$k" >> .htaccess; done +# And one in the x86 directory, providing links for the installers. +in-dest putty/x86 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