Small XDG_DATA_DIRS improvements

- win32: improve iss script to only replace the real XDG_DATA_DIRS path, not the comment
- use $(datadir) instead of $(prefix)/share, for the rare case someone configures with
  --datadir=DIR

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23337 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens committed 2013-10-26 08:56:26 +00:00
1 parent 2678946472
commit 82a0329df0
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -375,7 +375,7 @@ begin
if (Pos('GNC_DBD_DIR', EnvStrList[iLineCounter]) > 0) then
EnvStrList[iLineCounter] := 'GNC_DBD_DIR={GNC_HOME}/lib/dbd';
{ Adapt XDG_DATA_DIRS parameter }
if (Pos('XDG_DATA_DIRS', EnvStrList[iLineCounter]) > 0) then
if (Pos('XDG_DATA_DIRS=', EnvStrList[iLineCounter]) > 0) then
EnvStrList[iLineCounter] := 'XDG_DATA_DIRS={GNC_HOME}/share;{XDG_DATA_DIRS};/usr/local/share;/usr/share';
end;
+2 -2
View File
@@ -80,13 +80,13 @@ endif
# The compile time value is added because GnuCash on X11 builds on MacPorts, which
# uses /opt/local/share as default instead of the Free Desktop defined standard paths
# /usr/local/share and /usr/share
if [ "a$(prefix)" != "a/usr" ] && [ "a$(prefix)" != "a/usr/local" ]; \
if [ "a$(datadir)" != "a/usr/share" ] && [ "a$(datadir)" != "a/usr/local/share" ]; \
then \
echo >> $@.tmp; \
echo "# GnuCash was not installed in the default location" >> $@.tmp; \
echo "# XDG_DATA_DIRS will be set so that our documentation" >> $@.tmp; \
echo "# and gsettings schemas are found." >> $@.tmp; \
echo "XDG_DATA_DIRS=$(prefix)/share;{XDG_DATA_DIRS};$(XDG_DATA_DIRS);/usr/local/share/;/usr/share/" >> $@.tmp; \
echo "XDG_DATA_DIRS=$(datadir);{XDG_DATA_DIRS};$(XDG_DATA_DIRS);/usr/local/share/;/usr/share/" >> $@.tmp; \
fi
mv $@.tmp $@