<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>If the messages never get
localized, there is no need to keep them in a separate catalog file (which is
different, and generated differently on each platform). Instead, we can
simplify our lives by sticking all the messages in an array of strings in a header
file. Then, there would be no need to run the preprocessing step of generating
the catalog. We can also simplify and/or remove some of the code that does
message lookups as well – that code needs some work anyway, even if we
don’t do anything else, because it generates gazillions of warnings on g++
4.1 and higher, due to not being const correct. I can volunteer for that work (of
course we have to figure out what exactly to do about it first).<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Traian<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
fdo-internals-bounces@lists.osgeo.org
[mailto:fdo-internals-bounces@lists.osgeo.org] <b>On Behalf Of </b>Greg Boone<br>
<b>Sent:</b> Saturday, February 14, 2009 3:06 PM<br>
<b>To:</b> FDO Internals Mail List<br>
<b>Subject:</b> [fdo-internals] RE: mkcatdefs/gencat message catalogue files on
OSX<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='color:#1F497D'>Where did you get the source
code from mkcatdefs?<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>No… I have never
heard of anyone localizing the messages from FDO. <o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>As for the Fdo/Nls file names,
maybe that is something we can fix as a part of the side-work for OSX.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Greg<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
fdo-internals-bounces@lists.osgeo.org [mailto:fdo-internals-bounces@lists.osgeo.org]
<b>On Behalf Of </b>Traian Stanev<br>
<b>Sent:</b> Saturday, February 14, 2009 2:43 PM<br>
<b>To:</b> fdo-internals@lists.osgeo.org<br>
<b>Subject:</b> [fdo-internals] RE: mkcatdefs/gencat message catalogue files on
OSX<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>I *<b>think</b>* I recompiled
mkcatdefs for OSX and generated the message file on my Mac. I forgot how I did
it, but I can go through it again to retrace my steps. As far as I remember, it
wasn’t too painful.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>At the time, I was actually
going to complain about the whole process of generating the message catalog
like that instead of having all the messages in a header of some sort… A
related question, do FDO error messages from the generated catalog ever get
localized to languages other than English?<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Another thing that is really bad
(at least on OSX) is that the Fdo/Nls code has header files which have the same
names as standard C headers!! This was confusing the hell out of g++ since
other standard C headers end up including those header files from FDO rather
than from e.g. /usr/include. <o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>I never really got FDO to
compile cleanly on OSX, but admittedly I didn’t spend too long on it.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Traian<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
fdo-internals-bounces@lists.osgeo.org
[mailto:fdo-internals-bounces@lists.osgeo.org] <b>On Behalf Of </b>Greg Boone<br>
<b>Sent:</b> Saturday, February 14, 2009 2:31 PM<br>
<b>To:</b> fdo-internals@lists.osgeo.org<br>
<b>Subject:</b> [fdo-internals] mkcatdefs/gencat message catalogue files on OSX<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hi All,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>When generating our FDO message catalogue files on Linux we
use the following Makefile.am specification which in turn relies on mkcatdefs
and gencat. However on OSX, mkcatdefs is not available. Are there any
suggestions out there on how we can modify the message catalogue compilation
process to work with OSX?<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>AUTOMAKE_OPTIONS = foreign<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>EXTRA_DIST = FDOMessage.mc
resource.h MessageStatic.rc<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>CATDIR = ../../nls/linux/en_US<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>CATALOGS = FDOMessage.mc<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>CATALOGS_CAT = $(patsubst
%.mc,$(CATDIR)/%.cat,$(CATALOGS))<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>all: catalog_init $(CATALOGS_CAT)<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>clean:<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@rm -rf $(CATDIR)/*.cat <o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@rm -rf *.msf<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>catalog_init::<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@if [ ! -d $(CATDIR) ]; then mkdir -p $(CATDIR); fi<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>$(CATALOGS_CAT) : $(CATDIR)/%.cat :
%.msf<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@rm -f "../../Inc/$(basename $(notdir $<)).h"<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@echo "$(FDOTHIRDPARTY)/linux/mkcatdefs/mkcatdefs $(basename $(notdir
$<)) $< | gencat $@"; \<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
$(FDOTHIRDPARTY)/linux/mkcatdefs/mkcatdefs $(basename $(notdir $<)) $<
> $(addsuffix .tmp, $(basename $(notdir $<))); \<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
gencat $@ $(addsuffix .tmp, $(basename $(notdir $<))); \<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
sed -e '/#include/d' -e '/MF_/s/"\(.*\)\.cat"/\1_cat/' \<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
$(addsuffix
_msg.h, $(basename $(notdir $<))) > \<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
../../Inc/$(addsuffix _msg.h, $(basename $(notdir $<)))<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@rm $(addsuffix _msg.h, $(basename $(notdir $<))) \<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
$(addsuffix
.tmp, $(basename $(notdir $<)))<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@mv ../../Inc/$(basename $(notdir $<))_msg.h ../../Inc/FdoMessage.h<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>%.msf : %.mc<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@../McToMsf/McToMsf $(basename $(notdir $<)).mc $(basename $(notdir
$<)).msf "*" FDO<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>INSTALL_DIR = $(prefix)/nls<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>#install data<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>install :<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'>uninstall :<o:p></o:p></p>
<p class=MsoNormal style='margin-left:.5in'>
@rm -f $(INSTALL_DIR)/FDOMessage.cat<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>