Difference between revisions of "JA/Documentation/Building Guide/Building on Windows"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Created page with '{{Documentation/Building Guide TOC |ShowNextPage=none |ShowPrevPage=none }} {{DISPLAYTITLE:Building on Windows / Windows 環境でのビルド}} Category:Windows __TOC__ =…')
 
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Documentation/Building Guide TOC
+
{{JA/Documentation/Building Guide TOC
 
|ShowNextPage=none
 
|ShowNextPage=none
 
|ShowPrevPage=none
 
|ShowPrevPage=none
Line 11: Line 11:
 
= Overview / 概要 =
 
= Overview / 概要 =
  
{{Template:Documentation/Windows| This document explains how to build the OpenOffice.org source code on Windows systems.
+
{{Win| This document explains how to build the OpenOffice.org source code on Windows systems.
 
ここでは、Windows 環境で、OpenOffice.orgのソースコードをビルドする方法を説明しています。}}
 
ここでは、Windows 環境で、OpenOffice.orgのソースコードをビルドする方法を説明しています。}}
  
Line 18: Line 18:
 
OpenOffice.orgをビルドするには、Cygwin 環境が必要です。Cygwin 環境は、Unix のコマンドラインツールを完全にエミュレートしています。ここに書かれている内容を理解するには、コマンドラインツールになれている必要がありますが、Unix シェルに精通している必要はありません。
 
OpenOffice.orgをビルドするには、Cygwin 環境が必要です。Cygwin 環境は、Unix のコマンドラインツールを完全にエミュレートしています。ここに書かれている内容を理解するには、コマンドラインツールになれている必要がありますが、Unix シェルに精通している必要はありません。
  
{{Template:Documentation/Tip|If you have never used a Unix shell, you might want to take a look at the [http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/index.html shell introduction at TLDP].
+
{{Tip|If you have never used a Unix shell, you might want to take a look at the [http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/index.html shell introduction at TLDP].
 
Unix シェルを使いたい場合は、[http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/index.html shell introduction at TLDP](英語)をご覧ください。}}
 
Unix シェルを使いたい場合は、[http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/index.html shell introduction at TLDP](英語)をご覧ください。}}
  
{{Template:Documentation/Note|<code>$SRC_ROOT</code> will denote the directory in which the source code of OpenOffice.org is stored.
+
{{Note|<code>$SRC_ROOT</code> will denote the directory in which the source code of OpenOffice.org is stored.
 
<code>$SRC_ROOT</code> は、OpenOffice.org のソースコードを保存したフォルダのことを指しています。}}
 
<code>$SRC_ROOT</code> は、OpenOffice.org のソースコードを保存したフォルダのことを指しています。}}
{{Template:Documentation/Tip|You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.
+
{{Tip|You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.
 
ビルドするリリースが、前回のリリースからどのように変更されているかは、リリースノートを参照してください。}}
 
ビルドするリリースが、前回のリリースからどのように変更されているかは、リリースノートを参照してください。}}
  
Line 43: Line 43:
  
 
下表は、リンクを辿ってファイルを取得したり、ここにすぐに戻れるようにするために作りました。ここに記載したファイルをダウンロードして、指定した場所に配置してください。<br>
 
下表は、リンクを辿ってファイルを取得したり、ここにすぐに戻れるようにするために作りました。ここに記載したファイルをダウンロードして、指定した場所に配置してください。<br>
(訳注:「配置する場所」に「(標準)」と書かれているファイルは、アプリケーションです。各サイトの指示や画面の表示に従ってインストールしてください。)
+
(訳注:「配置する場所」に「(標準)」と書かれているファイルは、アプリケーションです。各サイトの指示や画面の表示に従ってインストールしてください。また、「配置する場所」に「external/gdiplus」などと書かれている場合は、ダウンロードしたファイルを「<code>$SRC_ROOT</code>\external\gdiplus」フォルダに解凍したり保存してください。)
  
 
{| class="prettytable" border="1" width="100%"
 
{| class="prettytable" border="1" width="100%"
Line 50: Line 50:
 
! Place in / 配置する場所
 
! Place in / 配置する場所
 
|-
 
|-
| Cygwin: [http://www.cygwin.com Cygwin Toolkit with (dll version 1.5.10) or later]<br>Cygwin: [http://www.cygwin.com Cygwin Toolkit with (dll version 1.5.10) 以降]
+
| Cygwin: [http://www.cygwin.com Cygwin Toolkit with (dll version 1.5.10) or later]
| (default)<br>(標準)
+
Cygwin: [http://www.cygwin.com Cygwin Toolkit with (dll version 1.5.10) 以降]
 +
| (default)
 +
(標準)
 
|-
 
|-
| C/C++ Compiler: [http://www.microsoft.com/express/download/ Visual C++ 2008 Express Compiler (basic install, no optional parts required)]<br>C/C++ コンパイラ: [http://www.microsoft.com/express/download/ Visual C++ 2008 Express Compiler (標準インストールのみ。オプションの製品は必要ありません)]
+
| C/C++ Compiler: [http://www.microsoft.com/express/download/ Visual C++ 2008 Express Compiler (basic install, no optional parts required)]
| (default)<br>(標準)
+
C/C++ コンパイラ: [http://www.microsoft.com/express/download/ Visual C++ 2008 Express Compiler (標準インストールのみ。オプションの製品は必要ありません)]
 +
| (default)
 +
(標準)
 
|-
 
|-
| Java: [http://java.sun.com/javase/6/ JDK 1.6] for DEV300 milestones >= m37 and all OOo310 versions (older milestones will fail in the hsqldb module)<br>Java: [http://java.sun.com/javase/6/ JDK 1.6](訳注:Java SE Development Kit 6 (JDK 6)) OpenOffice.org DEV300 の m37 以降、OOo310 の全バージョンをビルドする場合に必要です。(それより古いソースコードでは、hsqldb モジュールのビルドに失敗します。)
+
| Java: [http://java.sun.com/javase/6/ JDK 1.6] for DEV300 milestones >= m37 and all OOo310 versions (older milestones will fail in the hsqldb module)
| (default)<br>(標準)
+
Java: [http://java.sun.com/javase/6/ JDK 1.6](訳注:Java SE Development Kit 6 (JDK 6)です。)OpenOffice.org DEV300 の m37 以降、OOo310 の全バージョンをビルドする場合に必要です。(それより古いソースコードでは、hsqldb モジュールのビルドに失敗します。)
 +
| (default)
 +
(標準)
 
|-
 
|-
| [http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008]<ref name="Foot1">{{Template:Documentation/Note|This also supported on Vista. This is either a DVD image or a net installer. You can either mount the DVD with a suitable tool, burn it do a DVD or use tools like winrar that can extract files from ISO files directly. You don't need to install samples or documentation (saves a lot of disk space). It will also install the .NET Framework 3.5 SDK.
+
| [http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008]<ref name="Foot1"></ref>
It might be best to install the Windows SDK into the default directory, and if not that into one without capital letters in the path. I used D:\Dev\Win_SDK\ and received some linking errors in the Python module (see {{Bug|88568}}).}}</ref>
+
[http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008]<ref name="Foot1">{{Template:Note|This also supported on Vista. This is either a DVD image or a net installer. You can either mount the DVD with a suitable tool, burn it do a DVD or use tools like winrar that can extract files from ISO files directly. You don't need to install samples or documentation (saves a lot of disk space). It will also install the .NET Framework 3.5 SDK.
 +
このファイルはVistaにも対応しています。DVDイメージ(訳注:DVD ISO)か、ネットインストーラー(訳注:Web Setup)を使用してください。DVDイメージは、DVDに書き込んでから利用するか、ISOファイルを解凍できるwinrarのようなソフトウェアを使うことで利用できます。サンプル(Samples)やドキュメント(Documentation)は必要ありません(ハードディスクの空き容量を節約できます)。なお、.NET Framework 3.5 SDKもインストールされます。
 +
It might be best to install the Windows SDK into the default directory, and if not that into one without capital letters in the path. I used D:\Dev\Win_SDK\ and received some linking errors in the Python module (see {{Bug|88568}}).
 +
Windows SDKは、標準のフォルダにインストールすることをオススメします。標準のフォルダにインストールしない場合は、パスに大文字を含まないようにしてください。D:\Dev\Win_SDK\ にインストールしたところ、Pythonモジュール({{Bug|88568}}を参照)でリンクエラーが発生しました。}}</ref>
 
|  
 
|  
 
|-
 
|-
 
| [http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en GDI+ Redistributable] (Genuine Windows Validation required)
 
| [http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en GDI+ Redistributable] (Genuine Windows Validation required)
 +
[http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en GDI+ Redistributable] (使用している Windows が正規品かどうかを確認する必要があります)
 
| external/gdiplus
 
| external/gdiplus
 +
external/gdiplus<br>(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。適当なフォルダに解凍してから「gdiplus.dll」を「<code>$SRC_ROOT</code>\external\gdiplus」にコピーしてください)
 
|-
 
|-
| Only for OOo2.x but due to {{Bug|88652}} in configure still needed for 3.x: [http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe unicows.dll from (Microsoft Layer for Unicode)]<ref name="Foot2"> {{Template:Documentation/Note|unicows.dll is available from the Microsoft site and needs to be saved to $SRC_ROOT/external/unicows. Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.}}</ref>
+
| Only for OOo2.x but due to {{Bug|88652}} in configure still needed for 3.x: [http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe unicows.dll from (Microsoft Layer for Unicode)]<ref name="Foot2"></ref>
 +
OOo2.x をビルドする場合にのみ必要なファイルですが、{{Bug|88652}}にあるとおり、OOo3.x の configure 実行時に必要です: [http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe unicows.dll from (Microsoft Layer for Unicode)]<ref name="Foot2"> {{Note|unicows.dll is available from the Microsoft site and needs to be saved to $SRC_ROOT/external/unicows. Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.
 +
unicows.dll は、Microsoftのサイトからダウンロードできます。$SRC_ROOT/external/unicows フォルダに保存してください。(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。「<code>$SRC_ROOT</code>\external\unicows」を指定してください。)ちなみに、Microsoftはこのファイルの場所を変更するのが好きみたいです。ここに挙げたURLからダウンロードできない場合は、Microsoftのサイトから探してください。}}</ref>
 
| external/unicows
 
| external/unicows
 +
external/unicows<br>(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。「<code>$SRC_ROOT</code>\external\unicows」を指定してください)
 
|-
 
|-
| [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CD1FC4B2-0885-47F4-AF45-7FD5E14DB6C0 dbghelp.dll]<ref name="Foot3">{{Template:Documentation/Note|dbghelp.dll is available from the Microsoft site and needs to be saved to $SRC_ROOT/external/dbghelp. Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.}}</ref>
+
| [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CD1FC4B2-0885-47F4-AF45-7FD5E14DB6C0 dbghelp.dll]<ref name="Foot3"></ref>
 +
[http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CD1FC4B2-0885-47F4-AF45-7FD5E14DB6C0 dbghelp.dll]<ref name="Foot3">{{Note|dbghelp.dll is available from the Microsoft site and needs to be saved to $SRC_ROOT/external/dbghelp. Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.
 +
dbghelp.dll は、Microsoftのサイトからダウンロードできます。$SRC_ROOT/external/dbghelp フォルダに保存してください。(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。「<code>$SRC_ROOT</code>\external\dbghelp」を指定してください。)ちなみに、Microsoftはこのファイルの場所を変更するのが好きみたいです。ここに挙げたURLからダウンロードできない場合は、Microsoftのサイトから探してください。}}</ref>
 
| external/dbghelp
 
| external/dbghelp
 +
external/dbghelp<br>(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。適当なフォルダに解凍してから「dbghelp.dll」を「<code>$SRC_ROOT</code>\external\dbghelp」にコピーしてください)
 
|-
 
|-
 
| [http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe instmsiw.exe] and [http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe instmsia.exe]
 
| [http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe instmsiw.exe] and [http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe instmsia.exe]
 +
[http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe instmsiw.exe] と [http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe instmsia.exe]
 
| external/msi
 
| external/msi
 +
external/msi<br>(訳注:ダウンロードしたファイルをそのまま「<code>$SRC_ROOT</code>\external\msi」にコピーしてください)
 
|-
 
|-
| for 2005 compiler: msvcp80.dll and msvcr80.dll (found in c:\WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd/msvc  
+
| for 2005 compiler: msvcp80.dll and msvcr80.dll (found in c:\WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd/msvc
 +
Visual C++ 2005 コンパイラを使用する場合: msvcp80.dll と msvcr80.dll(それぞれc:\WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd/msvc フォルダに保存されています)
 
| external/msvcp80
 
| external/msvcp80
 +
external/msvcp80<br>(訳注:左記のファイルを「<code>$SRC_ROOT</code>\external\msvcp80」にコピーしてください)
 
|-
 
|-
 
| for 2008 compiler (until DEV300 m22): msvcp90.dll and msvcr90.dll (found in $(msvcdir)\Vc\redist\x86\Microsoft.VC90.CRT)  
 
| for 2008 compiler (until DEV300 m22): msvcp90.dll and msvcr90.dll (found in $(msvcdir)\Vc\redist\x86\Microsoft.VC90.CRT)  
 +
Visual C++ 2008 コンパイラを使用する場合(かつ、DEV300 m22以前のソースコードをビルドする場合): msvcp90.dll と msvcr90.dll(それぞれ(Visual C++ 2008 コンパイラのインストールフォルダ)\Vc\redist\x86\Microsoft.VC90.CRT フォルダに保存されています)
 
| external/msvcp90
 
| external/msvcp90
 +
external/msvcp90<br>(訳注:左記のファイルを「<code>$SRC_ROOT</code>\external\msvcp90」にコピーしてください)
 
|-
 
|-
| for 2008 compiler starting with DEV300m23: Microsoft_VC90_CRT_x86.msm and policy_9_0_Microsoft_VC90_CRT_x86.msm for non debug builds and Microsoft_VC90_DebugCRT_x86.msm and policy_9_0_Microsoft_VC90_DebugCRT_x86.msm for debug builds<ref name="Foot4"> {{Template:Documentation/Note|You can find these files in your directory c:\program files\common files\merge modules}}</ref>
+
| for 2008 compiler starting with DEV300m23: Microsoft_VC90_CRT_x86.msm and policy_9_0_Microsoft_VC90_CRT_x86.msm for non debug builds and Microsoft_VC90_DebugCRT_x86.msm and policy_9_0_Microsoft_VC90_DebugCRT_x86.msm for debug builds<ref name="Foot4"></ref>. These merge modules are available in VS08 Express Edition and VS08 Professional Edtion. All *.msm files are located at c:\Program Files\Common Files\Merge Module.
. These merge modules are available in VS08 Express Edition and VS08 Professional Edtion. All *.msm files are located at c:\Program Files\Common Files\Merge Module.
+
Visual C++ 2008 コンパイラを使用する場合(かつ、DEV300 m23以降のソースコードをビルドする場合): 通常のビルド用に、Microsoft_VC90_CRT_x86.msm と policy_9_0_Microsoft_VC90_CRT_x86.msm、デバッグビルド用に Microsoft_VC90_DebugCRT_x86.msm と policy_9_0_Microsoft_VC90_DebugCRT_x86.msm<ref name="Foot4"> {{Note|You can find these files in your directory c:\program files\common files\merge modules
 +
このファイルは、C:\Program Files\Common Files\Merge Modules フォルダに保存されています。}}</ref>.
 +
このファイルは、Visual C++ 2008 Express Edition Professional Edition をインストールすると、C:\Program Files\Common Files\Merge Modules フォルダに保存されます。
 
| external/msm90
 
| external/msm90
 +
external/msm90<br>(訳注:左記のファイルを「<code>$SRC_ROOT</code>\external\msm90」にコピーしてください)
 
|-
 
|-
 
| [http://archive.apache.org/dist/ant/binaries Apache Ant (version 1.6.5 or later)]
 
| [http://archive.apache.org/dist/ant/binaries Apache Ant (version 1.6.5 or later)]
 +
[http://archive.apache.org/dist/ant/binaries Apache Ant(バージョン 1.6.5 以降)]
 
| (default)
 
| (default)
 +
(標準)
 
|-
 
|-
 
| [http://tools.openoffice.org/moz_prebuild/OOo3.2 Mozilla binary distribution]  
 
| [http://tools.openoffice.org/moz_prebuild/OOo3.2 Mozilla binary distribution]  
 +
[http://tools.openoffice.org/moz_prebuild/OOo3.2 Mozilla binary distribution]
  
 
(WNTMSCIruntime.zip,WNTMSCIlib.zip,WNTMSCIinc.zip)
 
(WNTMSCIruntime.zip,WNTMSCIlib.zip,WNTMSCIinc.zip)
 +
 +
(WNTMSCIruntime.zip,WNTMSCIlib.zip,WNTMSCIinc.zip)
 
| moz/zipped
 
| moz/zipped
 +
moz/zipped<br>(訳注:左記のファイルを解凍せずに「<code>$SRC_ROOT</code>\moz\zipped」に保存してください)
 
|-
 
|-
 
| msvcr71.dll and msvcp71.dll for Mozilla libraries (Search for them in the Web or on your PC. These files should be named as all lower case. Sometimes when downloaded they are upper case and this will cause 'file not found' errors towards the end of the build))
 
| msvcr71.dll and msvcp71.dll for Mozilla libraries (Search for them in the Web or on your PC. These files should be named as all lower case. Sometimes when downloaded they are upper case and this will cause 'file not found' errors towards the end of the build))
| external/msvcp71  
+
Mozilla ライブラリ用に msvcr71.dll と msvcp71.dll(このファイルは、インターネットか、お使いのパソコンから探してください。なお、ファイル名はすべて小文字にしてください。ダウンロード時に大文字になっている場合があり、そのときはビルドの最後で 'file not found' エラーが発生することがあります。)
 +
| external/msvcp71
 +
external/msvcp71
 
|-
 
|-
| optional: [http://nsis.sourceforge.net/ Nullsoft Scriptable Install System (NSIS)]<ref name="Foot5">{{Template:Documentation/Note|If NSIS is available, a self contained Windows installer is created in addition to the MSI installer files.}}
+
| optional: [http://nsis.sourceforge.net/ Nullsoft Scriptable Install System (NSIS)]<ref name="Foot5"></ref>
{{Template:Documentation/Caution|It used to be that newer version of NSIS broke the build (see {{Bug|85657}}), but it seems that it now works for NSIS up to 2.3.7.}}</ref>
+
オプション: [http://nsis.sourceforge.net/ Nullsoft Scriptable Install System (NSIS)]<ref name="Foot5">{{Note|If NSIS is available, a self contained Windows installer is created in addition to the MSI installer files.
 +
NSISを用意すると、msi形式のインストールファイルにWindows用の自己解凍機能をプラスしたインストーラが作成できます。}}
 +
{{Warn|It used to be that newer version of NSIS broke the build (see {{Bug|85657}}), but it seems that it now works for NSIS up to 2.3.7.
 +
以前は、NSIS の新しいバージョンがビルドを壊していました({{Bug|85657}}を参照)が、NSIS が 2.3.7 になってからは問題なく動いているようです。}}</ref>
  
 
|
 
|
 
|-
 
|-
| optional: [http://msdn.microsoft.com/directx/directxdownloads/ Microsoft DirectX SDK]<ref name="Foot6"> {{Template:Documentation/Note|If you don't want to download it you can disable DirectX support in the configuration step (<code>--disable-directx</code>).}}
+
| optional: [http://msdn.microsoft.com/directx/directxdownloads/ Microsoft DirectX SDK]<ref name="Foot6"></ref>
{{Template:Documentation/Caution|Current (as of 2008/01) versions of the DirectX9 SDK and Windows Platform SDK do not fit to each other. To be able to build with DirextX enabled, you need to patch one file in the Platform SDK. See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID2743771 for details.}}
+
オプション: [http://msdn.microsoft.com/directx/directxdownloads/ Microsoft DirectX SDK]<ref name="Foot6">
 +
{{Note|If you don't want to download it you can disable DirectX support in the configuration step (<code>--disable-directx</code>).
 +
DirectX SDKを用意しない場合は、configure 実行時に DirectX サポートを無効にする(<code>--disable-directx</code>)ように設定してください。}}
 +
{{Warn|Current (as of 2008/01) versions of the DirectX9 SDK and Windows Platform SDK do not fit to each other. To be able to build with DirextX enabled, you need to patch one file in the Platform SDK. See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID2743771 for details.
 +
2008年1月現在、DirectX9 SDKと、Windows Platform SDKは同時に使用できません(訳注:そのままでは同時に使用できません)。DirectX サポートを有効にしてビルドする場合は、Platform SDKを修正する必要があります。http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID2743771 をご覧ください。(※下記の訳注をご覧ください)}}  
 +
(訳注:リンク先がなくなっており、詳細は不明ですが、dev@tools.openoffice.org のログに、http://www.microsoft.com/downloads/details.aspx?FamilyID=529f03be-1339-48c4-bd5a-8506e5acf571&DisplayLang=en からダウンロードできる dxsdk_aug2007.exe で十分という[http://tools.openoffice.org/servlets/ReadMsg?list=dev&msgNo=6770 メール]がありました。)
  
{{Template:Documentation/Caution|Do not use a DirectX10 SDK!}}</ref>
+
{{Warn|Do not use a DirectX10 SDK!
 +
DirectX10 SDKは使わないでください!}}</ref>
 
|
 
|
 
|}
 
|}
=== adding required files to the build tree ===
+
=== adding required files to the build tree / ソースツリーをビルドする際に必要なファイルを追加するには ===
  
{{Template:Documentation/Tip|Some of the files can be found in a suitable OOo installation set also, so you can save the download by “stealing” it from your OOo installation.}}
+
{{Tip|Some of the files can be found in a suitable OOo installation set also, so you can save the download by “stealing” it from your OOo installation.
 +
いくつかのファイルは、インストール用の OOo にも入っています。OOo をインストールして、そこからコピーすることもできます。}}
  
{{Template:Documentation/Note|OOo uses some Mozilla libraries. Building the corresponding sources is only possible with the VC2003 compiler so you have to use precompiled libraries that require the msvx71 libraries mentioned above. On Windows the Mozilla libraries are needed only for Mozilla address book support. Unfortunately a bug in the module dependencies makes it necessary that the Mozilla libaries are used anyway as otherwise building the module <tt>xmlsecurity</tt> fails (see below).}}
+
{{Note|OOo uses some Mozilla libraries. Building the corresponding sources is only possible with the VC2003 compiler so you have to use precompiled libraries that require the msvx71 libraries mentioned above. On Windows the Mozilla libraries are needed only for Mozilla address book support. Unfortunately a bug in the module dependencies makes it necessary that the Mozilla libaries are used anyway as otherwise building the module <tt>xmlsecurity</tt> fails (see below).
 +
OOo では、Mozilla のライブラリをいくつか使用しています。そのライブラリは、Visual C++ 2003 コンパイラでのみビルドできるため、コンパイル済みのファイル(上記のとおり msvx71 ライブラリが必要です)を使用してください。残念なことに、モジュールの依存に関するバグがあるため、Mozilla のライブラリを使用しないと、<tt>xmlsecurity</tt> モジュールのビルドに失敗します(下記参照)。 }}
  
= Installation and Preparation of Build Tools =
+
= Installation and Preparation of Build Tools / ビルド用ツールのインストールと準備 =
== setting up cygwin ==
+
== setting up cygwin / cygwin の設定 ==
  
 
Go to http://www.cygwin.com/ and download and install the current version.
 
Go to http://www.cygwin.com/ and download and install the current version.
{{Template:Documentation/Caution|Make sure that you keep the filetype set to “Unix/binary”.}}
 
  
=== required additional packages ===
+
http://www.cygwin.com/ にアクセスして、cygwin の最新バージョンをダウンロードし、インストールしてください。
 +
 
 +
{{Warn|Make sure that you keep the filetype set to “Unix/binary”.
 +
インストールする際、“Default Text File Type”は、“Unix / binary (RECOMMENDED)”のままにしてください。}}
 +
 
 +
=== required additional packages / 必要な追加パッケージ ===
 
Cygwin consists of some basic and a lot of optional packages. As building OOo needs some of these optional packages you have to select them in the installer.
 
Cygwin consists of some basic and a lot of optional packages. As building OOo needs some of these optional packages you have to select them in the installer.
 +
 +
Cygwin には、いくつかの基本的なパッケージと、多数のオプションパッケージがあります。OOo をビルドするには、Cygwin のインストール時に、いくつかのオプションパッケージを選択します。
 +
 
Here's a complete list of the needed packages:
 
Here's a complete list of the needed packages:
 +
 +
必要なパッケージは以下の通りです:
 +
* Category Archive:
 
* Category Archive:
 
* Category Archive:
 +
** unzip
 
** unzip
 
** unzip
 
** zip
 
** zip
 +
** zip
 +
* Category Devel :
 
* Category Devel :
 
* Category Devel :
 +
** autoconf
 
** autoconf
 
** autoconf
 +
** bison
 
** bison
 
** bison
 +
** flex
 
** flex
 
** flex
 
** gcc-g++
 
** gcc-g++
 +
** gcc-g++
 +
** gperf
 
** gperf
 
** gperf
 +
** make
 
** make
 
** make
 
** openssl-devel (only needed for perl modules for CWS tooling, see below)
 
** openssl-devel (only needed for perl modules for CWS tooling, see below)
 +
** openssl-devel (CWS ツール用の perl モジュールにのみ必要です。下記参照)
 
** cvs (for 2.x code line and 3.0 code line)  
 
** cvs (for 2.x code line and 3.0 code line)  
 +
** cvs (OOo 2.x 系と 3.0 系のビルドに必要です)
 
** subversion (for 3.x code line, minimum version 1.5.5)
 
** subversion (for 3.x code line, minimum version 1.5.5)
 +
** subversion (OOo 3.x 系のビルドに必要です。最低でも subversion 1.5.5 が必要です。)
 
* Category Libs
 
* Category Libs
 +
* Category Libs
 +
** openssl
 
** openssl
 
** openssl
 
* Category Net
 
* Category Net
 +
* Category Net
 +
** openssh
 
** openssh
 
** openssh
 
** ncftp
 
** ncftp
 +
** ncftp
 +
* Category Perl
 
* Category Perl
 
* Category Perl
 
** perl
 
** perl
 +
** perl
 +
* Category Shells
 
* Category Shells
 
* Category Shells
 
** rxvt
 
** rxvt
 +
** rxvt
 +
* Category Utils
 
* Category Utils
 
* Category Utils
 +
** patch
 
** patch
 
** patch
 +
** gnupg
 
** gnupg
 
** gnupg
 
* Category Web
 
* Category Web
 +
* Category Web
 +
** lynx
 
** lynx
 
** lynx
 
** wget
 
** wget
{{Template:Documentation/Note|Unfortunately the list of packages mentioned at http://website.openoffice.org/support/en/howtos/1.html#1 is incomplete, some more are listed at http://tools.openoffice.org/dev_docs/build_windows_tcsh.html#BuildRequirements .}}
+
** wget
 +
{{Note|Unfortunately the list of packages mentioned at http://website.openoffice.org/support/en/howtos/1.html#1 is incomplete, some more are listed at http://tools.openoffice.org/dev_docs/build_windows_tcsh.html#BuildRequirements .
 +
残念なことに、http://website.openoffice.org/support/en/howtos/1.html#1 で説明しているように、この一覧は不完全です。http://tools.openoffice.org/dev_docs/build_windows_tcsh.html#BuildRequirements に追加のパッケージが記載されています。}}
  
{{Template:Documentation/Note|The installer will automatically check and download some more packages needed by thosed listed here. The whole process takes roughly 20 minutes.}}
+
{{Note|The installer will automatically check and download some more packages needed by thosed listed here. The whole process takes roughly 20 minutes.
 +
Cygwin のインストーラは、上記のパッケージを使用するのに必要な追加パッケージを、自動的に確認してダウンロードします。必要なパッケージをダウンロードしてインストールするには、約 20 分かかります。}}
  
=== breaking links to executables ===
+
=== breaking links to executables / 実行ファイルのリンクを切る ===
 
Within the Cygwin Toolkit, some executables might be symlinks: awk.exe and gunzip.exe, tar.exe (in older releases only). This can lead to a break of the build later, and the symlinks should be replaced by copies of the command they link to.  
 
Within the Cygwin Toolkit, some executables might be symlinks: awk.exe and gunzip.exe, tar.exe (in older releases only). This can lead to a break of the build later, and the symlinks should be replaced by copies of the command they link to.  
 +
 +
Cygwin Toolkit では、awk.exe、gunzip.exe(訳注:gunzip です)、tar.exe(古いリリースの場合のみ)は、シンボリックリンクになっているかもしれません。シンボリックリンクになっている場合はビルドが失敗するため、シンボリックリンクを実際のファイルに置き換える必要があります。
  
 
To check this, execute:
 
To check this, execute:
  
 +
シンボリックリンクになっているか確認します。awk.exe がシンボリックリンクになっているかどうかを確認する場合は、Cygwin で次のコマンドを実行してください:
 +
 +
ls -l /bin/awk.exe
 
  ls -l /bin/awk.exe
 
  ls -l /bin/awk.exe
  
 
whether e.g. awk.exe is a symlink. In version 1.5.24-2 awk.exe is a link to gawk.exe. The shell will show this by putting out “awk.exe -> gawk.exe”. In this case gawk.exe must be copied to awk.exe by executing:  
 
whether e.g. awk.exe is a symlink. In version 1.5.24-2 awk.exe is a link to gawk.exe. The shell will show this by putting out “awk.exe -> gawk.exe”. In this case gawk.exe must be copied to awk.exe by executing:  
  
 +
バージョン 1.5.24-2 の awk.exe は、gawk.exe へのシンボリックリンクになっています。上記のコマンドを実行すると、“awk.exe -> gawk.exe”と表示されます。この場合、次のようにして gawk.exe を awk.exe としてコピーします。
 +
 +
 +
cd /bin
 
  cd /bin
 
  cd /bin
 
  rm awk.exe
 
  rm awk.exe
 +
rm awk.exe
 +
cp gawk.exe awk.exe
 
  cp gawk.exe awk.exe
 
  cp gawk.exe awk.exe
  
Line 170: Line 265:
 
In case you overlook something here or you have a newer Cygwin version with additional symlinks not mentioned here it's not a problem. You will get a helpful error message about an existing link in the configuration step (configure) later. The message will tell you which link you have to remove and you can do it following the advice given above for the awk.exe/gawk.exe pair.
 
In case you overlook something here or you have a newer Cygwin version with additional symlinks not mentioned here it's not a problem. You will get a helpful error message about an existing link in the configuration step (configure) later. The message will tell you which link you have to remove and you can do it following the advice given above for the awk.exe/gawk.exe pair.
  
=== installing additional perl modules in cygwin ===
+
ここまでに何かを見落としていたり、新しい Cygwin になってシンボリックリンクになっているファイルが増えていたりしても、心配することはありません。configure ツールを使うときにシンボリックリンクが残っていたら、丁寧なメッセージが表示されます。そのメッセージを読めば、上記の awk.exe と gawk.exe のようにシンボリックリンクを切る方法がわかるようになっています。
 +
 
 +
 
 +
=== installing additional perl modules in cygwin / cygwin で perl の追加モジュールをインストールする ===
 
As explained some perl modules must be installed with CPAN. The necessary command in the cygwin shell is
 
As explained some perl modules must be installed with CPAN. The necessary command in the cygwin shell is
  
 +
perl のモジュールをいくつか CPAN からインストールします。Cygwin の shell で次のコマンドを実行してください
 +
 +
perl -MCPAN -e shell
 
  perl -MCPAN -e shell
 
  perl -MCPAN -e shell
  
 
If this command is executed the first time CPAN will ask for configuration. Choose autoconfiguration.  
 
If this command is executed the first time CPAN will ask for configuration. Choose autoconfiguration.  
  
{{Template:Documentation/Caution|Please note that CPAN is not able to deal with usernames containing spaces. To work around this fact, when CPAN asks you to specify the ''CPAN build and cache directory'', change the default suggestion to <tt>/cpan</tt>.}}
+
はじめて CPAN を実行したときは、設定に関する質問が表示されます。自動設定(automatic configuration)を実行してください。
 +
 
 +
{{Warn|Please note that CPAN is not able to deal with usernames containing spaces. To work around this fact, when CPAN asks you to specify the ''CPAN build and cache directory'', change the default suggestion to <tt>/cpan</tt>.
 +
 
 +
CPAN は、スペースを含むユーザー名を使用できません。うまく動かすには、CPAN の設定中に ''CPAN build and cache directory'' と表示されたら、CPAN に提案されている設定を無視して <tt>/cpan</tt> と入力します。}}
  
 
At the end the CPAN shell appeared and is ready to accept commands for installations. Each module is installed by typing <code>install $MODULENAME</code>. The modules that must be installed are:
 
At the end the CPAN shell appeared and is ready to accept commands for installations. Each module is installed by typing <code>install $MODULENAME</code>. The modules that must be installed are:
 +
 +
設定が終わると CPAN シェル(訳注:cpan[x])が表示され、インストール用のコマンドを入力できるようになります。以下のモジュールは、<code>install (モジュール名)</code> と入力するとインストールされます。インストールするモジュールは次のとおりです:
  
 +
* Archive::Zip
 
* Archive::Zip
 
* Archive::Zip
 
* XML::Parser (though it seems that this is already installed; doesn't hurt to do it)
 
* XML::Parser (though it seems that this is already installed; doesn't hurt to do it)
 +
* XML::Parser (このモジュールはインストール済みのように見えますが、実行しても悪いことはありません)
 
* URI
 
* URI
 +
* URI
 +
* LWP::UserAgent
 
* LWP::UserAgent
 
* LWP::UserAgent
 
* Crypt::SSLeay
 
* Crypt::SSLeay
 +
* Crypt::SSLeay
 +
* SOAP::Lite
 
* SOAP::Lite
 
* SOAP::Lite
  
 
CPAN will detect if a selected module depends on other modules and it will offer to download them also. As explained please just confirm this.
 
CPAN will detect if a selected module depends on other modules and it will offer to download them also. As explained please just confirm this.
  
{{Template:Documentation/Note|The last three modules are only needed if you want to use the cws tooling. These tools are necessary if you want to create and maintain your own [http://wiki.services.openoffice.org/wiki/CWS Child Workspaces] or if you want to build one of them. I recommend to install them anyway as sooner or later you want to work on a child workspace.}}
+
CPAN は、選択したモジュールに必要なそのほかのモジュールを見つけて、ダウンロードするように提案してくれます。この提案についても確認してください。
 +
 
 +
{{Note|The last three modules are only needed if you want to use the cws tooling. These tools are necessary if you want to create and maintain your own [http://wiki.services.openoffice.org/wiki/CWS Child Workspaces] or if you want to build one of them. I recommend to install them anyway as sooner or later you want to work on a child workspace.
 +
最後の3つのモジュールは、cws ツールを使用するときにのみ必要です。cws ツールは、[http://wiki.services.openoffice.org/wiki/CWS Child Workspaces] を作成したりメンテナンスするときや、Child Workspaces をビルドするときに必要です。最後の3つのモジュールは、child workspace の作業をするときにインストールすることをオススメします。}}
  
{{Template:Documentation/Caution|I got an error message from CPAN somewhat like the following:
+
{{Warn|I got an error message from CPAN somewhat like the following:
 +
インストール中に以下のようなエラーメッセージが表示されました。
 
<pre>C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
 
<pre>C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
 
address as parent(0x7C0000) != 0x7D0000</pre>
 
address as parent(0x7C0000) != 0x7D0000</pre>
To fix this, I had to exit the Cygwin shell, run cmd.exe, then type "c:\cygwin\bin\ash.exe" to start the minimal shell, then type <code>/bin/rebaseall</code>. Then CPAN worked when I ran it again.}}
+
<pre>C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
 +
address as parent(0x7C0000) != 0x7D0000</pre>
 +
To fix this, I had to exit the Cygwin shell, run cmd.exe, then type "c:\cygwin\bin\ash.exe" to start the minimal shell, then type <code>/bin/rebaseall</code>. Then CPAN worked when I ran it again.
 +
この場合は、Cygwin シェルを終了して、cmd.exe を実行してください。(訳注:cmd.exe を実行する前に再起動した方がよさそうです。)次にコマンドプロンプトで "c:\cygwin\bin\ash.exe" と入力して、小さな小さなシェルを起動し、<code>/bin/rebaseall</code> と入力します。ここまで実行したら perl -MCPAN -e shell からやり直すと、エラーメッセージが表示されなくなります。}}
  
{{Template:Documentation/Caution| I got another error when cygwin was performing <tt>make install</tt>:
+
{{Warn| I got another error when cygwin was performing <tt>make install</tt>:
 +
<tt>make install</tt>(訳注:<tt>install (モジュール名)</tt> のこと)を実行すると、他のエラーメッセージが表示されました。
 +
<pre>ERROR: Can't create '/usr/bin'; Do not have write permissions on '/usr/bin'</pre>
 
<pre>ERROR: Can't create '/usr/bin'; Do not have write permissions on '/usr/bin'</pre>
 
<pre>ERROR: Can't create '/usr/bin'; Do not have write permissions on '/usr/bin'</pre>
 
I can actually write to /usr/bin; however when I do <tt>ls -ld /usr/bin</tt>, cygwin reports no write permission; and <tt>chmod u+w /usr/bin</tt> gives <tt>Permission denied</tt>.  This causes the install process to fail when it checks permissions. As a kludge, I installed vim, and edited line 368 of /usr/lib/perl5/5.10/ExtUtils/Install.pm, replacing this:
 
I can actually write to /usr/bin; however when I do <tt>ls -ld /usr/bin</tt>, cygwin reports no write permission; and <tt>chmod u+w /usr/bin</tt> gives <tt>Permission denied</tt>.  This causes the install process to fail when it checks permissions. As a kludge, I installed vim, and edited line 368 of /usr/lib/perl5/5.10/ExtUtils/Install.pm, replacing this:
 +
/usr/bin に書き込むことはできるのですが、<tt>ls -ld /usr/bin</tt> を実行すると、書き込み権限がないと表示されます。そこで、<tt>chmod u+w /usr/bin</tt> と入力しましたが、<tt>Permission denied</tt> と表示されます。これは、書き込み権限の確認に失敗してることが原因です。そこで、その場しのぎですが、vim をインストールして、/usr/lib/perl5/5.10/ExtUtils/Install.pm(訳注:/lib/perl5/5.10/ExtUtils/Install.pmでした。/usr/libは空っぽです。)の 368 行目を次のように書き換えました:
 +
 +
<pre>return -w $dir;</pre>
 
<pre>return -w $dir;</pre>
 
<pre>return -w $dir;</pre>
 
with this:
 
with this:
 +
 +
これを:
 
<pre>return 1;</pre>
 
<pre>return 1;</pre>
which allowed installation to proceed.}}
+
<pre>return 1;</pre>
 +
which allowed installation to proceed.
 +
 
 +
これでインストールができました。}}
  
= Full Builds =
+
= Full Builds / フルビルド =
 
== configure ==
 
== configure ==
 
Finally the <code>configure</code> tool is used to create the environment. It checks that all software, hardware, and system requirements for the build are satisfied, and creates configuration files called winenv.set (for tcsh) and winenv.set.sh (for bash) that are used to set all necessary build environment variables. Before running configure, make sure that all needed programs are in the system path or start configure with the appropriate command line switches. If configure detects a problem it will stop and give you a useful hint how to fix it.
 
Finally the <code>configure</code> tool is used to create the environment. It checks that all software, hardware, and system requirements for the build are satisfied, and creates configuration files called winenv.set (for tcsh) and winenv.set.sh (for bash) that are used to set all necessary build environment variables. Before running configure, make sure that all needed programs are in the system path or start configure with the appropriate command line switches. If configure detects a problem it will stop and give you a useful hint how to fix it.
Line 225: Line 355:
 
   --with-jdk-home="/cygdrive/d/develop/j2sdk1.4.2_11" \
 
   --with-jdk-home="/cygdrive/d/develop/j2sdk1.4.2_11" \
 
   --with-csc-path="/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5" \
 
   --with-csc-path="/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5" \
   --with-ant-home=/ant \
+
   --with-ant-home=/ant
  --with-use-shell=bash
+
  
  ./configure --disable-build-mozilla --with-use-shell=bash --disable-activex --with-win32
+
  ./configure --disable-build-mozilla --disable-activex --with-win32
 
  --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC"
 
  --with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC"
 
  --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin"
 
  --with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin"
Line 238: Line 367:
 
  --with-ant-home=/cygdrive/c/apache-ant-1.6.5
 
  --with-ant-home=/cygdrive/c/apache-ant-1.6.5
 
  --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
 
  --with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
 +
 +
(訳注:私のところでは以下のようになりました。
 +
./configure --disable-nss-module --disable-build-mozilla --disable-activex --with-win32 \
 +
--with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC" \
 +
--with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin" \
 +
--with-csc-path="/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5" \
 +
--with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1" \
 +
--with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/Bin" \
 +
--with-jdk-home="/cygdrive/C/Program Files/Java/jdk1.6.0_17" \
 +
--with-directx-home="/cygdrive/c/Program Files/Microsoft DirectX SDK (August 2007)" \
 +
--disable-epm \
 +
--with-ant-home=/cygdrive/d/apache-ant-1.7.1 \
 +
--with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
 +
Apache Antのフォルダが少し違うかもしれませんが、だいたいこんな感じになると思います。)
  
 
==== configure settings tips ====
 
==== configure settings tips ====
{{Template:Documentation/Caution|Make sure that the <code>PATH</code> variable in your cygwin shell does not contain any blanks and quotes.}}
+
{{Warn|Make sure that the <code>PATH</code> variable in your cygwin shell does not contain any blanks and quotes.}}
{{Template:Documentation/Caution|Paths might have problems with spaces. Install requirements into pathes without them. Alternatively, feel free to install the various packages using the default path containing spaces and then use the mixed short path for the configure stage. The mixed short path can be obtained using Cygwin's cygpath tool, eg:
+
{{Warn|Paths might have problems with spaces. Install requirements into pathes without them. Alternatively, feel free to install the various packages using the default path containing spaces and then use the mixed short path for the configure stage. The mixed short path can be obtained using Cygwin's cygpath tool, eg:
 
<pre>$ cygpath -m -s "c:\Program Files\Microsoft Visual Studio 9.0\VC"
 
<pre>$ cygpath -m -s "c:\Program Files\Microsoft Visual Studio 9.0\VC"
 
  c:/PROGRA~1/MICROS~1.0/VC</pre>
 
  c:/PROGRA~1/MICROS~1.0/VC</pre>
 
The <code>with-psdk-home</code> setting needs a case-sensitive path name. I recommend to use case-sensitive usage in all cases - it's good to get used to case sensitivity if you are going to work with Cygwin.}}
 
The <code>with-psdk-home</code> setting needs a case-sensitive path name. I recommend to use case-sensitive usage in all cases - it's good to get used to case sensitivity if you are going to work with Cygwin.}}
{{Template:Documentation/Caution|Beware of using <code>/c/</code> instead of <code>/cygdrive/c/</code>.}}
+
{{Warn|Beware of using <code>/c/</code> instead of <code>/cygdrive/c/</code>.}}
{{Template:Documentation/Caution|Avoid trailing slashes in configure parameters. They sure cause problems for <code>--with-psdk-home</code>.}}
+
{{Warn|Avoid trailing slashes in configure parameters. They sure cause problems for <code>--with-psdk-home</code>.}}
{{Template:Documentation/Note|Paths to dependencies might be different for your installation. The pathes containing "msvc" and "msdk" should be self-explanatory.}}
+
{{Note|Paths to dependencies might be different for your installation. The pathes containing "msvc" and "msdk" should be self-explanatory.}}
{{Template:Documentation/Tip|There are a number of options that you can use with the configure script. To display these options, type the following command:
+
{{Tip|There are a number of options that you can use with the configure script. To display these options, type the following command:
 
<pre>./configure --help</pre>}}
 
<pre>./configure --help</pre>}}
{{Template:Documentation/Tip|If you run into problems with early DEV300 releases, check your settings in winenv.set.sh for <code>WINDOWS_VISTA_PSDK</code> to be set <code>TRUE</code>. This is important if <code>configure</code> fails to detect the Windows platform SDK version correctly. The detection failure results from the way how configure searches for the Vista PSDK in older releases: it will be found only if it is installed into the default location.}}  
+
{{Tip|If you run into problems with early DEV300 releases, check your settings in winenv.set.sh for <code>WINDOWS_VISTA_PSDK</code> to be set <code>TRUE</code>. This is important if <code>configure</code> fails to detect the Windows platform SDK version correctly. The detection failure results from the way how configure searches for the Vista PSDK in older releases: it will be found only if it is installed into the default location.}}  
{{Template:Documentation/Tip|If you run into problems compiling on an "Express Edition" with early DEV300 releases, check your settings in winenv.set.sh for <code>DISABLE_ATL</code>, <code>DISABLE_ACTIVEX</code>: all have to be set <code>TRUE</code>. Visual Studio Express compilers do not contain everything needed to build the OOo ActiveX control, OLE automation and native Windows OLE support, so disable support for them. A "complete" Visual Studio (no “Express” version) is not limited in that way.}}
+
{{Tip|If you run into problems compiling on an "Express Edition" with early DEV300 releases, check your settings in winenv.set.sh for <code>DISABLE_ATL</code>, <code>DISABLE_ACTIVEX</code>: all have to be set <code>TRUE</code>. Visual Studio Express compilers do not contain everything needed to build the OOo ActiveX control, OLE automation and native Windows OLE support, so disable support for them. A "complete" Visual Studio (no “Express” version) is not limited in that way.}}
{{Template:Documentation/Tip|As DirectX is not needed for most developers, its SDK consumes a lot of disk space and is prone to incompatibilities I recommend to build without DirecX support by using <code>--disable-directx</code> as shown above. Otherwise you have to provide the path to the SDK in <code>--with-directx-home</code>.}}
+
{{Tip|As DirectX is not needed for most developers, its SDK consumes a lot of disk space and is prone to incompatibilities I recommend to build without DirecX support by using <code>--disable-directx</code> as shown above. Otherwise you have to provide the path to the SDK in <code>--with-directx-home</code>.}}
{{Template:Documentation/Tip|OOo uses some Mozilla components. It is not possible to build them from the sources using the Visual Studio 2005 compiler. Disabling the Mozilla components with <code>--disable-mozilla</code> completely currently does might not work due to a bug in the module dependencies.}}
+
{{Tip|OOo uses some Mozilla components. It is not possible to build them from the sources using the Visual Studio 2005 compiler. Disabling the Mozilla components with <code>--disable-mozilla</code> completely currently does might not work due to a bug in the module dependencies.}}
{{Template:Documentation/Tip|If you experiment with the newest sources, mind that it can happen sometimes that <code>configure.in</code> was updated, but it was forgotten to update configure too. The configure script itself is created from <code>configure.in</code> using the <code>autoreconf</code> command. The perl script <code>set_soenv</code> is created when you run configure from <code>set_soenv.in</code>.}}
+
{{Tip|If you experiment with the newest sources, mind that it can happen sometimes that <code>configure.in</code> was updated, but it was forgotten to update configure too. The configure script itself is created from <code>configure.in</code> using the <code>autoreconf</code> command. The perl script <code>set_soenv</code> is created when you run configure from <code>set_soenv.in</code>.}}
{{Template:Documentation/Tip|csc.exe comes from the <code>c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322</code> directory, you might need <code>--with-csc-path</code>.}}
+
{{Tip|csc.exe comes from the <code>c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322</code> directory, you might need <code>--with-csc-path</code>.}}
{{Template:Documentation/Tip|If you fail to getting together a working installation of Cygwin, one possibility is to use a known-to-work combination of Cygwin packages, i.e. a direct copy of some other user's Cygwin tree. [[User:TorLillqvist]] has such a tree (from late 2006) zipped up at http://download.go-oo.org/tstnvl/tml/tml-cygwin.zip . Don't hesitate to ask for advice if necessary.}}
+
{{Tip|If you fail to getting together a working installation of Cygwin, one possibility is to use a known-to-work combination of Cygwin packages, i.e. a direct copy of some other user's Cygwin tree. [[User:TorLillqvist]] has such a tree (from late 2006) zipped up at http://download.go-oo.org/tstnvl/tml/tml-cygwin.zip . Don't hesitate to ask for advice if necessary.}}
 +
{{Tip|(訳注:以下のようなメッセージが表示されたときは、<code>$SRC_ROOT</code>\soltools\wntmsci12.pro\inc\unistd.h のアクセス権限をフルアクセスにしてください。
 +
<pre>d:\ooo\ooo320_m7\soltools\mkdepend\def.h(42) : fatal error C1083: include ファイルを開けません。'unistd.h': No such file or directory</pre>
 +
<pre>dmake:  Error code 2, while making '../wntmsci12.pro/obj/cppsetup.obj'</pre>}}
  
 
== bootstrap ==
 
== bootstrap ==
Line 265: Line 411:
 
== setting the enviroment ==
 
== setting the enviroment ==
  
When the configure script has been run successfully a file <code>winenv.Set.sh</code> was created<ref name="Foot7">{{Template:Documentation/Note|When you want to use tcsh instead of bash, you will need to use the file <code>winenv.Set</code> instead:
+
When the configure script has been run successfully a file <code>winenv.Set.sh</code> was created<ref name="Foot7">{{Note|When you want to use tcsh instead of bash, you will need to use the file <code>winenv.Set</code> instead:
 
<pre> source winenv.Set
 
<pre> source winenv.Set
 
  rehash</pre>
 
  rehash</pre>
Line 275: Line 421:
  
 
== starting the build ==
 
== starting the build ==
Build the software by typing the following in <code>$SRC_ROOT</code><ref name="Foot8">{{Template:Documentation/Note|You can also run:
+
Build the software by typing the following in <code>$SRC_ROOT</code><ref name="Foot8">{{Note|You can also run:
 
<pre>make</pre>
 
<pre>make</pre>
 
but GNU/make will just start dmake. You can also run the following in the <code>instetoo_native</code> module:
 
but GNU/make will just start dmake. You can also run the following in the <code>instetoo_native</code> module:
Line 287: Line 433:
 
There are some special things in the way how OOo builds its modules. Every module has an “output” folder (with some subfolders for the different kinds of generated output) that is created the first time a build is done in the module. The name of this folder is “wntmsci10.pro” for builds with MSVC++2003, “wntmsci11.pro” for builds with MSVC++2005 and "wntmsci12.pro" for builds with MSVC++2008 (for the meaning of the "pro" extension see below). After a successful build of a module some of the generated files are copied to the output folder of the “solver” module by executing a tool called “deliver” (this is automatically called by build --all for each of the modules). Other modules will take these “delivered” files (header files, libraries etc.) to resolve their dependencies. The content of the solver module will also be used to pack the installation sets in the final step.
 
There are some special things in the way how OOo builds its modules. Every module has an “output” folder (with some subfolders for the different kinds of generated output) that is created the first time a build is done in the module. The name of this folder is “wntmsci10.pro” for builds with MSVC++2003, “wntmsci11.pro” for builds with MSVC++2005 and "wntmsci12.pro" for builds with MSVC++2008 (for the meaning of the "pro" extension see below). After a successful build of a module some of the generated files are copied to the output folder of the “solver” module by executing a tool called “deliver” (this is automatically called by build --all for each of the modules). Other modules will take these “delivered” files (header files, libraries etc.) to resolve their dependencies. The content of the solver module will also be used to pack the installation sets in the final step.
  
{{Template:Documentation/Tip|Using some not quite latest cygwin releases (1.5.18/1.5.19) can lead to tcsh freezing in places - the build will appear to hang. You can fix this by running ''ls /proc/$nnn/fd'' where $nnn is the number of the process. Or just run
+
{{Tip|Using some not quite latest cygwin releases (1.5.18/1.5.19) can lead to tcsh freezing in places - the build will appear to hang. You can fix this by running ''ls /proc/$nnn/fd'' where $nnn is the number of the process. Or just run
 
<pre>ls /proc/*/fd</pre>
 
<pre>ls /proc/*/fd</pre>
 
to "unhang" the process. See {{Bug|51560}} for more info...}}
 
to "unhang" the process. See {{Bug|51560}} for more info...}}
Line 297: Line 443:
 
* incompatible
 
* incompatible
 
Only do compatible partial builds if you know exactly what you are doing.
 
Only do compatible partial builds if you know exactly what you are doing.
{{Documentation/Note|For more information, see [[Compatible Builds]].}}
+
{{Note|For more information, see [[Compatible Builds]].}}
 
== rebuilding from a module (incompatible build) ==
 
== rebuilding from a module (incompatible build) ==
  
Line 314: Line 460:
 
  build && deliver
 
  build && deliver
  
A simple <code>build</code> in <code>$SRC_ROOT/instsetoo_native</code> will recreate the installation sets, provided all other modules have already been build.<ref name="Foot9">{{Documentation/Caution|<code>build --all</code> would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use <code>build --from --prepare</code>.}}</ref>
+
A simple <code>build</code> in <code>$SRC_ROOT/instsetoo_native</code> will recreate the installation sets, provided all other modules have already been build.<ref name="Foot9">{{Warn|<code>build --all</code> would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use <code>build --from --prepare</code>.}}</ref>
  
 
= Building a Module with Debug Information =
 
= Building a Module with Debug Information =
Line 326: Line 472:
 
Drop the newly created binaries into an existing installation. Building an installation set with them will not help, as binaries are stripped on packing by default.
 
Drop the newly created binaries into an existing installation. Building an installation set with them will not help, as binaries are stripped on packing by default.
  
{{Template:Documentation/Tip|For details, see [[Windows Debugging]].}}
+
{{Tip|For details, see [[Windows Debugging]].}}
 
= Finding the Installation Sets =
 
= Finding the Installation Sets =
 
After a successful build you will find the OOo installation set in  
 
After a successful build you will find the OOo installation set in  
Line 334: Line 480:
 
“instsetoo_native” is the module that packs the installation set.
 
“instsetoo_native” is the module that packs the installation set.
  
{{Documentation/Tip|If you already have a version of OOo installed you can install your freshly built version in parallel by installing it with setup /a that just unpacks all files without any system registration.}}
+
{{Tip|If you already have a version of OOo installed you can install your freshly built version in parallel by installing it with setup /a that just unpacks all files without any system registration.}}
  
 
= Tips And Tricks =
 
= Tips And Tricks =
Line 351: Line 497:
 
If you set the environment variable <code>nodep</code> to <code>TRUE</code>, then dependendy information files are not created - the build finishes faster.
 
If you set the environment variable <code>nodep</code> to <code>TRUE</code>, then dependendy information files are not created - the build finishes faster.
  
{{Template:Documentation/Caution|But only enable that on a clean build. Once you have built OOo and then made modifications, unset the variable again to be on the safe side.}}
+
{{Warn|But only enable that on a clean build. Once you have built OOo and then made modifications, unset the variable again to be on the safe side.}}
  
 
'''NO_HIDS'''
 
'''NO_HIDS'''
Line 408: Line 554:
  
 
= See Also =
 
= See Also =
{{Template:Documentation/Note|For more information on building OOo on Windows see:
+
{{Note|For more information on building OOo on Windows see:
 
* [[Building on Windows (older releases)]]
 
* [[Building on Windows (older releases)]]
 
* [[CPAN_install| Perl modules installation with CPAN]]
 
* [[CPAN_install| Perl modules installation with CPAN]]

Latest revision as of 09:20, 16 July 2018

Book.png
[[{{{PrevPage}}}|< 前のページ]] [[{{{NextPage}}}|次のページ >]]

Overview / 概要

Documentation windows.png This document explains how to build the OpenOffice.org source code on Windows systems.

ここでは、Windows 環境で、OpenOffice.orgのソースコードをビルドする方法を説明しています。

For building OpenOffice.org Cygwin is needed, a Windows program that emulates a complete Unix command line environment. To use this document you need to be familiar with a command line, but you need not to be a UNIX shell wizard.

OpenOffice.orgをビルドするには、Cygwin 環境が必要です。Cygwin 環境は、Unix のコマンドラインツールを完全にエミュレートしています。ここに書かれている内容を理解するには、コマンドラインツールになれている必要がありますが、Unix シェルに精通している必要はありません。

Tip.png If you have never used a Unix shell, you might want to take a look at the shell introduction at TLDP.

Unix シェルを使いたい場合は、shell introduction at TLDP(英語)をご覧ください。


Documentation note.png $SRC_ROOT will denote the directory in which the source code of OpenOffice.org is stored.

$SRC_ROOT は、OpenOffice.org のソースコードを保存したフォルダのことを指しています。

Tip.png You are advised to check the release notes for the release you are building to inform yourself about changes since previous releases.

ビルドするリリースが、前回のリリースからどのように変更されているかは、リリースノートを参照してください。


Requirements / システム要件

hardware requirements / ハードウェア

  • 1 or more reasonable fast CPUs (x-way CPU recommended)
  • 1つ以上の高速なCPU(複数のCPUを推奨)
  • 1 GB RAM (2 GB recommended)
  • 1 GB のメモリ(2 GBを推奨)
  • 10 GB free disk space (20 GB when debugging)
  • 10 GB のハードディスク空き容量(デバッグ時には 20 GB)

software requirements / ソフトウェア

  • Windows XP/Vista
  • Windows XPまたはVista

The following table is placed here, so you can come back to it easily, when you want to use a link. The items are explained below. Here's the list of files to download (with links) and the locations in the source tree where you must put them:

下表は、リンクを辿ってファイルを取得したり、ここにすぐに戻れるようにするために作りました。ここに記載したファイルをダウンロードして、指定した場所に配置してください。
(訳注:「配置する場所」に「(標準)」と書かれているファイルは、アプリケーションです。各サイトの指示や画面の表示に従ってインストールしてください。また、「配置する場所」に「external/gdiplus」などと書かれている場合は、ダウンロードしたファイルを「$SRC_ROOT\external\gdiplus」フォルダに解凍したり保存してください。)

Where to get / ダウンロード Place in / 配置する場所
Cygwin: Cygwin Toolkit with (dll version 1.5.10) or later

Cygwin: Cygwin Toolkit with (dll version 1.5.10) 以降

(default)

(標準)

C/C++ Compiler: Visual C++ 2008 Express Compiler (basic install, no optional parts required)

C/C++ コンパイラ: Visual C++ 2008 Express Compiler (標準インストールのみ。オプションの製品は必要ありません)

(default)

(標準)

Java: JDK 1.6 for DEV300 milestones >= m37 and all OOo310 versions (older milestones will fail in the hsqldb module)

Java: JDK 1.6(訳注:Java SE Development Kit 6 (JDK 6)です。)OpenOffice.org DEV300 の m37 以降、OOo310 の全バージョンをビルドする場合に必要です。(それより古いソースコードでは、hsqldb モジュールのビルドに失敗します。)

(default)

(標準)

Windows SDK for Windows Server 2008[1]

Windows SDK for Windows Server 2008[1]

GDI+ Redistributable (Genuine Windows Validation required)

GDI+ Redistributable (使用している Windows が正規品かどうかを確認する必要があります)

external/gdiplus

external/gdiplus
(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。適当なフォルダに解凍してから「gdiplus.dll」を「$SRC_ROOT\external\gdiplus」にコピーしてください)

Only for OOo2.x but due to Issue 88652 in configure still needed for 3.x: unicows.dll from (Microsoft Layer for Unicode)[2]

OOo2.x をビルドする場合にのみ必要なファイルですが、Issue 88652 にあるとおり、OOo3.x の configure 実行時に必要です: unicows.dll from (Microsoft Layer for Unicode)[2]

external/unicows

external/unicows
(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。「$SRC_ROOT\external\unicows」を指定してください)

dbghelp.dll[3]

dbghelp.dll[3]

external/dbghelp

external/dbghelp
(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。適当なフォルダに解凍してから「dbghelp.dll」を「$SRC_ROOT\external\dbghelp」にコピーしてください)

instmsiw.exe and instmsia.exe

instmsiw.exeinstmsia.exe

external/msi

external/msi
(訳注:ダウンロードしたファイルをそのまま「$SRC_ROOT\external\msi」にコピーしてください)

for 2005 compiler: msvcp80.dll and msvcr80.dll (found in c:\WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd/msvc

Visual C++ 2005 コンパイラを使用する場合: msvcp80.dll と msvcr80.dll(それぞれc:\WINDOWS/WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd/msvc フォルダに保存されています)

external/msvcp80

external/msvcp80
(訳注:左記のファイルを「$SRC_ROOT\external\msvcp80」にコピーしてください)

for 2008 compiler (until DEV300 m22): msvcp90.dll and msvcr90.dll (found in $(msvcdir)\Vc\redist\x86\Microsoft.VC90.CRT)

Visual C++ 2008 コンパイラを使用する場合(かつ、DEV300 m22以前のソースコードをビルドする場合): msvcp90.dll と msvcr90.dll(それぞれ(Visual C++ 2008 コンパイラのインストールフォルダ)\Vc\redist\x86\Microsoft.VC90.CRT フォルダに保存されています)

external/msvcp90

external/msvcp90
(訳注:左記のファイルを「$SRC_ROOT\external\msvcp90」にコピーしてください)

for 2008 compiler starting with DEV300m23: Microsoft_VC90_CRT_x86.msm and policy_9_0_Microsoft_VC90_CRT_x86.msm for non debug builds and Microsoft_VC90_DebugCRT_x86.msm and policy_9_0_Microsoft_VC90_DebugCRT_x86.msm for debug builds[4]. These merge modules are available in VS08 Express Edition and VS08 Professional Edtion. All *.msm files are located at c:\Program Files\Common Files\Merge Module.

Visual C++ 2008 コンパイラを使用する場合(かつ、DEV300 m23以降のソースコードをビルドする場合): 通常のビルド用に、Microsoft_VC90_CRT_x86.msm と policy_9_0_Microsoft_VC90_CRT_x86.msm、デバッグビルド用に Microsoft_VC90_DebugCRT_x86.msm と policy_9_0_Microsoft_VC90_DebugCRT_x86.msm[4]. このファイルは、Visual C++ 2008 Express Edition と Professional Edition をインストールすると、C:\Program Files\Common Files\Merge Modules フォルダに保存されます。

external/msm90

external/msm90
(訳注:左記のファイルを「$SRC_ROOT\external\msm90」にコピーしてください)

Apache Ant (version 1.6.5 or later)

Apache Ant(バージョン 1.6.5 以降)

(default)

(標準)

Mozilla binary distribution

Mozilla binary distribution

(WNTMSCIruntime.zip,WNTMSCIlib.zip,WNTMSCIinc.zip)

(WNTMSCIruntime.zip,WNTMSCIlib.zip,WNTMSCIinc.zip)

moz/zipped

moz/zipped
(訳注:左記のファイルを解凍せずに「$SRC_ROOT\moz\zipped」に保存してください)

msvcr71.dll and msvcp71.dll for Mozilla libraries (Search for them in the Web or on your PC. These files should be named as all lower case. Sometimes when downloaded they are upper case and this will cause 'file not found' errors towards the end of the build))

Mozilla ライブラリ用に msvcr71.dll と msvcp71.dll(このファイルは、インターネットか、お使いのパソコンから探してください。なお、ファイル名はすべて小文字にしてください。ダウンロード時に大文字になっている場合があり、そのときはビルドの最後で 'file not found' エラーが発生することがあります。)

external/msvcp71

external/msvcp71

optional: Nullsoft Scriptable Install System (NSIS)[5]

オプション: Nullsoft Scriptable Install System (NSIS)[5]

optional: Microsoft DirectX SDK[6]

オプション: Microsoft DirectX SDK[6]

adding required files to the build tree / ソースツリーをビルドする際に必要なファイルを追加するには

Tip.png Some of the files can be found in a suitable OOo installation set also, so you can save the download by “stealing” it from your OOo installation.

いくつかのファイルは、インストール用の OOo にも入っています。OOo をインストールして、そこからコピーすることもできます。


Documentation note.png OOo uses some Mozilla libraries. Building the corresponding sources is only possible with the VC2003 compiler so you have to use precompiled libraries that require the msvx71 libraries mentioned above. On Windows the Mozilla libraries are needed only for Mozilla address book support. Unfortunately a bug in the module dependencies makes it necessary that the Mozilla libaries are used anyway as otherwise building the module xmlsecurity fails (see below).

OOo では、Mozilla のライブラリをいくつか使用しています。そのライブラリは、Visual C++ 2003 コンパイラでのみビルドできるため、コンパイル済みのファイル(上記のとおり msvx71 ライブラリが必要です)を使用してください。残念なことに、モジュールの依存に関するバグがあるため、Mozilla のライブラリを使用しないと、xmlsecurity モジュールのビルドに失敗します(下記参照)。

Installation and Preparation of Build Tools / ビルド用ツールのインストールと準備

setting up cygwin / cygwin の設定

Go to http://www.cygwin.com/ and download and install the current version.

http://www.cygwin.com/ にアクセスして、cygwin の最新バージョンをダウンロードし、インストールしてください。

Documentation caution.png Make sure that you keep the filetype set to “Unix/binary”.

インストールする際、“Default Text File Type”は、“Unix / binary (RECOMMENDED)”のままにしてください。

required additional packages / 必要な追加パッケージ

Cygwin consists of some basic and a lot of optional packages. As building OOo needs some of these optional packages you have to select them in the installer.

Cygwin には、いくつかの基本的なパッケージと、多数のオプションパッケージがあります。OOo をビルドするには、Cygwin のインストール時に、いくつかのオプションパッケージを選択します。

Here's a complete list of the needed packages:

必要なパッケージは以下の通りです:

  • Category Archive:
  • Category Archive:
    • unzip
    • unzip
    • zip
    • zip
  • Category Devel :
  • Category Devel :
    • autoconf
    • autoconf
    • bison
    • bison
    • flex
    • flex
    • gcc-g++
    • gcc-g++
    • gperf
    • gperf
    • make
    • make
    • openssl-devel (only needed for perl modules for CWS tooling, see below)
    • openssl-devel (CWS ツール用の perl モジュールにのみ必要です。下記参照)
    • cvs (for 2.x code line and 3.0 code line)
    • cvs (OOo 2.x 系と 3.0 系のビルドに必要です)
    • subversion (for 3.x code line, minimum version 1.5.5)
    • subversion (OOo 3.x 系のビルドに必要です。最低でも subversion 1.5.5 が必要です。)
  • Category Libs
  • Category Libs
    • openssl
    • openssl
  • Category Net
  • Category Net
    • openssh
    • openssh
    • ncftp
    • ncftp
  • Category Perl
  • Category Perl
    • perl
    • perl
  • Category Shells
  • Category Shells
    • rxvt
    • rxvt
  • Category Utils
  • Category Utils
    • patch
    • patch
    • gnupg
    • gnupg
  • Category Web
  • Category Web
    • lynx
    • lynx
    • wget
    • wget
Documentation note.png Unfortunately the list of packages mentioned at http://website.openoffice.org/support/en/howtos/1.html#1 is incomplete, some more are listed at http://tools.openoffice.org/dev_docs/build_windows_tcsh.html#BuildRequirements .

残念なことに、http://website.openoffice.org/support/en/howtos/1.html#1 で説明しているように、この一覧は不完全です。http://tools.openoffice.org/dev_docs/build_windows_tcsh.html#BuildRequirements に追加のパッケージが記載されています。

Documentation note.png The installer will automatically check and download some more packages needed by thosed listed here. The whole process takes roughly 20 minutes.

Cygwin のインストーラは、上記のパッケージを使用するのに必要な追加パッケージを、自動的に確認してダウンロードします。必要なパッケージをダウンロードしてインストールするには、約 20 分かかります。

breaking links to executables / 実行ファイルのリンクを切る

Within the Cygwin Toolkit, some executables might be symlinks: awk.exe and gunzip.exe, tar.exe (in older releases only). This can lead to a break of the build later, and the symlinks should be replaced by copies of the command they link to.

Cygwin Toolkit では、awk.exe、gunzip.exe(訳注:gunzip です)、tar.exe(古いリリースの場合のみ)は、シンボリックリンクになっているかもしれません。シンボリックリンクになっている場合はビルドが失敗するため、シンボリックリンクを実際のファイルに置き換える必要があります。

To check this, execute:

シンボリックリンクになっているか確認します。awk.exe がシンボリックリンクになっているかどうかを確認する場合は、Cygwin で次のコマンドを実行してください:

ls -l /bin/awk.exe
ls -l /bin/awk.exe

whether e.g. awk.exe is a symlink. In version 1.5.24-2 awk.exe is a link to gawk.exe. The shell will show this by putting out “awk.exe -> gawk.exe”. In this case gawk.exe must be copied to awk.exe by executing:

バージョン 1.5.24-2 の awk.exe は、gawk.exe へのシンボリックリンクになっています。上記のコマンドを実行すると、“awk.exe -> gawk.exe”と表示されます。この場合、次のようにして gawk.exe を awk.exe としてコピーします。


cd /bin
cd /bin
rm awk.exe
rm awk.exe
cp gawk.exe awk.exe
cp gawk.exe awk.exe


In case you overlook something here or you have a newer Cygwin version with additional symlinks not mentioned here it's not a problem. You will get a helpful error message about an existing link in the configuration step (configure) later. The message will tell you which link you have to remove and you can do it following the advice given above for the awk.exe/gawk.exe pair.

ここまでに何かを見落としていたり、新しい Cygwin になってシンボリックリンクになっているファイルが増えていたりしても、心配することはありません。configure ツールを使うときにシンボリックリンクが残っていたら、丁寧なメッセージが表示されます。そのメッセージを読めば、上記の awk.exe と gawk.exe のようにシンボリックリンクを切る方法がわかるようになっています。


installing additional perl modules in cygwin / cygwin で perl の追加モジュールをインストールする

As explained some perl modules must be installed with CPAN. The necessary command in the cygwin shell is

perl のモジュールをいくつか CPAN からインストールします。Cygwin の shell で次のコマンドを実行してください

perl -MCPAN -e shell
perl -MCPAN -e shell

If this command is executed the first time CPAN will ask for configuration. Choose autoconfiguration.

はじめて CPAN を実行したときは、設定に関する質問が表示されます。自動設定(automatic configuration)を実行してください。

Documentation caution.png Please note that CPAN is not able to deal with usernames containing spaces. To work around this fact, when CPAN asks you to specify the CPAN build and cache directory, change the default suggestion to /cpan.

CPAN は、スペースを含むユーザー名を使用できません。うまく動かすには、CPAN の設定中に CPAN build and cache directory と表示されたら、CPAN に提案されている設定を無視して /cpan と入力します。

At the end the CPAN shell appeared and is ready to accept commands for installations. Each module is installed by typing install $MODULENAME. The modules that must be installed are:

設定が終わると CPAN シェル(訳注:cpan[x])が表示され、インストール用のコマンドを入力できるようになります。以下のモジュールは、install (モジュール名) と入力するとインストールされます。インストールするモジュールは次のとおりです:

  • Archive::Zip
  • Archive::Zip
  • XML::Parser (though it seems that this is already installed; doesn't hurt to do it)
  • XML::Parser (このモジュールはインストール済みのように見えますが、実行しても悪いことはありません)
  • URI
  • URI
  • LWP::UserAgent
  • LWP::UserAgent
  • Crypt::SSLeay
  • Crypt::SSLeay
  • SOAP::Lite
  • SOAP::Lite

CPAN will detect if a selected module depends on other modules and it will offer to download them also. As explained please just confirm this.

CPAN は、選択したモジュールに必要なそのほかのモジュールを見つけて、ダウンロードするように提案してくれます。この提案についても確認してください。

Documentation note.png The last three modules are only needed if you want to use the cws tooling. These tools are necessary if you want to create and maintain your own Child Workspaces or if you want to build one of them. I recommend to install them anyway as sooner or later you want to work on a child workspace.

最後の3つのモジュールは、cws ツールを使用するときにのみ必要です。cws ツールは、Child Workspaces を作成したりメンテナンスするときや、Child Workspaces をビルドするときに必要です。最後の3つのモジュールは、child workspace の作業をするときにインストールすることをオススメします。

Documentation caution.png I got an error message from CPAN somewhat like the following:

インストール中に以下のようなエラーメッセージが表示されました。

C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
address as parent(0x7C0000) != 0x7D0000
C:\cygwin\bin\perl.exe: *** unable to remap C:\cygwin\bin\cygiconv-2.dll to same
address as parent(0x7C0000) != 0x7D0000

To fix this, I had to exit the Cygwin shell, run cmd.exe, then type "c:\cygwin\bin\ash.exe" to start the minimal shell, then type /bin/rebaseall. Then CPAN worked when I ran it again. この場合は、Cygwin シェルを終了して、cmd.exe を実行してください。(訳注:cmd.exe を実行する前に再起動した方がよさそうです。)次にコマンドプロンプトで "c:\cygwin\bin\ash.exe" と入力して、小さな小さなシェルを起動し、/bin/rebaseall と入力します。ここまで実行したら perl -MCPAN -e shell からやり直すと、エラーメッセージが表示されなくなります。

Documentation caution.png I got another error when cygwin was performing make install:

make install(訳注:install (モジュール名) のこと)を実行すると、他のエラーメッセージが表示されました。

ERROR: Can't create '/usr/bin'; Do not have write permissions on '/usr/bin'
ERROR: Can't create '/usr/bin'; Do not have write permissions on '/usr/bin'

I can actually write to /usr/bin; however when I do ls -ld /usr/bin, cygwin reports no write permission; and chmod u+w /usr/bin gives Permission denied. This causes the install process to fail when it checks permissions. As a kludge, I installed vim, and edited line 368 of /usr/lib/perl5/5.10/ExtUtils/Install.pm, replacing this: /usr/bin に書き込むことはできるのですが、ls -ld /usr/bin を実行すると、書き込み権限がないと表示されます。そこで、chmod u+w /usr/bin と入力しましたが、Permission denied と表示されます。これは、書き込み権限の確認に失敗してることが原因です。そこで、その場しのぎですが、vim をインストールして、/usr/lib/perl5/5.10/ExtUtils/Install.pm(訳注:/lib/perl5/5.10/ExtUtils/Install.pmでした。/usr/libは空っぽです。)の 368 行目を次のように書き換えました:

return -w $dir;
return -w $dir;

with this:

これを:

return 1;
return 1;

which allowed installation to proceed.

これでインストールができました。

Full Builds / フルビルド

configure

Finally the configure tool is used to create the environment. It checks that all software, hardware, and system requirements for the build are satisfied, and creates configuration files called winenv.set (for tcsh) and winenv.set.sh (for bash) that are used to set all necessary build environment variables. Before running configure, make sure that all needed programs are in the system path or start configure with the appropriate command line switches. If configure detects a problem it will stop and give you a useful hint how to fix it.

You will find the configure script in $SRC_ROOT. The resulting configuration files are created there too.

sample configure calls

./configure \
 --disable-directx \
 --with-cl-home="/cygdrive/d/develop/msvc/VC" \
 --disable-activex \
 --disable-atl \
 --disable-build-mozilla \
 --with-frame-home="/cygdrive/d/develop/MSDK/v6.1" \
 --with-psdk-home="/cygdrive/d/develop/MSDK/v6.1" \
 --with-midl-path="/cygdrive/d/develop/MSDK/v6.1/Bin" \
 --with-asm-home="/cygdrive/d/develop/msvc/VC" \
 --with-jdk-home="/cygdrive/d/develop/j2sdk1.4.2_11" \
 --with-csc-path="/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5" \
 --with-ant-home=/ant
./configure --disable-build-mozilla --disable-activex --with-win32
--with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC"
--with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin"
--with-csc-path="/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.5"
--with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"
--with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/Bin"
--with-jdk-home="/cygdrive/c/j2sdk1.4.2_11" .
--disable-directx --disable-epm
--with-ant-home=/cygdrive/c/apache-ant-1.6.5
--with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"

(訳注:私のところでは以下のようになりました。

./configure --disable-nss-module --disable-build-mozilla --disable-activex --with-win32 \
--with-cl-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC" \
--with-midl-path="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1/Bin" \
--with-csc-path="/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5" \
--with-frame-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1" \
--with-asm-home="/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/Bin" \
--with-jdk-home="/cygdrive/C/Program Files/Java/jdk1.6.0_17" \
--with-directx-home="/cygdrive/c/Program Files/Microsoft DirectX SDK (August 2007)" \
--disable-epm \
--with-ant-home=/cygdrive/d/apache-ant-1.7.1 \
--with-psdk-home="/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.1"

Apache Antのフォルダが少し違うかもしれませんが、だいたいこんな感じになると思います。)

configure settings tips

Documentation caution.png Make sure that the PATH variable in your cygwin shell does not contain any blanks and quotes.
Documentation caution.png Paths might have problems with spaces. Install requirements into pathes without them. Alternatively, feel free to install the various packages using the default path containing spaces and then use the mixed short path for the configure stage. The mixed short path can be obtained using Cygwin's cygpath tool, eg:
$ cygpath -m -s "c:\Program Files\Microsoft Visual Studio 9.0\VC"
 c:/PROGRA~1/MICROS~1.0/VC

The with-psdk-home setting needs a case-sensitive path name. I recommend to use case-sensitive usage in all cases - it's good to get used to case sensitivity if you are going to work with Cygwin.

Documentation caution.png Beware of using /c/ instead of /cygdrive/c/.
Documentation caution.png Avoid trailing slashes in configure parameters. They sure cause problems for --with-psdk-home.
Documentation note.png Paths to dependencies might be different for your installation. The pathes containing "msvc" and "msdk" should be self-explanatory.
Tip.png There are a number of options that you can use with the configure script. To display these options, type the following command:
./configure --help
Tip.png If you run into problems with early DEV300 releases, check your settings in winenv.set.sh for WINDOWS_VISTA_PSDK to be set TRUE. This is important if configure fails to detect the Windows platform SDK version correctly. The detection failure results from the way how configure searches for the Vista PSDK in older releases: it will be found only if it is installed into the default location.
Tip.png If you run into problems compiling on an "Express Edition" with early DEV300 releases, check your settings in winenv.set.sh for DISABLE_ATL, DISABLE_ACTIVEX: all have to be set TRUE. Visual Studio Express compilers do not contain everything needed to build the OOo ActiveX control, OLE automation and native Windows OLE support, so disable support for them. A "complete" Visual Studio (no “Express” version) is not limited in that way.
Tip.png As DirectX is not needed for most developers, its SDK consumes a lot of disk space and is prone to incompatibilities I recommend to build without DirecX support by using --disable-directx as shown above. Otherwise you have to provide the path to the SDK in --with-directx-home.
Tip.png OOo uses some Mozilla components. It is not possible to build them from the sources using the Visual Studio 2005 compiler. Disabling the Mozilla components with --disable-mozilla completely currently does might not work due to a bug in the module dependencies.
Tip.png If you experiment with the newest sources, mind that it can happen sometimes that configure.in was updated, but it was forgotten to update configure too. The configure script itself is created from configure.in using the autoreconf command. The perl script set_soenv is created when you run configure from set_soenv.in.
Tip.png csc.exe comes from the c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 directory, you might need --with-csc-path.
Tip.png If you fail to getting together a working installation of Cygwin, one possibility is to use a known-to-work combination of Cygwin packages, i.e. a direct copy of some other user's Cygwin tree. User:TorLillqvist has such a tree (from late 2006) zipped up at http://download.go-oo.org/tstnvl/tml/tml-cygwin.zip . Don't hesitate to ask for advice if necessary.
Tip.png (訳注:以下のようなメッセージが表示されたときは、$SRC_ROOT\soltools\wntmsci12.pro\inc\unistd.h のアクセス権限をフルアクセスにしてください。
d:\ooo\ooo320_m7\soltools\mkdepend\def.h(42) : fatal error C1083: include ファイルを開けません。'unistd.h': No such file or directory
dmake:  Error code 2, while making '../wntmsci12.pro/obj/cppsetup.obj'


bootstrap

After running configure you must create the dmake make utility that is needed for the build of OpenOffice.org. This done from the SRC_ROOT directory by calling

./bootstrap

setting the enviroment

When the configure script has been run successfully a file winenv.Set.sh was created[7]. Do this:

source winenv.Set.sh

to set up the enviroment for the build.

starting the build

Build the software by typing the following in $SRC_ROOT[8]:

dmake

The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).

There are some special things in the way how OOo builds its modules. Every module has an “output” folder (with some subfolders for the different kinds of generated output) that is created the first time a build is done in the module. The name of this folder is “wntmsci10.pro” for builds with MSVC++2003, “wntmsci11.pro” for builds with MSVC++2005 and "wntmsci12.pro" for builds with MSVC++2008 (for the meaning of the "pro" extension see below). After a successful build of a module some of the generated files are copied to the output folder of the “solver” module by executing a tool called “deliver” (this is automatically called by build --all for each of the modules). Other modules will take these “delivered” files (header files, libraries etc.) to resolve their dependencies. The content of the solver module will also be used to pack the installation sets in the final step.

Tip.png Using some not quite latest cygwin releases (1.5.18/1.5.19) can lead to tcsh freezing in places - the build will appear to hang. You can fix this by running ls /proc/$nnn/fd where $nnn is the number of the process. Or just run
ls /proc/*/fd

to "unhang" the process. See Issue 51560 for more info...


Partial Builds

There are two ways to do partial builds:

  • compatible
  • incompatible

Only do compatible partial builds if you know exactly what you are doing.

Documentation note.png For more information, see Compatible Builds.

rebuilding from a module (incompatible build)

If you decide to change a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly):

cd $SRC_ROOT/instsetoo_native
build --from $INCOMPATIPLEMODULE --prepare
build --from $INCOMPATIBLEMODULE

rebuilding a module (compatible build)

To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:

cd $MODULE
build --from $MODULE --prepare
build && deliver

A simple build in $SRC_ROOT/instsetoo_native will recreate the installation sets, provided all other modules have already been build.[9]

Building a Module with Debug Information

To rebuild a module with debug information and additional assertions and checks, run:

cd $MODULE
build --from $MODULE --prepare # removes old output trees and solver
build debug=true --from $MODULE

Drop the newly created binaries into an existing installation. Building an installation set with them will not help, as binaries are stripped on packing by default.

Tip.png For details, see Windows Debugging.

Finding the Installation Sets

After a successful build you will find the OOo installation set in

instsetoo_native/wntmscixx.pro/OpenOffice/msi/Install/en-US

“instsetoo_native” is the module that packs the installation set.

Tip.png If you already have a version of OOo installed you can install your freshly built version in parallel by installing it with setup /a that just unpacks all files without any system registration.


Tips And Tricks

ccache

For Windows: download from here, do the following:

export CCACHE_DIR="some/place/with/space"
ccache -M 2G -F 10000
export CCACHE_CPP2=TRUE
export CXX="guw.pl ccache cl"
# export USE_PCH=  if you experience trouble with precompiled headers

dependencies

nodep

If you set the environment variable nodep to TRUE, then dependendy information files are not created - the build finishes faster.

Documentation caution.png But only enable that on a clean build. Once you have built OOo and then made modifications, unset the variable again to be on the safe side.

NO_HIDS

Similar to the nodep variable, this one prevents the generation of HIDs (Help IDs) that are mainly used for automated testing - if you only want to build OOo, you don't need those.

parallel builds

If you have a multiprocessor machine or similar, you can run a parallel build. There are two levels of parallelism - one operating on makefile (directory) level, the other one on the global level. The two levels of parallelism result from the two-step build procedure in the OOo build environment. The build script runs through all the directories it reads from the build.lst files in all modules and calls dmake for every directory.

parallelism on the global level

For parallelism on the global level, you have to run build from $SRC_ROOT>/instsetoo_native with the -P<number> switch, for example:

build -P2

This takes build how many dmake processes it is allowd to start in parallel.

parallelism on the directory level

export MAXPROCESS=<numer or processes> 

This tells dmake how many targets it is allowed to build in parallel. When you don't use build.pl but build a single directory (single makefile), you can achieve the same with

dmake -P2

combining both levels

If you want to have parallelism on both levels, you can call

build -P2 -- -P2

"--" is a special build.pl parameter that passes every further parameters to the dmake processes it starts.

Recommendation

Experience tells that using the doubled number of cores in your machine is a good choice, using more threads does not make a big difference, except if the combined option is chosen. So even on single core machines using two threads will speed up the build considerably.

create prebuilt mozilla

For the mozilla-components you have the choice to either build from mozilla sources, to use precompiled packages or to use system-mozilla (the one installed on your buildsystem, not everything might work, depending on the version you got installed). You can easily create your own version of the prepacked binaries if you wish to do so (either because you cannot use the official ones because of mismatch of compiler version used to build them/other technical reasons or because you want to use stuff you didn't build yourself). To do so:

  • build the moz module from the mozilla sources
  • use --enable-build-mozilla when running configure and put the mozilla-source tarball to moz/download
  • in moz run dmake zip to create the zip files
  • you'll find the zips in {platform}.pro/zipped

Copy them to a location of your liking. Now instead of using --enable-build-mozilla, use --disable-build-mozilla and copy the zips you created or downloaded to moz/zipped and these will be used when compiling. This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla).

See Also


  1. 1.0 1.1
    Documentation note.png This also supported on Vista. This is either a DVD image or a net installer. You can either mount the DVD with a suitable tool, burn it do a DVD or use tools like winrar that can extract files from ISO files directly. You don't need to install samples or documentation (saves a lot of disk space). It will also install the .NET Framework 3.5 SDK.

    このファイルはVistaにも対応しています。DVDイメージ(訳注:DVD ISO)か、ネットインストーラー(訳注:Web Setup)を使用してください。DVDイメージは、DVDに書き込んでから利用するか、ISOファイルを解凍できるwinrarのようなソフトウェアを使うことで利用できます。サンプル(Samples)やドキュメント(Documentation)は必要ありません(ハードディスクの空き容量を節約できます)。なお、.NET Framework 3.5 SDKもインストールされます。 It might be best to install the Windows SDK into the default directory, and if not that into one without capital letters in the path. I used D:\Dev\Win_SDK\ and received some linking errors in the Python module (see Issue 88568 ). Windows SDKは、標準のフォルダにインストールすることをオススメします。標準のフォルダにインストールしない場合は、パスに大文字を含まないようにしてください。D:\Dev\Win_SDK\ にインストールしたところ、Pythonモジュール(Issue 88568 を参照)でリンクエラーが発生しました。

  2. 2.0 2.1
    Documentation note.png unicows.dll is available from the Microsoft site and needs to be saved to $SRC_ROOT/external/unicows. Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.

    unicows.dll は、Microsoftのサイトからダウンロードできます。$SRC_ROOT/external/unicows フォルダに保存してください。(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。「$SRC_ROOT\external\unicows」を指定してください。)ちなみに、Microsoftはこのファイルの場所を変更するのが好きみたいです。ここに挙げたURLからダウンロードできない場合は、Microsoftのサイトから探してください。

  3. 3.0 3.1
    Documentation note.png dbghelp.dll is available from the Microsoft site and needs to be saved to $SRC_ROOT/external/dbghelp. Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.

    dbghelp.dll は、Microsoftのサイトからダウンロードできます。$SRC_ROOT/external/dbghelp フォルダに保存してください。(訳注:ダウンロードしたファイルを実行すると、解凍するフォルダを確認されます。「$SRC_ROOT\external\dbghelp」を指定してください。)ちなみに、Microsoftはこのファイルの場所を変更するのが好きみたいです。ここに挙げたURLからダウンロードできない場合は、Microsoftのサイトから探してください。

  4. 4.0 4.1
    Documentation note.png You can find these files in your directory c:\program files\common files\merge modules

    このファイルは、C:\Program Files\Common Files\Merge Modules フォルダに保存されています。

  5. 5.0 5.1
    Documentation note.png If NSIS is available, a self contained Windows installer is created in addition to the MSI installer files.

    NSISを用意すると、msi形式のインストールファイルにWindows用の自己解凍機能をプラスしたインストーラが作成できます。

    Documentation caution.png It used to be that newer version of NSIS broke the build (see Issue 85657 ), but it seems that it now works for NSIS up to 2.3.7.

    以前は、NSIS の新しいバージョンがビルドを壊していました(Issue 85657 を参照)が、NSIS が 2.3.7 になってからは問題なく動いているようです。

  6. 6.0 6.1
    Documentation note.png If you don't want to download it you can disable DirectX support in the configuration step (--disable-directx).

    DirectX SDKを用意しない場合は、configure 実行時に DirectX サポートを無効にする(--disable-directx)ように設定してください。

    Documentation caution.png Current (as of 2008/01) versions of the DirectX9 SDK and Windows Platform SDK do not fit to each other. To be able to build with DirextX enabled, you need to patch one file in the Platform SDK. See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID2743771 for details.

    2008年1月現在、DirectX9 SDKと、Windows Platform SDKは同時に使用できません(訳注:そのままでは同時に使用できません)。DirectX サポートを有効にしてビルドする場合は、Platform SDKを修正する必要があります。http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID2743771 をご覧ください。(※下記の訳注をご覧ください)

    (訳注:リンク先がなくなっており、詳細は不明ですが、dev@tools.openoffice.org のログに、http://www.microsoft.com/downloads/details.aspx?FamilyID=529f03be-1339-48c4-bd5a-8506e5acf571&DisplayLang=en からダウンロードできる dxsdk_aug2007.exe で十分というメールがありました。)

    Documentation caution.png Do not use a DirectX10 SDK!

    DirectX10 SDKは使わないでください!

  7. Documentation note.png When you want to use tcsh instead of bash, you will need to use the file winenv.Set instead:
     source winenv.Set
     rehash

    If you do not use tcsh, it is better to delete that file, as it will get in the way for tab-completion sooner or later.

  8. Documentation note.png You can also run:
    make

    but GNU/make will just start dmake. You can also run the following in the instetoo_native module:

    build --all

    For details run:

    build --help
  9. Documentation caution.png build --all would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use build --from --prepare.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools