README.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. 1. Download the PDFHummus/PDFWriter source code: https://github.com/galkahana/PDF-Writer
  2. This library only has build instructions for MSVC toolchains within Visual Studio 2017/2019.
  3. create folders PDFWriter\dependencies\lib\ and PDFWriter\dependencies\include
  4. 2. Use VCPKG to install the following libraries necessary for PDFHummus:
  5. libtiff, libjpeg, libpng, and zlib
  6. 3. Download freetype from: git://git.savannah.gnu.org/freetype/freetype2.git
  7. From the freetype2 source code root directory use Msys and run the following commands:
  8. mingw32-make setup mingw32
  9. mingw32-make
  10. cp -r include\* ..\PDFHummus\PDFWriter\dependencies\include\
  11. cp objs\libfreetype.a ..\PDFHummus\PDFWriter\dependencies\lib\
  12. 4. The PDFHummus/PDFWriter source code includes a copy of the source code for LibAesgm in a folder with the same name.
  13. Go into this folder and run the following commands to generate the library:
  14. // fpermissive is needed because the author chose to implicitly switch between pointers of uint_8 and char.
  15. g++ -c -fpermissive *.o
  16. ar -cvq aesgm.lib *.o
  17. g++ -I "C:\Users\bad-p\Downloads\PDFHummus-build\PDFHummus\LibAesgm"
  18. 5.
  19. Download libtiff from: https://gitlab.com/libtiff/libtiff
  20. After compiling the libtiff library with the Cmake file, all object files are located in C:\Users\bad-p\Downloads\TRASH\libtiff-master\build\libtiff\CMakeFiles\tiff.dir
  21. Download libpng from: https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz/download?use_mirror=newcontinuum
  22. After compiling the libpng library with the Cmake file, all object files are located in C:\Users\bad-p\Downloads\TRASH\libpng-1.6.37\build\CMakeFiles\png_static.dir
  23. Download libjpeg from:https://sourceforge.net/projects/libjpeg/files/
  24. After compiling the libjpeg library with the Cmake file, all object files are located in C:\Users\bad-p\Downloads\TRASH\jpeg-6b
  25. Download zlib from: https://www.zlib.net/
  26. After compiling the zlib library with the Cmake file, all object files are located in C:\Users\bad-p\Downloads\TRASH\zlib-1.2.11
  27. For all CMake instructions create a build directory in the source root. CD in to build, run Cmake .. for windows using msys pass the 'Cmake .. -G "MSYS Makefiles"'
  28. build option to generate a makefile appropiate for msys; You can use make afterwards to compile as normal.
  29. After all of the object files are moved into the same folder, generate a library for PDFWriter.
  30. ar -cvq PDFWriter.lib *.o