firemail

标题: build 中文支持 [打印本页]

作者: Qter    时间: 2020-8-10 16:15
标题: build 中文支持
本帖最后由 Qter 于 2020-8-11 11:16 编辑
  1. ----centos6------------
  2. # My first mozilla config
  3. mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
  4. mk_add_options MOZ_MAKE_FLAGS="-j6"
  5. mk_add_options MOZ_CO_LOCALE="zh-CN"
  6. #export L10NBASEDIR=@TOPSRCDIR@/l10n
  7. mk_add_options L10NBASEDIR=@TOPSRCDIR@/l10n

  8. ac_add_options --prefix=/usr
  9. ac_add_options --disable-tests
  10. ac_add_options --enable-ui-locale=zh-CN
  11. ac_add_options --with-system-zlib
  12. ac_add_options --with-system-jpeg
  13. ac_add_options --enable-official-branding
  14. #ac_add_options --with-l10n-base=@TOPSRCDIR@/l10n
复制代码
ac_add_options --enable-application=comm/mail
ac_add_options --enable-calendar
ac_add_options --with-l10n-base=$topsrcdir/comm/mail/locales


mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj_zh_CN
ac_add_options --enable-application=comm/mail
ac_add_options --enable-calendar
ac_add_options --disable-tests
mk_add_options MOZ_CO_LOCALE="zh-CN"
mk_add_options MOZ_CO_LOCALES="zh-CN"
mk_add_options L10NBASEDIR=@TOPSRCDIR@/l10n
mk_add_options LOCALE_SRCDIR=@TOPSRCDIR@/l10n
ac_add_options --with-l10n-base=../l10n
ac_add_options --enable-ui-locale=zh-CN
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1



ac_add_options --enable-application=comm/mail
ac_add_options --enable-calendar
ac_add_options --with-l10n-base=$topsrcdir/comm/mail/locales
mk_add_options LOCALE_SRCDIR=@TOPSRCDIR@/l10n
ac_add_options --enable-ui-locale=zh-CN
ac_add_options --enable-official-branding
ac_add_options --disable-tests
mk_add_options MOZ_CO_LOCALES=zh-CN
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj_Official
export MOZILLA_OFFICIAL=1
ac_add_options --with-l10n-base=$topsrcdir/comm/mail/locales
export MOZ_UI_LOCALE=zh-CN
mk_add_options MOZ_CO_LOCALES=zh-CN
mk_add_options MOZ_CO_LOCALE="zh-CN"
#export L10NBASEDIR=@TOPSRCDIR@/l10n
mk_add_options L10NBASEDIR=@TOPSRCDIR@/l10n
ac_add_options --enable-ui-locale=zh-CN

ac_add_options --enable-ui-locale=zh-CN
mk_add_options MOZ_CO_LOCALES=zh-CN
export MOZ_UI_LOCALE=zh-CN

./mach build installers-zh-CN ---> OBJDIR/dist/l10n-stage/
[~/.mozbuild/l10n-central]
ac_add_options --with-l10n-base=/make/this/a/absolute/path
./mach build langpack-zh-CN    ---> OBJDIR/dist/$(MOZ_PKG_PLATFORM)/xpi/
./mach build chrome-zh-CN
./mach build l10n-zh-CN

l10n-% is used for repacks, chrome-% for multi-locale packages.

toolkit/mozapps/installer/l10n-repack.py



i suspect your --with-l10n-base line is what's messing that up. i've never had to specify that... mach should grab what it needs and keep it in your ~/.mozbuild directory


ac_add_options --enable-ui-locale=zh-CN  ---报错
mk_add_options MOZ_CO_LOCALES=zh-CN
mk_add_options MOZ_UI_LOCALE=zh-CN
export MOZ_UI_LOCALE=zh-CN


https://s0developer0mozilla0org. ... ing_a_language_pack






https://bugzilla.mozilla.org/attachment.cgi?id=8936616&action=diff





Mercurial

https://wiki.developer.mozilla.o ... zing_with_Mercurial

  1. ./mach build
  2. ./mach package
  3. ./mach build installers-zh-CN
复制代码

作者: Qter    时间: 2020-8-10 18:41
本帖最后由 Qter 于 2020-8-10 18:45 编辑

https://blog.othree.net/log/2015/08/07/first-patch-to-firefox/https://thunderbird.topicbox.com/groups/addons/T93d42648aa43151e


作者: Qter    时间: 2020-8-14 11:38
本帖最后由 Qter 于 2020-8-14 14:39 编辑

https://firefox-source-docs.mozi ... acks-for-developers

https://bugzilla.mozilla.org/show_bug.cgi?id=1402564

https://hg.mozilla.org/l10n-central/  语言资源

作者: Qter    时间: 2020-8-17 09:34
编译多语言版本问题
https://firefox-source-docs.mozilla.org/build/buildsystem/locales.html#instructions-for-single-locale-repacks-for-developers

$ ./mach build chrome-zh-CN
0:24.69 c:\mozilla-build\bin\mozmake.EXE -j8 -s chrome-zh-CN
0:24.86 mozmake.EXE[1]: warning: -j1 forced in submake: resetting jobserver mode.
0:24.96 mozmake.EXE[1]: *** No rule to make target 'chrome-zh-CN'.  Stop.
0:24.96 mozmake.EXE: *** [F:/comm/mail/build.mk;39: chrome-zh-CN] Error 2
0:24.99 256 compiler warnings present.
Hey! Builds initiated with `mach build $A_SPECIFIC_TARGET` may not always work, even if the code being built is correct. Consider doing a bare `mach build` instead.


compare https://searchfox.org/mozilla-ce ... ue&regexp=false with https://searchfox.org/comm-centr ... ue&regexp=false

You could try copying and adapting https://searchfox.org/mozilla-ce ... s/Makefile.in#71-85 across to the mail equivalent file, though you might also have to look at some of the blame and history, and see if the patches that added those lines needed to change other files as well.

You might also need to compare the two files and make sure that the other parts are similar as well.






欢迎光临 firemail (http://firemail.wang:8088/) Powered by Discuz! X3