On Thu, 10 Apr 2014 at 10:19:27 -0700, Shawn W Dunn wrote:
> I am working on the official packaging of WindowMaker for openSUSE, 
> changing some install locations to conform with openSUSE standards (i.e. 
> installation to /usr instead of /usr/local), I have edited the 
> WindowMaker/menu and plmenu files appropriately, and after running a 
> make install, everything is being installed to the appropriate locations 
> (/usr/bin, /usr/share/WindowMaker, etc), and the default WMRootMenu is 
> displaying the proper paths for everything.
> 
> But, running /usr/bin/wmaker.inst, which calls /usr/bin/wmgenmenu.   The 
> WMRootMenu that is being written to $HOME/GNUstep/Defaults/ is writing 
> the paths as /usr/local/share, which isn't valid, for the installation.
> 
> Where is wmgenmenu pulling it's paths from, and how do I fix it?


I guess the patch below should fix it...

>From 3981805ec78adf4479f0988cfc2174a02d58a738 Mon Sep 17 00:00:00 2001
From: "Carlos R. Mafra" <crma...@gmail.com>
Date: Thu, 10 Apr 2014 19:34:48 +0100
Subject: [PATCH] wmgenmenu: Write paths according to options set at configure
 time

As reported by Shawn W Dunn, the configuration strings written by wmgenmenu
in $HOME/GNUstep/Defaults/WMRootMenu were not reflecting his installation
directories choices.

Fix this by writing strings composed with PKGDATADIR.

Signed-off-by: Carlos R. Mafra <crma...@gmail.com>
---
 util/wmgenmenu.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/util/wmgenmenu.c b/util/wmgenmenu.c
index 056eba9..aff43a7 100644
--- a/util/wmgenmenu.c
+++ b/util/wmgenmenu.c
@@ -41,6 +41,12 @@ int main(int argc, char *argv[])
 {
        char *t;
        int ch;
+       char *tmp, *theme_paths, *style_paths, *icon_paths;
+
+       tmp = wstrconcat("-noext ", PKGDATADIR);
+       theme_paths = wstrconcat(tmp, "/Themes 
$HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle");
+       style_paths = wstrconcat(tmp, "/Styles 
$HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle");
+       icon_paths = wstrconcat(tmp, "/IconSets 
$HOME/GNUstep/Library/WindowMaker/IconSets WITH seticons");
 
        struct option longopts[] = {
                { "version",            no_argument,    NULL,   'v' },
@@ -152,7 +158,7 @@ int main(int argc, char *argv[])
        L2Menu = WMCreatePLArray(
                WMCreatePLString(_("Themes")),
                WMCreatePLString("OPEN_MENU"),
-               WMCreatePLString("-noext /usr/local/share/WindowMaker/Themes 
$HOME/GNUstep/Library/WindowMaker/Themes WITH setstyle"),
+               WMCreatePLString(theme_paths),
                NULL
        );
        WMAddToPLArray(L1Menu, L2Menu);
@@ -161,7 +167,7 @@ int main(int argc, char *argv[])
        L2Menu = WMCreatePLArray(
                WMCreatePLString(_("Styles")),
                WMCreatePLString("OPEN_MENU"),
-               WMCreatePLString("-noext /usr/local/share/WindowMaker/Styles 
$HOME/GNUstep/Library/WindowMaker/Styles WITH setstyle"),
+               WMCreatePLString(style_paths),
                NULL
        );
        WMAddToPLArray(L1Menu, L2Menu);
@@ -170,7 +176,7 @@ int main(int argc, char *argv[])
        L2Menu = WMCreatePLArray(
                WMCreatePLString(_("Icon Sets")),
                WMCreatePLString("OPEN_MENU"),
-               WMCreatePLString("-noext /usr/local/share/WindowMaker/IconSets 
$HOME/GNUstep/Library/WindowMaker/IconSets WITH seticons"),
+               WMCreatePLString(icon_paths),
                NULL
        );
        WMAddToPLArray(L1Menu, L2Menu);
-- 
1.8.1.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to