Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1234|回复: 3
打印 上一主题 下一主题

build 中文支持

[复制链接]

1228

主题

1998

帖子

7596

积分

认证用户组

Rank: 5Rank: 5

积分
7596
跳转到指定楼层
楼主
发表于 2020-8-10 16:15:44 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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
复制代码
回复

使用道具 举报

1228

主题

1998

帖子

7596

积分

认证用户组

Rank: 5Rank: 5

积分
7596
沙发
 楼主| 发表于 2020-8-10 18:41:52 | 只看该作者
回复 支持 反对

使用道具 举报

1228

主题

1998

帖子

7596

积分

认证用户组

Rank: 5Rank: 5

积分
7596
板凳
 楼主| 发表于 2020-8-14 11:38:55 | 只看该作者
回复 支持 反对

使用道具 举报

1228

主题

1998

帖子

7596

积分

认证用户组

Rank: 5Rank: 5

积分
7596
地板
 楼主| 发表于 2020-8-17 09:34:09 | 只看该作者
编译多语言版本问题
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.

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-5-15 05:49 , Processed in 0.064455 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表