Procházet zdrojové kódy

Started working on a Makefile to get PDFHummus to compile
under the minGW build environment.

wes před 5 roky
rodič
revize
fa33485a4c

+ 48 - 0
PDFHummus-minGW-tools/Makefile

@@ -0,0 +1,48 @@
+#  was receiving these errors ["C:\Program: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)] when g++ -I parameter, had a double quoted string
+
+# get a list of all cpp files in the PDFHummus/PDFWriter directory
+files := $(wildcard *.cpp)
+all : $(files:.cpp=.o)
+
+# ft2build.h
+ANSIFontWriter.o \
+AbstractContentContext.o \
+CFFANSIFontWriter.o \
+CFFDescendentFontWriter.o \
+CFFEmbeddedFontWriter.o \
+CIDFontWriter.o \
+DescendentFontWriter.o \
+FontDescriptorWriter.o \
+FreeTypeFaceWrapper.o \
+FreeTypeOpenTypeWrapper.o \
+FreeTypeWrapper.o \
+PDFUsedFont.o \
+TrueTypeANSIFontWriter.o \
+TrueTypeDescendentFontWriter.o \
+TrueTypeEmbeddedFontWriter.o \
+Type1ToCFFEmbeddedFontWriter.o \
+UsedFontsRepository.o :
+	g++ -c $(@:.o=.cpp) -I 'C:/Users/bad-p/Downloads/freetype2/include'
+
+# aescpp.h
+DecryptionHelper.o \
+EncryptionHelper.o : 
+	g++ -c $(@:.o=.cpp) -I '../LibAesgm'
+
+# zlib.h
+InputFlateDecodeStream.o \
+OutputFlateDecodeStream.o \
+OutputFlateEncodeStream.o : 
+	g++ -c $(@:.o=.cpp) -I '../Zlib'
+
+# jpeglib.h
+PDFParser.o :
+	g++ -c $(@:.o=.cpp) -I '../LibJpeg'
+
+# png.h
+PNGImageHandler.o :
+	g++ -c $(@:.o=.cpp) -I '../LibPng'
+
+# tiffconf.h
+TIFFImageHandler.o : 
+	g++ -c $(@:.o=.cpp) -I '../LibTiff'

+ 11 - 0
PDFHummus-minGW-tools/notes.txt

@@ -0,0 +1,11 @@
+Today - we compiled all the .cpp files into object files. 
+The PDFHummus codebase did not have a build for anything other than
+MSVC. Tried to compile PDFWriter.cpp, but there were a huge amount of missing
+dependencies (both in source type declarations & missing include files).
+
+Previously, these were handled in the build tool, so we had to create a new build tool
+that also handled these problems. We found that nearly all (127) out of 152 source files,
+could be compiled without any dependency problems but that left 25 files to hunt down.
+Each of the files was put into a Makefile along with special compile flags to get them to 
+compile successfully. 
+At this point freetype2 has been compiled, but the other external libraries(e.g. libpng, zlib, libjpg, tiff, etc) need to be compiled so that we can link together an executable.

+ 4 - 0
snippets/pdfhummusCompileTroubleshoot

@@ -0,0 +1,4 @@
+ 
+ 
+ g++ PDFWriter.cpp -I "C:\Users\bad-p\Downloads\freetype2\include" -include "string" -I "..\Zlib" -I "..\LibJpeg" -I "../LibAesgm"  -w 2>&1 
+|sed 's/.*undefined/undefined/g' |grep 'undefined' |cut -d ' ' -f4 |sed 's/::.*$//g' |sort |uniq