Generally speaking, you want to have the latest ghostscript you can find. You should find anything since 8.60 to be serviceable, but as of this writing the current version is 8.71. As far as we know, you cannot go wrong by potentially having some "too far advanced" version of Ghostscript.
Ghostscript Download Mac Os X
It's always a good idea to check the validity of anything like this that you download. If nothing else, there may have been an error occur, which leads to a failed compiling and wastes your time. Once you download your file, you can run a checksum on it, which makes a calculation on the contents of the file, then creates an alphanumeric sequence that should match whichever checksum corresponds to your file from the list.
depending on which one you downloaded. The z or the J or the j option uncompresses the file so that then it can be extracted with the x option. The v and f options cause verbose output and indicate that what follows is a filename of the archive.
If you go farther down the page, past the archived files, past the checksums, you will find links for 32-bit and 64-bit Windows versions. Simply download one of these and run it to install Ghostscript. If you do this before you install Scribus, chances are Scribus will find Ghostscript unless you choose a nonstandard location when Ghostscript was installed.
Foomatic-RIP is an internal component of the Foomatic runtime printing system. It may be included with the Mac OS X driver package available for download from this website. Please check the Downloads section for the driver package you want. It should be listed as a separate download if it is not included with the driver package. If there is no Mac OS X package for the driver you need, you will have to download it separately.
Gutenprint 5.3.3 is released!August 25, 2019 - The Gutenprint project is pleased to announce Gutenprint 5.3.3, the first stable release of Gutenprint 5.3. This package is 64-bit only.NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
Gutenprint 5.2.15 is released!June 12, 2019 - The Gutenprint project is pleased to announce Gutenprint 5.2.15, the final planned release of Gutenprint 5.2. Future releases will be based on Gutenprint 5.3. This release fixes a problem with dye sublimation printers not functioning, restores the uninstaller, and should fix some other issues on OS X. As of this release, this package is 64-bit only.NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
Gutenprint 5.2.14 is released!May 17, 2018 - The Gutenprint project is pleased to announce Gutenprint 5.2.14, a stable release Gutenprint 5.2. This release adds full color support for most color laser printers, fixes some important bugs, adds support for additional printers, and offers improvements for others. NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
Gutenprint 5.2.13-pre1 is released!May 23, 2017 - The Gutenprint project is pleased to announce Gutenprint 5.2.13-pre1, a pre-release of Gutenprint 5.2.13. This release fixes some important bugs, adds support for additional printers, and offers improvements for others. NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
Gutenprint 5.2.12 is released!January 19, 2017 - The Gutenprint project is pleased to announce Gutenprint 5.2.12, a stable release of Gutenprint 5.2. This release adds support for many new printers and other improvements over 5.2.11. NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
Gutenprint 5.2.11 is released!January 22, 2016 - The Gutenprint project is pleased to announce Gutenprint 5.2.11, a stable release of Gutenprint 5.2. This release provides full support for OS X 10.11 (El Capitan). This release adds support for many new printers and other improvements over 5.2.10, but no longer supports OS X 10.5 or below. NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
Gutenprint 5.2.10 is released!May 20, 2014 - The Gutenprint project is pleased to announce Gutenprint 5.2.10, a stable release of 5.2. This release adds support for many new printers and other improvements over 5.2.9, but no longer supports OS X 10.3 or 10.4. NOTE: Users of many dye sublimation printers must follow a special installation procedure. Please read the release notes very carefully! See the Release notes for more detail. See the Downloads section for download links.
The brew command downloads and installs ImageMagick with many of its delegate libraries (e.g. JPEG, PNG, Freetype, etc). Homebrew no longer allows configurable builds; if you need different compile options (e.g. librsvg support), you can download the ImageMagick Mac OS X distribution we provide:
If this doesn't get you started you could also ask the GS developers directly in their online chat channel named #ghostscript on IRC server irc.freenode.net. They are a very friendly and helpful bunch of people.
If you also use camelot for pdf parsing you also need to replace library = find_library("gs") with library = distutils.spawn.find_executable("gs") in your /opt/anaconda3/lib/python3.8/site-packages/camelot/backends/ghostscript_backend.py file.
MacGhostView is a application for previewing Postscript and encapsulated Postscript files and converting them to other formats.It implements the command line tools gv (ghostview 3.7.2) and gs (ghostscript 9.18). Multiple files can be previewed at the same time, each one displayed in its own gv window. Unlike Apple's Preview program,MacGhostView does not convert Postscript files to PDF format and then displaythe PDF file. System RequirementsMacGhostView 6.1 runs on any OS X from 10.6 to 10.15 and requires the X11 or XQuartz application. If you have updated to Catalina from a previousversion of macOS you may have to reinstall XQuartz 2.7.11. DownloadingMacGhostView 6.1 is a 50 Mb download and can be downloaded by clickinghere.This download includes the gv, xdvi-motif and xpdf tools described below. Previous versions MacGhostView 5.2.4 is a 32 bit application and runs under OS X 10.2 - 10.14.
MacGhostView 4.6 does not require X11. It is a PPC program and runs under OS X 10.2 - 10.6.
MacGhostView 3.2 is the last version of MacGhostView that runs on a vintage 68K or Power Mac under OS 7.0.1 through 9.2.2. It also runs under emulation with Basilisk II or SheepShaver.
Terminal based previewers for TeX on OS XMacGhostview includes three previewers which may be of interest to usersof TeX on OS X, namely gv, xdvi-motif and xpdf. All three require a X11 installation and xdvi-motif requires MacTeX 2016 or later.Gv is simply MacGhostView stripped of everything but the Postscript viewer and is run from the Terminal.You must have a recent version of ghostscript installed in /usr/local. Toinstall gv simply move it to /usr/local/bin and move the man page, gv.1, to/usr/local/share/man/man1. It runs under OS X 10.6 through 10.15.Xpdf is another PDF viewer for OS X. It does not use Apple's PDFKit for renderingPDF files and thus may display PDF files that do not display correctly underPreview, TeXShop or Skim. Toinstall xpdf simply move xpdf and xpdf-bin to /usr/local/bin and move the man page, xpdf.1, to/usr/local/share/man/man1. Xpdf does not require a ghostscript installation but doesuse some old style ghostscript fonts. If your system does not have a/usr/local/share/ghostcript/fonts directory, move the fonts folder to the/usr/local/share/ghostscript directory.Xpdf runs under OS X 10.6 through 10.15. Xdvi-motif is the OpenMotif version of the xdvi program included with MacTeX 2016, 2017, 2018, 2019 or 2020. To install it move xdvim and xdvi-motif to /Library/TeX/texbin. To viewmyfile.dvi with xdvi-motif type xdvim myfile.dvi in a Terminal window.Typing xdvi myfile.dvi will run the standard xdvi program.These programs are included in the MacGhostView 6.1 download given above.
I've run the ghostscript 9.09 installer several times but even though it does not error out, I'm left with no gs executable anywhere on the system (verified with find / -type l -name gs -print). I'm unsure where/how to troubleshoot this, but I need ghostscript to try out Scribus. Is anyone aware of a ghostscript incompatibility with macOS X 10.12.6 and what to do about it? I've tried running the configure script both from Finder and from Terminal and, again, it seems fine. Except I get no results after it goes thru its processes. Thanks for any ideas.
For other information, see the Ghostscriptoverview and the instructions on how to installGhostscript.General overviewThis document describes how to build a Ghostscript executable from sourcecode. There are four major steps to building Ghostscript:Acquire the compressed archive files of source code for Ghostscript andthe required third-party libraries.Unpack the archive files into the Ghostscript directory and correctlynamed subdirectories.Prepare the makefiles, including specific changes for your operatingenvironment and your choice of configuration options.Invoke "make" to build the software.The remainder of this document describes each of these steps in detail.Note that some of this process is platform-dependent. After buildingGhostscript you must then install it; for that, see theinstallation instructions.How to acquire the source codeBuilding Ghostscript requires the Ghostscript source code itself, and alsothe source code for some third-party libraries that Ghostscript uses.Ghostscript source codeThere are two kinds of Ghostscript distributions available, called "AFPLGhostscript" and "GNU Ghostscript"; the distinction between them isexplained in the conditions for distributingGhostscript. The authoritative distribution site for AFPLGhostscript is "###" is the unpunctuated version number. GNU Ghostscript should beavailable on all GNU sites, such as source code is packaged in two different formats:gzip-compressed tar files (*.tar.gz) and zip files(*.zip). For all versions there are gzip-compressed tarfiles:ghostscript-#.##.tar.gzghostscript-fonts-std-#.##.tar.gzghostscript-fonts-other-#.##.tar.gzFor recent versions of AFPL Ghostscript -- not GNUGhostscript -- there are also zip files (each zipped file fits onto asingle 1.44MB diskette):gs###fn*.zipgs###sr*.zip("#.##" and "###" are version numbers in punctuated and unpunctuated form.)Software to decompress and extract both formats is available for almostevery platform for which Ghostscript is available -- including Unix, DOS,MS Windows, and VMS -- so you can choose the format most convenient foryou; but it's up to you to locate that software. See the section on unpacking the source code.Third-party library source codeTo build Ghostscript you need the source code for the Independent JPEG Group (IJG) library, thePortable Network Graphics(PNG)library, and the zlibcompression and decompression library. Here are authoritative distributionpoints for these libraries, where as elsewhere, "#" is used for versionnumbers. The JPEG source code is quite stable, so the referencehere includes the latest version number. The zlib references areversion-independent and should always provide the latest version.Third-party libraries: authoritative sourcesJPEG -#.#.#.tar.gz -#.#.#.tar.gz (latest) -zip.org/pub/infozip/zlib/zlib.tar.gz -zip.org/pub/infozip/zlib/zlib.zip -zip.org/pub/infozip/zlib/zlib.tar.gz -zip.org/pub/infozip/zlib/zlib.zipOn DOS or MS Windows one ordinarily uses the zip file kits, in otherenvironments the compressed tar files, but this is simply a matter ofconvenience, since for the same version of the software the compressed tarfile has the same contents as the zip file. Note that each of theselibraries has its own version number that hasnothing to do with Ghostscript's version number; you shouldget the highest numbered version. (If you encounter difficulties in thebuild process you might have to use a lower-numbered version, but don'tworry about this yet.) If you're running Linux, you might check whetherthese libraries are already available in source form on your system, sincemany Linux distributors include them; but we advise you to get the highestversion from the Net if you can.Although the zip archives of an old version of the PNG library may not benamed lpng###.zip, we refer to it aslpng###.zip.On MacOS, the .sit source archive includes the appropriate source versionsof these libraries, so no additional downloads are necessary.How to unpack the source codeUnfortunately there are no generally accepted standards for how to packagesource code into archives, so the instructions for unpacking Ghostscript arelonger than they should be. We begin with a brief explanation of how toextract the two kinds of archive files.How to unpack compressed tar files generallyTar (.tar) files are the de facto standard forarchiving files on Unix (every Unix system has the tarprogram), and programs to extract their contents are also widely availablefor DOS, MS Windows, and VMS. To economize on space and downloading time,Ghostscript's tar files are compressed with GNU gzip, whichadds the suffix ".gz" to the file name, giving".tar.gz".To unpack a compressed tar file MyArchive.tar.gz youmust both decompress it and extract the contents. You can do this in twosteps, one to decompress the file and another to unpack it:gzip -d MyArchive.tar.gztar -xf MyArchive.taror in a pipeline:gzip -d -c MyArchive.tar.gz tar -xf -or, if you have a program like GNU tar that can handlecompressed tar files, with a single command:tar -zxf MyArchive.tar.gzThe tar program automatically preserves directory structurein extracting files. The Ghostscript source archive puts all files under adirectory gs#.##, so using tar to unpack acompressed archive should always properly create that directory, which wewill call the "gs directory". Make sure you're positioned in theparent of the gs directory before unpackingthe files. If a subdirectory doesn't already exist, tarcreates it.Some other programs -- under MS Windows, for instance -- can also unpackcompressed tar files, but they may not automatically preserve directorystructure nor even extract files into the current directory. If you useone of these, you mustset the program's options to "Use folder names" or the equivalent, andcheck that it is extracting files into the right place.How to unpack zip files generallyZip files are the de facto standard for archiving files on DOS andMS Windows, and programs to extract their contents are widely available forDOS, MS Windows, Unix, VMS, and other platforms. Zip files are at once anarchive format and a compressed format, so an unzipping programdecompresses and extracts archived files as a single step.One common 16-bit DOS program is pkunzip, which comes inthe pkzip package. If you use this, you should ensure thatyou have at least version 2.04g, because with its -dswitch, that version of pkunzip preserves the directorystructure of archived files when extracting them; see below. Anotherpopular free program to unpack zip archives, available for DOS and MSWindows (16-bit and 32-bit), Unix, VMS, and other platforms, is InfoZIPunzip: -zip.org/pub/infozip/UnZip.htmlUnlike pkunzip, InfoZIP unzip automaticallypreserves the directory structure of extracted files. So if you have a ziparchive MyArchive.zip:Extracting zipped filesCommand Preserves directory structurepkunzip MyArchive.zip Does NOTpkunzip -d MyArchive.zip DOES (note the -d switch)unzip MyArchive.zip DOESAs with the compressed tar files, make sure you're positioned in theparent of the gs directory before unpackingthe files. If a subdirectory doesn't already exist, zip orpkunzip -d creates it.How to unpack Ghostscript itselfAt this point you have acquired all the source codeand are ready to unpack it according to the preceding guidelines for tar files or zip files. Tounpack the Ghostscript source, make the parent of the (new)gs directory the current directory.2-step: gzip -d ghostscript-#.##.tar.gztar -xf ghostscript-#.##.tarPipe: gzip -d -c ghostscript-#.##.tar.gz tar -xf -GNU tar: tar -zxf ghostscript-#.##.tar.gzpkunzip: pkunzip -d gs###sr1.zippkunzip -d gs###sr2.zip...unzip: unzip gs###sr*.zipAll the Ghostscript source files are now in subdirectories of the gsdirectory.Source subdirectoriesSubdirectory Contentssrc/ C source code and makefileslib/ PostScript files and scripts used when running Ghostscriptdoc/ Documentationman/ Unix man pagesexamples/ Sample PostScript filesHow to unpack the third-party librariesThe Ghostscript makefiles expect to find the JPEG, PNG, and zlib source codein specific subdirectories of the gs directory, and thismeans you must pay careful attention to unpacking the source code for thesepackages. Use the same method for all of them, no matter how they'repackaged:Make the gs directory current.Unpack the archive file, creating a subdirectory (which will include aversion number).Whatever the subdirectory's original name, rename it to the versionlessname shown just below.If you're uncertain how to unpack an archive, review the sections on compressed tar files and zipfiles.3d-party software subdirectoriesPackage Possibleoriginal name Rename toJPEG ./jpeg-6b ./jpegPNG ./libpng-#.## ./libpngzlib ./zlib-#.#.# ./zlibHow to check for post-release bug fixesBug information and fixes are tracked on SourceForge.For more information, please visit to prepare the makefilesThe Ghostscript makefiles are very large and complex in order to deal withthe diverse requirements of all the different systems where they may beused. Fortunately, the only makefiles you're likely to want to change arerelatively small ones containing platform-specific information.Platform-specific makefilesMakefile Used forbcwin32.mak MS Windows with Borland/Inprise compilersmsvc32.mak MS Windows with Microsoft Visual C++ version 4.n or 5.nopenvms.mak OpenVMSos2.mak OS/2 with the gcc/emx compilerunix-gcc.mak Unix with gccunixansi.mak Unix with ANSI C compilers other than gccunixtrad.mak Unix with "traditional C" compilerswatc.mak DOS with Watcom compilerswatcw32.mak MS Windows with Watcom compilers Platform-independent makefilescontrib.mak Contributed device driversdevs.mak Maintained device driversgs.mak Documentation and miscellanyint.mak Main makefile for the PostScript & PDF interpreterjpeg.mak JPEG librarylib.mak Graphics enginelibpng.mak PNG libraryversion.mak Version and release datezlib.mak zlib librarySince these files change from one Ghostscript version to another, sometimessubstantially, and since they all include documentation for the variousoptions, here we don't duplicate most of that documentation: we recommendstrongly that you review the entire makefile specific for your operatingsystem and compiler before building Ghostscript.Changes for your environmentYou must edit the platform-specific makefile to change any of these:The name of the makefile itself (MAKEFILE macro)The locations to install Ghostscript files (prefix etc.)The default search paths for the initialization and font files(GS_LIB_DEFAULT macro)The debugging options (DEBUG and TDEBUGmacros)Which optional features to include (FEATURE_DEVS)Which device drivers to include (DEVICE_DEVS andDEVICE_DEVS1--20 macros)Default resolution parameters for some printer drivers(devs.mak or contrib.mak, whichever definesthe driver)The platform-specific makefilesinclude comments describing all these except theDEVICE_DEVS options. These are described indevs.mak and contrib.mak, even though thefile that must be edited to select them is the platform-specific makefile. Checkalso the JVERSION and PVERSION macros inthe platform-specific makefile, and adjust them if they don't match theJPEG and PNG library versions you're using: see jpeg.makand libpng.mak for more information.Some platform-specific options are described in the sections for individualplatforms. See the "Options" section near the beginning of the relevantmakefile for more information.Selecting features and devicesYou may build Ghostscript with any of a variety of features and with anysubset of the available device drivers. The complete list of features isin a comment at the beginning of gs.mak, and the completelist of drivers in comments at the beginning of devs.makand contrib.mak. To find what devices a platform-specificmakefile selects to include in the executable, look in it for all lines ofthe formFEATURE_DEVS=list of featuresDEVICE_DEVS*=list of devicesFor example, if the makefile hasFEATURE_DEVS=$(PSD)level2.devindicating that only the PostScript Level 2 facilities should be included,you might make itFEATURE_DEVS=$(PSD)level2.dev $(PSD)pdf.devto add the ability to interpret PDF files. (In fact,FEATURE_DEVS in the current Unix makefiles already includes$(PSD)pdf.dev.) The Unix makefile also definesDEVICE_DEVS=$(DD)x11.devindicating that the X Windows driver should be included, but sinceplatform-specific makefiles as distributed normally include many of thepossible features and drivers, you will probably rather remove from themakefile the features and drivers you don't want. It does no harm toinclude unneeded features and devices, but the resulting executable will belarger than needed.You may edit the FEATURE_DEVS line to select or omit any ofthe features listed near the beginning of gs.mak, and theDEVICE_DEVS* lines to select or omit any of the devicedrivers listed near the beginning of devs.mak andcontrib.mak. The first device listed in the definition ofDEVICE_DEVS becomes the default device for this executable;see the usage documentation for how toselect an output device at run time using the-sDEVICE= switch. Ifyou can't fit all the devices on a single line, you may add lines definingDEVICE_DEVS1=$(DD)dev11.dev ... $(DD)dev1n.devDEVICE_DEVS2=$(DD)dev21.dev ... $(DD)dev2n.devetc., up to DEVICE_DEVS15. Don't use continuation lines --on some platforms they don't work.Note that if you want to include a driver named xxx, you must put$(DD)xxx.dev inDEVICE_DEVS*. Similarly, if you want to include a featurerelated to the PostScript or PDF language interpreters (PostScript level1 .. 3, or other language features such as the ability to read EPSF files orTrueType font files), you must represent it as$(PSD)xxx.dev. If you are linkingonly the graphics library -- not the language interpreter(s) -- with anapplication and want to include optional graphics library features such asCIE color, you represent them as$(GLD)xxx.dev.Precompiled run-time dataGhostscript normally reads a number of external data files at run time:initialization files containing PostScript code, fonts, and other resourcessuch as halftones. By changing options in the top-level makefile for theplatform, you can cause some of these files to be compiled into theexecutable: this simplifies installation, improves security, may reducememory requirements, and may be essential if you are planning on puttingGhostscript into ROM.To compile the initialization files (lib/gs_init.ps, etc.)into the executable, change the 0 to a 1 inthe lineCOMPILE_INITS=0To compile fonts into the executable, see Precompiling fonts.To compile threshold-array halftones into the executable, see the "Compiledhalftone" section of int.mak for a sample makefile fragment,genht.c for the syntax of halftone data files, andlib/ht_ccsto.ps for a sample data file. Note that eventhough the data files use PostScript syntax, compiled halftones do notrequire the PostScript interpreter and may be used with the graphics libraryalone.GNU readlineAFPL Ghostscript does not include an interface to GNU readline. A usercontributed code for this purpose, which we spent significant time debuggingand then updating to track internal architectural changes in Ghostscript.The contributor was willing to assign the copyright to Aladdin Enterprises(the copyright holder of Ghostscript at the time), and to allow the code tobe distributed with the Aladdin Free Public License (AFPL) as well as theGNU License (GPL). However, even though the GPL allows linking GPLed code(such as the GNU readline library package) with non-GPLed code (such as allthe rest of AFPL Ghostscript) if one doesn't distribute the result, the FreeSoftware Foundation, creators of the GPL, have told us that in theiropinion, the GPL forbids distributing non-GPLed code that is merelyintended to be linked with GPLed code. We understand that FSFtakes this position in order to prevent the construction of software that ispartly GPLed and partly not GPLed, even though the text of the GPL does notactually forbid this (it only forbids distribution of suchsoftware). We think that FSF's position is legally questionable and not inthe best interest of users, but we do not have the resources to challengeit, especially since FSF's attorney apparently supports it. Therefore, eventhough we added the user-contributed interface to GNU readline in internalAladdin Ghostscript version 5.71 and had it working in version 5.93 (one ofthe last beta versions before the 6.0 release), we removed it from theAladdin Ghostscript 6.0 distribution.GNU Ghostscript distributions will include support for GNU readline. Aswith other GNU Ghostscript components that are not included in AFPLGhostscript, the maintainers of Ghostscript will not attempt to run, link,or even compile this code, or keep it current across changes in the rest ofGhostscript. We will, however, welcome bug fixes or updates, and distributethem with subsequent releases of GNU Ghostscript.The first GNU Ghostscript distribution that will include GNU readlinesupport will be GNU Ghostscript 6.0, currently scheduled for release alongwith AFPL Ghostscript 7.0 in the first or second quarter of 2001. Beforethat time, we may return the copyright of Ghostscript's GNU readlineinterface module, which the original author assigned to Aladdin Enterprises,to the author, so that users of GNU Ghostscript will have have access to it.However, since it requires internal changes not available in any releasedGNU Ghostscript version before 6.0, any user who gets this code and links itwith Aladdin Ghostscript 6.0 will, according to FSF, be violating the intent(though not the letter) of the GPL.We put considerable work into making it possible for Ghostscript to use GNUreadline, including the creation and adjustment of internal softwareinterfaces specifically to serve this purpose. In principle, we should haveundone this work in AFPL Ghostscript, lest FSF object to it too asintended to facilitate linking AFPL Ghostscript with GNU readline (as theU.S. government has been said to do for code that merely provides APIs whereencryption may be added). However, we are willing to take this risk ratherthan spend the time to undo the interface changes.If you have comments or questions about this situation, please feel free tocontact the Free Software Foundation, authors of the GPL and copyrightholders of GNU readline, at gnu@gnu.org,and/or artofcode LLC, copyright holder of Ghostscript, at raph@artofcode.com.Setting up "makefile"After going through the steps just described to unpackthesources, make any desired changes tothemakefiles, and unpack or create links to the third party libraries, as the final step inpreparing to build Ghostscript you must usually associate the name"makefile" with the correct makefile for your environment sothe make command can find it. See the section on yourparticular platform for how to do that if necessary.Invoking "make"makeBuilds Ghostscript without debugging options.make debugBuilds Ghostscript with debugging options and additional internal errorchecks. The program will be somewhat larger and slower, but it will behaveno differently unless you actually turn on debugging options at executiontime with the -DDEBUG or-Z command line switchesdescribed in the usage documentation.make pgOn Unix platforms, builds with the -pg compilerswitch, creating an executable for time profiling.make beginOn PC platforms, attempts a quick and dirty compilation of all the.c files in the current directory. See themore detailed explanation.make installAfter building, installs the Ghostscript executables, support files,and documentation, but does not install fonts. See theinstallation documentation.make cleanDeletes all the files created by the build process (relocatables,executables, and miscellaneous temporary files). If you've built anexecutable and want to save it, move it first to another place, because"make clean" deletes it.Note: on most platforms some of these simple instructions don'tquite work in one way or another. Read the section on your specificplatform.Cross-compilingIf you are compiling Ghostscript on machines X1 ... Xn withcross-compilers that generate code for machine Y, you must firstperform several extra steps on some machine Z (not necessarily of thesame type as either Xi or Y). First of all, choose a makefileappropriate for Z and edit it to reflect the run-time options youwish to include (FEATURE_DEVS, DEVICE_DEVS*,and any other relevant options), just as for non-cross-compilation.If Z runs Unix, perform the following steps:On Z,make cleanmake obj/arch.h obj/genconf obj/echogsEdit obj/arch.h to reflect the architecture of Y.On Z,make CC=: CCLD=:Copy the files obj/*.h from Z to the directory oneach Xi that will be used for compilation.Extract from the file obj/ldt.tr (on Z) the listof .o files that will be linked: this gives the list ofsource files that must be compiled.Do the compilations on Xi.If Z runs some version of Microsoft Windows with Microsoft VisualC++, use the following steps. NOTE: We have not actually testedthis.On Z,nmake cleannmake obj\arch.h obj\genconf.exe obj\echogs.exeEdit obj\arch.h to reflect the architecture of Y.On Z,nmake CC=rem LINK=remCopy the files obj\*.h from Z to the directory oneach Xi that will be used for compilation.Extract from the file obj\ldt.tr (on Z) the listof .obj files that will be linked: this gives the list ofsource files that must be compiled.Do the compilations on Xi.How to build Ghostscript from source (PC version)All Ghostscript builds in PC (DOS and MS Windows) environments are 32- or64-bit: 16-bit builds are not supported. The relevant makefiles arePC makefilesMakefile Construction tools For environmentbcwin32.mak Borland/Inprise C++ 4.x 32-bit MS Windows 3.1 + Win32s, 95, 98, NTmsvc32.mak Microsoft Visual C++ 4.x or 5.x MS Windows 32-bitwatc.mak Watcom C/386 or C++ MS-DOS 32-bit (extended)watcw32.mak Watcom C/386 or C++ MS Windows 32-bitunix-gcc.mak Cygnus gcc Cygnus gnu-win32To build Ghostscript you need MS-DOS version 3.3 or later andBorland/Inprise C/C++ (4.0 or later); Microsoft Visual C++ (version 4.0 orlater); Watcom C/386 (version 8.5 or later) or C++ (any version); or thefree djgpp + go32 development system. The options in the makefiles arechosen to strike a balance between RAM consumption and likely usefulness.If you run make in directory dir, the defaultconfiguration generates an executable that assumes the Ghostscriptinitialization and font files are in directorydir\lib.Note that the make program supplied with each PC compilerhas a different name. We refer to this program generically asmake everywhere else in this document, but you will find thecorrect name for each compiler in the relevant section below that discussesthat compiler.You must have COMMAND.COM in your path to build Ghostscript.After making the changes needed to choose features and devices to build intothe executable, you must create the directory where the compiler will do itswork (normally the obj subdirectory of the currentdirectory) and the directory where the compiled code will be placed(normally the bin subdirectory). Then to build theGhostscript executable all you need do is give the makecommand.A special make target "begin" attempts to compile all the.c files in the current directory. Some of thesecompilations will fail, but the ones that succeed will go considerablyfaster because they don't individually pay the overhead of starting up thecompiler. So a good strategy for building the executable for the firsttime, or after changing a widely used .h file, is to do thefast compilation of everything possible, then the controlled compilation ofeverything that failed in the first step:make beginmakeNote: if you unpack the Ghostscript sources on a DOS or MS Windowssystem from a Unix tar file, the unpacked files have linefeed alone as theline terminator (the Unix convention) instead of carriage return + linefeed(the Microsoft convention), which may make the C compiler unhappy. Onesimple way to fix this, if you have the InfoZIP zip andunzip programs, iszip -l CVTEMP.zip *.bat *.c *.h (Letter "l", not the digit "1")unzip -o CVTEMP.zip (Rewrite all the same files correctly)del CVTEMP.zip (Delete the temporary zip file)Borland/Inprise environmentTo compile Ghostscript with the Borland/Inprise environment (hereafterreferred to as just "Borland"), you need Borland C++ (version 4.0 or later);specifically the compiler, make utility, and linker. Youalso need either the Borland assembler (version 1.0 or later) or theMicrosoft assembler (version 4.0 or later).To create "makefile", give the commandecho !include "src\bcwin32.mak" >makefileTo run the make program, give the commmandmakeBesides the source files and the makefiles, you need:*.bat (a variety of batch files used in the build process)Comments in the makefiles describe the configuration parameters. If yourconfiguration is different from the following, you should definitely readthose comments and see if you want or need to change any of this:The compiler files are in C:\BC and its subdirectories.You are using the Borland assembler tasm.You want an executable that will run on any 32-bit PC-compatible,regardless of processor type (80386, 80486, Pentium, or compatible) andregardless of whether a math coprocessor (80x87) is present -- an issue onlywith 80386 processors.NotesA user reports that the Borland C++ 4.00 with patch 1-6 doesn'tproduce a working executable of Ghostscript 5.03. We can't test this,since we no longer have this compiler.Borland C++ 4.5 has a bug or bugs that cause(s) the 32-bit Windowsexecutable to crash if you give any @-files on the command line. Amongother things, this makes the uniprint driver unusable, because it referencesthe .upp configuration files this way. This problem may possibly be fixedby one or more of the patch files on _5/Borland C++ 4.52 has a bug that causes the 32-bit Windows executable tofail during startup. Borland (now Inprise) provides a patch for this bugin _5/bc45xp1.zipBorland C++ 5.0 and 5.01 have a code generator bug that generatesincorrect code for the construct !file_is_valid(). Do notattempt to compile Ghostscript with these compilers. If you want to reportthis bug to Borland, send them the result of compilingziodev.c and tell them to look at the code generated forfile_is_valid() and !file_is_valid(). Wedon't know whether Borland C++ 5.02 still has this problem.When building for the MS Windows Win32s environment, the makeprocess will stop after it has created genarch.exe.You should then run "_genarch.bat", wait untilgenarch has finished and then exit MS Windows. Then type"make" again to restart the make process.Microsoft Environment NOTE: We have received reports that the Microsoft Visual C++ 5.0 and 6.0 compilers produce incorrect code for Ghostscript version 6.0 and later, from the same source code that compiles and runs correctly with other compilers. In spite of these reports, several members of the Artifex staff use version 6.0 of the MSVC compiler on a regular basis and we have not found any problems. You may also want to try out the Intel C/C++ compiler, which can be integrated into the Microsoft Visual C++ environment.To compile Ghostscript using the Microsoft environment, you need Microsoft Visual C++ 4.0 or later with its associated "nmake" utility and linker. Using Microsoft Developer StudioMicrosoft Developer Studio is the Microsoft Visual C++ integrated development environment. To use it to build Ghostscript: it is first necessary to create a new workspace/project. To create the workspace/project, open Microsoft Developer Studio and select File/New. In the dialog window that is opened, select 'Makefile' as the type of project. Specify a name for the project. (Microsoft does not allow special characters such as ., *, ?, /, or \ as part of project names.) Also specify the location of the master directory for your Ghostscript files. Then select OK. In the next dialog window, specify the build command line as nmake /f src/msvc32.mak DEVSTUDIO= Note the value for DEVSTUDIO is empty. Then select Finish. At this point, it is now possible to build Ghostscript using Developer Studio. To build, press F7 or select the build icon. Note: multiple warnings will also given about things like double to float data conversions. Ignore them. We have not found a way to create a single set of sources that does not create warnings with the different compilers and operating systems supported by Ghostscript. We are working to reduce the number of the warning messages. To run Ghostscript inside of Developer Studio, it is necessary to specify the name of the executable program . Select Project/Settings. Select the Debug tab. Then for Executable for debug session: specify bin/gswin32.exe To use all of the features of Microsoft Developer Studio for debugging, and modifying Ghostscriptt, you need to finish the remaining steps. To add the Ghostscript DLL to the project, select Project/Settings. Select the Debug tab. Change the Category to Additional DLLs. Then specify bin/gsdll32.dll. To specify the Ghostscript program arguments, select Project/Settings. Select the Debug tab. Change the Category to General. Then specify the desired program arguments. For example, specifying: examples/tiger.ps will result in the tiger example file being displayed when Ghostscript is executed. . A final note: it is possible to create a command file (build.bat) to be used for the build command line. If many different workspaces/projects are created, it is simpler to use a build batch command file rather than retyping the build command line for each new project. Here is an example used by one of Artifex's staff members. This file is one line: nmake -f src/msvc32.mak DEVSTUDIO= DEBUG=1 GS_LIB_DEFAULT="./lib/;./font;$(GSROOTDIR)/lib;$(AROOTDIR)/fonts" The DEBUG=1 enables many debugging features built into Ghostscript. Please note the double quotes around the value for GS_LIB_DEFAULT and the addition of ./lib;./fonts; to its definition. This uses the local (within the project) copy of the lib and fonts directories. This is convenient if any changes need to be made in these directories. Using the command lineGhostscript can be made using either the DOS shell or one one of the various command line shells made for Windows.In order for the makefiles to work properly, two items may have to be changed. If you are not using version 5.x then before building, in src\msvc32.mak find the line "MSVC_VERSION=5" and change it to "MSVC_VERSION=4" or "MSVC_VERSION=6". In some cases the location of the Microsoft Developer Studio, needs to be changed. The location of Microsoft Developer Studio is defined by the value of DEVSTUDIO. There are three different definitions of DEVSTUDIO in src\msvc32.mak. There is one for each of the currently supported versions of Microsoft Visual C++ (4, 5, and 6). The normal installation process for Microsoft Visual C++ includes setting the location of the Microsoft Visual C++ executables (cl.exe, link.exe, nmake.exe, rc.exe) in your PATH definition and the LIB and INCLUDE environment variables are set to point to the Microsoft Visual C++ directories. If this is true then the value for DEVSTUDIO can be changed to empty. I.e. DEVSTUDIO= If PATH, LIB, and INCLUDE are not correctly set then the value for DEVSTUDIO needs to be defined. For example, for version 6.0, the default definition for the location for the Microsoft Developer Studio is: DEVSTUDIO=C:\Program Files\Microsoft Visual Studio If the path to Microsoft Developer Studio on your system differs from the default then change the appropriate definition of DEVSTUDIO. (Remember that there is a separate definition of DEVSTUDIO for each version of MSVC, so be sure to change the correct definition.) To run the make program, give the command nmake -f src\msvc32.makRather than changing src/msvc32.mak, these values can be specified on the makecommand line, I.e. nmake -f src\msvc32.mak MSVC_VERSION=6 DEVSTUDIO="C:\Program Files\Microsoft Visual Studio" Note that double quotes have been added around the path for DEVSTUDIO due to the spaces in the path value.This command line can also be put into a batch file. You may get warning messages during compilation about /QI0f being an undefined switch, or the message "dwmain32.def: EXETYPE not supported for platform; ignored" during linking. Multiple warnings will also given about things like double to float data conversions. Ignore them. We have not found a way to create a single set of sources that does not create warnings with the different compilers and operating systems supported by Ghostscript. The Microsoft VC++ 5.0 compiler locks up when compilinggxi12bit.c with /O2. Compile this filewithout /O2. The Microsoft VC++ 5.0 compiler produces a non-working executable if compiling without stack checking. Don't change the setting TDEBUG=1 in msvc32.mak. Making self-extracting executablesYou can build self-extracting Windows executables of Ghostscript. (This isnot needed to use Ghostscript.) Currently this requires both theBorland/Inprise and the Microsoft compilers, and also two pieces ofthird-party software:WinZipSE, available from is not free.zip, available from -zip.org/pub/infozip/Zip.html. This is free.You will have to edit src/winint.mak to defineWINZIPSE_XE and ZIP_XE respectively as thepath names of these programs. See Release.htm forthe detailed procedure.Watcom environmentBecause of limitations in the way that Watcom implemented theirwmake program, you must run the Watcom tools under MSWindows, even if you are generating a DOS executable. This is veryunfortunate, and there is no good technical reason for it, but we wereunable to persuade Watcom (now Powersoft) to do anything about it.To use the Watcom compiler, add to AUTOEXEC.BAT the line"set DOS4G=quiet". Check thatAUTOEXEC.BAT also contains a line of the form"set WATCOM=wcdir" where wcdir isthe directory where you installed the Watcom tools, and that the setting ofPATH includes wcdir\binnt (or%WATCOM%\binnt) before wcdir\binw(or %WATCOM%\binw). Then to create"makefile":For Give the commandDOS echo !include src\watc.mak >makefileMS Windows echo !include src\watcw32.mak >makefileBefore compiling, change the definition of the WCVERSIONmacro in the makefile (watc.mak orwatcw32.mak) to the version of the Watcom compiler you areusing. This is necessary to handle some minor incompatibilities betweenversions.To run the make program, give the commmandwmake -uFor information on using the GNU make program with theWatcom compiler to build MS-DOS executables, which avoids the limitations inwmake, see here.Cygwin32 gccA user reports that it is possible to compile Ghostscript for MS Windows NTusing the Cygwin32 gcc compiler, GNU make, and theunix-gcc.mak makefile, with only two small source codechanges:Add "b" to the call to fopen in gp_open_scratchMirror the gp_ntfs logic for gp_file_name_is_absoluteInformation about this compiler and environment is at the Cygnus site: note that Cygnus's licensing terms aren't quite as liberal aboutredistribution as either the GNUGeneral Public Licenseor the Aladdin Free Public License, so read theirlicense carefully if you want to redistribute the results of using theircompiler.Intel C/C++ environmentIntel provides a C/C++ compiler that is compatible with the Microsoft Visual C++ environment. The mainadvantage of this compiler over MSVC 5.0 and 6.0 is that it producesworking code even when all optimizations are enabled and when stack checkingis disabled.To build Ghostscript using the Intel C/C++ compiler, you have to make thefollowing small changes in the makefiles:Find and change the second occurrence of"COMPILE_FULL_OPTIMIZED" to "/O2" in filemsvccmd.mak. Override "TDEBUG","COMP", and "COMPAUX" when invokingnmake.More specifically, use "TDEBUG=0" and set both"COMP" and "COMPAUX" to the full path oficl (for example"COMP=C:\intel\compiler45\bin\icl" if the Intel C/C++compiler V4.5 was installed to C:\intel). It is suggestedthat you use a batch file to launch nmake, since the commandline processes the "=" on its own. Also, you may need toexecute vcvars32.bat and iccvars.bat toregister the proper paths for the compiler, its include files and itslibraries.You can buy or download a 30-day evaluation version of the Intel C/C++compiler from Intel's Software Performance Tools web site: to build Ghostscript from source (MacOS version)Traditional MacOSThe Macintosh version of Ghostscript requires the Metrowerks Codewarrior development suite. Download the macgs-700-src.sit source archive from the location listedbelow. This includes a Codewarrior .mcp project file than can be used to build both Carbon and CFM versions of the ghostscript shared library component. your system doesn't automatically unpack the source archive, you candownload the free Stuffit Expander to open it.This archive includes appropriate versions of the jpeg, zlib and libpng 3rd partylibrary source for convenience. You must still download the fonts and place them in anappropriate location, along with the contents of the lib directory from the sourcearchive.Note that since this is just a library component, you will need a front-end application, such asMacGSView, to actually view or convert postscript and pdf documents.MacOS XThe unix source distribution (.tar.gz) builds fine on Darwin/MacOS X,albeit without a display device. You can generally follow the instructionsfor building on unix in the next section, using unixansi.mak asyour top-level makefile. You must, however, remove the X11 devices fromthe DEVICE_DEVS define near the end of the file. This will allow you to use Ghostscript from the command line as a BSD-layer tool to rasterize postscript and pdf to image files, and convert between the formats supported by Ghostscript.Additionally, there is a macos-mcp.mak makefile that can beused to set up the Codewarrior shared library component build describedin the section on Classic MacOS above. Currentlythis makefile is distributed only with the MacOS-specific .sitsource archive, but with be included generally in future releases.To set up the shlib build, download and uncompress the Ghostscript source.If the archive doesn't contain the 3rd party jpeg, png, and zlib source,you must download them as described at the beginning of this document andunpack them under the macgs-###-src directory under the specific namesjpeg, zlib and libpng. You cannot use symlinks asCodewarrior will not be able to follow them for some of the needed headerfiles.Copy src/macos-mcp.mak to the top-level directory and renameit makefile. Then run 'make' in that directory, either fromwithin Terminal.app or through Project Builder. This will set up thegenerated code required for the build and run a shell script to generateghostscript.mcp.xml. Launch Metrowerks Codewarrior, and select'Import Project...' from the File menu, and open the xml project file.When asked, save the results as ghostscript.mcp in the same directory and you should be ready to build the shared library component. 2ff7e9595c
Commenti