Monday, October 08, 2007

Session 6 - trying to build en-GB

  • At home, following this tutorial but to build en-GB:
  • cvs -z3 -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r MOZILLA_1_8_BRANCH mozilla/client.mk
  • cvs -z3 -d:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/tools/l10n mozilla/testing/tests/l10n
  • cd mozilla
  • make -f client.mk l10n-checkout MOZ_CO_PROJECT=browser MOZ_CO_LOCALES=en-GB LOCALES_CO_TAG=HEAD
  • vi .mozconfig
    • . $topsrcdir/browser/config/mozconfig
      mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../en-GB
      mk_add_options MOZ_CO_LOCALES=en-GB
  • Link to source code of tools/l10n/l10n.mk

38 include client.mk
39
40 .PHONY : check-l10n
41
42 check-l10n:

//We have set in the .mozconfig the value MOZ_CO_LOCALES to en-GB
43 for loc in $(MOZ_CO_LOCALES); do \
44 for mod in $(sort $(foreach project,$(MOZ_PROJECT_LIST),$(LOCALES_$(project)))); do \
45 echo Comparing $(TOPSRCDIR)/$$mod/locales/en-US with $(TOPSRCDIR)/../l10n/$$loc/$$mod; \
46 perl $(TOPSRCDIR)/toolkit/locales/compare-locales.pl $(TOPSRCDIR)/$$mod/locales/en-US $(TOPSRCDIR)/../l10n/$$loc/$$mod; \
47 done; \
48 done;
49
50 create-%:
51 for mod in $(sort $(foreach project,$(MOZ_PROJECT_LIST),$(LOCALES_$(project)))); do \
52 if test -d $(TOPSRCDIR)/../l10n/$*/$$mod; then \
53 echo $(TOPSRCDIR)/../l10n/$*/$$mod already exists; \
54 else \
55 echo Creating $(TOPSRCDIR)/../l10n/$*/$$mod from $(TOPSRCDIR)/$$mod/locales/en-US; \
56 mkdir -p ../l10n/$*/$$mod; \
57 cp -r $(TOPSRCDIR)/$$mod/locales/en-US/* $(TOPSRCDIR)/../l10n/$*/$$mod; \
58 find $(TOPSRCDIR)/../l10n/$*/$$mod -name CVS | xargs rm -rf; \
59 fi; \
60 done;

  • To check the completness of your localization //takes long
    • make -f tools/l10n/l10n.mk check-l10n //as long as you have a .mozconfig described as above
  • The simplest tool is the makefile l10n.mk that we already mentioned above. It offers two targets, check-l10n and create-%.
  • MOZ_CO_PROJECT=browser make -f tools/l10n/l10n.mk create-en-GB // why for l10n projects I have to set the project as browser only when I build?? It helps you to bootstrap your localization
  • THE CHECKOUT TO SEE IF FILES HAVE HCANGED SINCE LAST TIME
    • make -f tools/l10n/l10n.mk check-l10n
  • time MOZ_CO_PROJECT=browser make -f client.mk build
  • ERROR - configure: error: Building crypto support requires a valid version of
    the standalone assembler (ml.exe for MSVC).
    • Added this line to .mozconfig: ac_add_options --disable-crypto
  • Building again
It has actually build but it doesn't look like en-GB, I will try to build at home or at school