Re: GTK-2.0 static linked application need minimal dependencies



> means this, that I should configure gtk2 with the flag '--sysconfdir'
> in pango and in gtk2? to place the config files f. e.
> in /abiword/etc to distribute it with the final executable?.

Not necessarily. You can also set environment variables.

What we do for GPS is to use a wrapper (shell script) that does the setting,
and then call the real executable:

<<
#!/bin/sh
# Copyright 2002 by ACT Europe.

prog=`basename $0`
root=`dirname $0`

# Strip 'bin' directory to retrieve the real root

root=`dirname $root`
LD_LIBRARY_PATH=$root/lib:$LD_LIBRARY_PATH
PANGO_RC_FILE=$root/etc/gps/pangorc
GTK_IM_MODULE_FILE=$root/etc/gps/gtk.immodules
GTK_DATA_PREFIX=$root

export LD_LIBRARY_PATH PANGO_RC_FILE GTK_DATA_PREFIX GTK_IM_MODULE_FILE
exec $root/bin/${prog}_exe "$@"
>>

This script is licensed under the GPL, so feel free to use it (or a similar
technique) for any GPL program.

Now, it would be really nice if all these env variable setting could be
avoided.

Arno



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]