On Jan 24, 12:10 pm, Giovanni Bajo <[email protected]> wrote:
> On mer, 2009-01-21 at 07:59 -0800, [email protected] wrote:
>
>
>
> > Yes, doing LD_LIBRARY_PATH works... along with doing MEIPASS2=./lib.
> > But that defeats much of the purpose of having a compiled binary in
> > the first place, if I need to write a wrapper script to launch it and
> > set proper env variables.
>
> > I have to make my iu.py hack a little more extensible, and then I
> > should be all set to work with any version of pyinstaller.
>
> But the PyInstaller bootloader already sets LD_LIBRARY_PATH to the
> executable's directory. See source/linux/main.c, line 112. What you want
> is to change that code so that it looks within "Lib" as well.
>
> Something like (completely untested):
>
> /* now LD_LIBRARY_PATH */
> strcpy(ldlib_envvar, "LD_LIBRARY_PATH=");
> strcat(ldlib_envvar, workpath);
> strcat(ldlib_envvar, ":");
> strcat(ldlib_envvar, workpath);
> strcat(ldlib_envvar, "/Lib");
>
> --
> Giovanni Bajo
> Develer S.r.l.http://www.develer.com
>From my understanding, source/linux/main.c only exports
LD_LIBRARY_PATH if workpath is not null (workpath = getenv
( "_MEIPASS2" ). So, I would have to change too much of the source
code and I doubt the patches would get taken in up-stream. It would
probably be some sort of security risk if the system were to
automatically look in subdir."/lib" always without the person
packaging the program explicitly flag that as an option.
Also, hacking the C code for the linux platform forces the same amount
of hacking for the windows platform as well, and I don't think i can
maintain that complex of a patch (again, assuming that up-stream
doesn't want this feature).
Hacking iu.py works on both platforms (guessing: haven't tried windows
yet) and satisfies the purely cosmetic desire to reduce the number of
files in the dist directory, making the executable much easier to spot.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---