1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00
Commit Graph

46 Commits

Author SHA1 Message Date
Simon Tatham
b7174344e6 README: clarify that you need to run vcvars32 first.
The source-code README file claims that you can start by just running
'cmake .'. But on Windows, that's not literally true. cmake will
expect to find a compiler on your path, and if it doesn't, will fail
to configure.

I'd always taken this for granted, assuming that anyone who was
reading this README and trying to compile PuTTY was already familiar
with how Windows compiler toolchains work, and only needed the part of
the instructions that were specific to PuTTY.

But of course there's no reason that should be true. PuTTY's primary
target audience, even from before it was called PuTTY, has been Unix
expats: people who like to do nearly everything on Unix but for some
reason have a Windows machine in front of them. Such a person might
very well be familiar with _Unix_ compilation, where the C compiler is
installed in /usr/bin and on your PATH already. And then if they want
to try to tweak PuTTY, that will be the first time they have to engage
with a Windows compiler!

So we do need to at least _say_ that the user needs to start by
running vcvars32.bat or one of its friends. Even if we don't give full
details of where to find it (because I've known it to change now and
then), we at least need to remind people to go and look for it.
2024-06-29 12:19:35 +01:00
Jacob Nevins
f229aab20c Rewrap a paragraph in README. 2022-10-23 12:36:24 +01:00
Jacob Nevins
afebe8027f README: remove mention of doc/Makefile.
While cmake might create it, it's not something we ship any more.
2022-10-22 09:59:02 +01:00
Jacob Nevins
e45c6b76da Restore advice about making pterm set[ug]id.
cmake doesn't have convincing facilities for doing this in its install
step, so the new advice is to do it manually (we've provided no
equivalent to the autotools --enable-setuid or --enable-setgid options,
nor UTMP_USER/GROUP).
2022-05-19 10:52:56 +01:00
Jacob Nevins
868d309779 Minimally document how to install. 2022-05-18 18:46:40 +01:00
Simon Tatham
c19e7215dd Replace mkfiles.pl with a CMake build system.
This brings various concrete advantages over the previous system:

 - consistent support for out-of-tree builds on all platforms

 - more thorough support for Visual Studio IDE project files

 - support for Ninja-based builds, which is particularly useful on
   Windows where the alternative nmake has no parallel option

 - a really simple set of build instructions that work the same way on
   all the major platforms (look how much shorter README is!)

 - better decoupling of the project configuration from the toolchain
   configuration, so that my Windows cross-building doesn't need
   (much) special treatment in CMakeLists.txt

 - configure-time tests on Windows as well as Linux, so that a lot of
   ad-hoc #ifdefs second-guessing a particular feature's presence from
   the compiler version can now be replaced by tests of the feature
   itself

Also some longer-term software-engineering advantages:

 - other people have actually heard of CMake, so they'll be able to
   produce patches to the new build setup more easily

 - unlike the old mkfiles.pl, CMake is not my personal problem to
   maintain

 - most importantly, mkfiles.pl was just a horrible pile of
   unmaintainable cruft, which even I found it painful to make changes
   to or to use, and desperately needed throwing in the bin. I've
   already thrown away all the variants of it I had in other projects
   of mine, and was only delaying this one so we could make the 0.75
   release branch first.

This change comes with a noticeable build-level restructuring. The
previous Recipe worked by compiling every object file exactly once,
and then making each executable by linking a precisely specified
subset of the same object files. But in CMake, that's not the natural
way to work - if you write the obvious command that puts the same
source file into two executable targets, CMake generates a makefile
that compiles it once per target. That can be an advantage, because it
gives you the freedom to compile it differently in each case (e.g.
with a #define telling it which program it's part of). But in a
project that has many executable targets and had carefully contrived
to _never_ need to build any module more than once, all it does is
bloat the build time pointlessly!

To avoid slowing down the build by a large factor, I've put most of
the modules of the code base into a collection of static libraries
organised vaguely thematically (SSH, other backends, crypto, network,
...). That means all those modules can still be compiled just once
each, because once each library is built it's reused unchanged for all
the executable targets.

One upside of this library-based structure is that now I don't have to
manually specify exactly which objects go into which programs any more
- it's enough to specify which libraries are needed, and the linker
will figure out the fine detail automatically. So there's less
maintenance to do in CMakeLists.txt when the source code changes.

But that reorganisation also adds fragility, because of the trad Unix
linker semantics of walking along the library list once each, so that
cyclic references between your libraries will provoke link errors. The
current setup builds successfully, but I suspect it only just manages
it.

(In particular, I've found that MinGW is the most finicky on this
score of the Windows compilers I've tried building with. So I've
included a MinGW test build in the new-look Buildscr, because
otherwise I think there'd be a significant risk of introducing
MinGW-only build failures due to library search order, which wasn't a
risk in the previous library-free build organisation.)

In the longer term I hope to be able to reduce the risk of that, via
gradual reorganisation (in particular, breaking up too-monolithic
modules, to reduce the risk of knock-on references when you included a
module for function A and it also contains function B with an
unsatisfied dependency you didn't really need). Ideally I want to
reach a state in which the libraries all have sensibly described
purposes, a clearly documented (partial) order in which they're
permitted to depend on each other, and a specification of what stubs
you have to put where if you're leaving one of them out (e.g.
nocrypto) and what callbacks you have to define in your non-library
objects to satisfy dependencies from things low in the stack (e.g.
out_of_memory()).

One thing that's gone completely missing in this migration,
unfortunately, is the unfinished MacOS port linked against Quartz GTK.
That's because it turned out that I can't currently build it myself,
on my own Mac: my previous installation of GTK had bit-rotted as a
side effect of an Xcode upgrade, and I haven't yet been able to
persuade jhbuild to make me a new one. So I can't even build the MacOS
port with the _old_ makefiles, and hence, I have no way of checking
that the new ones also work. I hope to bring that port back to life at
some point, but I don't want it to block the rest of this change.
2021-04-17 13:53:02 +01:00
Simon Tatham
4ec2791945 Remove Makefile.bor.
After a conversation this week with a user who tried to use it, it's
clear that Borland C can't build the up-to-date PuTTY without having
to make too many compromises of functionality (unsupported API
details, no 'long long' type), even above the issues that could be
worked round with extra porting ifdefs.
2017-09-13 19:26:28 +01:00
Ben Harris
ce050c5b72 Fix a luking mention of Win32 in README. 2017-05-08 21:33:03 +01:00
Simon Tatham
6ea9d36ae9 Switch chiark URLs to https. 2017-05-07 16:29:01 +01:00
Jacob Nevins
2e5212fb41 Document VS2015 impact on very old Windows.
(In a XXX-REVIEW-BEFORE-RELEASE form.)

Also, note the effect of compilation with different Visual Studio
versions on Windows version compatibility in the source README, for the
sake of having it written down somewhere.
2017-02-16 23:47:03 +00:00
Jacob Nevins
0249dd0a31 We routinely compile with both VS2003 and 2015. 2017-01-23 23:41:39 +00:00
Jacob Nevins
b3c3871745 Enable various features in MinGW builds.
I've reset the baseline to be the version of mingw-w64 that comes with
Ubuntu 14.04. Right now, that means no features need to be omitted; all
you need to do is set TOOLPATH to i686-w64-mingw32- .

I've removed -mno-cygwin without comment. Toolchains which don't support
this flag have been around since at least 2012, so we can probably
assume that no-one cares about older toolchains by now.
2016-04-10 15:27:16 +01:00
Jacob Nevins
371c68e355 Rename Makefile.cyg to Makefile.mgw.
It's really only useful with MinGW rather than a Cygwin toolchain these
days, as recent versions of the latter insist against linking with the
Cygwin DLL.

(I think it may no longer be possible to build with Cygwin out of the
box at all these days, but I'm not going to say so without having
actually checked that's the case. Settle for listing MinGW first in
various comments and docs.)
2016-04-10 15:10:45 +01:00
Simon Tatham
776a31b7da Remove the warning about Unix PuTTY being Linux-specific.
Since I've been building it on OS X recently, I think it's fair to say
it can now cope with reasonable variation in pty APIs and the like.
2016-03-27 20:25:59 +01:00
Simon Tatham
7fdcb804a8 Update Visual Studio versions in README.
VC6 is hopefully long gone, and I've recently been testing on more
up-to-date versions.
2016-03-27 20:25:09 +01:00
Jacob Nevins
87683b6377 Update README for Gtk3. 2016-03-19 23:43:21 +00:00
Ben Harris
09111ea9c2 Update documentation to refer to Git rather than Subversion. 2014-11-01 17:17:57 +00:00
Ben Harris
65290ced76 Better document the various environments with which Makefile.cyg works.
[originally from svn r9670]
2012-09-18 23:07:42 +00:00
Simon Tatham
4a3f8bf767 Add a wrapper script called 'configure' at the top level, which runs
the real configure script from the unix subdirectory, but with cwd
unchanged so that you end up doing a VPATH build in the top-level
source directory.

Should, ideally, placate the people who expect 'configure' to be at
the top level, while still letting _me_ keep all the Unix-specific
stuff in the Unix subdirectory.

[originally from svn r9241]
2011-07-23 11:40:26 +00:00
Simon Tatham
7af708a603 Rename --with-gtk-version to --with-gtk, and support its negation
--without-gtk as a means of manually overriding the makefile into one
building the command-line tools only (as it would if GTK were not
found at all at configure time).

[originally from svn r9240]
2011-07-23 11:36:25 +00:00
Simon Tatham
64150a5ef2 Switch to using automake for the Unix autoconfigured build.
mkfiles.pl no longer generates a Makefile.in, but instead generates a
Makefile.am on which mkauto.sh runs automake. This means that the
autoconfigured makefile now does build-time dependency tracking (a
standard feature of automake-generated makefiles), and is generally
more like what Unix people will expect.

Some of the old-style make command-line settings (VER=-DRELEASE=foo,
XFLAGS=-DDEBUG) will still work; the COMPAT settings are better done
by autoconfiguration, and my habitual 'XFLAGS="-g -O0"' for an easily
debuggable build will actually not work any more because CFLAGS is
specified _after_ XFLAGS, so I should instead write 'make CFLAGS=-O0'
(-g is the default in automake, removed at 'make install' time).

The new makefile will automatically degrade into one that builds the
command-line tools only, in the case where GTK could not be found. In
principle, therefore, it should be an adequate replacement for _both_
the static Unix makefiles, Makefile.gtk and Makefile.ux. I haven't
actually retired those in this commit, but I'm pretty tempted.

[originally from svn r9239]
2011-07-23 11:33:29 +00:00
Jacob Nevins
506a81d5ba Mention Makefile.ux.
Be less certain about the possibility of building with vanilla VC6.
Provide more details of actively tested toolchains.

[originally from svn r8609]
2009-07-28 23:30:38 +00:00
Simon Tatham
9f13d75c74 Manfred Schwarb points out that the README contains an outdated
comment about GTK 2 not being supported.

[originally from svn r8058]
2008-06-07 16:25:46 +00:00
Jacob Nevins
a4aed21c1a Miscellaneous updates.
[originally from svn r7090]
2007-01-10 00:54:08 +00:00
Jacob Nevins
9ca35dd9e5 Spell out more explicitly what needs to be done with vanilla VC6, since it
seems to be becoming a FAQ.

[originally from svn r6752]
2006-07-07 20:56:22 +00:00
Jacob Nevins
789c47bcdd Mention compile-time directives and where they're documented.
[originally from svn r6497]
2005-12-16 16:43:28 +00:00
Ben Harris
c1c27e9fb8 Add support for generating project files for use with Dev-C++, contributed
by Florian Gaab.

[originally from svn r6201]
2005-08-22 20:37:13 +00:00
Jacob Nevins
203a25d502 Miscellaneous updates:
- note Visual Foo version requirements
 - note which things are done for you in our source snapshots
 - other tweaks

[originally from svn r5839]
2005-05-23 12:41:21 +00:00
Ben Harris
265950a800 Move generation of the "configure" script into its own script so that
people who check the code out of Subversion can get it to go.

[originally from svn r5674]
2005-04-25 16:36:43 +00:00
Ben Harris
0227bfdbc7 Add a mechanism for using autoconf to detect the quirks of Unix systems
rather than relying on the user to edit the Makefile.  Makefile.gtk
still works as well as it ever did, but now we get a Makefile.in alongside
it.  mkunxarc.sh now relies on autoconf and friends to build the configure
script for the Unix source distribution.

[originally from svn r5673]
2005-04-25 15:55:06 +00:00
Simon Tatham
cb45b9cc25 Now that we have Subversion's file renaming ability, it's time at
long last to move all the Windows-specific source files down into a
`windows' subdirectory. Only platform-specific files remain at the
top level. With any luck this will act as a hint to anyone still
contemplating sending us a Windows-centric patch...

[originally from svn r4792]
2004-11-16 22:14:56 +00:00
Simon Tatham
1b94cc85c6 Various changes related to the Subversion migration.
[originally from svn r4790]
2004-11-16 18:01:39 +00:00
Jacob Nevins
c7498e2b18 Mention requirement for Gtk+-1.2.
Other minor cleanups.

[originally from svn r4539]
2004-09-09 18:00:05 +00:00
Jacob Nevins
86cafb4524 Talk about Halibut; mention Unix `install' target; mention lack of Makefiles
if you check out directly from CVS as it's come up once or twice.

[originally from svn r4370]
2004-07-29 10:09:25 +00:00
Simon Tatham
ad889c93d2 Add some Unix blurb.
[originally from svn r3817]
2004-02-07 17:38:54 +00:00
Simon Tatham
fe793ca4f8 Oh, and mention lcc in the README.
[originally from svn r3745]
2004-01-20 20:35:49 +00:00
Simon Tatham
fb8d264f28 Joe Yates's patch to make mkfiles.pl generate Visual Studio project
files as well as an nmake makefile. Needed line-end tweakery in
order to be able to generate usable project files when run on Unix,
but other than that appears fine. Ooh!

[originally from svn r3721]
2004-01-17 13:48:40 +00:00
Jacob Nevins
8cc836095e Mention Roald Ribe's success with OpenWatcom and Makefile.vc
[originally from svn r3332]
2003-07-06 09:34:03 +00:00
Simon Tatham
3006fa4f38 Update README to make it clear it's a _source_ README.
[originally from svn r1970]
2002-09-20 18:57:05 +00:00
Jacob Nevins
d6c766a279 Fixed reference to putty-bugs@lists to putty@projects.
[originally from svn r1594]
2002-03-16 18:23:27 +00:00
Simon Tatham
a011a5edba Completely revamped mkfiles.pl which incorporates dependency
analysis (for both .c and .rc files). Generates the VC++ makefile as
well as the other two; the authoritative source is now the new file
`Recipe' rather than any particular Makefile. Note that `Makefile'
is still here as a relic of the old way until we stop the nightly
builds using it, but it'll be gone soon.

[originally from svn r1592]
2002-03-16 15:49:28 +00:00
Simon Tatham
7cda7dc475 PuTTY website URL spelling change
[originally from svn r415]
2000-03-16 14:56:26 +00:00
Simon Tatham
5176e1e9bb Add multi-makefile management system
[originally from svn r349]
1999-12-13 17:21:42 +00:00
Simon Tatham
d5123675aa Add description of workaround for Visual Studio 6 problem
[originally from svn r331]
1999-11-30 11:39:04 +00:00
Simon Tatham
f1f2aafbfc Add spiel about there being a comment at the top of Makefile
[originally from svn r291]
1999-11-10 10:28:59 +00:00
Simon Tatham
b5c923f250 Added LICENCE and README files
[originally from svn r290]
1999-11-10 09:47:31 +00:00