Archive

Posts Tagged ‘Firefox’

如何在大陆构建 Firefox for Android

October 29th, 2015 No comments

大陆由于墙的缘故, 不仅Google的服务没有正确的部署, 所有依赖于Google的服务都会出现问题. Firefox for Android (以下称 Fennec) 需要使用 Android SDK 和 NDK 进行构建, 因此也就遇到了同样的问题, 导致了 Mozilla 仓库中的 mach bootstrap 命令无法正确执行.

一种方式是不使用 mach bootstrap 命令初始化的 toolchain, 利用你之前手工下载的 Android SDK/NDK 进行构建. 方法是配置 mozilla 仓库根目录下的 mozconfig 参数, 指定好路径.

另一种方式是死磕, 在 mach bootstrap 过程中加入一点手工的方法来绕过. 以下是方法:

  1. 首先你需要 google hosts 能够下载基本的SDK等; 具体可以自行上 github 上找找;
  2. 运行 mach bootstrap, 在尝试 refresh android repository addons list-2.xml 或者类似的文件的时候会显示读取失败.
  3. 手工的切换到 $HOME/.mozbuild 中的目录. 找到 Android 工具并运行, 一般是 $HOME/.mozbuild/android-sdk-linux/tools/android
  4. 这是就看到了熟悉的 Android SDK 管理页面. 在配置中取消 HTTPS, 强制使用 HTTP. 安装所有需要的 SDK.
  5. 回到 mozilla-central 目录下运行 mach build
  6. 这个时候可能会遇到说找不到正确的 SDK 和 NDK 路径, 这是因为 bootstrap 没有正确执行结束导致的. 解决方法是修改 mozconfig 配置文件中”–with-android-sdk”和”–with-android-ndk”选项, 指向具体的位置.

之后就可以执行 mach build & mach package 正确的编译出 apk 了.

PS: 当然还有一种最为高大上的方式就是VPN了…然而下载量很大的说…

Firefox Technical Architecture Group

September 11th, 2015 No comments

Dave Camp 一个月前在邮件列表中宣布了新的 Firefox 架构领导小组:

We don’t have a lot of people whose responsibility extends to the entire Firefox frontend. Most of us are focused on individual pieces of our large codebase. Meanwhile, we have a set of large technical challenges ahead of us. In particular, gofaster and figuring out what comes after XUL are going to be sweeping changes that affect large swaths of code.

We are asking Dave Townsend, Richard Newman, Rob Helmer, Mark Hammond, and Robert Strong to explicitly take over technical stewardship of the Firefox products. Their responsibilities will be:

* Document and build consensus around larger projects that affect Firefox products.
* Help resolve technical issues that cross functional areas of the project.
* Provide a point of consistent technical decision making.
* Be a point of contact for and coordinate cross-technology projects with other Mozilla groups such as Platform and Content Services.
* Be available to technical contributors for guidance, mentoring, etc.

This may look a lot like Module Ownership – this is no coincidence. Mark Finkle (as Firefox Mobile module owner) and I (as Firefox Desktop module owner) will be delegating a lot of the technical responsibility for those modules to that group. It may also remind some folks of the Super Reviewers. It’s similar to that in spirit (a group of people charged with a global view of the product) but not in mechanics (no sr? flags, and limited to the Firefox frontend modules).

This isn’t a permanent appointment. We’ve asked these people to help get us started working through the gofaster and deXULinisation initiatives, but we’ll cycle people in an out as events warrant. Nor do we expect these people to do it alone. We expect them to be working closely with all the engineers on the team.

Thanks to the Firefox Architects for stepping up.

 

现在差不多已经成型了:

https://wiki.mozilla.org/Firefox/Technical_Architecture_Group

不过目前在 Mozilla 之外还没有看到什么内容.

[JS-internals] Jit DevTools 0.0.1

June 18th, 2015 No comments

转发,我一直期待(但是自己没有做)的工具之一:

Nicolas B. Pierron via lists.mozilla.org

Hello everybody,

I am please to do an early announce a new tool named Jit DevTools.

This new tool is an addon which mostly target Jit developers.  It uses the recently added Debugger.onIonCompilation hook to display the latest MIR [1] and LIR graphs within the dev tools.

To use this tool, go to a web page, and open the Jit DevTools panel, then wait until a function got compiled.

Once a function is compiled, you can select a compiled script, which will display the MIR graph of the compilation.  If you need to, you can also have a look at the LIR graph.  The output is similar to the one rendered with iongraph [5].

By selecting any inlined script, the background of the block titles will change color, if the block correspond to the inlined instance.  This feature is quite useful to identify how a function plays in a compiled script.

You might find this tool quite handy to use for the following use cases:
– Investigating DOM optimization.
– Investigating jsperf issues.
– Comparing function implementations, and impacts on the generated code.

This addon works on optimized builds, and even with parallel compilation enabled.

You can download [2] this early version from http://people.mozilla.org/~npierron/jit-dev-tools/ , or build it your-self by using the sources [3] with jpm tool [4].

Have fun, and enjoy.

[1] http://people.mozilla.org/~npierron/jit-dev-tools/jit-dev-tools-0.0.1.png
[2] http://people.mozilla.org/~npierron/jit-dev-tools/jit-dev-tools-0.0.1.xpi
[3] https://github.com/nbp/jit-dev-tools/
[4] https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm
[5] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Hacking_Tips#Using_IonMonkey_spew_%28JS_shell%29

WebAssembly

June 18th, 2015 No comments

https://blog.mozilla.org/luke/2015/06/17/webassembly/

https://brendaneich.com/2015/06/from-asm-js-to-webassembly/

https://github.com/WebAssembly/design

额,速度太快了,还在啃 asm.js 的我表示跟不上节奏了……

[摘] 如何在Linux上用MSVC2013编译Firefox for Windows

January 23rd, 2015 No comments

看标题就知道这是一个很纠结的决定。

但是 Mozilla 开发者 Ehsan Akhgari 做到了,有兴趣的可以去看他的博客以及 github gist

嗯,自然是基于 Wine。