mirror of
https://github.com/qpdf/qpdf.git
synced 2024-10-31 19:02:30 +00:00
notes
git-svn-id: svn+q:///qpdf/trunk@866 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
6e7e9be94a
commit
ae4c6166a1
@ -16,24 +16,23 @@ Building with MinGW
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
QPDF is known to build and pass its test suite with MSYS-1.0.11 and
|
QPDF is known to build and pass its test suite with MSYS-1.0.11 and
|
||||||
gcc 4.4.0 with C++ support. You can fully configure and build qpdf in
|
gcc 4.4.0 with C++ support. If you also have ActiveState Perl in your
|
||||||
this environment, though cygwin is required to run the test suite.
|
path, you can fully configure, build, and test qpdf in this
|
||||||
You will most likely not be able to build qpdf with mingw using
|
environment. You will most likely not be able to build qpdf with
|
||||||
cygwin, though it's possible that it could be made to work with gcc
|
mingw using cygwin.
|
||||||
-mno-cygwin.
|
|
||||||
|
|
||||||
From your MSYS prompt, run
|
From your MSYS prompt, run
|
||||||
|
|
||||||
./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=mingw
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
./config-mingw
|
./config-mingw
|
||||||
|
|
||||||
and then
|
and then
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
|
Note that ./config-mingw just runs ./configure with specific
|
||||||
|
arguments, so you can look at it, make adjustments, and manually run
|
||||||
|
configure instead.
|
||||||
|
|
||||||
Add the absolute path to the libqpdf/build directory to your PATH.
|
Add the absolute path to the libqpdf/build directory to your PATH.
|
||||||
Make sure you can run the qpdf command by typing qpdf/build/qpdf and
|
Make sure you can run the qpdf command by typing qpdf/build/qpdf and
|
||||||
making sure you get a help message rather than an error loading the
|
making sure you get a help message rather than an error loading the
|
||||||
@ -43,13 +42,20 @@ DLL or no output at all. Run the test suite by typing
|
|||||||
|
|
||||||
If all goes well, you should get a passing test suite.
|
If all goes well, you should get a passing test suite.
|
||||||
|
|
||||||
|
To create an installation directory, run make install. This will
|
||||||
|
create install-mingw/qpdf-VERSION and populate it. The binary
|
||||||
|
download of qpdf for Windows with mingw is created from this
|
||||||
|
directory.
|
||||||
|
|
||||||
|
|
||||||
Building with MSVC .NET 2008 Express
|
Building with MSVC .NET 2008 Express
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
These instructions would likely work with newer version of MSVC or
|
These instructions would likely work with newer version of MSVC or
|
||||||
with full version of MSVC. They may also work with .NET 2005. They
|
with full version of MSVC. They may also work with .NET 2005. They
|
||||||
have only been tested with .NET 2008 Express. You may follow these
|
have only been tested with .NET 2008 Express (VC9.0). You may follow
|
||||||
instructions from either Cygwin or from MSYS.
|
these instructions from either Cygwin or from MSYS, though only MSYS
|
||||||
|
is regularly tested.
|
||||||
|
|
||||||
You should first set up your environment to be able to run MSVC from
|
You should first set up your environment to be able to run MSVC from
|
||||||
the command line. There is usually a batch file included with MSVC
|
the command line. There is usually a batch file included with MSVC
|
||||||
@ -58,27 +64,22 @@ shell.
|
|||||||
|
|
||||||
Configure as follows:
|
Configure as follows:
|
||||||
|
|
||||||
CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
./config-msvc
|
./config-msvc
|
||||||
|
|
||||||
and then
|
and then
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
|
Note that ./config-msvc just runs ./configure with specific arguments,
|
||||||
|
so you can look at it, make adjustments, and manually run configure
|
||||||
|
instead.
|
||||||
|
|
||||||
NOTE: automated dependencies are not generated with the msvc build.
|
NOTE: automated dependencies are not generated with the msvc build.
|
||||||
If you're planning on making modifications, you should probably work
|
If you're planning on making modifications, you should probably work
|
||||||
with mingw. If there is a need, I can add dependency information to
|
with mingw. If there is a need, I can add dependency information to
|
||||||
the msvc build, but since I only use it for generating release
|
the msvc build, but since I only use it for generating release
|
||||||
versions, I haven't bothered.
|
versions, I haven't bothered.
|
||||||
|
|
||||||
The -DHAVE_VSNPRINTF is really only required for things that include
|
|
||||||
zutil.h from zlib. You don't have to worry about this when compiling
|
|
||||||
against qpdf with MSVC -- only when building zlib. It's harmless to
|
|
||||||
include with the rest of the qpdf build.
|
|
||||||
|
|
||||||
Once built, add the full path to the libqpdf/build directory to your
|
Once built, add the full path to the libqpdf/build directory to your
|
||||||
path and run
|
path and run
|
||||||
|
|
||||||
@ -91,53 +92,25 @@ debugger, first start an instance of Visual C++. Then run qpdf. When
|
|||||||
the abort/retry/ignore dialog pops up, first attach the process from
|
the abort/retry/ignore dialog pops up, first attach the process from
|
||||||
within visual C++, and then click Retry in qpdf.
|
within visual C++, and then click Retry in qpdf.
|
||||||
|
|
||||||
A release version of qpdf is built by default. You will probably have
|
A release version of qpdf is built by default. If you want to link
|
||||||
to edit msvc.mk to change /MD to /MDd to build a debugging version.
|
against debugging libraries, you will have to change /MD to /MDd in
|
||||||
Note that you must redistribute the Microsoft runtime DLLs. Linking
|
make/msvc.mk. Note that you must redistribute the Microsoft runtime
|
||||||
with static runtime won't work; see "Static Runtime" below for
|
DLLs. Linking with static runtime (/MT) won't work; see "Static
|
||||||
details.
|
Runtime" below for details.
|
||||||
|
|
||||||
|
|
||||||
Runtime DLLs
|
Runtime DLLs
|
||||||
============
|
============
|
||||||
|
|
||||||
Both build methods create executables and DLLs that are dependent on
|
Both build methods create executables and DLLs that are dependent on
|
||||||
the compiler's runtime DLLs. You can find out which DLLs are required
|
the compiler's runtime DLLs. When you run make install, the
|
||||||
by using objdump. For any DLLs that are not standard on any Windows
|
installation process will automatically detect the DLLs and copy them
|
||||||
system, you will need to copy those into the directory with the exe
|
into the installation bin directory. Look at the copy_dlls script for
|
||||||
and the qpdf DLL in order for the application to work outside the
|
details on how this is accomplished.
|
||||||
development environment. You don't need KERNEL32.dll, or msvcrt.dll
|
|
||||||
as those are standard.
|
|
||||||
|
|
||||||
To discover which DLLs you need, you can run
|
|
||||||
|
|
||||||
objdump -p qpdf/build/qpdf.exe | grep DLL
|
|
||||||
|
|
||||||
To find the path to the DLL, you can use type -P, as in
|
|
||||||
|
|
||||||
type -P libgcc_s_dw2-1.dll
|
|
||||||
|
|
||||||
replacing libgcc_s_dw2-1.dll with whatever gcc DLL is shown, if
|
|
||||||
different. For MSVC, you will probably need two DLLs. Keep in mind
|
|
||||||
that Microsoft does not allow redistribution of the debugging DLLs.
|
|
||||||
qpdf's build does not depend on them by default, however.
|
|
||||||
|
|
||||||
Redistribution of the runtime DLL is unavoidable as of this writing;
|
Redistribution of the runtime DLL is unavoidable as of this writing;
|
||||||
see "Static Runtime" below for details.
|
see "Static Runtime" below for details.
|
||||||
|
|
||||||
Installing
|
|
||||||
==========
|
|
||||||
|
|
||||||
As of this writing, make install doesn't work with Windows since it is
|
|
||||||
hard-coded to use libtool. Until that time, you can install manually
|
|
||||||
by looking at the install target in Makefile and gathering up the
|
|
||||||
appropriate pieces by hand. If building with mingw, be sure to run
|
|
||||||
strip on the DLL and EXE files to make them much smaller. This is not
|
|
||||||
necessary with msvc since it stores debugging information in a
|
|
||||||
separate file. Note that, in both cases, compiling with debugging
|
|
||||||
flags adds extra data to the symbol table and not to the resulting
|
|
||||||
executables. (Compiling with debugging flags, with msvc, is distinct
|
|
||||||
from directing the compiler to use debugging runtime libraries, which
|
|
||||||
does make a difference.)
|
|
||||||
|
|
||||||
Static Runtime
|
Static Runtime
|
||||||
==============
|
==============
|
||||||
|
11
TODO
11
TODO
@ -8,17 +8,16 @@
|
|||||||
* Write documentation section on source-level API changes between 2.0
|
* Write documentation section on source-level API changes between 2.0
|
||||||
and 2.1.
|
and 2.1.
|
||||||
|
|
||||||
|
* Really need to get rid of embedded external libs. We can either
|
||||||
|
provide them separately for Windows or provide instructions for
|
||||||
|
building them. Remember to remove -DHAVE_VSNPRINTF from
|
||||||
|
config-msvc and to remove --enable-build-external-libs from both.
|
||||||
|
|
||||||
* Windows release: config for both compilers, make install. Create
|
* Windows release: config for both compilers, make install. Create
|
||||||
zip files. Probably should put the compiler name somewhere in the
|
zip files. Probably should put the compiler name somewhere in the
|
||||||
directory (qpdf-version-compiler?). Need some kind of "what to
|
directory (qpdf-version-compiler?). Need some kind of "what to
|
||||||
download" file.
|
download" file.
|
||||||
|
|
||||||
* Make install for windows: copy system DLLs as needed excluding
|
|
||||||
msvcrt and kernel32. Update README.windows in this case including
|
|
||||||
taking out the mention of strip since it should be handled by the
|
|
||||||
install step. Make sure it works to link with the static library
|
|
||||||
when the dll is not in the same directory.
|
|
||||||
|
|
||||||
* Add comments for the security functions that map them back to the
|
* Add comments for the security functions that map them back to the
|
||||||
items in Adobe's products.
|
items in Adobe's products.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user