README 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. This is the README for the source archive of PuTTY, a free Windows
  2. and Unix Telnet and SSH client.
  3. If you want to rebuild PuTTY from source, we provide a variety of
  4. Makefiles and equivalents. (If you have fetched the source from
  5. Git, you'll have to generate the Makefiles yourself -- see
  6. below.)
  7. There are various compile-time directives that you can use to
  8. disable or modify certain features; it may be necessary to do this
  9. in some environments. They are documented in `Recipe', and in
  10. comments in many of the generated Makefiles.
  11. For building on Windows:
  12. - windows/Makefile.vc is for command-line builds on MS Visual C++
  13. systems. Change into the `windows' subdirectory and type `nmake
  14. -f Makefile.vc' to build all the PuTTY binaries.
  15. As of 2017, we successfully compile PuTTY with both Visual Studio
  16. 7 (2003) and Visual Studio 14 (2015), so our guess is that it will
  17. probably build with versions in between those as well.
  18. (The binaries from Visual Studio 14 are only compatible with
  19. Windows XP and up. Binaries from Visual Studio 7 ought to work
  20. with anything from Windows 95 onward.)
  21. - Inside the windows/MSVC subdirectory are MS Visual Studio project
  22. files for doing GUI-based builds of the various PuTTY utilities.
  23. These have been tested on Visual Studio 7 and 10.
  24. You should be able to build each PuTTY utility by loading the
  25. corresponding .dsp file in Visual Studio. For example,
  26. MSVC/putty/putty.dsp builds PuTTY itself, MSVC/plink/plink.dsp
  27. builds Plink, and so on.
  28. - windows/Makefile.mgw is for MinGW / Cygwin installations. Type
  29. `make -f Makefile.mgw' while in the `windows' subdirectory to
  30. build all the PuTTY binaries.
  31. MinGW and friends can lag behind other toolchains in their support
  32. for the Windows API. Compile-time levers are provided to exclude
  33. some features; the defaults are set appropriately for the
  34. 'mingw-w64' cross-compiler provided with Ubuntu 14.04. If you are
  35. using an older toolchain, you may need to exclude more features;
  36. alternatively, you may find that upgrading to a recent version of
  37. the 'w32api' package helps.
  38. - windows/Makefile.lcc is for lcc-win32. Type `make -f
  39. Makefile.lcc' while in the `windows' subdirectory. (You will
  40. probably need to specify COMPAT=-DNO_MULTIMON.)
  41. - Inside the windows/DEVCPP subdirectory are Dev-C++ project
  42. files for doing GUI-based builds of the various PuTTY utilities.
  43. The PuTTY team actively use Makefile.vc (with VC7/10) and Makefile.mgw
  44. (with mingw32), so we'll probably notice problems with those
  45. toolchains fairly quickly. Please report any problems with the other
  46. toolchains mentioned above.
  47. For building on Unix:
  48. - unix/configure is for Unix and GTK. If you don't have GTK, you
  49. should still be able to build the command-line utilities (PSCP,
  50. PSFTP, Plink, PuTTYgen) using this script. To use it, change into
  51. the `unix' subdirectory, run `./configure' and then `make'. Or you
  52. can do the same in the top-level directory (we provide a little
  53. wrapper that invokes configure one level down), which is more like
  54. a normal Unix source archive but doesn't do so well at keeping the
  55. per-platform stuff in each platform's subdirectory; it's up to you.
  56. - unix/Makefile.gtk and unix/Makefile.ux are for non-autoconfigured
  57. builds. These makefiles expect you to change into the `unix'
  58. subdirectory, then run `make -f Makefile.gtk' or `make -f
  59. Makefile.ux' respectively. Makefile.gtk builds all the programs but
  60. relies on Gtk, whereas Makefile.ux builds only the command-line
  61. utilities and has no Gtk dependence.
  62. - For the graphical utilities, any of Gtk+-1.2, Gtk+-2.0, and Gtk+-3.0
  63. should be supported. If you have more than one installed, you can
  64. manually specify which one you want by giving the option
  65. '--with-gtk=N' to the configure script where N is 1, 2, or 3.
  66. (The default is the newest available, of course.) In the absence
  67. of any Gtk version, the configure script will automatically
  68. construct a Makefile which builds only the command-line utilities;
  69. you can manually create this condition by giving configure the
  70. option '--without-gtk'.
  71. - pterm would like to be setuid or setgid, as appropriate, to permit
  72. it to write records of user logins to /var/run/utmp and
  73. /var/log/wtmp. (Of course it will not use this privilege for
  74. anything else, and in particular it will drop all privileges before
  75. starting up complex subsystems like GTK.) By default the makefile
  76. will not attempt to add privileges to the pterm executable at 'make
  77. install' time, but you can ask it to do so by running configure
  78. with the option '--enable-setuid=USER' or '--enable-setgid=GROUP'.
  79. - The Unix Makefiles have an `install' target. Note that by default
  80. it tries to install `man' pages; if you have fetched the source via
  81. Git then you will need to have built these using Halibut
  82. first - see below.
  83. - It's also possible to build the Windows version of PuTTY to run
  84. on Unix by using Winelib. To do this, change to the `windows'
  85. directory and run `make -f Makefile.mgw CC=winegcc RC=wrc'.
  86. All of the Makefiles are generated automatically from the file
  87. `Recipe' by the Perl script `mkfiles.pl' (except for the Unix one,
  88. which is generated by the `configure' script; mkfiles.pl only
  89. generates the input to automake). Additions and corrections to Recipe,
  90. mkfiles.pl and/or configure.ac are much more useful than additions and
  91. corrections to the actual Makefiles, Makefile.am or Makefile.in.
  92. The Unix `configure' script and its various requirements are generated
  93. by the shell script `mkauto.sh', which requires GNU Autoconf, GNU
  94. Automake, and Gtk; if you've got the source from Git rather
  95. than using one of our source snapshots, you'll need to run this
  96. yourself. The input file to Automake is generated by mkfiles.pl along
  97. with all the rest of the makefiles, so you will need to run mkfiles.pl
  98. and then mkauto.sh.
  99. Documentation (in various formats including Windows Help and Unix
  100. `man' pages) is built from the Halibut (`.but') files in the `doc'
  101. subdirectory using `doc/Makefile'. If you aren't using one of our
  102. source snapshots, you'll need to do this yourself. Halibut can be
  103. found at <https://www.chiark.greenend.org.uk/~sgtatham/halibut/>.
  104. The PuTTY home web site is
  105. https://www.chiark.greenend.org.uk/~sgtatham/putty/
  106. If you want to send bug reports or feature requests, please read the
  107. Feedback section of the web site before doing so. Sending one-line
  108. reports saying `it doesn't work' will waste your time as much as
  109. ours.
  110. See the file LICENCE for the licence conditions.