Skip to content

Commit 4b2118b

Browse files
committed
Update install-windows.sgml
1 parent 8268d3b commit 4b2118b

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

postgresql/doc/src/sgml/install-windows.sgml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
</para>
3737
-->
3838
<para>
39-
在<productname>Windows</productname>中,有多种方法编译安装PostgreSQL
39+
在<productname>Windows</productname>中,有多种方法编译PostgreSQL
4040
对于微软工具的话,最简单的方法是安装一个<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>来编译
4242
在一些情况下,除了编译器还需要安装<productname>Windows SDK</productname>。
4343
</para>
4444

@@ -53,7 +53,7 @@
5353
<para>
5454
此外,可以使用<productname>MinGW</productname>提供的GNU编译工具来编译PostgreSQL。
5555
如果<productname>Windows</productname>系统版本比较旧,
56-
可以使用<productname>Cygwin</productname>进行编译安装
56+
可以使用<productname>Cygwin</productname>进行编译
5757
</para>
5858

5959
<!--
@@ -66,8 +66,8 @@
6666
</para>
6767
-->
6868
<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>),以兼容使用这些工具编译出来的静态链接程序。
7171
</para>
7272

7373
<!--
@@ -91,13 +91,13 @@
9191
-->
9292
<para>
9393
使用<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>可执行程序,
9797
例如<productname>Linux</productname> 和<productname>Darwin</productname>系统。
9898
在生产环境中不推荐使用<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>编译的。
101101
</para>
102102

103103
<!--
@@ -183,13 +183,13 @@
183183
-->
184184
<para>
185185
用<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++的所有工具在系统路径中
187187
在<productname>Visual Studio</productname>中,启动<application>Visual Studio Command Prompt</application>。
188188
如果需要编译64位的版本,使用64位版本的命令,反之亦然。在<productname>Microsoft Windows SDK</productname>中,
189189
从开始菜单中SDK下的列表启动<application>CMD shell</application>。在最新版的SDK中,
190-
你可以使用<command>setenv</command>等命令来更改目标的CPU架构,编译类型和操作系统类型
190+
你可以使用<command>setenv</command>等命令来更改目标的CPU架构,编译类型和操作系统类型等
191191
指令<command>setenv /x86 /release /xp</command>用来编译Windows XP或更新的32位版本。
192-
使用<command>/?</command>命令可以查看<command>setenv</command>的其它用法
192+
使用<command>/?</command>命令可以查看<command>setenv</command>的其它选项
193193
所有命令都应该在<filename>src\tools\msvc</filename>目录下运行。
194194
</para>
195195

@@ -211,7 +211,7 @@ $config->{python} = 'c:\python26';
211211
-->
212212
<para>
213213
在编译前,根据需要修改<filename>config.pl</filename>中相应选项和使用到的第三方库的路径。
214-
完整的配置由首先读取和解析的<filename>config_default.pl</filename>决定,然后从<filename>config.pl</filename>获取变更
214+
完整的配置由首先读取和解析的<filename>config_default.pl</filename>决定,然后从<filename>config.pl</filename>适用所有的变更
215215
例如,为了指定<productname>Python</productname>的安装路径,在<filename>config.pl</filename>文件中添加以下语句:
216216
<programlisting>
217217
$config->{python} = 'c:\python26';
@@ -232,7 +232,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
232232
-->
233233
<para>
234234
如果需要指定其它的环境变量,创建一个<filename>buildenv.pl</filename>文件并写入所需要的命令。
235-
例如,为了在PATH中添加一个还不存在的bison变量,创建一个文件包含以下内容:
235+
例如,为了在PATH中添加还不存在的bison的位置,创建一个文件包含以下内容:
236236
<programlisting>
237237
$ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
238238
</programlisting>
@@ -297,7 +297,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
297297
建议把SDK的版本升级到最新的版本(目前为7.1版本),下载地址为<ulink url="http://www.microsoft.com/downloads/"></>。
298298
</para>
299299
<para>
300-
在SDK中,必须要保证包含<application>Windows Headers and Libraries</application>这部分内容
300+
你必需包含SDK的<application>Windows头文件和库</application>。
301301
如果安装的<productname>Windows SDK</productname>中已经包含了<application>Visual C++ Compilers</application>,
302302
就不再需要使用<productname>Visual Studio</productname>进行编译了。
303303
注意Windows SDK 8.0a之后的版本不再附有完整的命令行编译环境。
@@ -307,7 +307,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
307307
<varlistentry>
308308
<term><productname>ActiveState Perl</productname></term>
309309
<listitem><para>
310-
ActiveState Perl用于编译生成脚本,而MinGW或Cygwin的Perl则不起作用。
310+
运行编译生成脚本时需要ActiveState Perl。而MinGW或Cygwin的Perl则不起作用。
311311
同样,它的路径也要添加到系统路径中。二进制文件下载地址为<ulink url="http://www.activestate.com"></> (注意: 必须使用5.8或者更新的版本, 免费的标准版既可)。
312312
</para></listitem>
313313
</varlistentry>
@@ -357,11 +357,11 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
357357
</para>
358358
-->
359359
<varlistentry>
360-
<term><productname>Bison</productname> and
360+
<term><productname>Bison</productname>
361361
<productname>Flex</productname></term>
362362
<listitem>
363363
<para>
364-
<productname>Bison</productname> and <productname>Flex</productname>用来从GIT进行编译,对于发行版文件的编译是不需要的。
364+
<productname>Bison</productname> <productname>Flex</productname>用来从GIT进行编译,对于发行版文件的编译是不需要的。
365365
<productname>Bison</productname>需要1.875或2.2及更新版本。<productname>Flex</productname>需要使用2.5.31或更新版本。
366366
</para>
367367

@@ -376,9 +376,9 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
376376
</para>
377377
-->
378378
<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/"></>获得
382382
</para>
383383

384384
<!--
@@ -430,7 +430,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
430430
</para>
431431
-->
432432
<para>
433-
在PostgreSQL FTP上的winflex是旧的二进制版本,在64位Windows主机上执行时,
433+
在PostgreSQL FTP上的winflex是旧的二进制版本并且引用旧的文档,在64位Windows主机上执行时,
434434
会报"flex: fatal internal error, exec failed"的错误。可以使用msys中的flex来替代以避免这个问题。
435435
</para>
436436
</note>
@@ -461,7 +461,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
461461
-->
462462
<listitem><para>
463463
Gettext用于编译NLS支持,可以从<ulink url="http://gnuwin32.sourceforge.net"></>下载。
464-
需要注意的是二进制,依赖项和开发文件都需要。
464+
需要注意的是二进制文件,依赖项和开发文件都需要。
465465
</para></listitem>
466466
</varlistentry>
467467

@@ -480,7 +480,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
480480
</varlistentry>
481481

482482
<varlistentry>
483-
<term><productname>libxml2</productname> and
483+
<term><productname>libxml2</productname>
484484
<productname>libxslt</productname></term>
485485
<!--
486486
<listitem><para>
@@ -521,7 +521,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
521521
</para></listitem>
522522
-->
523523
<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/"></>下载源码
525525
</para></listitem>
526526
</varlistentry>
527527

@@ -534,7 +534,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
534534
</para></listitem>
535535
-->
536536
<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"></>下载二进制文件
538538
</para></listitem>
539539
</varlistentry>
540540

@@ -569,7 +569,7 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
569569
</para>
570570
-->
571571
<para>
572-
PostgreSQL的X64架构只能在64位Windows系统上编译,不支持安腾处理器
572+
在64位Windows上只能编译x64架构的PostgreSQL,不支持安腾的处理器
573573
</para>
574574

575575
<!--
@@ -596,8 +596,8 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
596596
</para>
597597
-->
598598
<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使用
601601
</para>
602602
</sect2>
603603

@@ -655,7 +655,7 @@ $ENV{CONFIG}="Debug";
655655
<filename>pgsql.sln</filename> (in the root directory of the source tree)
656656
in Visual Studio.
657657
-->
658-
然后在Visual Studio中打开<filename>pgsql.sln</filename>文件(从资源树的根目录)。
658+
然后在Visual Studio中打开生成的<filename>pgsql.sln</filename>文件(源码树的根目录)。
659659
</para>
660660
</sect2>
661661

@@ -679,7 +679,7 @@ $ENV{CONFIG}="Debug";
679679
-->
680680
<para>
681681
大多数时候,Visual Studio会自动追踪所依赖的文件的改动。但是当有大量改动的的时候,可能需要清除安装。
682-
要做到这一点,只需简单的运行<filename>clean.bat</filename>,它将自动的清除生成的相关文件
682+
要做到这一点,只需简单的运行<filename>clean.bat</filename>,它将自动的清除生成的所有文件
683683
也可以在运行时添加<parameter>dist</parameter>参数,它的行为和<userinput>make distclean</userinput>命令比较相似,同时会清除flex/bison的输出文件。
684684
</para>
685685

@@ -719,8 +719,8 @@ $ENV{CONFIG}="Debug";
719719
the following commands from the <filename>src\tools\msvc</filename>
720720
directory:
721721
-->
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>目录中运行下面命令中的一个
724724
<screen>
725725
<userinput>vcregress check</userinput>
726726
<userinput>vcregress installcheck</userinput>
@@ -741,7 +741,7 @@ $ENV{CONFIG}="Debug";
741741
For more information about the regression tests, see
742742
<xref linkend="regress">.
743743
-->
744-
关于回归测试的更多内容,<xref linkend="regress">。
744+
关于回归测试的更多内容,参见<xref linkend="regress">。
745745
</para>
746746
</sect2>
747747

@@ -757,7 +757,7 @@ $ENV{CONFIG}="Debug";
757757
and files. Create a root directory for all these files, and store them
758758
in the subdirectories in the list below.
759759
-->
760-
把PostgreSQL文档编译成HTML格式的需要一些工具和文件。为所有这些文件创建一个根目录,将它们存储在下列的子目录中。
760+
把PostgreSQL文档编译成HTML格式需要一些工具和文件。为所有这些文件创建一个根目录,将它们存储在下列的子目录中。
761761
<variablelist>
762762
<varlistentry>
763763
<term>OpenJade 1.3.1-2</term>
@@ -823,7 +823,7 @@ $ENV{DOCROOT}='c:\docbook';
823823
will be in <filename>doc\src\sgml</filename>.
824824
-->
825825
要编译文档,运行<filename>builddoc.bat</filename>文件。注意为了生成索引,
826-
实际上编译运行来两次。生成的HTML文件存在于<filename>doc\src\sgml</filename>中。
826+
实际上编译会运行两次。生成的HTML文件存在于<filename>doc\src\sgml</filename>中。
827827
</para>
828828
</sect2>
829829

@@ -863,7 +863,7 @@ $ENV{DOCROOT}='c:\docbook';
863863
<filename>src</filename> directory and type the command:
864864
-->
865865

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>目录下输入下面的命令
867867
<screen>
868868
<userinput>nmake /f win32.mak</userinput>
869869
</screen>
@@ -875,7 +875,7 @@ $ENV{DOCROOT}='c:\docbook';
875875
later</productname>, change into the <filename>src</filename>
876876
directory and type in the command:
877877
-->
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>目录下输入下面的命令
879879
<screen>
880880
<userinput>nmake /f win32.mak CPU=AMD64</userinput>
881881
</screen>
@@ -892,7 +892,7 @@ $ENV{DOCROOT}='c:\docbook';
892892
<productname>Borland C++</productname>, change into the
893893
<filename>src</filename> directory and type the command:
894894
-->
895-
采用<productname>Borland C++</productname>编译<application>libpq</application>的客户端库,使用下面的命令修改<filename>src</filename>的路径
895+
使用<productname>Borland C++</productname>编译<application>libpq</application>的客户端库时,在<filename>src</filename>目录下输入下面的命令
896896
<screen>
897897
<userinput>make -N -DCFG=Release /f bcc32.mak</userinput>
898898
</screen>
@@ -919,7 +919,7 @@ $ENV{DOCROOT}='c:\docbook';
919919
</para>
920920
-->
921921
<para>
922-
可连接的前端动态库
922+
可链接的前端动态库
923923
</para>
924924
</listitem>
925925
</varlistentry>
@@ -933,7 +933,7 @@ $ENV{DOCROOT}='c:\docbook';
933933
</para>
934934
-->
935935
<para>
936-
导入库来连接程序和<filename>libpq.dll</filename>
936+
导入库链接你的程序和<filename>libpq.dll</filename>
937937
</para>
938938
</listitem>
939939
</varlistentry>
@@ -970,9 +970,9 @@ $ENV{DOCROOT}='c:\docbook';
970970
</para>
971971
-->
972972
<para>
973-
通常不需要安装任何的客户端文件。应该将<filename>libpq.dll</filename>文件放在和可执行的应用程序文件放在同一个目录下
973+
通常不需要安装任何的客户端文件。应该将<filename>libpq.dll</filename>文件放在和可执行的应用程序文件在同一个目录下
974974
除非必要,否则不要把<filename>libpq.dll</filename>放入<filename>Windows</>,<filename>System</>或<filename>System32</>的目录下。
975-
如果一个文件是使用安装程序安装的,那么需要使用<symbol>VERSIONINFO</symbol>进行版本审查,以免被新版本的库覆盖掉。
975+
如果这个文件是使用安装程序安装的,那么需要使用文件中包含的<symbol>VERSIONINFO</symbol>进行版本检查,以免被新版本的库覆盖掉。
976976
</para>
977977

978978
<para>
@@ -983,7 +983,7 @@ $ENV{DOCROOT}='c:\docbook';
983983
<filename>src\interfaces\libpq</filename> subdirectories of the source
984984
tree to the include path in your compiler's settings.
985985
-->
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>子目录加入到编译器的配置中
987987
</para>
988988

989989
<para>
@@ -992,7 +992,7 @@ $ENV{DOCROOT}='c:\docbook';
992992
<filename>libpqdll.lib</filename> file to your project. (In Visual
993993
C++, just right-click on the project and choose to add it.)
994994
-->
995-
要使用一个库,必须将<filename>libpqdll.lib</filename>添加到项目中。(在Visual C++,只需在项目上右键单击并选择添加。)</para>
995+
要使用这个库,你必须将<filename>libpqdll.lib</filename>添加到项目中。(在Visual C++,只需在项目上右键单击并选择添加。)</para>
996996
</sect2>
997997
</sect1>
998998
</chapter>

0 commit comments

Comments
 (0)