WINGs: Improve search path logic in WMPathForResourceOfType
commitbfab7690651e85d5c400058077758b22c3b221c5
authorJohn D Pell <john@pell.cc>
Sun, 8 Aug 2021 07:36:10 +0000 (8 09:36 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 10 Aug 2021 08:42:43 +0000 (10 09:42 +0100)
tree28171b310153f959209fd873b6bb1c50e6f17c47
parentc060477d57ec5a7d3a7c5f6c78d8a613fc068aa4
WINGs: Improve search path logic in WMPathForResourceOfType

The man page says environment variables are used, and if they don't exist
it falls back to defaults, yet this was not true in WINGS.

This changes implements the checks for the default paths used when the env
variables are not defined; these default paths have been fixed (+lib) to
match the GNUstep layout ('fhs'), expect for the very last path which keeps
the legacy layout.

For the user Apps folder, rely on wusergnusteppath() (~/GNUstep) to build
the path.

The previous code was only partially functional as the hard-coded paths
did not exist in any of GNUstep standard file system layout and the
GNUSTEP_*_ROOT environment variables were not provided by GNUstep for a
while. This means it would never work no matter how environment variables
were set when using layouts: 'debian', 'fhs', 'next', 'Apple', 'mac',
'fhs-system', or 'standalone'.
WINGs/wapplication.c
doc/wmaker.in