]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - unix/gtkapp.c
New program 'osxlaunch', to use as an OS X bundle launcher.
authorSimon Tatham <anakin@pobox.com>
Wed, 23 Mar 2016 22:13:30 +0000 (22:13 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 23 Mar 2016 22:22:48 +0000 (22:22 +0000)
commit7d705ed1bdfdf44f4af283ed3505030727d78084
tree7732e97e2e42467d018af334c99d73992b76ce8b
parent19b5a74f71433db650cd754d2eefaa038b43ff9e
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
Recipe
unix/gtkapp.c
unix/osxlaunch.c [new file with mode: 0644]
unix/uxpty.c
unix/uxputty.c