36
36
</para>
37
37
-->
38
38
<para>
39
- 在<productname>Windows</productname>中,有多种方法编译安装PostgreSQL 。
39
+ 在<productname>Windows</productname>中,有多种方法编译PostgreSQL 。
40
40
对于微软工具的话,最简单的方法是安装一个<productname>Visual Studio Express 2012 for Windows Desktop</productname>,并使用它自带的编译器进行编译。
41
- 也可以使用<productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>来编译安装 。
41
+ 也可以使用<productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>来编译 。
42
42
在一些情况下,除了编译器还需要安装<productname>Windows SDK</productname>。
43
43
</para>
44
44
53
53
<para>
54
54
此外,可以使用<productname>MinGW</productname>提供的GNU编译工具来编译PostgreSQL。
55
55
如果<productname>Windows</productname>系统版本比较旧,
56
- 可以使用<productname>Cygwin</productname>进行编译安装 。
56
+ 可以使用<productname>Cygwin</productname>进行编译 。
57
57
</para>
58
58
59
59
<!--
66
66
</para>
67
67
-->
68
68
<para>
69
- 最后,为了兼容静态链接(<application>libpq</application>)的应用,
70
- 可以用<productname>Visual C++ 7.1</productname>或<productname>Borland C++</productname> 来编译libpq。
69
+ 最后,可以使用<productname>Visual C++ 7.1</productname>或<productname>Borland C++</productname> 编译
70
+ 客户端访问库(<application>libpq</application>),以兼容使用这些工具编译出来的静态链接程序。
71
71
</para>
72
72
73
73
<!--
91
91
-->
92
92
<para>
93
93
使用<productname>MinGW</productname> 或者<productname>Cygwin</productname>的普通编译系统的话,
94
- 可以参看<xref linkend="installation">及<xref linkend="installation-notes-mingw">和<xref linkend="installation-notes-cygwin">。
95
- 要在这些环境中生成原生的64位可执行程序 ,可以使用<productname>MinGW-w64</productname>工具。
96
- 这些工具也可以在其它的平台下执行交叉编译 ,生成32位或64位的<productname>Windows</productname>可执行程序,
94
+ 可以参看<xref linkend="installation">及<xref linkend="installation-notes-mingw">和<xref linkend="installation-notes-cygwin">中的详细记录 。
95
+ 要在这些环境中生成本地的64位二进制文件 ,可以使用<productname>MinGW-w64</productname>工具。
96
+ 这些工具也可以在其它的主机上执行交叉编译 ,生成32位或64位的<productname>Windows</productname>可执行程序,
97
97
例如<productname>Linux</productname> 和<productname>Darwin</productname>系统。
98
98
在生产环境中不推荐使用<productname>Cygwin</productname>,
99
- 它仅适合用于<productname>Windows 98</productname>等比较旧的<productname>Windows</productname>版本上的编译器编译不了时使用 。
100
- 官方的的二进制可执行文件是由 <productname>Visual Studio</productname>编译的。
99
+ 它仅适合用于<productname>Windows 98</productname>等比较旧的<productname>Windows</productname>版本上,本地编译器编译不了时使用 。
100
+ 官方的的二进制文件是由 <productname>Visual Studio</productname>编译的。
101
101
</para>
102
102
103
103
<!--
183
183
-->
184
184
<para>
185
185
用<productname>Visual C++</productname>或<productname>Platform SDK</productname>编译的工具在<filename>src/tools/msvc</filename>目录下。
186
- 编译时,确保系统路径下没有包含<productname>MinGW</productname>或<productname>Cygwin</productname>的工具,同时所需要的Visual C++工具在系统路径下是可用的 。
186
+ 编译时,确保系统路径下没有包含<productname>MinGW</productname>或<productname>Cygwin</productname>的工具,同时确保需要的Visual C++的所有工具在系统路径中 。
187
187
在<productname>Visual Studio</productname>中,启动<application>Visual Studio Command Prompt</application>。
188
188
如果需要编译64位的版本,使用64位版本的命令,反之亦然。在<productname>Microsoft Windows SDK</productname>中,
189
189
从开始菜单中SDK下的列表启动<application>CMD shell</application>。在最新版的SDK中,
190
- 你可以使用<command>setenv</command>等命令来更改目标的CPU架构,编译类型和操作系统类型 。
190
+ 你可以使用<command>setenv</command>等命令来更改目标的CPU架构,编译类型和操作系统类型等 。
191
191
指令<command>setenv /x86 /release /xp</command>用来编译Windows XP或更新的32位版本。
192
- 使用<command>/?</command>命令可以查看<command>setenv</command>的其它用法 。
192
+ 使用<command>/?</command>命令可以查看<command>setenv</command>的其它选项 。
193
193
所有命令都应该在<filename>src\tools\msvc</filename>目录下运行。
194
194
</para>
195
195
@@ -211,7 +211,7 @@ $config->{python} = 'c:\python26';
211
211
-->
212
212
<para>
213
213
在编译前,根据需要修改<filename>config.pl</filename>中相应选项和使用到的第三方库的路径。
214
- 完整的配置由首先读取和解析的<filename>config_default.pl</filename>决定,然后从<filename>config.pl</filename>获取变更 。
214
+ 完整的配置由首先读取和解析的<filename>config_default.pl</filename>决定,然后从<filename>config.pl</filename>适用所有的变更 。
215
215
例如,为了指定<productname>Python</productname>的安装路径,在<filename>config.pl</filename>文件中添加以下语句:
216
216
<programlisting>
217
217
$config->{python} = 'c:\python26';
@@ -232,7 +232,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
232
232
-->
233
233
<para>
234
234
如果需要指定其它的环境变量,创建一个<filename>buildenv.pl</filename>文件并写入所需要的命令。
235
- 例如,为了在PATH中添加一个还不存在的bison变量 ,创建一个文件包含以下内容:
235
+ 例如,为了在PATH中添加还不存在的bison的位置 ,创建一个文件包含以下内容:
236
236
<programlisting>
237
237
$ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
238
238
</programlisting>
@@ -297,7 +297,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
297
297
建议把SDK的版本升级到最新的版本(目前为7.1版本),下载地址为<ulink url="http://www.microsoft.com/downloads/"></>。
298
298
</para>
299
299
<para>
300
- 在SDK中,必须要保证包含 <application>Windows Headers and Libraries </application>这部分内容 。
300
+ 你必需包含SDK的 <application>Windows头文件和库 </application>。
301
301
如果安装的<productname>Windows SDK</productname>中已经包含了<application>Visual C++ Compilers</application>,
302
302
就不再需要使用<productname>Visual Studio</productname>进行编译了。
303
303
注意Windows SDK 8.0a之后的版本不再附有完整的命令行编译环境。
@@ -307,7 +307,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
307
307
<varlistentry>
308
308
<term><productname>ActiveState Perl</productname></term>
309
309
<listitem><para>
310
- ActiveState Perl用于编译生成脚本, 而MinGW或Cygwin的Perl则不起作用。
310
+ 运行编译生成脚本时需要ActiveState Perl。 而MinGW或Cygwin的Perl则不起作用。
311
311
同样,它的路径也要添加到系统路径中。二进制文件下载地址为<ulink url="http://www.activestate.com"></> (注意: 必须使用5.8或者更新的版本, 免费的标准版既可)。
312
312
</para></listitem>
313
313
</varlistentry>
@@ -357,11 +357,11 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
357
357
</para>
358
358
-->
359
359
<varlistentry>
360
- <term><productname>Bison</productname> and
360
+ <term><productname>Bison</productname> 和
361
361
<productname>Flex</productname></term>
362
362
<listitem>
363
363
<para>
364
- <productname>Bison</productname> and <productname>Flex</productname>用来从GIT进行编译,对于发行版文件的编译是不需要的。
364
+ <productname>Bison</productname> 和 <productname>Flex</productname>用来从GIT进行编译,对于发行版文件的编译是不需要的。
365
365
<productname>Bison</productname>需要1.875或2.2及更新版本。<productname>Flex</productname>需要使用2.5.31或更新版本。
366
366
</para>
367
367
@@ -376,9 +376,9 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
376
376
</para>
377
377
-->
378
378
<para>
379
- <productname>Bison</productname> and <productname>Flex</productname>包含在<productname>msys</productname>工具套件内。
380
- 作为<productname>MinGW</productname>编译器套件的一部分,msys可以从<ulink url="http://www.mingw.org/wiki/MSYS"></>下载 。
381
- 同时作为<productname>msysGit</productname>的一部分,<productname>msys</productname>也可以从<ulink url="http://git-scm.com/"></>下载 。
379
+ <productname>Bison</productname> 和 <productname>Flex</productname>包含在<productname>msys</productname>工具套件内。
380
+ 作为<productname>MinGW</productname>编译器套件的一部分,msys可以从<ulink url="http://www.mingw.org/wiki/MSYS"></>获得 。
381
+ 同时作为<productname>msysGit</productname>的一部分,<productname>msys</productname>也可以从<ulink url="http://git-scm.com/"></>获得 。
382
382
</para>
383
383
384
384
<!--
@@ -430,7 +430,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
430
430
</para>
431
431
-->
432
432
<para>
433
- 在PostgreSQL FTP上的winflex是旧的二进制版本 ,在64位Windows主机上执行时,
433
+ 在PostgreSQL FTP上的winflex是旧的二进制版本并且引用旧的文档 ,在64位Windows主机上执行时,
434
434
会报"flex: fatal internal error, exec failed"的错误。可以使用msys中的flex来替代以避免这个问题。
435
435
</para>
436
436
</note>
@@ -461,7 +461,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
461
461
-->
462
462
<listitem><para>
463
463
Gettext用于编译NLS支持,可以从<ulink url="http://gnuwin32.sourceforge.net"></>下载。
464
- 需要注意的是二进制 ,依赖项和开发文件都需要。
464
+ 需要注意的是二进制文件 ,依赖项和开发文件都需要。
465
465
</para></listitem>
466
466
</varlistentry>
467
467
@@ -480,7 +480,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
480
480
</varlistentry>
481
481
482
482
<varlistentry>
483
- <term><productname>libxml2</productname> and
483
+ <term><productname>libxml2</productname> 和
484
484
<productname>libxslt</productname></term>
485
485
<!--
486
486
<listitem><para>
@@ -521,7 +521,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
521
521
</para></listitem>
522
522
-->
523
523
<listitem><para>
524
- ossp-uuid用于提供UUID-OSSP支持(仅用于contrib)。可以从<ulink url="http://www.ossp.org/pkg/lib/uuid/"></>下载 。
524
+ ossp-uuid用于提供UUID-OSSP支持(仅用于contrib)。可以从<ulink url="http://www.ossp.org/pkg/lib/uuid/"></>下载源码 。
525
525
</para></listitem>
526
526
</varlistentry>
527
527
@@ -534,7 +534,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
534
534
</para></listitem>
535
535
-->
536
536
<listitem><para>
537
- Python用于编译<application>PL/Python</application>。可以从<ulink url="http://www.python.org"></>下载 。
537
+ Python用于编译<application>PL/Python</application>。可以从<ulink url="http://www.python.org"></>下载二进制文件 。
538
538
</para></listitem>
539
539
</varlistentry>
540
540
@@ -569,7 +569,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
569
569
</para>
570
570
-->
571
571
<para>
572
- PostgreSQL的X64架构只能在64位Windows系统上编译,不支持安腾处理器 。
572
+ 在64位Windows上只能编译x64架构的PostgreSQL,不支持安腾的处理器 。
573
573
</para>
574
574
575
575
<!--
@@ -596,8 +596,8 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
596
596
</para>
597
597
-->
598
598
<para>
599
- 在服务器端使用 <productname>python</>或<productname>openssl</>这样的第三方库, <emphasis>必须</emphasis>是64位的。64位服务器上不支持对32位库的加载。
600
- 一些第三方库只支持32位的PostgrSQL ,这种情形下,它们不能用在64位的PostgreSQL上 。
599
+ 要使用服务器端的第三方库,如 <productname>python</>或<productname>openssl</>,这些库 <emphasis>必须</emphasis>是64位的。64位服务器上不支持对32位库的加载。
600
+ 一些PostgreSQL支持的第三方库只有32位的版本 ,这种情形下,它们不能被64位的PostgreSQL使用 。
601
601
</para>
602
602
</sect2>
603
603
@@ -655,7 +655,7 @@ $ENV{CONFIG}="Debug";
655
655
<filename>pgsql.sln</filename> (in the root directory of the source tree)
656
656
in Visual Studio.
657
657
-->
658
- 然后在Visual Studio中打开 <filename>pgsql.sln</filename>文件(从资源树的根目录 )。
658
+ 然后在Visual Studio中打开生成的 <filename>pgsql.sln</filename>文件(源码树的根目录 )。
659
659
</para>
660
660
</sect2>
661
661
@@ -679,7 +679,7 @@ $ENV{CONFIG}="Debug";
679
679
-->
680
680
<para>
681
681
大多数时候,Visual Studio会自动追踪所依赖的文件的改动。但是当有大量改动的的时候,可能需要清除安装。
682
- 要做到这一点,只需简单的运行<filename>clean.bat</filename>,它将自动的清除生成的相关文件 。
682
+ 要做到这一点,只需简单的运行<filename>clean.bat</filename>,它将自动的清除生成的所有文件 。
683
683
也可以在运行时添加<parameter>dist</parameter>参数,它的行为和<userinput>make distclean</userinput>命令比较相似,同时会清除flex/bison的输出文件。
684
684
</para>
685
685
@@ -719,8 +719,8 @@ $ENV{CONFIG}="Debug";
719
719
the following commands from the <filename>src\tools\msvc</filename>
720
720
directory:
721
721
-->
722
- 要运行回归测试,首先确保已经完成所需的编译 。同时,确保用来加载系统所有部分(例如程序语言Perl和Python的DLLs)的DLLs已经在系统路径中存在。
723
- 如果没有,通过<filename>buildenv.pl</filename>文件来设置。要运行测试,运行 <filename>src\tools\msvc</filename>目录中的一个命令 :
722
+ 要运行回归测试,首先确保已经完成所需的部分的编译 。同时,确保用来加载系统所有部分(例如程序语言Perl和Python的DLLs)的DLLs已经在系统路径中存在。
723
+ 如果没有,通过<filename>buildenv.pl</filename>文件来设置。要运行测试,在 <filename>src\tools\msvc</filename>目录中运行下面命令中的一个 :
724
724
<screen>
725
725
<userinput>vcregress check</userinput>
726
726
<userinput>vcregress installcheck</userinput>
@@ -741,7 +741,7 @@ $ENV{CONFIG}="Debug";
741
741
For more information about the regression tests, see
742
742
<xref linkend="regress">.
743
743
-->
744
- 关于回归测试的更多内容,见 <xref linkend="regress">。
744
+ 关于回归测试的更多内容,参见 <xref linkend="regress">。
745
745
</para>
746
746
</sect2>
747
747
@@ -757,7 +757,7 @@ $ENV{CONFIG}="Debug";
757
757
and files. Create a root directory for all these files, and store them
758
758
in the subdirectories in the list below.
759
759
-->
760
- 把PostgreSQL文档编译成HTML格式的需要一些工具和文件 。为所有这些文件创建一个根目录,将它们存储在下列的子目录中。
760
+ 把PostgreSQL文档编译成HTML格式需要一些工具和文件 。为所有这些文件创建一个根目录,将它们存储在下列的子目录中。
761
761
<variablelist>
762
762
<varlistentry>
763
763
<term>OpenJade 1.3.1-2</term>
@@ -823,7 +823,7 @@ $ENV{DOCROOT}='c:\docbook';
823
823
will be in <filename>doc\src\sgml</filename>.
824
824
-->
825
825
要编译文档,运行<filename>builddoc.bat</filename>文件。注意为了生成索引,
826
- 实际上编译运行来两次 。生成的HTML文件存在于<filename>doc\src\sgml</filename>中。
826
+ 实际上编译会运行两次 。生成的HTML文件存在于<filename>doc\src\sgml</filename>中。
827
827
</para>
828
828
</sect2>
829
829
@@ -863,7 +863,7 @@ $ENV{DOCROOT}='c:\docbook';
863
863
<filename>src</filename> directory and type the command:
864
864
-->
865
865
866
- 采用 <productname>Visual Studio 7.1 or later </productname>编译<application>libpq</application>的客户端库,使用下面的命令修改 <filename>src</filename>的路径 :
866
+ 使用 <productname>Visual Studio 7.1或更新版本 </productname>编译<application>libpq</application>的客户端库时,在 <filename>src</filename>目录下输入下面的命令 :
867
867
<screen>
868
868
<userinput>nmake /f win32.mak</userinput>
869
869
</screen>
@@ -875,7 +875,7 @@ $ENV{DOCROOT}='c:\docbook';
875
875
later</productname>, change into the <filename>src</filename>
876
876
directory and type in the command:
877
877
-->
878
- 采用 <productname>Visual Studio 8.0 or later </productname>编译64位的<application>libpq</application>客户端库,使用下面的命令修改 <filename>src</filename>的路径 :
878
+ 使用 <productname>Visual Studio 8.0或更新版本 </productname>编译64位的<application>libpq</application>客户端库时,在 <filename>src</filename>目录下输入下面的命令 :
879
879
<screen>
880
880
<userinput>nmake /f win32.mak CPU=AMD64</userinput>
881
881
</screen>
@@ -892,7 +892,7 @@ $ENV{DOCROOT}='c:\docbook';
892
892
<productname>Borland C++</productname>, change into the
893
893
<filename>src</filename> directory and type the command:
894
894
-->
895
- 采用 <productname>Borland C++</productname>编译<application>libpq</application>的客户端库,使用下面的命令修改 <filename>src</filename>的路径 :
895
+ 使用 <productname>Borland C++</productname>编译<application>libpq</application>的客户端库时,在 <filename>src</filename>目录下输入下面的命令 :
896
896
<screen>
897
897
<userinput>make -N -DCFG=Release /f bcc32.mak</userinput>
898
898
</screen>
@@ -919,7 +919,7 @@ $ENV{DOCROOT}='c:\docbook';
919
919
</para>
920
920
-->
921
921
<para>
922
- 可连接的前端动态库
922
+ 可链接的前端动态库
923
923
</para>
924
924
</listitem>
925
925
</varlistentry>
@@ -933,7 +933,7 @@ $ENV{DOCROOT}='c:\docbook';
933
933
</para>
934
934
-->
935
935
<para>
936
- 导入库来连接程序和 <filename>libpq.dll</filename>
936
+ 导入库链接你的程序和 <filename>libpq.dll</filename>。
937
937
</para>
938
938
</listitem>
939
939
</varlistentry>
@@ -970,9 +970,9 @@ $ENV{DOCROOT}='c:\docbook';
970
970
</para>
971
971
-->
972
972
<para>
973
- 通常不需要安装任何的客户端文件。应该将<filename>libpq.dll</filename>文件放在和可执行的应用程序文件放在同一个目录下 。
973
+ 通常不需要安装任何的客户端文件。应该将<filename>libpq.dll</filename>文件放在和可执行的应用程序文件在同一个目录下 。
974
974
除非必要,否则不要把<filename>libpq.dll</filename>放入<filename>Windows</>,<filename>System</>或<filename>System32</>的目录下。
975
- 如果一个文件是使用安装程序安装的,那么需要使用 <symbol>VERSIONINFO</symbol>进行版本审查 ,以免被新版本的库覆盖掉。
975
+ 如果这个文件是使用安装程序安装的,那么需要使用文件中包含的 <symbol>VERSIONINFO</symbol>进行版本检查 ,以免被新版本的库覆盖掉。
976
976
</para>
977
977
978
978
<para>
@@ -983,7 +983,7 @@ $ENV{DOCROOT}='c:\docbook';
983
983
<filename>src\interfaces\libpq</filename> subdirectories of the source
984
984
tree to the include path in your compiler's settings.
985
985
-->
986
- 如果需要在本机器上使用<application>libpq</application>进行开发,要将 <filename>src\include</filename>和<filename>src\interfaces\libpq</filename>的子目录加入到编译器配置的资源树中 。
986
+ 如果需要在本机器上使用<application>libpq</application>进行开发,要将源码树中的 <filename>src\include</filename>和<filename>src\interfaces\libpq</filename>子目录加入到编译器的配置中 。
987
987
</para>
988
988
989
989
<para>
@@ -992,7 +992,7 @@ $ENV{DOCROOT}='c:\docbook';
992
992
<filename>libpqdll.lib</filename> file to your project. (In Visual
993
993
C++, just right-click on the project and choose to add it.)
994
994
-->
995
- 要使用一个库,必须将 <filename>libpqdll.lib</filename>添加到项目中。(在Visual C++,只需在项目上右键单击并选择添加。)</para>
995
+ 要使用这个库,你必须将 <filename>libpqdll.lib</filename>添加到项目中。(在Visual C++中 ,只需在项目上右键单击并选择添加。)</para>
996
996
</sect2>
997
997
</sect1>
998
998
</chapter>
0 commit comments