[GRASS-dev] font path question for Linux and Windows
Paul Kelly
paul-grass at stjohnspoint.co.uk
Fri May 4 00:10:42 EDT 2007
On Mon, 30 Apr 2007, Glynn Clements wrote:
> At present, it gets run at build time; thereafter, it has to be run
> manually. It could be run from a post-install script used by the
> packaging system (.deb, .rpm, etc).
>
> It isn't intended to be run automatically during normal use.
Amazingly enough, the script works as is on native Windows. I had thought
there would be problems with Msys/Windows paths - in the past I've had to
carefully distinguish between where paths were going to be used by Msys
utilities during compiling (in which case Msys paths were needed) and
where paths were going to be used by running GRASS modules (either during
or after installation), in which case Windows paths were needed. But the
Msys find command appears to work with Windows paths so that's just great.
A quick web search suggests that $SYSTEMROOT is the "preferred" variable
for the windows directory from NT on, whereas $WINDIR is always set for
backward compatibility with Win 9x. So I guess it doesn't really matter
but in my experience Microsoft scripts etc. tend to use SYSTEMROOT.
Also I have a proposed modification to the script:
Index: mkftcap
===================================================================
RCS file: /home/grass/grassrepository/grass6/tools/mkftcap/mkftcap,v
retrieving revision 1.6
diff -u -r1.6 mkftcap
--- mkftcap 3 May 2007 04:25:17 -0000 1.6
+++ mkftcap 4 May 2007 03:51:37 -0000
@@ -12,7 +12,7 @@
for ext in $exts ; do
find "$dir" -type f -iname '*.'"$ext" -print \
| sed 's!^\(.*\)/\(.*\)$!\2:\1/\2:utf-8:!' \
- | sed 's/\.'"$ext"':/:/'
+ | sed 's/\.'"$ext"':/:/I'
done
fi
done
This will case-insensitively match the filename extension when it's
stripping it out to form the short name for the font at the start of the
line - some files had the extension in capitals and it wasn't matching
them. Not a big deal though - just looked a bit uglier. But maybe the I
flag for case insensitive matching might not work with all versions of
sed.
Next step is to compile Windows GRASS with Freetype and debug/test that.
Paul
More information about the grass-dev
mailing list