Compiling GnuPG 2.0.1 on MacOS X
Werner Koch
wk at gnupg.org
Tue Feb 20 11:23:50 CET 2007
On Wed, 14 Feb 2007 19:58, benjamin at py-soft.co.uk said:
> 'cos I was searching through my MacOS programming book for a solution to
> MacOS X not reading the GUI bundle information and it suggested using
> system.
I might have a solution. In agent/call-pinentry you find this code:
if ( !(pgmname = strrchr (opt.pinentry_program, '/')))
pgmname = opt.pinentry_program;
else
pgmname++;
argv[0] = pgmname;
What is does is to setup argv[0] so that there is no directory part.
Now my guess is that OS X uses argv[0] to locate the bundle and won't
find it if there is no directory part in argv[0]. To test it, you
just need to change the last line to:
argv[0] = opt.pinentry_program;
Let me know if it works and I change the code.
Using system helps because it creates a new argv[0].
Shalom-Salam,
Werner
More information about the Gnupg-users
mailing list