limodou
小狐狸
小狐狸
  • UID1917
  • 注册日期2005-01-08
  • 最后登录2005-06-14
  • 发帖数20
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:15160回复:8

在Windows下如何编译Mozilla源代码

楼主#
更多 发布于:2005-01-18 14:25
最近想学xpcom方面的知识,但好象总有问题。希望可以自已在 windows 下编译Mozilla原码。有人有这样的经验吗?我已经看过了mozilla.org上的说明,但是没找到如何编译,只是一堆配置。好明上面使用的是 nmake。不过我使用的是 cygwin 中的make,执行:make -f client.mak 但报告让我去网站上看说明。而client.mak也的确没什么东西。同时我的编译器下载的微软的免费的visual C++ toolkit 2003,里面不带nmake。

希望有经验的人给予指导。谢谢。
I love python!
My Blog: http://www.donews.net/limodou
猫头猪
狐狸大王
狐狸大王
  • UID163
  • 注册日期2004-11-25
  • 最后登录2005-12-04
  • 发帖数595
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2005-01-18 14:25
一句话,还是“看说明”,呵呵:
http://www.mozilla.org/build/

从Getting started开始看
1.Build Requirements
2.Get the Source
3.Configure Build Options
4. Build and Install
你就知道怎么编译了。
limodou
小狐狸
小狐狸
  • UID1917
  • 注册日期2005-01-08
  • 最后登录2005-06-14
  • 发帖数20
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2005-01-18 14:25
谢谢回复。

我使用的是visual C++ toolkit 2003,其中没有midl,但我执行 make -f client.mk build ,但在自动执行configure时报找不到midl。

在mozilla.org的主页上提供了一个链接关于使用VC7.0编译的,但打不开。我想问一下,你们都使用什么版本的VC在 windows下进行的编译,是6.0吗?
I love python!
My Blog: http://www.donews.net/limodou
limodou
小狐狸
小狐狸
  • UID1917
  • 注册日期2005-01-08
  • 最后登录2005-06-14
  • 发帖数20
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
3楼#
发布于:2005-01-18 14:25
我已经使用了VC 6.0,configure已经通过,只不过在编译时有一个与jpeg有关的报错了。我再试一试,我主要的目的是想编译pyxpcom
I love python!
My Blog: http://www.donews.net/limodou
猫头猪
狐狸大王
狐狸大王
  • UID163
  • 注册日期2004-11-25
  • 最后登录2005-12-04
  • 发帖数595
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
4楼#
发布于:2005-01-18 14:25
Version 6 requires installation of the Visual C++ Service Pack 5  and Visual C++ Processor Pack.
你一定是没装processor pack。
你这位老兄看文档实在是太不仔细了。:)
limodou
小狐狸
小狐狸
  • UID1917
  • 注册日期2005-01-08
  • 最后登录2005-06-14
  • 发帖数20
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
5楼#
发布于:2005-01-18 14:25
呵呵。多谢。我看到有,昨天太晚了,还没做到那一步呢。
I love python!
My Blog: http://www.donews.net/limodou
ganggangwu
小狐狸
小狐狸
  • UID2554
  • 注册日期2005-01-26
  • 最后登录2005-01-27
  • 发帖数1
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
6楼#
发布于:2005-01-18 14:25
各位大侠,请了。
请问大侠,我在用gmake编译的时候显示:
C:\mozilla>gmake -f client.mk checkout
Could not open the destination file : Invalid argument
Could not open the source file: No such file or directory
Path not found: No such file or directory
client.mk:152: /cygdrive/c/mozilla: No such file or directory
client.mk:152: |: Invalid argument
client.mk:152: sed: No such file or directory
client.mk:152: -e: No such file or directory
client.mk:152: s////.mozconfig.mk: No such file or directory
client.mk:153: /cygdrive/c/mozilla: No such file or directory
client.mk:153: |: Invalid argument
client.mk:153: sed: No such file or directory
client.mk:153: -e: No such file or directory
client.mk:153: s////build/unix/modules.mk: No such file or directory
gmake: *** No rule to make target `s////build/unix/modules.mk'.  Stop.

是说在Client.mk中的两个文件不存在吗(如下)?
include $(TOPSRCDIR)/.mozconfig.mk
include $(TOPSRCDIR)/build/unix/modules.mk
可是都在啊,这是为什么呢?求解。万谢!

我在学XPCOM,想给NetScape7上添加个组件,可是不知道开头怎么写。网上这方面的资源太少了。
在这里跪求各位大侠,能否提供一个能编译的代码示例。万谢,万万谢!
XPCOM 您的门在哪?~~
sam
sam
小狐狸
小狐狸
  • UID1799
  • 注册日期2005-01-06
  • 最后登录2005-03-01
  • 发帖数18
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
7楼#
发布于:2005-01-18 14:25
你在编译之前要建好.mozconfig.mk文件,在前面的网址中提供的文章里面会讲这个问题,另外你在WINDOWS下面编译估计用GCC会有问题.
sam
sam
小狐狸
小狐狸
  • UID1799
  • 注册日期2005-01-06
  • 最后登录2005-03-01
  • 发帖数18
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
8楼#
发布于:2005-01-18 14:25
XPCOM教程:http://docs.mandragor.org/files/Misc/Creating_XPCom_Components_en/appB.html
游客

返回顶部