clq
浏览(0) +
2006-10-29 19:31:20 发表
编辑
关键字:
编译 firefox 编译 firefox 实在是件很麻烦的事,网上的说法很多,但没有一个是可以直接成功编译的,包括官方网站上的说明.估计是根相关的软件的版本有关,当然实际上这反映了 firefox 项目做得其实并不是很好----他们实在应该再向 apache 项目多学习. 下面只说说我的成功编译步骤 1.首先是下载源码 在 ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ 可以下载到各个版本的源码,我编译成功过其中的 firefox-1.5.0.7-source.tar.bz2 firefox-2.0rc3-source.tar.bz2 它们的编译方法是有些不同的.
clq
2006-10-29 19:34:54 发表
编辑
2.是cygwin的安装 我是根据 http://www.unnoo.com/html/research/2006/0718/12.html 所说的安装了 # ash -- UNIX-like command line interpreter shell # autoconf -- Wrapper scripts for autoconf2.1 and autoconf2.5 # coreutils -- GNU core utilities (includes fileutils, sh-utils, and textutils) # cvs -- Concurrent Version System # diffutils -- file comparison utility # findutils -- Utilities for finding files--find, xargs, locate, updatedb # gawk -- pattern matching language (Devel category) # gcc -- C compiler upgrade helper # grep -- text search tool # make -- dependency analyzer for software builds (Devel category) # patchutils -- a small collection of programs that operate on patch files # perl -- a scripting language used to control parts of the build (Interpreters category) # sed -- a search and replace language # unzip -- zip file extraction (Archive category) # zip -- zip file creation (Archive category) 另外目前的 make 是 3.8.1 版本,而目前firefox的必须是 3.80 版本.这个大家可以从我们的网站上下载,替换掉其中的 make.exe 就行了.
clq
2006-10-29 19:47:15 发表
编辑
3.还有一个非常关键的部分是 .mozconfig 的内容 我是内容是 # . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --disable-tests ac_add_options --enable-static ac_add_options --disable-shared ac_add_options --enable-official-branding mk_add_options MOZ_CO_PROJECT=browser ac_add_options --enable-application=browser ac_add_options --disable-installer ac_add_options --disable-tests 第一行中其实是注释掉了,在 make -f client.mk build 时是会自动调用源码根目录的 ".mozconfig" 的,当然别的时候是不会的,很多文章对第一行的解释是错误的,建议大家再看看官方网上的介绍.
clq
2006-10-29 19:50:17 发表
编辑
4.还有一个非常重要的就是 moztools 了 moztools的文件非常重要,如果使用了错误的moztools版本,连编译都过不去,而且连提示都是莫名其妙的. 具体请看 http://newbt.8800.org:8022/read.csp?tid=881 和 http://newbt.8800.org:8022/read.csp?tid=883
clq
2006-10-29 20:05:51 发表
编辑
5.还有一个很严重的问题,我很遗憾似乎只有我碰到了 我的 mozset.bat 文件内容如下: set MOZ_TOOLS=D:\app1\moztools-static\moztools set PATH=c:\cygwin\bin;"C:\Program Files\Microsoft Visual Studio\VC98\Bin";%MOZ_TOOLS%\bin;%PATH% call VCVARS32.BAT 按道理这是在 cygwin 环境中执行的一个批处理文件,MOZ_TOOL 的变量应该是在里面说得很清楚了,但是不行,我最后不得不在 windows XP 的系统环境变量中指明了 MOZ_TOOLS 的变量值,同时还要在 path 中将 %MOZ_TOOLS%\bin; 放在最前面.
clq
2006-10-29 20:11:20 发表
编辑
它的原始文件在 http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/ 可以获得 不过它的 1.5 版本以前的要安装,我的不用 :)
clq
2006-10-30 21:54:49 发表
编辑
http://www.unnoo.com/html/research/2006/0718/12.html 原内容如下 FireFox 1.0.7 编译方法及步骤 文章出处:大成天下 发布时间:2006-07-18 网址:http://www.unnoo.com 作者:黄鑫(glacier@unnoo.com) 根据 Mozilla 官方网站上的编译步骤操作总会遇到各种各样的错误提示,以下是在虚拟机环境下验证通过的编译步骤。 1、准备工作 1) 依次安装 Visual C++ 6, Visual C++ Service Pack 5, Visual C++ Processor Pack。 2) 安装 cygwin 至 C 盘根目录,选择 DOS 风格(默认为 UNIX 风格)。除默认组件外,还应选择以下组件: # ash -- UNIX-like command line interpreter shell # autoconf -- Wrapper scripts for autoconf2.1 and autoconf2.5 # coreutils -- GNU core utilities (includes fileutils, sh-utils, and textutils) # cvs -- Concurrent Version System # diffutils -- file comparison utility # findutils -- Utilities for finding files--find, xargs, locate, updatedb # gawk -- pattern matching language (Devel category) # gcc -- C compiler upgrade helper # grep -- text search tool # make -- dependency analyzer for software builds (Devel category) # patchutils -- a small collection of programs that operate on patch files # perl -- a scripting language used to control parts of the build (Interpreters category) # sed -- a search and replace language # unzip -- zip file extraction (Archive category) # zip -- zip file creation (Archive category) 3) 下载并解压 firefox-1.0.7-source.tar.bz2 至 C 盘根目录,解压后生成 c:\mozilla 目录。 4) 下载并解压 Netscape's wintools,在 buildtools 目录编写以下 BAT 文件,运行后生成 moztools 目录: -------------- moztools.bat -------------- set MOZ_TOOLS=c:\mozilla\moztools md %MOZ_TOOLS% cd windows install.bat ------------------ end ------------------- 5) 编写 .mozconfig 文件保存至 c:\mozilla 目录: --------------- .mozconfig --------------- . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --disable-tests ac_add_options --enable-static ac_add_options --disable-shared ac_add_options --enable-official-branding ------------------ end ------------------- 6) 编写 mozbuild.bat 文件保存至 c:\mozilla 目录: -------------- mozbuild.bat -------------- @echo off set MOZ_TOOLS=c:\mozilla\moztools set PATH=%PATH%;"C:\Program Files\Microsoft Visual Studio\VC98\Bin";c:\cygwin\bin;%MOZ_TOOLS%\bin call VCVARS32.BAT c:\cygwin\bin\make.exe -f client.mk build ------------------ end ------------------- 7) 重命名 cygwin\bin\link.exe 2、编译 启动 cygwin 后运行以下命令 Administrator@win2kpro ~ $ cd c: Administrator@win2kpro /cygdrive/c $ cd mozilla/ Administrator@win2kpro /cygdrive/c/mozilla $ ./mozbuild.bat 以下为编译时的部分输出结果: Setting environment for using Microsoft Visual C++ tools. Adding client.mk options from /cygdrive/c/mozilla/.mozconfig: MOZ_PHOENIX=1 MOZ_OBJDIR=$(TOPSRCDIR)/ff cd /cygdrive/c/mozilla/ff /cygdrive/c/mozilla/configure Adding configure options from /cygdrive/c/mozilla/.mozconfig: --disable-ldap --disable-mailnews --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth --enable-crypto --disable-composer --enable-single-profile --disable-profilesharing --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-official-branding --enable-ui-locale=zh-CN loading cache ./config.cache checking host system type... i686-pc-cygwin checking target system type... i686-pc-cygwin checking build system type... i686-pc-cygwin checking for gcc... (cached) cl checking whether the C compiler (cl ) works... yes checking whether the C compiler (cl ) is a cross-compiler... no checking whether we are using GNU C... (cached) no checking whether cl accepts -g... (cached) no checking for c++... (cached) cl checking whether the C++ compiler (cl ) works... yes checking whether the C++ compiler (cl ) is a cross-compiler... no checking whether we are using GNU C++... (cached) no checking whether cl accepts -g... (cached) no checking for ranlib... (cached) ranlib checking for ml... (cached) /cygdrive/c/PROGRA~1/MICROS~2/VC98/BIN/ml checking for ar... (cached) ar checking for ld... (cached) link checking for strip... (cached) strip checking for windres... (cached) windres checking for gawk... (cached) gawk checking for midl... (cached) midl checking for midl flags... none needed checking how to run the C preprocessor... cl checking for mmintrin.h... (cached) no checking how to run the C preprocessor... cl checking how to run the C++ preprocessor... (cached) /lib/cpp checking for a BSD compatible install... (cached) /usr/bin/install -c checking whether ln -s works... (cached) yes checking for perl5... (cached) /usr/bin/perl checking for minimum required perl version >= 5.004... 5.008007 checking for full perl installation... yes checking for doxygen... (cached) : checking for whoami... (cached) /usr/bin/whoami checking for autoconf... (cached) /usr/bin/autoconf checking for unzip... (cached) /usr/bin/unzip checking for zip... (cached) /usr/bin/zip checking for makedepend... no checking for xargs... (cached) /usr/bin/xargs checking for make... (cached) /usr/bin/make checking for X... (cached) no checking for 64-bit OS... no checking for valid optimization flags... yes creating ./config.status creating config/autoconf.mk creating config/doxygen.cfg creating xpfe/global/buildconfig.html creating toolkit/content/buildconfig.html creating toolkit/components/passwordmgr/resources/content/contents.rdf creating toolkit/mozapps/contents-content.rdf creating gfx/gfx-config.h gfx/gfx-config.h is unchanged creating netwerk/necko-config.h netwerk/necko-config.h is unchanged creating xpcom/xpcom-config.h xpcom/xpcom-config.h is unchanged creating xpcom/xpcom-private.h xpcom/xpcom-private.h is unchanged configuring in nsprpub running /bin/sh /cygdrive/c/mozilla/nsprpub/configure --disable-ldap --disable-mailnews --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth --enable-crypto --disable-composer --enable-single-profile --disable-profilesharing --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-official-branding --enable-ui-locale=zh-CN --with-dist-prefix=c:/mozilla/ff/dist --with-mozilla --cache-file=.././config.cache --srcdir=/cygdrive/c/mozilla/nsprpub loading cache .././config.cache checking host system type... i686-pc-cygwin checking target system type... i686-pc-cygwin checking build system type... i686-pc-cygwin checking for cl... (cached) cl creating ./config.status creating Makefile creating config/Makefile creating config/autoconf.mk creating config/nsprincl.mk creating config/nsprincl.sh creating config/nspr-config creating lib/Makefile creating lib/ds/Makefile creating lib/libc/Makefile creating lib/libc/include/Makefile creating lib/libc/src/Makefile creating lib/tests/Makefile creating pkg/Makefile creating pkg/linux/Makefile creating pkg/solaris/Makefile creating pkg/solaris/SUNWpr/Makefile creating pkg/solaris/SUNWprx/Makefile creating pr/Makefile creating pr/include/Makefile creating pr/include/md/Makefile creating pr/include/obsolete/Makefile creating pr/include/private/Makefile creating pr/src/Makefile creating pr/src/io/Makefile creating pr/src/linking/Makefile creating pr/src/malloc/Makefile creating pr/src/md/Makefile creating pr/src/md/windows/Makefile creating pr/src/memory/Makefile creating pr/src/misc/Makefile creating pr/src/threads/Makefile creating pr/tests/Makefile creating pr/tests/dll/Makefile creating pr/src/threads/combined/Makefile configure: warning: Recreating autoconf.mk with updated nspr-config output /usr/bin/make -C /cygdrive/c/mozilla/ff make[1]: Entering directory `/cygdrive/c/mozilla/ff' rm -f -rf ./dist/sdk /usr/bin/make -C config export make[2]: Entering directory `/cygdrive/c/mozilla/ff/config' make[3]: Entering directory `/cygdrive/c/mozilla/ff/config/mkdepend' make[3]: Nothing to be done for `export'. make[3]: Leaving directory `/cygdrive/c/mozilla/ff/config/mkdepend' /usr/bin/perl -I/cygdrive/c/mozilla/config /cygdrive/c/mozilla/config/bdate.pl build_number ...... IBM T42 笔记本,在分配了 256M 内存的 WIN2K PRO 虚拟机下第一次编译需要一个多小时。 3、相关链接: Mozilla 官方网站上的编译说明:http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites firefox-1.0.7-source.tar.bz2 下载地址:http: //ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.7/source/firefox-1.0.7-source.tar.bz2 Cygwin 安装程序下载地址:http://www.cygwin.com/setup.exe Visual C++ Service Pack 5 下载地址:http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspx Visual C++ Processor Pack 下载地址:http://msdn.microsoft.com/vstudio/downloads/tools/ppack/download.asp Netscape's wintools 下载地址:http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip
clq
2006-10-30 21:56:27 发表
编辑
其实,其中的cvs和gcc对于在本地用vc6编译firefox来说是不必要的.不过谁知道呢,预防万一吧.
NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.