Граф коммитов

58 Коммитов

Автор SHA1 Сообщение Дата
Simon Tatham 650404f32c Server prep: pass "implementation name" to ssh_verstring_new.
The word 'PuTTY' in the outgoing SSH version string has always
represented the name of the *SSH implementation* as opposed to the
name of the specific program containing it (for example, PSCP and
PSFTP don't announce themselves with a different banner). But I think
that a change from client to server merits a change in that
implementation name, so I'm removing the prefix "PuTTY" from the
constant string sshver[], and moving it to a parameter passed in
separately to ssh_verstring_new, so that the upcoming server can pass
in a different one.
2018-10-21 10:02:10 +01:00
Simon Tatham 9f6b59fa2e Fix platform field in Windows on Arm installers.
I had previously left the platform field (in line 7 of the installer
database's SummaryInformation table) set at "x86" instead of any value
you might expect such as "Arm" or "Arm64", because I found that an MSI
file with either of the latter values was rejected by WoA's msiexec as
invalid.

It turns out this is because I _also_ needed to upgrade the installer
database schema version to a higher value than I even knew existed:
apparently the problem is that those platform fields aren't present in
the older schema. A test confirms that this works.

Unfortunately, WiX 3 doesn't actually know _how_ to write MSIs with
those platform values. But that's OK, because diffing the x86 and x64
MSIs against each other suggested that there were basically no other
changes in the database tables - so I can just generate the installer
as if for x64, and then rewrite that one field after installer
construction using GNOME msitools to take apart the binary file
structure and put it back together. (Those are the same tools I'm
using as part of my system for running WiX on Linux in the first
place.)

This commit introduces a script to do that post-hoc bodging, and calls
it from Buildscr. I've also changed over the choice of Program Files
folder for the Arm installers so that it's ProgramFiles64Folder
instead of ProgramFilesFolder - so now the Windows on Arm installer
doesn't incongruously default to installing in C:\Program Files (x86)!
2018-08-21 07:17:06 +01:00
Simon Tatham accb6931ce Add HTTP redirects for the Windows on Arm installers.
There's always one - I did everything else in the build script, but
forgot to arrange for the wa32 and wa64 output subdirs to have a
.htaccess redirect from a fixed name like 'putty-arm64-installer.msi'
to whatever the real file name is in that particular build.
2018-06-04 19:13:13 +01:00
Simon Tatham ec850f4d98 Build MSI installers for Arm Windows.
I expected this to be nightmarish because WiX 3 doesn't know about the
Windows on Arm platform at all. Fortunately, it turns out that it
doesn't have to: testing on a borrowed machine I find that Windows on
Arm's msiexec.exe is quite happy to take MSIs whose platform field in
the _SummaryInformation table says "Intel".

In fact, that seemed to be _all_ that my test machine would accept: I
tried taking the MSI apart with msidump, putting some other value in
there (e.g. "Arm64" or "Arm") and rebuilding it with msibuild, and all
I got was messages from msiexec saying "This installation package is
not supported by this processor type."

So in fact I just give WiX the same -arch x86 option that I give it
for the real 32-bit x86 Windows installer, but then I point it at the
Arm binaries, and that seems to produce a viable MSI. There is the
unfortunate effect that msiexec forcibly sets the default install
location to 'Program Files (x86)' no matter how I strive to make it
set it any other way, but that's only cosmetic: the programs _run_
just fine no matter which Program Files directory they're installed
into (and I know this won't be the first piece of software that
installs itself into the wrong one). Perhaps some day we can find a
way to do that part better.

On general principles of caution (and of not really wanting to force
Arm machines to emulate x86 code at all), the Arm versions of the
installers have the new DllOk=no flag, so they're pure MSI with no
embedded DLLs.
2018-06-01 19:35:15 +01:00
Simon Tatham 23698d6164 Installer: condition out use of WiX DLL components.
This arranges that we can build a completely pure MSI file, which
doesn't depend on any native code at install time. We don't lose much
by doing this - only the option to pop up the README file at the end
of installation, and validation of the install directory when you
select it from a file browser.

My immediate use for this is that I want to use it for installers that
will run on Windows on Arm. But it also seems to me like quite an
attractive property in its own right - no native code at all running
at install time would be an _especially_ good guarantee that that code
can't be hijacked by DLLs in the download directory. So I may yet
decide that the features we're losing are not critical to _any_
version of the MSI, and throw them out unconditionally.
2018-06-01 19:35:15 +01:00
Simon Tatham cbf4b10ebd Buildscr: add one more make -j flag.
Somehow yesterday I managed to miss the one in the icons build
command. It's not the most critical one to speed up, but every little
helps.
2018-06-01 19:35:15 +01:00
Simon Tatham 8615892fb7 Buildscr: separate 'make all' from 'make cleantestprogs'.
When our Windows make commands were serial, 'make all cleantestprogs'
was a nice shorthand for 'first build all the binaries, then delete
the ones we don't want to ship'. Now they're using -j, that doesn't
work so well - last night's snapshot build log shows that the command
'rm -f testbn.exe' from the cleantestprogs target happened _before_
the lld-link command that created testbn.exe in the first place, so
that file got shipped into the download directory by mistake.

Easily fixed, of course - just run two separate make commands per
build directory.
2018-06-01 19:35:15 +01:00
Simon Tatham 2cf07bb8fe Buildscr: parallelise all the 'make' commands.
Now we're building four rather than two sets of Windows binaries, the
build time has gone up rather painfully. I've just added a feature to
bob where it will invent a sensible value to use in 'make -j' and the
like, so let's start using it.
2018-05-31 18:50:18 +01:00
Simon Tatham a4d82d90a8 Add Arm Windows builds to the main build script.
I build both 32- and 64-bit versions of the .exe files, code-sign
them, and create the same .zip file as I do for x86 Windows. I don't
yet have a method of building Arm MSI installers, though.
2018-05-31 18:50:18 +01:00
Simon Tatham 3cd10509a5 Update version number for 0.70 release. 2017-07-04 20:29:54 +01:00
Simon Tatham fd6898b586 Build the MSI using Wix run on Linux via Mono.
I have a grubby method of getting this to work without Wine, which I
intend to get round to publishing just as soon as I finish deciding
what its best shape is. But I don't want to wait for that before
starting to actually use it, because this eliminates the last trace of
Windows in the PuTTY Windows builds.
2017-05-27 20:07:00 +01:00
Simon Tatham 599ca6d726 Build using clang-cl instead of Visual Studio.
This permits me to do the binary builds via cross-compilation on
Linux, which is nice from a perspective of not having my build
environment subject to the same potential pool of Windows malware that
might be interested in infecting the resulting binaries. Also, it's
quicker to build and the code generation is noticeably better.
2017-05-27 20:06:11 +01:00
Simon Tatham bbdb527d4d Turn off the Inno Setup installer build.
We've been planning to do that for a while, and this installer-builder
isn't going to work anyway in the build environment I'm about to move
everything to, so this seems like the moment.
2017-05-27 20:05:07 +01:00
Simon Tatham 93931b0a56 Switch to using Halibut's new direct .CHM generation.
This allows me to remove HTML Help Workshop completely from my build
dependencies, and good riddance!
2017-05-13 18:51:10 +01:00
Simon Tatham 6ea9d36ae9 Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
Simon Tatham b1829b81b5 Update version number for 0.69 release. 2017-04-24 14:45:52 +01:00
Simon Tatham 23fbc4f56b Update version number for 0.68 release.
This commit also updates the dumps of Plink's and PSCP's help output,
adding the -proxycmd option to both and the -shareexists option to
Plink.

(Or rather, _re_-adding the latter, since it was introduced in error
by commit 07af4ed10 due to a branch management error and hastily
removed again in 29e8c24f9. This time it really does match reality.)
2017-02-18 17:09:38 +00:00
Simon Tatham 73e5b6db25 Fix misspelled redirect of the 64-bit installer.
The .htaccess written by Buildscr into the w64 directory was applying
a redirect from 'putty-installer.msi', but in fact the name by which
the website links to snapshot and prerelease installers in that
directory is 'putty-64bit-installer.msi'.
2017-01-21 15:29:50 +00:00
Simon Tatham 5687a16fc1 Make bob builds show the full source git commit hash in buildinfo.
The Windows binaries, and both Windows and Unix source archives,
output from a bob build will now include the full SHA-1 of the source
git commit in their buildinfo (hence in all the About boxes and
command-line version output).

This will be occasionally useful to me at release time (there was that
one embarrassing incident where I managed not to notice that I'd made
a release build from entirely the wrong commit), but mostly, it just
seems like an obviously useful thing to put in a general buildinfo
section now that there is one.
2017-01-21 14:55:53 +00:00
Simon Tatham 23a9d5608c Fix PE header of the VS2015 builds so they run on Windows XP.
By default the VS2015 linker produces binaries with the minimum
version fields in the PE header set to 06.00, which causes XP not to
recognise them as valid binaries at all. But there's no other reason
VS2015-built binaries _can't_ run on versions of Windows as old as XP;
so here I add the link option to set those fields to 05.01 which makes
XP like them again.

This only applies to the 32-bit build, because the VS2015 64-bit
linker refuses to lower the min version field to under 06.00.
2017-01-21 14:55:53 +00:00
Simon Tatham 786d752757 Comment that Inno Setup installer remains 32-bit only.
Our Inno Setup installer is legacy as far as I'm concerned, so there's
no point in introducing a 64-bit version of it. 64-bit PuTTY users can
use the MSI from the start, and then there'll only ever have been one
kind of installer and they won't collide with one another.
2017-01-21 14:55:53 +00:00
Simon Tatham 5985bb7ea0 Name the 64-bit MSI distinctively.
The 32- and 64-bit installers may be distinguishable by their pathname
in the build output directory, but it's better to have their actual
filenames be different as well, so they don't collide in people's
download directories.
2017-01-21 14:55:52 +00:00
Simon Tatham faae648475 Build an MSI installer for the new Win64 binaries.
The MSI format has a fixed field for target architecture, so there's
no way to build a single MSI that can decide at install time whether
to install 32-bit or 64-bit (or both). The best you can do along those
lines, apparently, is to have two MSI files plus a bootstrap .EXE that
decides which of them to run, and as far as I'm concerned that would
just reintroduce all the same risks and annoyances that made us want
to migrate away from .EXE installers anyway.
2017-01-21 14:55:52 +00:00
Simon Tatham e6059f18d4 Build a set of Windows 32-bit 'legacy' binaries with VS2003.
The downside of moving to VS2015 is that its output won't run on very
old versions of Windows. It's not yet clear whether anyone still cares
about things before, say, Win2000 or WinXP, but since my build
environment still _has_ VS2003 available, it's easy enough to build
the extra set of binaries anyway just in case. (At least for now.)

The new binaries live in a build output directory 'w32old'. As with
w64, there is no installer for them; but unlike w64, I don't intend to
add one.
2017-01-21 14:55:52 +00:00
Simon Tatham d9b05f8861 Build 64-bit Windows binaries, alongside the 32-bit ones.
Now we've got VS2015 available (and thanks to a lot of 64-bit
cleanness fixing, in particular Tim Kosse's large patch series from
August 2015) we can do this fairly easily.

The new binaries are shipped in a 'w64' directory, alongside the
just-renamed 'w32'. There is no 64-bit installer (yet).
2017-01-21 14:55:52 +00:00
Simon Tatham 4b17025035 Switch the main Windows build to Visual Studio 2015.
This is a big jump from the previous VS2003. It should add a little
performance (VS2015 is a better-optimising compiler), but mostly it's
groundwork for doing other useful things such as 64-bit builds and
security-related linker features.

The downside is reduced support for very old versions of Windows,
which I'll address shortly.
2017-01-21 14:55:48 +00:00
Simon Tatham 504c00e4ad Rename the 'x86' build output directory to 'w32'.
This change does affect the layout of the output build directory, and
will need corresponding website changes to avoid breaking links.

'x86' was a misnomer anyway, because it was really Windows-specific
rather than just x86-specific. Calling it 'w32' will make it look less
strange to add 'w64' alongside it.
2017-01-21 14:55:48 +00:00
Simon Tatham 7ccc105c81 Do the Windows build in a subdirectory windows/build32.
Uses the BUILDDIR mechanism I added to Makefile.vc in commit
d3db17f3e.

This change is purely internal to Buildscr, and shouldn't affect the
output of a build. It paves the way to have Buildscr run multiple
Windows builds using different compilers, by putting each one in a
different subdirectory so that their outputs don't collide.
2017-01-21 14:55:47 +00:00
Simon Tatham d29d33e165 Update build script for Inno Setup 5.5.9.
I've just upgraded my build environment to the latest Inno Setup
(apparently fixing some DLL hijacking issues), and found that the
build script doesn't run any more because the name of the output file
has changed - it used to produce Output/setup.exe, but now it produces
Output/mysetup.exe.

Rather than just fixing the build script to expect the new name, I've
explicitly specified an output filename of my own choice in putty.iss,
so that the build script should now work with versions before and
after the change.
2016-04-08 11:01:58 +01:00
Simon Tatham 1620aef7c6 MSI installer: offer to display the README file after install.
This is a thing that the Inno Setup installer did, and that I didn't
get round to replicating when I rushed out the initial MSI in a hurry.

I've checked that this doesn't prevent unattended installation by
administrators: running 'msiexec /q /i putty-whatever.msi' as
administrator still installs silently after this change, without
popping up the README unexpectedly on anyone's desktop as a side
effect.

(I _think_ - but I'm still a long way from an MSI expert - that that's
because /q turns off the whole UI part of the MSI system, and the
loading of README is actually triggered by the transition away from
the final UI dialog box, which we now never visit in the first place.)
2016-04-02 08:26:26 +01:00
Simon Tatham 5c5879b99d New Windows installer system, using WiX to build an MSI.
Mostly this is a reaction to the reports of Inno Setup having a DLL
hijacking vulnerability. But also, the new installer has several other
nice features that our Inno Setup one didn't provide: it can put the
PuTTY install directory on PATH automatically, and it supports
completely automatic and silent install/uninstall via 'msiexec /q'
which should make it easier for sysadmins to roll out installation in
large organisations. Also, it just seems like good sense to be using
Windows's own native packaging system (or closest equivalent) rather
than going it alone.

(And on the developer side, I have to say I like the fact that WiX
lets me pass in the version number as a set of command-line #define-
equivalents, whereas for Inno Setup I had to have Buildscr apply Perl
rewriting to the source file.)

For the moment, I'm still building the old Inno Setup installer
alongside this one, but I expect to retire it once the WiX one has
survived in the wild for a while and proven itself more or less
stable.

I've found both MSI and WiX to be confusing and difficult
technologies, so this installer has some noticeable pieces missing
(e.g. retrospective reconfiguration of the installed feature set, and
per-user vs systemwide installation) simply because I couldn't get
them to work. I've commented the new installer source code heavily, in
the hope that a passing WiX expert can give me a hand!
2016-03-09 20:55:38 +00:00
Simon Tatham 8e41e0a4b2 Use bob's new 'with' system in the build script.
Now the dust from 0.67 has settled, I can do this without getting my
git branches hopelessly confused :-)
2016-03-05 22:23:34 +00:00
Simon Tatham 984fe3dde8 Merge branch 'pre-0.67' 2016-02-29 19:59:59 +00:00
Simon Tatham 830b7f8898 Update version number for 0.67 release. 2016-02-29 19:59:59 +00:00
Simon Tatham 0d919e2124 Code-sign the Windows PuTTY binaries and installer.
Or, at least, potentially do so. The build script now has a slot into
which code-signing can be dropped by setting a variable in the bob
configuration to specify an appropriate command line.

The variable will typically need to point at a script wrapping the
actual signing tool, since there are lots of fiddly details
(timestamping countersignature, certificate, private key, etc) not
given on the command lines in this build script, on the basis that
they're local configuration questions for whoever is _running_ this
build script.

(cherry picked from commit d0e9630e1c)
2016-02-29 19:59:34 +00:00
Simon Tatham 6b9bccf388 Convert Buildscr to use the new "do/win" mechanism.
(cherry picked from commit 470337d0f2)
2016-02-29 19:59:33 +00:00
Simon Tatham daeeca55a4 Promote 'testbn' to a binary built by the makefiles.
This makes it easier to compile in multiple debugging modes, or on
Windows, without having to constantly paste annoying test-compile
commands out of comments in sshbn.c.

The new binary is compiled into the build directory, but not shipped
by 'make install', just like fuzzterm. Unlike fuzzterm, though, testbn
is also compiled on Windows, for which we didn't already have a
mechanism for building unshipped binaries; I've done the very simplest
thing for the moment, of providing a target in Makefile.vc to delete
them.

In order to comply with the PuTTY makefile system's constraint of
never compiling the same object multiple times with different ifdefs,
I've also moved testbn's main() out into its own source file.
2015-12-16 15:26:31 +00:00
Simon Tatham d0e9630e1c Code-sign the Windows PuTTY binaries and installer.
Or, at least, potentially do so. The build script now has a slot into
which code-signing can be dropped by setting a variable in the bob
configuration to specify an appropriate command line.

The variable will typically need to point at a script wrapping the
actual signing tool, since there are lots of fiddly details
(timestamping countersignature, certificate, private key, etc) not
given on the command lines in this build script, on the basis that
they're local configuration questions for whoever is _running_ this
build script.
2015-12-11 18:11:43 +00:00
Simon Tatham 470337d0f2 Convert Buildscr to use the new "do/win" mechanism. 2015-11-17 18:41:52 +00:00
Simon Tatham 07af4ed100 Update version number for 0.66 release. 2015-11-07 09:53:03 +00:00
Simon Tatham 8c803e725e Key rollover: fix the .htaccess files built by Buildscr.
The build script generates the .htaccess files that go in each
individual build and redirect generic names like 'putty.tar.gz' to the
real filenames including that build's version number. Those .htaccess
files redirect the corresponding signatures as well, so they need
updating now that we're generating signature files with a different
extension.

(cherry picked from commit 6744387924)
2015-10-17 17:30:17 +01:00
Simon Tatham 7cfe83f791 Bump version number for 0.65 release. 2015-07-25 10:54:57 +01:00
Simon Tatham 2713396c91 Bump version number for 0.64 release. 2015-02-28 07:57:35 +00:00
Simon Tatham 4d8782e74f Rework versioning system to not depend on Subversion.
I've shifted away from using the SVN revision number as a monotonic
version identifier (replacing it in the Windows version resource with
a count of days since an arbitrary epoch), and I've removed all uses
of SVN keyword expansion (replacing them with version information
written out by Buildscr).

While I'm at it, I've done a major rewrite of the affected code which
centralises all the computation of the assorted version numbers and
strings into Buildscr, so that they're all more or less alongside each
other rather than scattered across multiple source files.

I've also retired the MD5-based manifest file system. A long time ago,
it seemed like a good idea to arrange that binaries of PuTTY would
automatically cease to identify themselves as a particular upstream
version number if any changes were made to the source code, so that if
someone made a local tweak and distributed the result then I wouldn't
get blamed for the results. Since then I've decided the whole idea is
more trouble than it's worth, so now distribution tarballs will have
version information baked in and people can just cope with that.

[originally from svn r10262]
2014-09-24 10:33:13 +00:00
Simon Tatham 1dff23a214 Introduce a new version type, 'prerelease'. Quotes the version number
it's a pre-release of, and the revision number so you can tell two
pre-releases apart. I intend to use this for builds from branch-0.61
until I call it 0.62 proper.

[originally from svn r9343]
2011-11-26 17:35:21 +00:00
Simon Tatham c8f2b65d16 Generate some checksum files with more up-to-date hash functions than
MD5. Shipped (and signed) alongside the existing 'md5sums' file.

[originally from svn r9189]
2011-07-10 11:45:52 +00:00
Simon Tatham ce6349bd89 Capitalisation error.
[originally from svn r7476]
2007-04-22 08:56:31 +00:00
Jacob Nevins f634340275 LICENCE in the installer should have CP/M line endings.
[originally from svn r7290]
2007-02-15 23:27:29 +00:00
Jacob Nevins f947275c64 Typo.
[originally from svn r7271]
2007-02-11 18:09:03 +00:00
Simon Tatham c4893477bd I've changed my mind about the PuTTY build script. It now delivers
the release directory into a _subdirectory_ of the main build.out,
and delivers the link maps and sign.sh alongside it. That simplifies
both the nightly snapshot cron job (which now doesn't have to
carefully move the maps out of the release directory or go looking
in strange places for sign.sh) and my release procedure (for much
the same reasons).

[originally from svn r7258]
2007-02-08 18:53:11 +00:00