Firefox初步

来源:互联网 发布:软件开发工作计划 编辑:程序博客网 时间:2024/06/06 14:24

## Firefox的编译步骤:
1. ubuntu系统,安装jdk 7.0
2.Termial中: sudo apt-get install yasm git python-dbus mercurial automake autoconf autoconf2.13 build-essential ccache python-dev python-pip python-setuptools unzip uuid zip zlib1g-dev openjdk-7-jdk wget libncurses5:i386 libstdc++6:i386 zlib1g:i386
3.mkdir firefox –> cd firefox
4. curl -sf -L https://static.rust-lang.org/rustup.sh > rustup.sh
5.chmod +x rustup.sh
6../rustup.sh
7. ./rustup.sh –add-target=i686-linux-android
8.git clone https://github.com/mozilla/gecko-dev.git
9.cd gecko-dev
10.git checkout -b r49-2016101919 remotes/origin/MOBILE4902_2016101919_RELBRANCH
11. 预处理 : ./mach bootstrap
12. 选择 Firefox for android
13. 下载 ndk 和 sdk //结束时会提示 ndk ,sdk怎么配置 – >
//如果编译没有通过,有时需要自己再下载ndk sdk
例如:
ac_add_options –with-android-sdk=”/home/matthew/.mozbuild/android-sdk-linux”
ac_add_options –with-android-ndk=”/home/matthew/.mozbuild/android-ndk-r11b”
(自己去官网下载,放在该目录下)
14. cd gecko-dev*
15. vi mozconfig
16. 增加:6行

ac_add_options --enable-application=mobile/androidac_add_options --target=i386-linux-android

//# 配置 sdk ndk 路径是 决定路径 – > 查看路径用 pwd(复制过来的格式有误自己调整)

ac_add_options --with-android-sdk="/firefox/Sdk"     ac_add_options --with-android ndk="/root/.mozbuild/android-ndk-r11b"mk_add_options MOZ_OBJDIR=./objdir-allmk_add_options MOZ_MAKE_FLAGS="-j4"

关闭mozconfig,然后再vi mobile/android/confvars.sh(新文件)
若报错:注释:第49行 或 是 注释掉MOZ_INSTALL_TRACKING

./mach build
./mach package
./mach install


自己刚接触不太懂,这些也是问同事和看官方文档找出来的有些问题我也是不知怎么解决,更多是尝试。 你编译肯定会出现各种问题,但是在这个基础上,基本是有一个主线。下面是官网地址祝你好运:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build

0 0