Commit ae4c6166a1d35e89fc7409045ce23837aaa89082

Authored by Jay Berkenbilt
1 parent 6e7e9be9

notes

git-svn-id: svn+q:///qpdf/trunk@866 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing 2 changed files with 36 additions and 64 deletions
README.windows
@@ -16,24 +16,23 @@ Building with MinGW @@ -16,24 +16,23 @@ Building with MinGW
16 =================== 16 ===================
17 17
18 QPDF is known to build and pass its test suite with MSYS-1.0.11 and 18 QPDF is known to build and pass its test suite with MSYS-1.0.11 and
19 -gcc 4.4.0 with C++ support. You can fully configure and build qpdf in  
20 -this environment, though cygwin is required to run the test suite.  
21 -You will most likely not be able to build qpdf with mingw using  
22 -cygwin, though it's possible that it could be made to work with gcc  
23 --mno-cygwin. 19 +gcc 4.4.0 with C++ support. If you also have ActiveState Perl in your
  20 +path, you can fully configure, build, and test qpdf in this
  21 +environment. You will most likely not be able to build qpdf with
  22 +mingw using cygwin.
24 23
25 From your MSYS prompt, run 24 From your MSYS prompt, run
26 25
27 - ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=mingw  
28 -  
29 -or  
30 -  
31 ./config-mingw 26 ./config-mingw
32 27
33 and then 28 and then
34 29
35 make 30 make
36 31
  32 +Note that ./config-mingw just runs ./configure with specific
  33 +arguments, so you can look at it, make adjustments, and manually run
  34 +configure instead.
  35 +
37 Add the absolute path to the libqpdf/build directory to your PATH. 36 Add the absolute path to the libqpdf/build directory to your PATH.
38 Make sure you can run the qpdf command by typing qpdf/build/qpdf and 37 Make sure you can run the qpdf command by typing qpdf/build/qpdf and
39 making sure you get a help message rather than an error loading the 38 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 @@ -43,13 +42,20 @@ DLL or no output at all. Run the test suite by typing
43 42
44 If all goes well, you should get a passing test suite. 43 If all goes well, you should get a passing test suite.
45 44
  45 +To create an installation directory, run make install. This will
  46 +create install-mingw/qpdf-VERSION and populate it. The binary
  47 +download of qpdf for Windows with mingw is created from this
  48 +directory.
  49 +
  50 +
46 Building with MSVC .NET 2008 Express 51 Building with MSVC .NET 2008 Express
47 ==================================== 52 ====================================
48 53
49 These instructions would likely work with newer version of MSVC or 54 These instructions would likely work with newer version of MSVC or
50 with full version of MSVC. They may also work with .NET 2005. They 55 with full version of MSVC. They may also work with .NET 2005. They
51 -have only been tested with .NET 2008 Express. You may follow these  
52 -instructions from either Cygwin or from MSYS. 56 +have only been tested with .NET 2008 Express (VC9.0). You may follow
  57 +these instructions from either Cygwin or from MSYS, though only MSYS
  58 +is regularly tested.
53 59
54 You should first set up your environment to be able to run MSVC from 60 You should first set up your environment to be able to run MSVC from
55 the command line. There is usually a batch file included with MSVC 61 the command line. There is usually a batch file included with MSVC
@@ -58,27 +64,22 @@ shell. @@ -58,27 +64,22 @@ shell.
58 64
59 Configure as follows: 65 Configure as follows:
60 66
61 - CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc  
62 -  
63 -or  
64 -  
65 ./config-msvc 67 ./config-msvc
66 68
67 and then 69 and then
68 70
69 make 71 make
70 72
  73 +Note that ./config-msvc just runs ./configure with specific arguments,
  74 +so you can look at it, make adjustments, and manually run configure
  75 +instead.
  76 +
71 NOTE: automated dependencies are not generated with the msvc build. 77 NOTE: automated dependencies are not generated with the msvc build.
72 If you're planning on making modifications, you should probably work 78 If you're planning on making modifications, you should probably work
73 with mingw. If there is a need, I can add dependency information to 79 with mingw. If there is a need, I can add dependency information to
74 the msvc build, but since I only use it for generating release 80 the msvc build, but since I only use it for generating release
75 versions, I haven't bothered. 81 versions, I haven't bothered.
76 82
77 -The -DHAVE_VSNPRINTF is really only required for things that include  
78 -zutil.h from zlib. You don't have to worry about this when compiling  
79 -against qpdf with MSVC -- only when building zlib. It's harmless to  
80 -include with the rest of the qpdf build.  
81 -  
82 Once built, add the full path to the libqpdf/build directory to your 83 Once built, add the full path to the libqpdf/build directory to your
83 path and run 84 path and run
84 85
@@ -91,53 +92,25 @@ debugger, first start an instance of Visual C++. Then run qpdf. When @@ -91,53 +92,25 @@ debugger, first start an instance of Visual C++. Then run qpdf. When
91 the abort/retry/ignore dialog pops up, first attach the process from 92 the abort/retry/ignore dialog pops up, first attach the process from
92 within visual C++, and then click Retry in qpdf. 93 within visual C++, and then click Retry in qpdf.
93 94
94 -A release version of qpdf is built by default. You will probably have  
95 -to edit msvc.mk to change /MD to /MDd to build a debugging version.  
96 -Note that you must redistribute the Microsoft runtime DLLs. Linking  
97 -with static runtime won't work; see "Static Runtime" below for  
98 -details. 95 +A release version of qpdf is built by default. If you want to link
  96 +against debugging libraries, you will have to change /MD to /MDd in
  97 +make/msvc.mk. Note that you must redistribute the Microsoft runtime
  98 +DLLs. Linking with static runtime (/MT) won't work; see "Static
  99 +Runtime" below for details.
  100 +
99 101
100 Runtime DLLs 102 Runtime DLLs
101 ============ 103 ============
102 104
103 Both build methods create executables and DLLs that are dependent on 105 Both build methods create executables and DLLs that are dependent on
104 -the compiler's runtime DLLs. You can find out which DLLs are required  
105 -by using objdump. For any DLLs that are not standard on any Windows  
106 -system, you will need to copy those into the directory with the exe  
107 -and the qpdf DLL in order for the application to work outside the  
108 -development environment. You don't need KERNEL32.dll, or msvcrt.dll  
109 -as those are standard.  
110 -  
111 -To discover which DLLs you need, you can run  
112 -  
113 - objdump -p qpdf/build/qpdf.exe | grep DLL  
114 -  
115 -To find the path to the DLL, you can use type -P, as in  
116 -  
117 - type -P libgcc_s_dw2-1.dll  
118 -  
119 -replacing libgcc_s_dw2-1.dll with whatever gcc DLL is shown, if  
120 -different. For MSVC, you will probably need two DLLs. Keep in mind  
121 -that Microsoft does not allow redistribution of the debugging DLLs.  
122 -qpdf's build does not depend on them by default, however. 106 +the compiler's runtime DLLs. When you run make install, the
  107 +installation process will automatically detect the DLLs and copy them
  108 +into the installation bin directory. Look at the copy_dlls script for
  109 +details on how this is accomplished.
123 110
124 Redistribution of the runtime DLL is unavoidable as of this writing; 111 Redistribution of the runtime DLL is unavoidable as of this writing;
125 see "Static Runtime" below for details. 112 see "Static Runtime" below for details.
126 113
127 -Installing  
128 -==========  
129 -  
130 -As of this writing, make install doesn't work with Windows since it is  
131 -hard-coded to use libtool. Until that time, you can install manually  
132 -by looking at the install target in Makefile and gathering up the  
133 -appropriate pieces by hand. If building with mingw, be sure to run  
134 -strip on the DLL and EXE files to make them much smaller. This is not  
135 -necessary with msvc since it stores debugging information in a  
136 -separate file. Note that, in both cases, compiling with debugging  
137 -flags adds extra data to the symbol table and not to the resulting  
138 -executables. (Compiling with debugging flags, with msvc, is distinct  
139 -from directing the compiler to use debugging runtime libraries, which  
140 -does make a difference.)  
141 114
142 Static Runtime 115 Static Runtime
143 ============== 116 ==============
@@ -8,17 +8,16 @@ @@ -8,17 +8,16 @@
8 * Write documentation section on source-level API changes between 2.0 8 * Write documentation section on source-level API changes between 2.0
9 and 2.1. 9 and 2.1.
10 10
  11 + * Really need to get rid of embedded external libs. We can either
  12 + provide them separately for Windows or provide instructions for
  13 + building them. Remember to remove -DHAVE_VSNPRINTF from
  14 + config-msvc and to remove --enable-build-external-libs from both.
  15 +
11 * Windows release: config for both compilers, make install. Create 16 * Windows release: config for both compilers, make install. Create
12 zip files. Probably should put the compiler name somewhere in the 17 zip files. Probably should put the compiler name somewhere in the
13 directory (qpdf-version-compiler?). Need some kind of "what to 18 directory (qpdf-version-compiler?). Need some kind of "what to
14 download" file. 19 download" file.
15 20
16 - * Make install for windows: copy system DLLs as needed excluding  
17 - msvcrt and kernel32. Update README.windows in this case including  
18 - taking out the mention of strip since it should be handled by the  
19 - install step. Make sure it works to link with the static library  
20 - when the dll is not in the same directory.  
21 -  
22 * Add comments for the security functions that map them back to the 21 * Add comments for the security functions that map them back to the
23 items in Adobe's products. 22 items in Adobe's products.
24 23