?? make.htm
字號:
the <b><tt>pkzip</tt></b> package. If you use this, you should ensure that
you have at least version 2.04g, because with its <b><tt>-d</tt></b>
switch, that version of <b><tt>pkunzip</tt></b> preserves the directory
structure of archived files when extracting them; see below. Another
popular free program to unpack zip archives, available for DOS and MS
Windows (16-bit and 32-bit), Unix, VMS, and other platforms, is InfoZIP
<b><tt>unzip</tt></b>:
<blockquote>
<a href="http://www.cdrom.com/pub/infozip/UnZip.html">http://www.cdrom.com/pub/infozip/UnZip.html</a>
</blockquote>
<p>
Unlike <b><tt>pkunzip</tt></b>, InfoZIP <b><tt>unzip</tt></b> automatically
preserves the directory structure of extracted files. So if you have a zip
archive <b><tt>MyArchive.zip</tt></b>:
<blockquote><table cellpadding=0 cellspacing=0>
<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Extracting zipped files</font><hr>
<tr valign=bottom>
<th align=left>Command
<td>
<th align=left>Preserves directory structure
<tr> <td colspan=3><hr>
<tr valign=top> <td><b><tt>pkunzip MyArchive.zip</tt></b>
<td>
<td>Does <b><em>NOT</em></b>
<tr valign=top> <td><b><tt>pkunzip -d MyArchive.zip</tt></b>
<td>
<td><b><em>DOES</em></b> (note the <b><tt>-d</tt></b> switch)
<tr valign=top> <td><b><tt>unzip MyArchive.zip</tt></b>
<td>
<td><b><em>DOES</em></b>
</table></blockquote>
<p>
As with the compressed tar files, make sure you're positioned in the
<b><em>parent</em></b> of the gs directory <b><em>before</em></b> unpacking
the files. If a subdirectory doesn't already exist, <b><tt>zip</tt></b> or
<b><tt>pkunzip -d</tt></b> creates it.
<h2><a name="Unpack_Ghostscript"></a>How to unpack Ghostscript itself</h2>
<p>
At this point you have <a href="#Acquiring">acquired all the source
code</a> and are ready to unpack it according to the preceding guidelines
for <a href="#Tarfiles">tar files</a> or <a href="#Zipfiles">zip files</a>.
To unpack the Ghostscript source, make the <b><em>parent</em></b> of the
(new) gs directory the current directory, then unpack the archive using one
of these methods:
<blockquote><table cellpadding=0 cellspacing=0>
<tr> <th align=left valign=top>2-step:
<td>
<td><b><tt>gzip -d ghostscript-</tt></b>#.##<b><tt>.tar.gz</tt></b><br><b><tt>tar -xf ghostscript-</tt></b>#.##<b><tt>.tar</tt></b>
<tr><td>
<tr> <th align=left valign=top>Pipe:
<td>
<td><b><tt>gzip -d -c ghostscript-</tt></b>#.##<b><tt>.tar.gz | tar -xf -</tt></b>
<tr><td>
<tr> <th align=left valign=top>GNU <b><tt>tar</tt></b>:
<td>
<td><b><tt>tar -zxf ghostscript-</tt></b>#.##<b><tt>.tar.gz</tt></b>
<tr><td>
<tr> <th align=left valign=top><b><tt>pkunzip</tt></b>:
<td>
<td><b><tt>pkunzip -d gs</tt></b>###<b><tt>sr1.zip</tt></b><br><b><tt>pkunzip -d gs</tt></b>###<b><tt>sr2.zip</tt></b><br>...
<tr><td>
<tr> <th align=left valign=top><tt>unzip</tt>:
<td>
<td><b><tt>unzip gs</tt></b>###<b><tt>sr*.zip</tt></b>
</table></blockquote>
<p>
All the Ghostscript source files are now in the gs directory
<b><tt>./gs</tt></b>#.##.
<h2><a name="Unpack_libraries"></a>How to unpack the third-party libraries</h2>
<p>
The Ghostscript makefiles expect to find the JPEG, PNG, and zlib source
code in specific subdirectories of the gs directory, and this means you
must pay careful attention to unpacking the source code for these packages.
Use the same method for all of them, no matter how they're packaged:
<ol>
<li>Make the gs directory current
<li>Unpack the archive file, creating a subdirectory (which will include a
version number)
<li>Whatever the subdirectory's original name, rename it to the versionless
name show just below.
</ol>
<p>
If you're uncertain how to unpack an archive, review the sections on <a
href="#Tarfiles">compressed tar files</a> and <a href="#Zipfiles">zip
files</a>.
<blockquote><table cellpadding=0 cellspacing=0>
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">3d-party software subdirectories</font><hr>
<tr> <th valign=bottom align=left>Package
<td>
<th valign=bottom align=left>Possible<br>original name
<td>
<th valign=bottom align=left>Rename to
<tr> <td colspan=5><hr>
<tr> <td>JPEG
<td>
<td><b><tt>./jpeg-6b</tt></b>
<td>
<td><b><tt>./jpeg</tt></b>
<tr> <td>PNG
<td>
<td><b><tt>./libpng-</tt></b>#.##
<td>
<td><b><tt>./libpng</tt></b>
<tr> <td>zlib
<td>
<td><b><tt>./zlib-</tt></b>#.#.#
<td>
<td><b><tt>./zlib</tt></b>
</table></blockquote>
<hr>
<h1><a name="Bug_check"></a>How to check for post-release bug fixes</h1>
<p>
Before making any changes for your particular environment, check the
post-release "known bugs" notice at
<blockquote>
<a href="http://www.cs.wisc.edu/~ghost/aladdin/relnotes/">http://www.cs.wisc.edu/~ghost/aladdin/relnotes/</a>gs###/index.html
</blockquote>
<p>
where "###" is the unpunctuated version number of Ghostscript's latest
release. The page lists bugs known in the latest release, and also gives
workarounds and patches where available. Apply the patches before building
Ghostscript.
<hr>
<h1><a name="Makefile_overview"></a>How to prepare the makefiles</h1>
<p>
The Ghostscript makefiles are very large and complex in order to deal with
the diverse requirements of all the different systems where they may be
used. Fortunately, the only makefiles you're likely to want to change are
relatively small ones containing platform-specific information.
<blockquote><a name="Platform-specific_makefiles"></a><table cellpadding=0 cellspacing=0>
<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Platform-specific makefiles</font><hr>
<tr> <th align=left>Makefile
<td>
<th align=left>Used for
<tr> <td colspan=3><hr>
<tr> <td><b><tt>bcwin32.mak</tt></b>
<td>
<td>MS Windows with Borland compilers
<!-- OBSOLETE|<tr> <td><b><tt>dvx-gcc.mak</tt></b>
<!-- OBSOLETE| <td>
<!-- OBSOLETE| <td>DESQview/X with gcc
<!-- OBSOLETE| -->
<tr> <td><b><tt>msvc32.mak</tt></b>
<td>
<td>MS Windows with Microsoft Visual C++ version 4.n or 5.n
<tr> <td><b><tt>openvms.mak</tt></b>
<td>
<td>OpenVMS
<tr> <td><b><tt>os2.mak</tt></b>
<td>
<td>OS/2 with the gcc/emx compiler
<tr> <td><b><tt>unix-cc.mak</tt></b>
<td>
<td>Unix with "traditional C" compilers
<tr> <td><b><tt>unix-gcc.mak</tt></b>
<td>
<td>Unix with gcc
<tr> <td><b><tt>unixansi.mak</tt></b>
<td>
<td>Unix with ANSI C compilers other than gcc
<tr> <td><b><tt>watc.mak</tt></b>
<td>
<td>DOS with Watcom compilers
<tr> <td><b><tt>watcw32.mak</tt></b>
<td>
<td>MS Windows with Watcom compilers
<tr> <td>
<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Platform-independent makefiles</font><hr>
<tr> <td><b><tt>contrib.mak</tt></b>
<td>
<td>Contributed device drivers
<tr> <td><b><tt>devs.mak</tt></b>
<td>
<td>Aladdin's device drivers
<tr> <td><b><tt>gs.mak</tt></b>
<td>
<td>Documentation and miscellany
<tr> <td><b><tt>int.mak</tt></b>
<td>
<td>Main makefile for the PostScript & PDF interpreter
<tr> <td><b><tt>jpeg.mak</tt></b>
<td>
<td>JPEG library
<tr> <td><b><tt>lib.mak</tt></b>
<td>
<td>Graphics engine
<tr> <td><b><tt>libpng.mak</tt></b>
<td>
<td>PNG library
<tr> <td><b><tt>version.mak</tt></b>
<td>
<td>Version and release date
<tr> <td><b><tt>zlib.mak</tt></b>
<td>
<td>zlib library
</table></blockquote>
<p>
Since these files change from one Ghostscript version to another, sometimes
substantially, and since they all include documentation for the various
options, here we don't duplicate most of that documentation: we recommend
strongly that you review the entire makefile specific for your operating
system and compiler before building Ghostscript.
<h2><a name="Preparing_makefiles"></a>Changes for your environment</h2>
<p>
You must edit the platform-specific makefile to change any of these:
<ul>
<li>The name of the makefile itself (<b><tt>MAKEFILE</tt></b> macro)
<li>The locations to install Ghostscript files (<b><tt>prefix</tt></b> etc.)
<li>The default search paths for the initialization and font files
(<b><tt>GS_LIB_DEFAULT</tt></b> macro)
<li>The debugging options (<b><tt>DEBUG</tt></b> and <b><tt>TDEBUG</tt></b>
macros)
<li>Which optional features to include (<b><tt>FEATURE_DEVS</tt></b>)
<li>Which device drivers to include (<b><tt>DEVICE_DEVS</tt></b> and
<b><tt>DEVICE_DEVS</tt></b>{<em>1--15</em>} macros)
<li>Default resolution parameters for a dot-matrix printer driver
(<b><tt>devs.mak</tt></b> or <b><tt>contrib.mak</tt></b>, whichever defines
the driver)
</ul>
<p>
The <a href="#Platform-specific_makefiles">platform-specific makefiles</a>
include comments describing all these except the
<b><tt>DEVICE_DEVS</tt></b> options. These are described in
<b><tt>devs.mak</tt></b> and <b><tt>contrib.mak</tt></b>, even though the
file that must be edited to select them is the <a
href="#Platform-specific_makefiles">platform-specific makefile</a>. Check
also the <b><tt>JVERSION</tt></b> and <b><tt>PVERSION</tt></b> macros in
the platform-specific makefile, and adjust them if they don't match the
JPEG and PNG library versions you're using: see <b><tt>jpeg.mak</tt></b>
and <b><tt>libpng.mak</tt></b> for more information.
<p>
Some platform-specific options are described in the sections for individual
platforms. See the "Options" section near the beginning of the relevant
makefile for more information.
<h2><a name="Features_and_devices"></a>Selecting features and devices</h2>
<p>
You may build Ghostscript with any of a variety of features and with any
subset of the available device drivers. The complete list of features is
in a comment at the beginning of <b><tt>gs.mak</tt></b>, and the complete
list of drivers in comments at the beginning of <b><tt>devs.mak</tt></b>
and <b><tt>contrib.mak</tt></b>. To find what devices a platform-specific
makefile selects to include in the executable, look in it for all lines of
the form
<blockquote>
<b><tt>FEATURE_DEVS=</tt></b><em>{list of features}</em><br>
<b><tt>DEVICE_DEVS</tt></b>*<b><tt>=</tt></b><em>{list of devices}</em>
</blockquote>
<p>
For example, if the makefile has
<blockquote><b><tt>
FEATURE_DEVS=level2.dev
</tt></b></blockquote>
<p>
indicating that only the PostScript Level 2 facilities should be included,
you might make it
<blockquote><b><tt>
FEATURE_DEVS=level2.dev pdf.dev
</tt></b></blockquote>
<p>
to add the ability to interpret PDF files. (In fact,
<b><tt>FEATURE_DEVS</tt></b> in the current Unix makefiles already includes
<b><tt>pdf.dev</tt></b>.) The Unix makefile also defines
<blockquote><b><tt>
DEVICE_DEVS=x11.dev
</tt></b></blockquote>
<p>
indicating that the X Windows driver should be included, but since
platform-specific makefiles as distributed normally include many of the
possible features and drivers, you will probably rather remove from the
makefile the features and drivers you don't want. It does no harm to
include unneeded features and devices, but the resulting executable will be
larger than needed.
<p>
You may edit the <b><tt>FEATURE</tt></b>* lines to select or omit any of
the features listed near the beginning of <b><tt>gs.mak</tt></b>, and the
<b><tt>DEVICE_DEVS</tt></b>* lines to select or omit any of the device
drivers listed near the beginning of <b><tt>devs.mak</tt></b> and
<b><tt>contrib.mak</tt></b>. The first device listed in the definition of
<b><tt>DEVICE_DEVS</tt></b> becomes the default device for this executable;
see the usage documentation for <a href="Use.htm#Output_device">how to
select an output device</a> at run time using the
<a href="Use.htm#DEVICE_switch"><b><tt>-sDEVICE=</tt></b></a> switch. If
you can't fit all the devices on a single line, you may add lines defining
<blockquote>
<b><tt>DEVICE_DEVS1=</tt></b><em>{dev11}</em><b><tt>.dev</tt></b> ... <em>{dev1n}</em><b><tt>.dev</tt></b>
<br><b><tt>DEVICE_DEVS2=</tt></b><em>{dev21}</em><b><tt>.dev</tt></b> ... <em>{dev2n}</em><b><tt>.dev</tt></b>
</blockquote>
etc. up to <b><tt>DEVICE_DEVS15</tt></b>. Don't use continuation lines --
on some platforms they don't work.
<h3><a name="LZW"></a>LZW compression</h3>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -