Re: kdedirs ugly hack patch to kstandarddirs.cpp

2003-10-05 Thread Chris Cheney
I thought I had a way to easily patch it as a temporary measure but I
can't seem to get it to output in the correct order. Does anyone know
how to make this work? No matter what order I call addPrefix() in it
does not seem to actually change the output order of kde-confg --path

KDEDIRS=/www/kde:/mnt/kde

kde-config --path apps
/home/ccheney/.kde/share/applnk/:/www/kde/share/applnk/:/mnt/kde/share/applnk/:/usr/share/applnk/:/usr/local/share/applnk/

So it seems to know to always put homedir first then KDEDIRS in the
order listed but after that it doesn't seem to be ordered?

I really need this workaround to work for sarge, I already saw someone
today asking how to make /usr/local work for locally compiled kde apps.

Thanks,

Chris


@@ -983,12 +983,6 @@
 }
 kdedirList.append(KDEDIR);

-#ifdef __KDE_EXECPREFIX
-QString execPrefix(__KDE_EXECPREFIX);
-if (execPrefix!=NONE)
-   kdedirList.append(execPrefix);
-#endif
-
 QString localKdeDir;
 if (getuid())
 {
@@ -1035,6 +1029,14 @@
addPrefix(dir);
 }

+// UGLY HACK - MOVED THIS SO IT WOULD BE IN ORDER - Chris Cheney
+addPrefix(/usr/local);
+#ifdef __KDE_EXECPREFIX
+QString execPrefix(__KDE_EXECPREFIX);
+if (execPrefix!=NONE)
+   addPrefix(execPrefix);
+#endif
+
 uint index = 0;
 while (types[index] != 0) {
addResourceType(types[index], kde_default(types[index]));



signature.asc
Description: Digital signature


kdedirs ugly hack patch to kstandarddirs.cpp

2003-10-04 Thread Chris Cheney
I noticed that the only way it seems to have more than one dir by
default in KDE that is a prefix is to use $KDEDIRS. However, we don't
really want Debian users to have to mess with that. So I was trying to
find a way to have both /usr and /usr/local usable for KDE and found
that there isn't a way currently in kstandarddirs.cpp to read the
KDEDIRS from kderc. Right now there is a hack (ifdef) to hardcode in
$exec_prefix if one is set so that not setting KDEDIR/S works. So I am
going to hack up an ugly patch to it to force looking in /usr/local as
well for Debian. Yes, I know its damn ugly. :(

Is there anyone here that knows kdelibs well enough to come up with a
clean solution to this for KDE 3.2 (and maybe 3.1 if time permits)?
Ideally it would possible to read a kdedirs, dir_prefix, or something to
that effect from /etc/kderc so that it doesn't need to be hardcoded into
the source.

Thanks,
Chris Cheney


signature.asc
Description: Digital signature