![]() |
モジラのビルドモジラをビルドしよう! エンベッディングを試みる前に、まずは、モジラのソース全体をダウンロードし、そのままビルドすることが必須です。 モジラはその機能ごとに、各モジュールに分割されてはいますが、それらの動作は各モジュール間の相互作用による為、実質上かなり多くのモジュールが必要となります。 ことエンベッディングに関しては、ほとんどのモジュールが必要です。(なんとか切り離せるのは、editorとmailnewsくらいでしょうか…) と言うわけで、モジラをいかなる用途に使用するにしても、まずモジラ本体のビルドが先決です。 現在 (2001.01.21)、モジラMacintoshのビルド全体を、Carbonビルドに移行しようという提案がなされています。その方法は、ビルドプロジェクトをXMLエキスポートとして管理し、CodeWarrior 5.0 でも 6.0 でも、ビルドできる方法になりそうです。これが施行されれば、以下に示すビルド方法は大きく変わるでしょう。 ◆ ビルド環境の構築 ◆"モジラソースのダウンロード" & "モジラのビルド" に必要なツール類が多数あります。 "モジラソースのダウンロード" は、これがCVSにより管理されている為、正確には、"モジラソースのチェックアウト" と呼びます。 Macintoshでは、このチェックアウト&ビルドは、Perlスクリプトで記述されており、バッチ式に処理されます。 このチェックアウト&ビルドの過程は、相互に絡み合っている為、まずはこれらに使用するツール類をダウンロード&インストールして、チェックアウト&ビルドの為の環境を構築するところから始めます。 必要なツール類には以下のようなものがあります。 ■ CodeWarrior Pro 5ビルド用のコンパイラリンカとして、Metrowerks CodeWarrior Pro 5 を使用します。モジラビルドツールの中で、唯一これだけは購入する必要があります。 ■ Codewarrior Pro 5.3 updates [#]CodeWarrior Pro 5.3 updateをダウンロードしインストールします。MacOSプリコンパイルドヘッダー、ランタイムライブラリ、MSLライブラリをリビルドします。IDEのメモリアロケーションを24 MBtyeに変更します。 ■ CodeWarrior Plugin SDK [#]Mac OS Supportフォルダにインストールします。ビルド過程で、xpidlコンパイラをCW Pluginとしてビルドするので、これが必要になります。 ■ Universal Interfaces 3.3.2 [#]Carbonへの移行を容易にする為、Appleのシステムヘッダー3.3.2を使用します。ディスクイメージファイルをダウンロードし、DiskCopyでこれをマウントし、UniversalフォルダをCodeWarriorのMac OS Supportフォルダにコピーしてください。OpenTransportフォルダの名前を、(OpenTransport)にリネームしてください。 ■ Menu Sharing Toolkit 1.4 [#]メニューをモジラのメニューバーに追加する為に使用されます。ダウンロードして解凍し、Menu Sharing Toolkit 4.1フォルダをCodeWarriorのMac OS Supportフォルダにコピーしてください。 ■ ToolServer [#]CodeWarrior MPWをインストール済みなら、既にMPWフォルダにインストールされています。未インストールならばインストールしてください。ビルド過程で、MakeStubが使用します。 ■ MacPerl distribution [#]ダウンロードして解凍しインストールしてください。MacPerlのメモリパーティションサイズを16 MByteにしてください。Preferences...のScriptでRun Scripts opened from Finderをチェックして、パールスクリプトがダブルクリックで起動できるように設定した方がよいでしょう。 ■ cpan-mac distribution [#](現在はv0.50です)新しいパールモジュールのインストールを簡単にする為のツールです。ダウンロードして解凍してください。site_perlというフォルダをMacPerlアプリケーションフォルダ内に作成してください。preferencesのLibrariesで、ライブラリパスにこのsite_perlフォルダを追加してください。cpan-mac distributionの中のINSTALL.plxを起動して、インストールしてください。dropletsをインストールするか問い合わせてきたら、Yesを選択してください。 ■ Perl AppleEvents module [#](現在はv1.01です)
|
| # You can use this file to customize the Mozilla build system. # The following kinds of lines are allowable: # Comment lines, which start with a '#' in the first column # Lines which modify the default build settings. For the list of flags, # see MozBuildFlags.pm. Examples are: # # build pull 0 # don't pull # options mng 1 # turn mng on # # Line containing the special 'buildfrom' flag, which specifies # where to start the build. Example: # # buildfrom nglayout # where to start the build # # Lines which specify the location of the files used to store paths # to the CodeWarrior IDE, and the MacCVS Pro session file. Note quoting # of paths containing whitespace. Examples: # # filepath idepath ::codewarrior.txt # filepath sessionpath ":Some folder:MacCVS session path.txt" # # Lines which modify the build settings like #main::DEBUG. # Any lines which do not match either of the above are assumed # to set variables on $main::. Examples: # # CARBON 1 # MOZILLA_OFFICIAL 1 # build pull 0 CLOBBER_LIBS 0 CLOBBER_DIST_ALL 0 CLOBBER_DIST_LIBS 0 CLOBBER_IDL_PROJECTS 0 #CARBON 1 #buildfrom nglayout #options svg 1 #options mathml 1 #options transformiix 1 |
【Mozilla opt build prefs】
| # You can use this file to customize the Mozilla build system. # The following kinds of lines are allowable: # Comment lines, which start with a '#' in the first column # Lines which modify the default build settings. For the list of flags, # see MozBuildFlags.pm. Examples are: # # build pull 0 # don't pull # options mng 1 # turn mng on # # Line containing the special 'buildfrom' flag, which specifies # where to start the build. Example: # # buildfrom nglayout # where to start the build # # Lines which specify the location of the files used to store paths # to the CodeWarrior IDE, and the MacCVS Pro session file. Note quoting # of paths containing whitespace. Examples: # # filepath idepath ::codewarrior.txt # filepath sessionpath ":Some folder:MacCVS session path.txt" # # Lines which modify the build settings like #main::DEBUG. # Any lines which do not match either of the above are assumed # to set variables on $main::. Examples: # # CARBON 1 # MOZILLA_OFFICIAL 1 # build pull 0 CLOBBER_LIBS 0 CLOBBER_DIST_ALL 0 CLOBBER_DIST_LIBS 0 CLOBBER_IDL_PROJECTS 0 #CARBON 1 #buildfrom runtime #RUNTIME 1 #options svg 1 #options mathml 1 #options transformiix 1 |
モジラ本体をビルドすると、mozilla/dist/ というディレクトリが作成され、種々のビルド結果がそこに集められます。
このmozilla/dist/ ディレクトリの内容は、大きく分けて、
の2つに大別されます。
"モジラのビルドに必要な資源" とは、主にヘッダーファイルなどで、各モジュールが自分自身を使用してもらう為にExport (Manifest)するファイル群です。dist/ 直下にある各モジュール名と同名のディレクトリ以下にあります。
"モジラの実行に必要な資源" とは、実行形式ファイルやShlb、それらが使用するリソースなどで、いわゆるモジラの実行環境です。dist/viewser/、dist/viewser_debug/ 以下にあたります。
【mozilla/dist/】
|
mozilla/ |
dist/viewser/、dist/viewser_debug/ 以下の構造は、
直下に実行形式ファイル。
Mozilla (モジラ本体の実行形式)、viewer.app (単純なブラウザのテストプログラム)。
PPBrowserの実行形式なども、ビルドするとここに作成されます。
dist/Essential Files/、dist/Components/ に、Shlb。
それぞれモジラに必須のもの、オプション的なものに分けて格納されます。
dist/Chrome/ に、クロームファイル。
モジラのクロームを定義するファイルで、XUL、CSS、DTD、JS、RDF、などのファイルが、定められたディレクトリ構造に従って格納されます。最近では、これらが幾つかの単位ごとにJarファイル化されています。
などです。
また、mozilla/dist/ ディレクトリ以下のファイルの多くは、実際のファイルそのものではなく、mozilla/ ディレクトリ以下の各モジュールディレクトリ以下に生成されたファイルへのエイリアスです。
さあ、お疲れさまでした。ビルドが済んだなら、モジラを早速実行してみましょう。
モジラの実行形式は、
です。
| c_o_n_t_a_c_t | Copyright (C) 2000-2002 Symphony, Inc. All Rights Reserved. |
English |