[fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX
Traian Stanev
traian.stanev at autodesk.com
Sat Feb 14 18:34:08 EST 2009
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).
Traian
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 3:06 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX
Where did you get the source code from mkcatdefs?
No... I have never heard of anyone localizing the messages from FDO.
As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.
Greg
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: fdo-internals at lists.osgeo.org
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX
I *think* 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.
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?
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.
I never really got FDO to compile cleanly on OSX, but admittedly I didn't spend too long on it.
Traian
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: fdo-internals at lists.osgeo.org
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX
Hi All,
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?
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = FDOMessage.mc resource.h MessageStatic.rc
CATDIR = ../../nls/linux/en_US
CATALOGS = FDOMessage.mc
CATALOGS_CAT = $(patsubst %.mc,$(CATDIR)/%.cat,$(CATALOGS))
all: catalog_init $(CATALOGS_CAT)
clean:
@rm -rf $(CATDIR)/*.cat
@rm -rf *.msf
catalog_init::
@if [ ! -d $(CATDIR) ]; then mkdir -p $(CATDIR); fi
$(CATALOGS_CAT) : $(CATDIR)/%.cat : %.msf
@rm -f "../../Inc/$(basename $(notdir $<)).h"
@echo "$(FDOTHIRDPARTY)/linux/mkcatdefs/mkcatdefs $(basename $(notdir $<)) $< | gencat $@"; \
$(FDOTHIRDPARTY)/linux/mkcatdefs/mkcatdefs $(basename $(notdir $<)) $< > $(addsuffix .tmp, $(basename $(notdir $<))); \
gencat $@ $(addsuffix .tmp, $(basename $(notdir $<))); \
sed -e '/#include/d' -e '/MF_/s/"\(.*\)\.cat"/\1_cat/' \
$(addsuffix _msg.h, $(basename $(notdir $<))) > \
../../Inc/$(addsuffix _msg.h, $(basename $(notdir $<)))
@rm $(addsuffix _msg.h, $(basename $(notdir $<))) \
$(addsuffix .tmp, $(basename $(notdir $<)))
@mv ../../Inc/$(basename $(notdir $<))_msg.h ../../Inc/FdoMessage.h
%.msf : %.mc
@../McToMsf/McToMsf $(basename $(notdir $<)).mc $(basename $(notdir $<)).msf "*" FDO
INSTALL_DIR = $(prefix)/nls
#install data
install :
@if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi
@cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)
uninstall :
@rm -f $(INSTALL_DIR)/FDOMessage.cat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20090214/ee189de5/attachment.html
More information about the fdo-internals
mailing list