阅读:5267回复:16
从cvs编译Firefox2.0代码(增补,提高成功率!)
已经有了一些文章介绍如何编译firefox,本文主要介绍如何从cvs取出特定版本的firefox并且编译。注意,firefox的代码大约200多M,网速慢以及毅力不足者请勿尝试。本文基于ubuntu linux 6.06 LTS 其他linux发行版本也应该大同小异。我的原则是走一步看一步,提示缺了什么,就安装什么。
1取出代码 cd ~ cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r MOZILLA_1_8_BRANCH mozilla/client.mk cd mozilla make -f client.mk checkout MOZ_CO_PROJECT=browser 此过程需要数个小时 进行完以后记得压缩一下这些代码,以防编译弄脏代码树 cd .. tar cjvf ffirefox.cvs.tar.bz2 mozilla/ 2编写.mozconfig 编译的时候在mozilla目录下需要一个.mozconfig文件作为configure的参数 有很多文章介绍这个文件我就不多赘述了。这里是我的.mozconfig文件,参考了swiftfox。适用k7cpu # This file specifies the build flags for Firefox. You can use it by adding: # . $topsrcdir/browser/config/mozconfig # to the top of your mozconfig file. mk_add_options MOZ_CO_PROJECT=browser ac_add_options --with-pthreads ac_add_options --enable-application=browser ac_add_options --enable-default-toolkit=gtk2 ac_add_options --with-distribution-id=Taizifox ac_add_options --disable-freetype2 ac_add_options --enable-single-profile ac_add_options --enable-extensions=default,xforms,schema-validation ac_add_options --disable-installer ac_add_options --disable-tests ac_add_options '--enable-optimize=-O3 -march=athlon-xp -freorder-blocks -fno-reorder-functions -msse -mmmx -m3dnow -mfpmath=sse -D_FORTIFY_SOURCE=2' ac_add_options --disable-shared ac_add_options --enable-static ac_add_options --disable-profilesharing ac_add_options --disable-debug ac_add_options --enable-xft ac_add_options --enable-crypto ac_add_options --enable-svg ac_add_options --enable-canvas ac_add_options --enable-update-packaging ac_add_options --enable-xinerama 3编译 这个在linux下面相对简单,在windows下面也有很多文章介绍如何编译。 ./configure --prefix=/opt/firefoxcvs make sudo make install 注意cvs的代码不一定编译的通,这个要看运气,如果有能力可以手 动除错。 补充1 cvs升级所需要的命令: cd mozilla cvs up -r MOZILLA_1_8_BRANCH client.mk make -f client.mk checkout MOZ_CO_PROJECT=browser 补充2 在ubuntu下安装需要的开发库 首先编辑/etc/apt/sources.list保证里面有deb src 如果没有加入如下内容 deb-src http://debian.ustc.edu.cn/ubuntu/ dapper main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ dapper-backports main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ dapper-proposed main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ dapper-security main restricted universe multiverse deb-src http://debian.ustc.edu.cn/ubuntu/ dapper-updates main restricted universe multiverse 然后保存,并运行如下命令 sudo apt-get update sudo apt-get build-dep firefox 这样作库比较全,大大提高编译成功的可能性 |
|
|
1楼#
发布于:2006-09-25 09:08
|
|
|
2楼#
发布于:2006-09-25 09:08
我写这个文章的原因就是利用“大便”的优势
简化编译cvs版本的过程 |
|
|