Mozilla本体のビルド
Modified: 28 Feb 1999
いよいよ、Mozilla本体のビルドの方法です。
私の場合、ビルドの前に、3つの変更が必要でした。
今回は、CVSというものに悩まされましたが、Xiaolinさんのアドバイスのおかげで、何とかビルドすることができました。感謝の気持ちから、ご本人の許可を得て、「Xiaolinさんのご教示の記録」というページを作りました。
こうすれば、一回でビルドが成功する。という方法です。
悩み、教えてもらい、根気よくエラー対応したらやっとできました。その記録です。
以下の順序でビルドすれば、一回でビルドが成功すします。
ビルドの前のファイルの修正(1)
以下の修正で、"fatal error U1077: 'for'"が回避できます。
dummy.h を作る
改行文字一つだけのファイルを作り、$(MOZ_SRC) のディレクトリに保存します。
ファイルが存在する事だけに意味のあるファイルです。
rules.mak を修正する
571行目からです。
変更前 :
#//------------------------------------------------------------------------
#//
#// JMC
#//
#// EXPORTS Names of headers to be copied to MODULE
#//
#//------------------------------------------------------------------------
!if defined(EXPORTS)
export:: $(XPDIST)\public\$(MODULE)
for %f in ($(EXPORTS)) do $(MAKE_INSTALL:/=\) %f $(XPDIST:/=\)\public\$(MODULE:/=\)
clobber::
-for %g in ($(EXPORTS)) do $(RM) $(XPDIST:/=\)\public\$(MODULE:/=\)\%g
!endif # EXPORTS
:変更後 :
#//------------------------------------------------------------------------
#//
#// JMC
#//
#// EXPORTS Names of headers to be copied to MODULE
#//
#//------------------------------------------------------------------------
!if defined(EXPORTS)
export:: $(XPDIST)\public\$(MODULE)
for %f in ($(EXPORTS) $(MOZ_SRC)\dummy.h) do $(MAKE_INSTALL:/=\) %f $(XPDIST:/=\)\public\$(MODULE:/=\)
clobber::
-for %g in ($(EXPORTS)) do $(RM) $(XPDIST:/=\)\public\$(MODULE:/=\)\%g
!endif # EXPORTS
:
ビルドの前のファイルの修正(2)
デフォルトのディレクトリを、"mozilla"以外の名称に変更した場合、以下の変更が必要です。変更していない場合、以下の変更は不要です。
以下の修正で、”fatal error U1077: 'cd'”のエラーを回避できます。
client.mak を修正する
変更前
:
build_seamonkey:
@cd $(MOZ_SRC)\mozilla\.
nmake -f nglayout.mak all
:変更後 :
build_seamonkey:
@cd $(MOZ_SRC)\$(MOZ_TOP)\.
nmake -f nglayout.mak all
:”mozilla”が固定された名称しなっているので、$(MOZ_TOP)に変更しました。
INCLUDEファイルのコピーと設定
これは、本来不要なはずですが、私は悩んだすえ、こうすることでビルドを成功させました。
以下の修正で、”fatal error C1083: インクルード ファイルがオープンできません”のエラーを回避できます。
VisualC++6.0 のインクルードファイルをコピーする
mozill_src の下に、
incvc6
というディレクトリを作成します。
そして、そこに、
”C:\Program Files\Microsoft Visual Studio\VC98\atl\include”
の内容を全部コピーします。
環境変数、INCLUDEを設定します。
set INCLUDE=D:\mozilla_src\incvc6;%INCLUDE%
を実行し、設定します。
ビルドする
1999年1月28日版では、以下のように、
nmake /f client.mak build_all
"build_all" の指定が必要になりました。
ビルドの結果
正常終了時の画面は、以下のようになります。
+++ makecopy: Installing throbber\anims05.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims06.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims07.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims08.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims09.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims10.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims11.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims12.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ makecopy: Installing throbber\anims13.gif into directory ..\..\..\dist\WIN32_D.OBJ\bin\res\throbber
+++ make: install in D:\mozilla_src\19990128\webshell\tests\imgtest
+++ make: Creating directory: WIN32_D.OBJ
ImageTest.cpp
Creating Resource file: .\WIN32_D.OBJ\image.res
+++ make: Creating EXE: .\WIN32_D.OBJ\ImageTest.exe
+++ makecopy: Installing .\WIN32_D.OBJ\ImageTest.exe into directory ..\..\..\dist\WIN32_D.OBJ\bin
+++ make: install in D:\mozilla_src\19990128\webshell\tests\ComFactory
+++ make: Creating directory: WIN32_D.OBJ
TestCOMFactory.cpp
+++ make: Creating EXE: .\WIN32_D.OBJ\TestCOMFactory.EXE
+++ makecopy: Installing .\WIN32_D.OBJ\TestCOMFactory.EXE into directory ..\..\..\dist\WIN32_D.OBJ\bin
+++ make: install in D:\mozilla_src\19990128\webshell\embed