4.6 installer: glade files installed to global prefix
Brian J. Tarricone
bjt23 at cornell.edu
Mon Jan 19 21:36:03 CET 2009
Jannis Pohlmann wrote:
> Am Sun, 18 Jan 2009 09:59:08 +0100
> schrieb Enrico Tröger <enrico.troeger at uvena.de>:
>
>> On Sun, 18 Jan 2009 04:35:49 +0100, Jannis Pohlmann <jannis at xfce.org>
>> wrote:
>>
>> G'Morning,
>>
>>> I just played with the installer a bit and created the necessary
>>> files to create an installer for 4.6. I did a test run, installing
>>> to /home/jannis/local as a normal user and I ran into a problem with
>>> the gladeui files. I don't have the log at hand right now, but I know
>>> that the build scripts tried to install stuff from libxfcegui4/glade/
>>> into the gladeui prefix (/usr/share/glade3 or something).
>>>
>>> So, for the installer this is a bit problematic. A lot of people will
>>> try to run the installer as a normal user and if they happen to have
>>> libgladeui they will run into this problem. Any ideas how to fix
>>> that?
>> I use the following ./configure options to build my Xfce
>> in /home/enrico/apps/xfce-svn:
>>
>> for libxfcegui4:
>> --with-libglade-module-path=$prefix/libglade/2.0/
>>
>> for xfce-utils:
>> --with-xsession-prefix=$prefix
>>
>> $prefix is:
>> prefix="/home/enrico/apps/xfce-svn"
>>
>> And to get the libxfce4gui stuff working when running, you need to
>> make the LIBGLADE_MODULE_PATH public, the following is a snippet from
>> my ~/.bashrc:
>>
>> # for libxfcegui4
>> export LIBGLADE_MODULE_PATH=/home/enrico/apps/xfce-svn/libglade/2.0/:
>> $LIBGLADE_MODULE_PATH
>
> It looks like this affects both, the gladeui as well as the normal
> glade stuff. Bad. I guess the installer won't work unless we find a
> platform-independent way to define $LIBGLADE_MODULE_PATH somewhere.
>
> .bashrc is not really an option because not everyone uses bash. We
> *could* add a 'gladedir' variable to libxfcegui4-1.0.pc and use
>
> export LIBGLADE_MODULE_PATH="$LIBGLADE_MODULE_PATH \
> `pkg-config --variable=gladedir libxfcegui4-1.0.pc`"
>
> in startxfce4 or the xinitrc script to define it. Any other ideas?
Yeah, xinitrc is the place for this. Be sure to hard-code the *result*
of running that pkg-config command, not the command itself... no need to
shell out again, and I don't want to assume pkg-config is available at
runtime (tho in practice it should be).
Also should do something like this instead:
xfce_libglade_path=/path/to/whatever
if test "x$LIBGLADE_MODULE_PATH" = "x"; then
LIBGLADE_MODULE_PATH="$xfce_libglade_path"
else
LIBGLADE_MODULE_PATH="$LIBGLADE_MODULE_PATH:$xfce_libglade_path"
fi
I also wonder if we should test to make sure that $xfce_libglade_path !=
$default_libglade_path, and if not, then don't set the env var. But I
guess it doesn't matter.
We should also do this for GLADE_MODULE_PATH -- less critical since it's
only for developers, but it doesn't hurt to be complete.
Actually, if we do all this, then we might want to consider defaulting
the libglade/glade modules paths to $libdir rather than libglade/glade's
$libdir. But in that case I'd want to move this env var setting to
startxfce4, since people with custom xinitrc files will miss this change
and have broken dialogs.
Actually^2, I think at some point I'd like to change how our xinitrc
stuff works so this is a moot point. The systemwide xinitrc that we
install should *always* get run, and should source a per-user xinitrc if
one exists. That way global changes like this won't get lost if the
user has an old, customised xinitrc in their homedir. But that's for
4.8. For 4.6 we should just fix the libglade/glade issue as you've
described.
-brian
More information about the Xfce4-dev
mailing list