Commit 8e71e1fbd31da31953d64cfad5264bb52cc590e0
1 parent
4f1ce188
notes
git-svn-id: svn+q:///qpdf/trunk@779 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
4 changed files
with
92 additions
and
47 deletions
Makefile
| ... | ... | @@ -23,7 +23,9 @@ |
| 23 | 23 | # and make maintainer-clean to remove everything that is generated |
| 24 | 24 | # including things distributed with the source distribution. You can |
| 25 | 25 | # pass CLEAN=1 to prevent this Makefile from complaining if |
| 26 | -# ./configure has not been run. | |
| 26 | +# ./configure has not been run. If you are cleaning from Windows, you | |
| 27 | +# may also need to add BUILD_EXTERNAL_LIBS=1 to make sure you can that | |
| 28 | +# as well. | |
| 27 | 29 | |
| 28 | 30 | # The install target works as usual and obeys --prefix and so forth |
| 29 | 31 | # passed to ./configure. You can also pass DESTDIR=/dir to make | ... | ... |
README.windows
| 1 | -By default, qpdf builds on UNIX and UNIX-like systems with simple | |
| 2 | -./configure; make; make install comamnds. It ordinarily uses libtool | |
| 3 | -to build libraries and link executables. | |
| 1 | +Common Setup | |
| 2 | +============ | |
| 4 | 3 | |
| 5 | -As an alternative, the build system can use its own built-in rules. | |
| 6 | -The available build rules can be found in the make directory; all the | |
| 7 | -files except rules.mk are build rules. The gcc-linux rules are there | |
| 8 | -primarily for testing the build system. They are not intended to be | |
| 9 | -used in production since, in a Linux environment, it's better to use | |
| 10 | -the default libtool rules. | |
| 4 | +To be able to run qpdf's test suite, you must have cygwin installed. | |
| 5 | +This is because qpdf's test suite uses qtest, which requires cygwin | |
| 6 | +perl on Windows. (Hopefully a future version of qtest will work with | |
| 7 | +ActiveState Perl.) You must have at least perl and gnu diffutils | |
| 8 | +installed to run the test suite. | |
| 11 | 9 | |
| 12 | -For building on Windows, autoconf and libtool don't generate a working | |
| 13 | -build for either mingw (as of this writing) or MS Visual C++. We use | |
| 14 | -our own rules instead. In addition, the external dependencies (pcre | |
| 15 | -and zlib) are often not present on Windows systems. | |
| 10 | +As of this writing, the image comparison tests confuse ghostscript in | |
| 11 | +cygwin, but there's a chance they might work at some point. If you | |
| 12 | +want to run them, you need ghostscript and tiff utils as well. Then | |
| 13 | +omit --disable-test-compare-images from the configure statements given | |
| 14 | +below. | |
| 16 | 15 | |
| 17 | -If you have MSYS and Mingw installed, you can run configure as follows: | |
| 16 | +Building with MinGW | |
| 17 | +=================== | |
| 18 | 18 | |
| 19 | -./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=mingw | |
| 19 | +QPDF is known to build and pass its test suite with MSYS-1.0.11 and | |
| 20 | +gcc 4.4.0 with C++ support. You can fully configure and build qpdf in | |
| 21 | +this environment, though cygwin is required to run the test suite. | |
| 22 | +You will most likely not be able to build qpdf with mingw using | |
| 23 | +cygwin, though it's possible that it could be made to work with gcc | |
| 24 | +-mno-cygwin. | |
| 20 | 25 | |
| 21 | -To build with msvc, you must be running in a shell environment that | |
| 22 | -puts the MSVC tools in your path. Then you can run | |
| 26 | +From your MSYS prompt, run | |
| 23 | 27 | |
| 24 | -CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc | |
| 28 | + ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=mingw | |
| 29 | + make | |
| 25 | 30 | |
| 26 | -This is tested with MSVC .NET 2008 Express. | |
| 31 | +When done, you should copy the gcc runtime dll into the libqpdf/build | |
| 32 | +directory. You can find the path to it by running | |
| 27 | 33 | |
| 28 | -From there, run | |
| 34 | + objdump -p qpdf/build/qpdf.exe | grep DLL | |
| 35 | + type -P libgcc_s_dw2-1.dll | |
| 29 | 36 | |
| 30 | -make | |
| 37 | +replacing libgcc_s_dw2-1.dll with whatever gcc DLL is shown, if | |
| 38 | +different. | |
| 31 | 39 | |
| 32 | -at the top level directory to build everything. Building with mingw | |
| 33 | -from a cygwin environment is not likely to work. However, you have to | |
| 34 | -have a cygwin environment to run the test suite. Once you have built | |
| 35 | -qpdf using mingw, you can test as follows: | |
| 40 | +From your cygwin prompt, add the absolute path to the libqpdf/build | |
| 41 | +directory to your PATH. Make sure you can run the qpdf command by | |
| 42 | +typing qpdf/build/qpdf and making sure you get a help message rather | |
| 43 | +than an error loading the DLL or no output at all. Run the test suite | |
| 44 | +by typing | |
| 36 | 45 | |
| 37 | -From your MSYS environment: | |
| 46 | + make check GENDEPS=0 | |
| 38 | 47 | |
| 39 | - * Run objdump qpdf/build/qpdf.exe | grep DLL | |
| 48 | +from your cygwin prompt. The GENDEPS=0 is necessary to prevent the | |
| 49 | +build system in cygwin from trying to interpret the MSYS/Windows paths | |
| 50 | +embedded in the dependency files. If all goes well, you should get a | |
| 51 | +passing test suite. | |
| 40 | 52 | |
| 41 | - * Copy the gcc runtime DLL into libqpdf/build | |
| 53 | +Building with MSVC .NET 2008 Express | |
| 54 | +==================================== | |
| 42 | 55 | |
| 43 | -From a Cygwin environment: | |
| 56 | +These instructions would likely work with newer version of MSVC or | |
| 57 | +with full version of MSVC. They may also work with .NET 2005. They | |
| 58 | +have only been tested with .NET 2008 Express. | |
| 44 | 59 | |
| 45 | - * Add the full path libqpdf/build to your path | |
| 60 | +It's possible that the MSVC build may work from MSYS, but since cygwin | |
| 61 | +is needed to run the test suite, these have only been tested from | |
| 62 | +cygwin. | |
| 46 | 63 | |
| 47 | - * Run | |
| 64 | +You should first set up your environment to be able to run MSVC from | |
| 65 | +the command line. There is usually a batch file included with MSVC | |
| 66 | +that does this. From that cmd prompt, you can start your cygwin | |
| 67 | +shell. | |
| 48 | 68 | |
| 49 | - make check GENDEPS=0 | |
| 69 | +Configure as follows: | |
| 50 | 70 | |
| 51 | -This will run the qtest-based test suite, which requires cygwin. You | |
| 52 | -need perl, gnu diffutils, and basic shell commands. | |
| 71 | + CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc | |
| 72 | + make | |
| 53 | 73 | |
| 54 | -As of this writing, the image comparison tests confuse ghostscript in | |
| 55 | -cygwin, but there's a chance they might work at some point. If you | |
| 56 | -want to run them, you need ghostscript and tiff utils as well. Then | |
| 57 | -omit --disable-test-compare-images from your configure statement. | |
| 74 | +Then add the full path to the libqpdf/build directory to your path and | |
| 75 | +run | |
| 76 | + | |
| 77 | + make check | |
| 78 | + | |
| 79 | +to run the test suite. | |
| 58 | 80 | |
| 59 | 81 | If you are building with MSVC and want to debug a crash in MSVC's |
| 60 | 82 | debugger, first start an instance of Visual C++. Then run qpdf. When |
| 61 | 83 | the abort/retry/ignore dialog pops up, first attach the process from |
| 62 | 84 | within visual C++, and then click Retry in qpdf. |
| 85 | + | |
| 86 | +A release version of qpdf is built by default. You will probably have | |
| 87 | +to edit msvc.mk to change /MD to /MDd to build a debugging version. | |
| 88 | +It has also been attempted to build qpdf with /MT, but it does not | |
| 89 | +pass its test suite in this configuration. I have not investigated. | ... | ... |
TODO
| 1 | 1 | 2.1 |
| 2 | 2 | === |
| 3 | 3 | |
| 4 | - * Remember to update documentation with Windows build instructions. | |
| 5 | - Search for Windows (case insensitive to be safe). Update | |
| 6 | - README.windows. | |
| 4 | + * Update documentation to reflect new command line flags and any | |
| 5 | + other relevant changes. Should read through ChangeLog and the | |
| 6 | + manual before releasing 2.1. | |
| 7 | + | |
| 8 | + * Add comments for the security functions that map them back to the | |
| 9 | + items in Adobe's products. | |
| 10 | + | |
| 11 | + * Have force version at least turn off object streams and maybe | |
| 12 | + change security settings? | |
| 13 | + | |
| 14 | + * Add error codes to QPDFException. Change the error interface so | |
| 15 | + that warnings and errors are pointers that can be queried using | |
| 16 | + more C API functions. We need a way to get a full string as well | |
| 17 | + as an error code, file name, offset, and message. We should go | |
| 18 | + through all error messages to try to include all these fields as | |
| 19 | + appropriate. Make sure invalid password is specifically | |
| 20 | + detectable. I/O errors and so forth should also be | |
| 21 | + distinguishable. | |
| 22 | + | |
| 23 | + * Test DLL works on a fresh XP installation | |
| 7 | 24 | |
| 8 | 25 | * "Delphi wrapper unit 'qpdf.pas' created by Zarko Gajic |
| 9 | 26 | (http://delphi.about.com). .. use at your own risk and for whatever | ... | ... |
manual/qpdf-manual.xml
| ... | ... | @@ -179,11 +179,10 @@ make |
| 179 | 179 | <filename>INSTALL</filename> files in the source distribution. |
| 180 | 180 | </para> |
| 181 | 181 | <para> |
| 182 | - There is currently no support for building qpdf on Windows. The | |
| 183 | - code is reasonably portable, however, and making it work on | |
| 184 | - Windows would probably be reasonably straightforward. A | |
| 185 | - significant amount of the code in QPDF has been known to work on | |
| 186 | - Windows in the past. | |
| 182 | + Building on Windows is a little bit more complicated. For | |
| 183 | + details, please see <filename>README.windows</filename> in the | |
| 184 | + source distribution. You can also download a binary distribution | |
| 185 | + for Windows. | |
| 187 | 186 | </para> |
| 188 | 187 | <para> |
| 189 | 188 | There are some other things you can do with the build. Although | ... | ... |