]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/crashrpt/001-add-install-target-and-find-deps.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / crashrpt / 001-add-install-target-and-find-deps.patch
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 44d7df0..ed9e3d3 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -17,6 +17,9 @@ set (CRASHRPT_VER 1403)
6 # Build options
7 option(CRASHRPT_BUILD_SHARED_LIBS "If set (default), CrashRpt modules are built as dynamic-link libraries, otherwise as static libs." ON)
8 option(CRASHRPT_LINK_CRT_AS_DLL "If set (default), CrashRpt modules link C run-time (CRT) as multi-threaded dynamic libraries, otherwise as multi-threaded static libs." ON)
9 +option(CRASHRPT_BUILD_PROBE "If set (default), CrashRpt builds the CrashRptProbe project." ON)
10 +option(CRASHRPT_BUILD_DEMOS "If set (default), CrashRpt builds the demo projects." ON)
11 +option(CRASHRPT_BUILD_TESTS "If set (default), CrashRpt builds the test projects." ON)
12
13 # Set output directory for executable files
14 if(CMAKE_CL_64)
15 @@ -94,19 +97,65 @@ macro(fix_default_compiler_settings_)
16
17 endmacro()
18
19 +find_package(ZLIB REQUIRED)
20 +find_package(PNG REQUIRED)
21 +find_package(Ogg REQUIRED)
22 +find_package(JPEG REQUIRED)
23 +
24 +find_library(THEORA_LIBRARY theora)
25 +if(NOT THEORA_LIBRARY)
26 + message(FATAL_ERROR "theora library not found")
27 +endif()
28 +
29 +find_path(THEORA_INCLUDE_DIR theora/theora.h)
30 +if(NOT THEORA_INCLUDE_DIR)
31 + message(FATAL_ERROR "theora include dir not found")
32 +endif()
33 +
34 +find_library(TINYXML_LIBRARY NAMES tinyxml)
35 +if(NOT TINYXML_LIBRARY)
36 + message(FATAL_ERROR "tinyxml library not found")
37 +endif()
38 +
39 +find_path(TINYXML_INCLUDE_DIR tinyxml.h)
40 +if(NOT TINYXML_INCLUDE_DIR)
41 + message(FATAL_ERROR "tinyxml include dir not found")
42 +endif()
43 +
44 +find_path(WTL_INCLUDE_DIR wtl/atlapp.h)
45 +if(NOT WTL_INCLUDE_DIR)
46 + message(FATAL_ERROR "WTL include dir not found")
47 +endif()
48 +
49 +find_library(DBGHELP_LIBRARY dbghelp)
50 +if(NOT DBGHELP_LIBRARY)
51 + message(FATAL_ERROR "dbghelp library not found")
52 +endif()
53 +
54 +find_path(DBGHELP_INCLUDE_DIR dbghelp.h)
55 +if(NOT DBGHELP_INCLUDE_DIR)
56 + message(FATAL_ERROR "dbghelp include dir not found")
57 +endif()
58 +
59 # Other CMakeLists are located in project subdirectories
60
61 +if(CRASHRPT_BUILD_DEMOS)
62 add_subdirectory("demos/ConsoleDemo")
63 add_subdirectory("demos/WTLDemo")
64 add_subdirectory("demos/MFCDemo")
65 +endif()
66
67 add_subdirectory("reporting/crashrpt")
68 add_subdirectory("reporting/crashsender")
69
70 +if(CRASHRPT_BUILD_PROBE)
71 add_subdirectory("processing/crashrptprobe")
72 add_subdirectory("processing/crprober")
73 +endif()
74
75 +if(CRASHRPT_BUILD_TESTS)
76 add_subdirectory("tests")
77 +endif()
78
79 # Set output directory for LIB files
80 if(CMAKE_CL_64)
81 @@ -117,13 +166,13 @@ else(CMAKE_CL_64)
82 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/thirdparty/lib)
83 endif(CMAKE_CL_64)
84
85 -add_subdirectory("thirdparty/tinyxml")
86 -add_subdirectory("thirdparty/jpeg")
87 -add_subdirectory("thirdparty/libpng")
88 +#add_subdirectory("thirdparty/tinyxml")
89 +#add_subdirectory("thirdparty/jpeg")
90 +#add_subdirectory("thirdparty/libpng")
91 add_subdirectory("thirdparty/minizip")
92 -add_subdirectory("thirdparty/zlib")
93 -add_subdirectory("thirdparty/libogg")
94 -add_subdirectory("thirdparty/libtheora")
95 +#add_subdirectory("thirdparty/zlib")
96 +#add_subdirectory("thirdparty/libogg")
97 +#add_subdirectory("thirdparty/libtheora")
98
99
100
101 diff --git a/demos/ConsoleDemo/CMakeLists.txt b/demos/ConsoleDemo/CMakeLists.txt
102 index e47ef4c..4df7b12 100644
103 --- a/demos/ConsoleDemo/CMakeLists.txt
104 +++ b/demos/ConsoleDemo/CMakeLists.txt
105 @@ -12,12 +12,12 @@ fix_default_compiler_settings_()
106 # Add include dir
107 include_directories(${CMAKE_SOURCE_DIR}/include
108 ${CMAKE_SOURCE_DIR}/reporting/CrashRpt
109 - ${CMAKE_SOURCE_DIR}/thirdparty/wtl
110 - ${CMAKE_SOURCE_DIR}/thirdparty/zlib
111 + ${WTL_INCLUDE_DIR}
112 + ${ZLIB_INCLUDE_DIRS}
113 ${CMAKE_SOURCE_DIR}/thirdparty/minizip
114 - ${CMAKE_SOURCE_DIR}/thirdparty/jpeg
115 - ${CMAKE_SOURCE_DIR}/thirdparty/libpng
116 - ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml )
117 + ${JPEG_INCLUDE_DIR}
118 + ${PNG_INCLUDE_DIRS}
119 + ${TINYXML_INCLUDE_DIR} )
120
121 # Add executable build target
122 add_executable(ConsoleDemo ${source_files} ${header_files})
123 @@ -26,3 +26,7 @@ add_executable(ConsoleDemo ${source_files} ${header_files})
124 target_link_libraries(ConsoleDemo CrashRpt)
125
126 set_target_properties(ConsoleDemo PROPERTIES DEBUG_POSTFIX d )
127 +
128 +install(TARGETS ConsoleDemo
129 + RUNTIME DESTINATION tools/crashrpt
130 +)
131 diff --git a/demos/MFCDemo/CMakeLists.txt b/demos/MFCDemo/CMakeLists.txt
132 index a250ecc..ade93cb 100644
133 --- a/demos/MFCDemo/CMakeLists.txt
134 +++ b/demos/MFCDemo/CMakeLists.txt
135 @@ -44,7 +44,7 @@ if(CMAKE_CL_64)
136 ADD_CUSTOM_COMMAND(
137 TARGET WTLDemo
138 POST_BUILD
139 - COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
140 + #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
141 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
142 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
143 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\""
144 @@ -53,9 +53,13 @@ else(CMAKE_CL_64)
145 ADD_CUSTOM_COMMAND(
146 TARGET WTLDemo
147 POST_BUILD
148 - COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\""
149 + #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\""
150 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\""
151 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\""
152 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\""
153 )
154 -endif(CMAKE_CL_64)
155 \ No newline at end of file
156 +endif(CMAKE_CL_64)
157 +
158 +install(TARGETS MFCDemo
159 + RUNTIME DESTINATION tools/crashrpt
160 +)
161 diff --git a/demos/WTLDemo/AboutDlg.h b/demos/WTLDemo/AboutDlg.h
162 index 83eaac0..e96d1c2 100644
163 --- a/demos/WTLDemo/AboutDlg.h
164 +++ b/demos/WTLDemo/AboutDlg.h
165 @@ -33,7 +33,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
166 #pragma once
167 #include "stdafx.h"
168 #include <shellapi.h>
169 -#include <atlctrlx.h>
170 +#include <wtl/atlctrlx.h>
171 #include "CrashRpt.h"
172
173 class CAboutDlg : public CDialogImpl<CAboutDlg>
174 diff --git a/demos/WTLDemo/CMakeLists.txt b/demos/WTLDemo/CMakeLists.txt
175 index 40aaefb..42c0f5a 100644
176 --- a/demos/WTLDemo/CMakeLists.txt
177 +++ b/demos/WTLDemo/CMakeLists.txt
178 @@ -19,7 +19,7 @@ fix_default_compiler_settings_()
179
180 # Add include dir
181 include_directories(${CMAKE_SOURCE_DIR}/include
182 - ${CMAKE_SOURCE_DIR}/thirdparty/wtl)
183 + ${WTL_INCLUDE_DIR})
184
185 # Add executable build target
186 add_executable(WTLDemo WIN32 ${source_files} ${header_files})
187 @@ -36,7 +36,7 @@ if(CMAKE_CL_64)
188 ADD_CUSTOM_COMMAND(
189 TARGET WTLDemo
190 POST_BUILD
191 - COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
192 + #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
193 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
194 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\""
195 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\""
196 @@ -45,9 +45,13 @@ else(CMAKE_CL_64)
197 ADD_CUSTOM_COMMAND(
198 TARGET WTLDemo
199 POST_BUILD
200 - COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\""
201 + #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\""
202 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\""
203 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\""
204 COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\""
205 )
206 -endif(CMAKE_CL_64)
207 \ No newline at end of file
208 +endif(CMAKE_CL_64)
209 +
210 +install(TARGETS WTLDemo
211 + RUNTIME DESTINATION tools/crashrpt
212 +)
213 diff --git a/demos/WTLDemo/DocumentDlg.h b/demos/WTLDemo/DocumentDlg.h
214 index afce8fe..9b47728 100644
215 --- a/demos/WTLDemo/DocumentDlg.h
216 +++ b/demos/WTLDemo/DocumentDlg.h
217 @@ -33,7 +33,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
218 #pragma once
219 #include "stdafx.h"
220 #include <shellapi.h>
221 -#include <atlctrlx.h>
222 +#include <wtl/atlctrlx.h>
223 #include "CrashRpt.h"
224
225 class CDocumentDlg : public CDialogImpl<CDocumentDlg>
226 diff --git a/demos/WTLDemo/WTLDemo.rc b/demos/WTLDemo/WTLDemo.rc
227 index c651841..71f4b39 100644
228 --- a/demos/WTLDemo/WTLDemo.rc
229 +++ b/demos/WTLDemo/WTLDemo.rc
230 @@ -7,7 +7,7 @@
231 //
232 // Generated from the TEXTINCLUDE 2 resource.
233 //
234 -#include "atlres.h"
235 +#include "wtl/atlres.h"
236
237 /////////////////////////////////////////////////////////////////////////////
238 #undef APSTUDIO_READONLY_SYMBOLS
239 @@ -32,7 +32,7 @@ END
240
241 2 TEXTINCLUDE
242 BEGIN
243 - "#include ""atlres.h""\r\n"
244 + "#include ""wtl/atlres.h""\r\n"
245 "\0"
246 END
247
248 diff --git a/demos/WTLDemo/stdafx.h b/demos/WTLDemo/stdafx.h
249 index a601446..658d9e5 100644
250 --- a/demos/WTLDemo/stdafx.h
251 +++ b/demos/WTLDemo/stdafx.h
252 @@ -16,10 +16,10 @@ be found in the Authors.txt file in the root of the source tree.
253 #pragma once
254
255 // Change these values to use different versions
256 -#define WINVER 0x0500
257 +#define WINVER 0x0501
258 #define _WIN32_WINNT 0x0501
259 -#define _WIN32_IE 0x0501
260 -#define _RICHEDIT_VER 0x0200
261 +#define _WIN32_IE 0x0600
262 +#define _RICHEDIT_VER 0x0300
263
264 #include <atldef.h>
265 #if ( _ATL_VER < 0x0800 )
266 @@ -52,18 +52,18 @@ namespace ATL
267 };
268 #endif // _WTL_SUPPORT_SDK_ATL3
269
270 -#include <atlapp.h>
271 +#include <wtl/atlapp.h>
272
273 extern CAppModule _Module;
274
275 #include <atlwin.h>
276
277 -#include <atlframe.h>
278 -#include <atlctrls.h>
279 -#include <atldlgs.h>
280 +#include <wtl/atlframe.h>
281 +#include <wtl/atlctrls.h>
282 +#include <wtl/atldlgs.h>
283
284 #define _WTL_USE_CSTRING
285 -#include <atlmisc.h>
286 +#include <wtl/atlmisc.h>
287
288 #if _MSC_VER>=1400
289 #if defined _M_IX86
290 diff --git a/processing/crashrptprobe/CMakeLists.txt b/processing/crashrptprobe/CMakeLists.txt
291 index a6c692a..c513c6d 100644
292 --- a/processing/crashrptprobe/CMakeLists.txt
293 +++ b/processing/crashrptprobe/CMakeLists.txt
294 @@ -21,11 +21,11 @@ fix_default_compiler_settings_()
295 include_directories( ${CMAKE_SOURCE_DIR}/include
296 ${CMAKE_SOURCE_DIR}/reporting/crashrpt
297 ${CMAKE_SOURCE_DIR}/reporting/crashsender
298 - ${CMAKE_SOURCE_DIR}/thirdparty/wtl
299 - ${CMAKE_SOURCE_DIR}/thirdparty/zlib
300 + ${WTL_INCLUDE_DIR}
301 + ${ZLIB_INCLUDE_DIRS}
302 ${CMAKE_SOURCE_DIR}/thirdparty/minizip
303 - ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml
304 - ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/include)
305 + ${TINYXML_INCLUDE_DIR}
306 + ${DBGHELP_INCLUDE_DIR})
307
308 # Add library build target
309 if(CRASHRPT_BUILD_SHARED_LIBS)
310 @@ -34,15 +34,15 @@ else(CRASHRPT_BUILD_SHARED_LIBS)
311 add_library(CrashRptProbe STATIC ${source_files} ${header_files})
312 endif(CRASHRPT_BUILD_SHARED_LIBS)
313
314 -if(CMAKE_CL_64)
315 - link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 )
316 - target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64/dbghelp.lib)
317 -else(CMAKE_CL_64)
318 - link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib )
319 - target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/dbghelp.lib)
320 -endif(CMAKE_CL_64)
321 +#if(CMAKE_CL_64)
322 +# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 )
323 +# target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64/dbghelp.lib)
324 +#else(CMAKE_CL_64)
325 +# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib )
326 +# target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/dbghelp.lib)
327 +#endif(CMAKE_CL_64)
328
329 -target_link_libraries(CrashRptProbe zlib minizip tinyxml Rpcrt4.lib shell32.lib gdi32.lib version.lib psapi.lib)
330 +target_link_libraries(CrashRptProbe ZLIB::ZLIB minizip ${TINYXML_LIBRARY} ${DBGHELP_LIBRARY} Rpcrt4.lib shell32.lib gdi32.lib version.lib psapi.lib)
331
332 if(CRASHRPT_BUILD_SHARED_LIBS)
333
334 @@ -58,4 +58,11 @@ else(CRASHRPT_BUILD_SHARED_LIBS)
335
336 endif(CRASHRPT_BUILD_SHARED_LIBS)
337
338 +set_target_properties(CrashRptProbe PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/CrashRptProbe.h)
339
340 +INSTALL(TARGETS CrashRptProbe
341 + PUBLIC_HEADER DESTINATION include/crashrpt
342 + LIBRARY
343 + ARCHIVE
344 + RUNTIME
345 +)
346 diff --git a/processing/crashrptprobe/CrashRptProbe.rc b/processing/crashrptprobe/CrashRptProbe.rc
347 index a08f63e..e12b8e9 100644
348 --- a/processing/crashrptprobe/CrashRptProbe.rc
349 +++ b/processing/crashrptprobe/CrashRptProbe.rc
350 @@ -7,7 +7,7 @@
351 //
352 // Generated from the TEXTINCLUDE 2 resource.
353 //
354 -#include "atlres.h"
355 +#include "wtl/atlres.h"
356
357 /////////////////////////////////////////////////////////////////////////////
358 #undef APSTUDIO_READONLY_SYMBOLS
359 @@ -32,7 +32,7 @@ END
360
361 2 TEXTINCLUDE
362 BEGIN
363 - "#include ""atlres.h""\r\n"
364 + "#include ""wtl/atlres.h""\r\n"
365 "\0"
366 END
367
368 diff --git a/processing/crashrptprobe/stdafx.h b/processing/crashrptprobe/stdafx.h
369 index 2b027b2..0b60659 100644
370 --- a/processing/crashrptprobe/stdafx.h
371 +++ b/processing/crashrptprobe/stdafx.h
372 @@ -70,13 +70,13 @@ namespace ATL
373 };
374 #endif // _WTL_SUPPORT_SDK_ATL3
375
376 -#include <atlapp.h>
377 +#include <wtl/atlapp.h>
378 extern CAppModule _Module;
379 #include <atlwin.h>
380
381 // CString-related includes
382 #define _WTL_USE_CSTRING
383 -#include <atlmisc.h>
384 +#include <wtl/atlmisc.h>
385
386 #if _MSC_VER<1400
387 #define WCSNCPY_S(strDest, sizeInBytes, strSource, count) wcsncpy(strDest, strSource, count)
388 diff --git a/processing/crprober/CMakeLists.txt b/processing/crprober/CMakeLists.txt
389 index 046ba57..255e200 100644
390 --- a/processing/crprober/CMakeLists.txt
391 +++ b/processing/crprober/CMakeLists.txt
392 @@ -18,4 +18,8 @@ add_executable(crprober ${source_files} ${header_files})
393 # Add input link libraries
394 target_link_libraries(crprober CrashRptProbe)
395
396 -set_target_properties(crprober PROPERTIES DEBUG_POSTFIX d )
397 \ No newline at end of file
398 +set_target_properties(crprober PROPERTIES DEBUG_POSTFIX d )
399 +
400 +install(TARGETS crprober
401 + RUNTIME DESTINATION tools/crashrpt
402 +)
403 diff --git a/reporting/crashrpt/CMakeLists.txt b/reporting/crashrpt/CMakeLists.txt
404 index 42d40e2..c7e4fd6 100644
405 --- a/reporting/crashrpt/CMakeLists.txt
406 +++ b/reporting/crashrpt/CMakeLists.txt
407 @@ -18,7 +18,7 @@ add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE)
408 fix_default_compiler_settings_()
409
410 # Add include dir
411 -include_directories( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/thirdparty/wtl)
412 +include_directories( ${CMAKE_SOURCE_DIR}/include ${WTL_INCLUDE_DIR})
413
414 # Add library build target
415 if(CRASHRPT_BUILD_SHARED_LIBS)
416 @@ -55,3 +55,11 @@ else(CRASHRPT_BUILD_SHARED_LIBS)
417 RELEASE_POSTFIX LIB )
418 endif(CRASHRPT_BUILD_SHARED_LIBS)
419
420 +set_target_properties(CrashRpt PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/CrashRpt.h)
421 +
422 +INSTALL(TARGETS CrashRpt
423 + PUBLIC_HEADER DESTINATION include/crashrpt
424 + LIBRARY
425 + ARCHIVE
426 + RUNTIME
427 +)
428 diff --git a/reporting/crashrpt/CrashRpt.rc b/reporting/crashrpt/CrashRpt.rc
429 index 95e7502..a8c821b 100644
430 --- a/reporting/crashrpt/CrashRpt.rc
431 +++ b/reporting/crashrpt/CrashRpt.rc
432 @@ -7,7 +7,7 @@
433 //
434 // Generated from the TEXTINCLUDE 2 resource.
435 //
436 -#include "atlres.h"
437 +#include "wtl/atlres.h"
438
439 /////////////////////////////////////////////////////////////////////////////
440 #undef APSTUDIO_READONLY_SYMBOLS
441 @@ -32,7 +32,7 @@ END
442
443 2 TEXTINCLUDE
444 BEGIN
445 - "#include ""atlres.h""\r\n"
446 + "#include ""wtl/atlres.h""\r\n"
447 "\0"
448 END
449
450 diff --git a/reporting/crashrpt/StdAfx.h b/reporting/crashrpt/StdAfx.h
451 index 77d8c36..13bbe50 100644
452 --- a/reporting/crashrpt/StdAfx.h
453 +++ b/reporting/crashrpt/StdAfx.h
454 @@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree.
455 #define WINVER 0x0501
456 #define _WIN32_WINNT 0x0501
457 #define _WIN32_IE 0x0600
458 -#define _RICHEDIT_VER 0x0200
459 +#define _RICHEDIT_VER 0x0300
460
461 #include <errno.h>
462 #include <atldef.h>
463 @@ -54,12 +54,12 @@ namespace ATL
464 };
465 #endif // _WTL_SUPPORT_SDK_ATL3
466
467 -#include <atlapp.h>
468 +#include <wtl/atlapp.h>
469 extern CAppModule _Module;
470 #include <atlwin.h>
471 // CString-related includes
472 #define _WTL_USE_CSTRING
473 -#include <atlmisc.h>
474 +#include <wtl/atlmisc.h>
475 #include <new.h>
476 #include <map>
477 #include <set>
478 diff --git a/reporting/crashsender/CMakeLists.txt b/reporting/crashsender/CMakeLists.txt
479 index 9b444c5..aa4ab8a 100644
480 --- a/reporting/crashsender/CMakeLists.txt
481 +++ b/reporting/crashsender/CMakeLists.txt
482 @@ -22,27 +22,27 @@ fix_default_compiler_settings_()
483 # Add include dir
484 include_directories( ${CMAKE_SOURCE_DIR}/include
485 ${CMAKE_SOURCE_DIR}/reporting/CrashRpt
486 - ${CMAKE_SOURCE_DIR}/thirdparty/wtl
487 - ${CMAKE_SOURCE_DIR}/thirdparty/zlib
488 + ${WTL_INCLUDE_DIR}
489 ${CMAKE_SOURCE_DIR}/thirdparty/minizip
490 - ${CMAKE_SOURCE_DIR}/thirdparty/jpeg
491 - ${CMAKE_SOURCE_DIR}/thirdparty/libpng
492 - ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml
493 - ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/include
494 - ${CMAKE_SOURCE_DIR}/thirdparty/libogg/include
495 - ${CMAKE_SOURCE_DIR}/thirdparty/libtheora/include)
496 -
497 -if(NOT CMAKE_CL_64)
498 - link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib )
499 -else(NOT CMAKE_CL_64)
500 - link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 )
501 -endif(NOT CMAKE_CL_64)
502 + ${ZLIB_INCLUDE_DIRS}
503 + ${JPEG_INCLUDE_DIR}
504 + ${PNG_INCLUDE_DIRS}
505 + ${TINYXML_INCLUDE_DIR}
506 + ${DBGHELP_INCLUDE_DIR}
507 + ${OGG_INCLUDE_DIRS}
508 + ${THEORA_INCLUDE_DIR})
509 +
510 +#if(NOT CMAKE_CL_64)
511 +# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib )
512 +#else(NOT CMAKE_CL_64)
513 +# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 )
514 +#endif(NOT CMAKE_CL_64)
515
516 # Add executable build target
517 add_executable(CrashSender WIN32 ${source_files} ${header_files})
518
519 # Add input link libraries
520 -target_link_libraries(CrashSender zlib minizip libjpeg libpng tinyxml libogg libtheora WS2_32.lib Dnsapi.lib wininet.lib Rpcrt4.lib Gdi32.lib shell32.lib Comdlg32.lib version.lib psapi.lib)
521 +target_link_libraries(CrashSender ZLIB::ZLIB minizip ${JPEG_LIBRARIES} PNG::PNG ${TINYXML_LIBRARY} Ogg::ogg ${THEORA_LIBRARY} WS2_32.lib Dnsapi.lib wininet.lib Rpcrt4.lib Gdi32.lib shell32.lib Comdlg32.lib version.lib psapi.lib)
522
523 # Add compiler flags (/MP for multi-processor compilation, /Os to favor small code)
524 set_target_properties(CrashRpt PROPERTIES COMPILE_FLAGS "/Os")
525 @@ -52,4 +52,12 @@ set_target_properties(CrashRpt PROPERTIES COMPILE_FLAGS "/Os")
526
527 set_target_properties(CrashSender PROPERTIES
528 DEBUG_POSTFIX ${CRASHRPT_VER}d
529 - RELEASE_POSTFIX ${CRASHRPT_VER} )
530 \ No newline at end of file
531 + RELEASE_POSTFIX ${CRASHRPT_VER} )
532 +
533 +install(TARGETS CrashSender
534 + RUNTIME DESTINATION tools/crashrpt
535 +)
536 +
537 +file(GLOB LANG_FILES "${CMAKE_SOURCE_DIR}/lang_files/crashrpt_lang_*.ini")
538 +install(FILES ${LANG_FILES} DESTINATION tools/crashrpt)
539 +install(FILES "${CMAKE_SOURCE_DIR}/lang_files/crashrpt_lang_EN.ini" DESTINATION tools/crashrpt RENAME crashrpt_lang.ini)
540 diff --git a/reporting/crashsender/CrashSender.rc b/reporting/crashsender/CrashSender.rc
541 index 0502962..e10e269 100644
542 --- a/reporting/crashsender/CrashSender.rc
543 +++ b/reporting/crashsender/CrashSender.rc
544 @@ -7,7 +7,7 @@
545 //
546 // Generated from the TEXTINCLUDE 2 resource.
547 //
548 -#include "atlres.h"
549 +#include "wtl/atlres.h"
550
551 /////////////////////////////////////////////////////////////////////////////
552 #undef APSTUDIO_READONLY_SYMBOLS
553 @@ -243,7 +243,7 @@ END
554
555 2 TEXTINCLUDE
556 BEGIN
557 - "#include ""atlres.h""\r\n"
558 + "#include ""wtl/atlres.h""\r\n"
559 "\0"
560 END
561
562 diff --git a/reporting/crashsender/ErrorReportSender.cpp b/reporting/crashsender/ErrorReportSender.cpp
563 index ac9603c..64cf2b5 100644
564 --- a/reporting/crashsender/ErrorReportSender.cpp
565 +++ b/reporting/crashsender/ErrorReportSender.cpp
566 @@ -722,9 +722,9 @@ BOOL CErrorReportSender::CreateMiniDump()
567 CompiledApiVer.Reserved = 0;
568 LPAPI_VERSION pActualApiVer = lpImagehlpApiVersionEx(&CompiledApiVer);
569 pActualApiVer;
570 - ATLASSERT(CompiledApiVer.MajorVersion==pActualApiVer->MajorVersion);
571 - ATLASSERT(CompiledApiVer.MinorVersion==pActualApiVer->MinorVersion);
572 - ATLASSERT(CompiledApiVer.Revision==pActualApiVer->Revision);
573 + //ATLASSERT(CompiledApiVer.MajorVersion==pActualApiVer->MajorVersion);
574 + //ATLASSERT(CompiledApiVer.MinorVersion==pActualApiVer->MinorVersion);
575 + //ATLASSERT(CompiledApiVer.Revision==pActualApiVer->Revision);
576 }
577
578 // Write minidump to the file
579 @@ -1086,7 +1086,7 @@ BOOL CErrorReportSender::CreateCrashDescriptionXML(CErrorReportInfo& eri)
580 goto cleanup;
581 }
582
583 - doc.useMicrosoftBOM = true;
584 + //doc.useMicrosoftBOM = true;
585 bool bSave = doc.SaveFile(f);
586 if(!bSave)
587 {
588 diff --git a/reporting/crashsender/FilePreviewCtrl.cpp b/reporting/crashsender/FilePreviewCtrl.cpp
589 index e71aafc..5650291 100644
590 --- a/reporting/crashsender/FilePreviewCtrl.cpp
591 +++ b/reporting/crashsender/FilePreviewCtrl.cpp
592 @@ -365,7 +365,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName)
593 if (!png_ptr)
594 goto cleanup;
595
596 - if (setjmp(png_ptr->jmpbuf))
597 + if (setjmp(png_jmpbuf(png_ptr)))
598 goto cleanup;
599
600 info_ptr = png_create_info_struct(png_ptr);
601 @@ -389,7 +389,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName)
602 width = png_get_image_width(png_ptr, info_ptr);
603 height = png_get_image_height(png_ptr, info_ptr);
604
605 - if(info_ptr->channels==3)
606 + if (png_get_channels(png_ptr, info_ptr) == 3)
607 {
608 png_set_strip_16(png_ptr);
609 png_set_packing(png_ptr);
610 @@ -408,14 +408,14 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName)
611 pBMI = (BITMAPINFO*)new BYTE[sizeof(BITMAPINFO)+256*4];
612 memset(pBMI, 0, sizeof(BITMAPINFO)+256*4);
613 pBMI->bmiHeader.biSize = sizeof(BITMAPINFO);
614 - pBMI->bmiHeader.biBitCount = 8*info_ptr->channels;
615 + pBMI->bmiHeader.biBitCount = 8 * png_get_channels(png_ptr, info_ptr);
616 pBMI->bmiHeader.biWidth = width;
617 pBMI->bmiHeader.biHeight = height;
618 pBMI->bmiHeader.biPlanes = 1;
619 pBMI->bmiHeader.biCompression = BI_RGB;
620 pBMI->bmiHeader.biSizeImage = rowbytes*height;
621
622 - if( info_ptr->channels == 1 )
623 + if (png_get_channels(png_ptr, info_ptr) == 1)
624 {
625 RGBQUAD* palette = pBMI->bmiColors;
626
627 @@ -431,7 +431,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName)
628
629 for(y=height-1; y>=0; y--)
630 {
631 - png_read_rows(png_ptr, &row, png_bytepp_NULL, 1);
632 + png_read_rows(png_ptr, &row, NULL, 1);
633
634 {
635 CAutoLock lock(&m_csLock);
636 diff --git a/reporting/crashsender/ScreenCap.cpp b/reporting/crashsender/ScreenCap.cpp
637 index c183c19..8f5643d 100644
638 --- a/reporting/crashsender/ScreenCap.cpp
639 +++ b/reporting/crashsender/ScreenCap.cpp
640 @@ -11,6 +11,7 @@ be found in the Authors.txt file in the root of the source tree.
641 #include "stdafx.h"
642 #include "ScreenCap.h"
643 #include "Utility.h"
644 +#include "zlib.h"
645
646 // Disable warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable
647 #pragma warning(disable:4611)
648 diff --git a/reporting/crashsender/stdafx.h b/reporting/crashsender/stdafx.h
649 index f087ff4..4494d3a 100644
650 --- a/reporting/crashsender/stdafx.h
651 +++ b/reporting/crashsender/stdafx.h
652 @@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree.
653 #define WINVER 0x0501
654 #define _WIN32_WINNT 0x0501
655 #define _WIN32_IE 0x0600
656 -#define _RICHEDIT_VER 0x0200
657 +#define _RICHEDIT_VER 0x0300
658
659 typedef __int64 off_t, _off_t;
660 #define _OFF_T_DEFINED
661 @@ -61,19 +61,19 @@ namespace ATL
662 };
663 #endif // _WTL_SUPPORT_SDK_ATL3
664
665 -#include <atlapp.h>
666 +#include <wtl/atlapp.h>
667
668 extern CAppModule _Module;
669
670 #include <atlwin.h>
671
672 -#include <atlframe.h>
673 -#include <atlctrls.h>
674 -#include <atldlgs.h>
675 -#include <atlctrlx.h>
676 +#include <wtl/atlframe.h>
677 +#include <wtl/atlctrls.h>
678 +#include <wtl/atldlgs.h>
679 +#include <wtl/atlctrlx.h>
680
681 #define _WTL_USE_CSTRING
682 -#include <atlmisc.h>
683 +#include <wtl/atlmisc.h>
684
685 #include <string>
686 #include <vector>
687 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
688 index f7bfede..9358bef 100644
689 --- a/tests/CMakeLists.txt
690 +++ b/tests/CMakeLists.txt
691 @@ -32,7 +32,7 @@ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
692 # Add include dir
693 include_directories( ${CMAKE_SOURCE_DIR}/include
694 ${CMAKE_SOURCE_DIR}/reporting/CrashRpt
695 - ${CMAKE_SOURCE_DIR}/thirdparty/wtl )
696 + ${WTL_INCLUDE_DIR} )
697
698 # Add executable build target
699 add_executable(Tests ${source_files} ${header_files})
700 @@ -42,3 +42,10 @@ target_link_libraries(Tests CrashRpt CrashRptProbe)
701
702 set_target_properties(Tests PROPERTIES DEBUG_POSTFIX d )
703 #set_target_properties(Tests PROPERTIES COMPILE_FLAGS "/Zi" LINK_FLAGS "/DEBUG")
704 +
705 +install(TARGETS Tests
706 + RUNTIME DESTINATION tools/crashrpt
707 +)
708 +
709 +install(FILES "${CMAKE_SOURCE_DIR}/demos/WTLDemo/dummy.ini" DESTINATION tools/crashrpt)
710 +install(FILES "${CMAKE_SOURCE_DIR}/demos/WTLDemo/dummy.log" DESTINATION tools/crashrpt)
711 diff --git a/tests/stdafx.h b/tests/stdafx.h
712 index f12675b..0ec2117 100644
713 --- a/tests/stdafx.h
714 +++ b/tests/stdafx.h
715 @@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree.
716 #define WINVER 0x0501
717 #define _WIN32_WINNT 0x0501
718 #define _WIN32_IE 0x0600
719 -#define _RICHEDIT_VER 0x0200
720 +#define _RICHEDIT_VER 0x0300
721
722 #include <errno.h>
723 #include <winsock2.h>
724 @@ -58,15 +58,15 @@ namespace ATL
725 };
726 #endif // _WTL_SUPPORT_SDK_ATL3
727
728 -#include <atlapp.h>
729 +#include <wtl/atlapp.h>
730
731 extern CAppModule _Module;
732
733 #include <atlwin.h>
734
735 -#include <atlframe.h>
736 -#include <atlctrls.h>
737 -#include <atldlgs.h>
738 +#include <wtl/atlframe.h>
739 +#include <wtl/atlctrls.h>
740 +#include <wtl/atldlgs.h>
741 #include <set>
742 #include <map>
743 #include <string>
744 @@ -75,7 +75,7 @@ extern CAppModule _Module;
745 #include <conio.h>
746
747 #define _WTL_USE_CSTRING
748 -#include <atlmisc.h>
749 +#include <wtl/atlmisc.h>
750
751 #if _MSC_VER<1400
752 #define _TCSCPY_S(strDestination, numberOfElements, strSource) _tcscpy(strDestination, strSource)
753 diff --git a/thirdparty/libpng/CMakeLists.txt b/thirdparty/libpng/CMakeLists.txt
754 index b358c4e..e0f7a33 100644
755 --- a/thirdparty/libpng/CMakeLists.txt
756 +++ b/thirdparty/libpng/CMakeLists.txt
757 @@ -7,7 +7,7 @@ aux_source_directory( . source_files )
758 add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4244 /wd4267)
759
760 # Add include dir
761 -include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/zlib )
762 +include_directories( ${ZLIB_INCLUDE_DIRS} )
763
764 fix_default_compiler_settings_()
765
766 @@ -15,6 +15,6 @@ fix_default_compiler_settings_()
767 add_library(libpng STATIC ${source_files})
768
769 # Add linker input libraries
770 -target_link_libraries(libpng zlib)
771 +target_link_libraries(libpng ZLIB::ZLIB)
772
773 set_target_properties(libpng PROPERTIES DEBUG_POSTFIX d )
774 \ No newline at end of file
775 diff --git a/thirdparty/libtheora/CMakeLists.txt b/thirdparty/libtheora/CMakeLists.txt
776 index 896fb47..f3cf5eb 100644
777 --- a/thirdparty/libtheora/CMakeLists.txt
778 +++ b/thirdparty/libtheora/CMakeLists.txt
779 @@ -8,7 +8,7 @@ aux_source_directory( ./lib/x86_vc x86_source_files )
780 add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4244 /wd4700 /wd4214 /wd4554 /wd4018 /wd4100 /wd4132 /wd4389 /wd4127 /wd4701 /wd4245 /wd4267 /wd4334)
781
782 # Add include dir
783 -include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/libogg/include
784 +include_directories( ${OGG_INCLUDE_DIRS}
785 ${CMAKE_SOURCE_DIR}/thirdparty/libtheora/include)
786
787 fix_default_compiler_settings_()
788 diff --git a/thirdparty/minizip/CMakeLists.txt b/thirdparty/minizip/CMakeLists.txt
789 index 5f4d0af..2b015c9 100644
790 --- a/thirdparty/minizip/CMakeLists.txt
791 +++ b/thirdparty/minizip/CMakeLists.txt
792 @@ -7,7 +7,7 @@ aux_source_directory( . source_files )
793 add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4127 /wd4131 /wd4100 /wd4189 /wd4244)
794
795 # Add include dir
796 -include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/zlib )
797 +include_directories( ${ZLIB_INCLUDE_DIRS} )
798
799 fix_default_compiler_settings_()
800
801 @@ -15,6 +15,6 @@ fix_default_compiler_settings_()
802 add_library(minizip STATIC ${source_files})
803
804 # Add linker input libraries
805 -target_link_libraries(minizip zlib)
806 +target_link_libraries(minizip ZLIB::ZLIB)
807
808 set_target_properties(minizip PROPERTIES DEBUG_POSTFIX d )
809 \ No newline at end of file