mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
osxlaunch: stop setting DYLD_LIBRARY_PATH.
It actually doesn't seem to be necessary: running 'otool -L' on the real binary in the application bundle (Pterm-bin or PuTTY-bin) lists a lot of paths starting with "@executable_path/../Resources/", which I take to mean that the application is already set up to automatically load the GTK shared libraries out of its own bundle directory, without me having to give it the extra hint of DYLD_LIBRARY_PATH. Moreover, I just got round to upgrading my Mac to High Sierra, and now the version of osxlaunch _with_ DYLD_LIBRARY_PATH is causing a crash at program load time, when the libpng in the MacOS system library directory tries to use the libz in the application bundle and finds that it doesn't provide an entry point it was expecting ('inflateValidate'). I could try to fix that by updating the libz version in my OS X PuTTY build environment, but that seems to me to set a precedent of running to keep up with any further dependencies the system libraries happen to acquire in later releases. Better to reset DYLD_LIBRARY_PATH so that the system libpng will load the system libz and not get confused in the first place.
This commit is contained in:
parent
10e570cc79
commit
8ec55ef25f
@ -10,8 +10,8 @@
|
|||||||
*
|
*
|
||||||
* But the GTK program won't start up unless all those shared
|
* But the GTK program won't start up unless all those shared
|
||||||
* libraries etc are already pointed to by environment variables like
|
* libraries etc are already pointed to by environment variables like
|
||||||
* DYLD_LIBRARY_PATH, which won't be set up when the bundle is
|
* GTK_PATH and PANGO_LIBDIR and things like that, which won't be set
|
||||||
* launched.
|
* up when the bundle is launched.
|
||||||
*
|
*
|
||||||
* Hence, gtk-mac-bundler expects to install the program in the bundle
|
* Hence, gtk-mac-bundler expects to install the program in the bundle
|
||||||
* under a name like 'Contents/MacOS/Program-bin'; and the file called
|
* under a name like 'Contents/MacOS/Program-bin'; and the file called
|
||||||
@ -415,7 +415,7 @@ int main(int argc, char **argv)
|
|||||||
char *locale = alloc_cat(share, "/locale");
|
char *locale = alloc_cat(share, "/locale");
|
||||||
char *realbin = alloc_cat(prog_path, "-bin");
|
char *realbin = alloc_cat(prog_path, "-bin");
|
||||||
|
|
||||||
overwrite_env("DYLD_LIBRARY_PATH", lib);
|
// overwrite_env("DYLD_LIBRARY_PATH", lib);
|
||||||
overwrite_env("XDG_CONFIG_DIRS", xdg);
|
overwrite_env("XDG_CONFIG_DIRS", xdg);
|
||||||
overwrite_env("XDG_DATA_DIRS", share);
|
overwrite_env("XDG_DATA_DIRS", share);
|
||||||
overwrite_env("GTK_DATA_PREFIX", resources);
|
overwrite_env("GTK_DATA_PREFIX", resources);
|
||||||
|
Loading…
Reference in New Issue
Block a user