simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Wed Mar 23 22:26:28 GMT 2016


TL;DR:
  450a995 Use NetPBM .pam as an intermediate format in the icon makefile.
  01778a2 Make gtkmain.c contain the actual main().
  1af3bd9 New program type [XT] in Recipe.
  9866b66 Make an OS X icon for pterm as well as PuTTY.
  f23375b Delegate GTK window creation to gtkmain.c.
  19b5a74 New front end to PuTTY/pterm, as a GtkApplication.
  7d705ed New program 'osxlaunch', to use as an OS X bundle launcher.
  c73f255 Create OS X application bundles for PuTTY and pterm.
  9ee7768 Add '.DS_Store' to .gitignore.
  ae53014 Add a TODO list to gtkapp.c.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2016-03-23 22:26:28

commit 450a995f05a7dfbf75d7e0913accf1af2ee9d165
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=450a995f05a7dfbf75d7e0913accf1af2ee9d165;hp=eac66b0281f30be97094fe94174e65477b018812
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 06:41:27 2016 +0000

    Use NetPBM .pam as an intermediate format in the icon makefile.
    
    mkicon.py now outputs .pam by hand, rather than using ImageMagick to
    go straight to .png. For most purposes the main makefile then uses
    ImageMagick anyway, to convert those .pams straight to the .pngs that
    the rest of the scripts were expecting. But one script that doesn't do
    that is macicon.py, which builds the MacOS .icns file by directly
    reading those .pam files back in.
    
    This allows the 'make icns' target in the icons directory to build
    from a clean checkout on vanilla MacOS, without requiring a user to
    install ImageMagick or any other non-core Python image handling
    module.
    
    (I could probably take this change at least a little bit further. I
    don't see any reason why icon.pl - generating the Windows .ico files -
    couldn't read the .pam files directly, about as easily as macicon.py
    did, if anyone had a use case for building the Windows icons in the
    presence of Python and Perl but in the absence of ImageMagick. But the
    .png files are directly useful outputs for Unix, so _some_ PNG-writing
    will have to remain here.)

 .gitignore       |    1 +
 icons/Makefile   |   37 ++++++++++++++++++++++---------------
 icons/macicon.py |   35 ++++++++++++++++++++++++-----------
 icons/mkicon.py  |   50 ++++++++++++++++++++++++++------------------------
 4 files changed, 73 insertions(+), 50 deletions(-)

commit 01778a2d546bb4cebe3a4e5a0bb227deda548182
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=01778a2d546bb4cebe3a4e5a0bb227deda548182;hp=450a995f05a7dfbf75d7e0913accf1af2ee9d165
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 21:58:40 2016 +0000

    Make gtkmain.c contain the actual main().
    
    Instead of main() living in uxputty.c and uxpterm.c, and doing a
    little bit of setup before calling the larger pt_main() in gtkmain.c,
    I've now turned things backwards: the big function in gtkmain.c *is*
    main(), and the small pieces of preliminary setup in uxputty.c and
    uxpterm.c are now a function called setup() which is called from
    there. This will allow me to reuse the rest of ux{putty,pterm}.c, i.e.
    the assorted top-level bits and pieces that distinguish PuTTY from
    pterm, in the upcoming OS X application that will have its own main().

 unix/gtkmain.c |    9 ++++++++-
 unix/uxpterm.c |   11 +++--------
 unix/uxputty.c |    8 +-------
 3 files changed, 12 insertions(+), 16 deletions(-)

commit 1af3bd927f12334c5417f6ac1f56687e0f68f764
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=1af3bd927f12334c5417f6ac1f56687e0f68f764;hp=01778a2d546bb4cebe3a4e5a0bb227deda548182
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:01:10 2016 +0000

    New program type [XT] in Recipe.
    
    This is to [X] what [UT] is to [U]: that is, it's a program linked
    against the GTK libraries, but one which doesn't become part of the
    'make install' set. I'll use this for the individual binaries that
    will go in the OS X application bundles, and then have another
    makefile rule pick those up in turn.

 mkfiles.pl |   19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

commit 9866b662c4da44795d74ba27a1084c841ef5e4a2
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=9866b662c4da44795d74ba27a1084c841ef5e4a2;hp=1af3bd927f12334c5417f6ac1f56687e0f68f764
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:02:46 2016 +0000

    Make an OS X icon for pterm as well as PuTTY.

 icons/Makefile |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

commit f23375b14e41e075360617ecd821385d057137e6
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=f23375b14e41e075360617ecd821385d057137e6;hp=9866b662c4da44795d74ba27a1084c841ef5e4a2
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:03:46 2016 +0000

    Delegate GTK window creation to gtkmain.c.
    
    This is a weird thing to have to do, but it is necessary: the OS X
    PuTTY will need its top-level windows to be instances of a thing
    called GtkApplicationWindow, rather than plain GtkWindow. Hence, the
    actual creation of windows needs to be somewhere that isn't
    centralised between the two kinds of front end.

 unix/gtkmain.c |    5 +++++
 unix/gtkwin.c  |    2 +-
 unix/unix.h    |    3 +++
 3 files changed, 9 insertions(+), 1 deletion(-)

commit 19b5a74f71433db650cd754d2eefaa038b43ff9e
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=19b5a74f71433db650cd754d2eefaa038b43ff9e;hp=f23375b14e41e075360617ecd821385d057137e6
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:22:30 2016 +0000

    New front end to PuTTY/pterm, as a GtkApplication.
    
    When it's finished, this will be the backbone of the OS X GTK port:
    using a GtkApplication automatically gives us a properly OS X
    integrated menu bar.
    
    Using this source file in place of gtkmain.c turns the usual Unix
    single-session-per-process PuTTY or pterm into the multi-session-per-
    process OS X style one.
    
    Things like Duplicate Session can be done much more simply here - we
    just grab the Conf * from the source window and launch a new window
    using it, with no fiddly interprocess work needed.
    
    This is still experimental and has a lot of holes, but it's usable
    enough to test and improve.

 .gitignore    |    2 +
 Recipe        |    6 ++
 unix/gtkapp.c |  175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 183 insertions(+)

commit 7d705ed1bdfdf44f4af283ed3505030727d78084
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=7d705ed1bdfdf44f4af283ed3505030727d78084;hp=19b5a74f71433db650cd754d2eefaa038b43ff9e
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:13:30 2016 +0000

    New program 'osxlaunch', to use as an OS X bundle launcher.
    
    The big problem with making an OS X application out of a GTK program
    is that it won't start unless DYLD_LIBRARY_PATH and several other
    environment variables point at all the GTK machinery. So your app
    bundle has to contain two programs: a launcher to set up that
    environment, and then the real main program that the launcher execs
    once it's done so.
    
    But in our case, we also need pterm to start subprocesses _without_
    all that stuff in the environment - so our launcher has to be more
    complicated than the usual one, because it's also got to save every
    detail of how the environment was when it started up. So this is the
    launcher program I'm going to use. Comments in the header explain in
    more detail how it'll work.
    
    Also in this commit, I add the other end of the same machinery to
    gtkapp.c and uxpty.c: the former catches an extra command-line
    argument that the launcher used to indicate how it had munged the
    environment, and stores it in a global variable where the latter can
    pick it up after fork() and use to actually undo the munging.

 .gitignore       |    1 +
 Recipe           |    2 +
 unix/gtkapp.c    |    5 +
 unix/osxlaunch.c |  414 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 unix/uxpty.c     |   30 ++++
 unix/uxputty.c   |    1 +
 6 files changed, 453 insertions(+)

commit c73f25564f8abf9747ab8a1168f6a2dfe2c80d21
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=c73f25564f8abf9747ab8a1168f6a2dfe2c80d21;hp=7d705ed1bdfdf44f4af283ed3505030727d78084
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:14:13 2016 +0000

    Create OS X application bundles for PuTTY and pterm.
    
    This commit adds two .plist files, which go in the app bundles; two
    .bundle files, which are input to gtk-mac-bundler and explain to it
    how to _create_ the bundles; and a piece of manual addition to
    Makefile.am that actually runs gtk-mac-bundler after building the
    gtkapp.c based binaries and the OSX launcher. The latter is
    conditionalised on configuring --with-quartz (unlike the binaries
    themselves, which you can build on other platforms too, though they
    won't do much that's useful).

 .gitignore        |    2 ++
 Recipe            |   12 ++++++++++++
 configure.ac      |    7 +++++--
 unix/gtkapp.c     |   16 ++++++++++++++++
 unix/pterm.bundle |   43 +++++++++++++++++++++++++++++++++++++++++++
 unix/pterm.plist  |   30 ++++++++++++++++++++++++++++++
 unix/putty.bundle |   43 +++++++++++++++++++++++++++++++++++++++++++
 unix/putty.plist  |   30 ++++++++++++++++++++++++++++++
 8 files changed, 181 insertions(+), 2 deletions(-)

commit 9ee7768f31651c2b1f3f34d652b2564c0d8290f3
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=9ee7768f31651c2b1f3f34d652b2564c0d8290f3;hp=c73f25564f8abf9747ab8a1168f6a2dfe2c80d21
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:16:20 2016 +0000

    Add '.DS_Store' to .gitignore.
    
    This is a file that generally seems to turn up when you start using OS
    X Finder to interact with directories - which is more likely now that
    we're building OS X app bundles into this source tree.

 .gitignore |    1 +
 1 file changed, 1 insertion(+)

commit ae53014f535692dd444f2578cbb6edabe7550abb
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=ae53014f535692dd444f2578cbb6edabe7550abb;hp=9ee7768f31651c2b1f3f34d652b2564c0d8290f3
Author: Simon Tatham <anakin at pobox.com>
Date:   Wed Mar 23 22:17:09 2016 +0000

    Add a TODO list to gtkapp.c.
    
    This lists all the things I currently know to be wrong with the OS X
    work. There are quite a few of them, but I doubt I've thought of them
    all.

 unix/gtkapp.c |   91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)



More information about the tartarus-commits mailing list