Title: [233102] trunk/Tools
Revision
233102
Author
[email protected]
Date
2018-06-22 15:13:23 -0700 (Fri, 22 Jun 2018)

Log Message

[Win] ImageDiff should use DLLLauncher
https://bugs.webkit.org/show_bug.cgi?id=186927

ImageDiff should use DLLLauncher to find DLLs under WEBKIT_LIBRARIES, in the same way as DRT & TestWebKitAPI.

Reviewed by Per Arne Vollan.

* ImageDiff/CMakeLists.txt:
* ImageDiff/ImageDiff.cpp:
(dllLauncherEntryPoint):
* ImageDiff/PlatformWin.cmake:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (233101 => 233102)


--- trunk/Tools/ChangeLog	2018-06-22 21:53:57 UTC (rev 233101)
+++ trunk/Tools/ChangeLog	2018-06-22 22:13:23 UTC (rev 233102)
@@ -1,3 +1,17 @@
+2018-06-22  Ross Kirsling  <[email protected]>
+
+        [Win] ImageDiff should use DLLLauncher
+        https://bugs.webkit.org/show_bug.cgi?id=186927
+
+        ImageDiff should use DLLLauncher to find DLLs under WEBKIT_LIBRARIES, in the same way as DRT & TestWebKitAPI.
+
+        Reviewed by Per Arne Vollan.
+
+        * ImageDiff/CMakeLists.txt:
+        * ImageDiff/ImageDiff.cpp:
+        (dllLauncherEntryPoint):
+        * ImageDiff/PlatformWin.cmake:
+
 2018-06-22  Basuke Suzuki  <[email protected]>
 
         [style] Fix --git-index option for check-webkit-style command

Modified: trunk/Tools/ImageDiff/CMakeLists.txt (233101 => 233102)


--- trunk/Tools/ImageDiff/CMakeLists.txt	2018-06-22 21:53:57 UTC (rev 233101)
+++ trunk/Tools/ImageDiff/CMakeLists.txt	2018-06-22 22:13:23 UTC (rev 233102)
@@ -17,3 +17,7 @@
 include_directories(SYSTEM ${IMAGE_DIFF_SYSTEM_INCLUDE_DIRECTORIES})
 add_executable(ImageDiff ${IMAGE_DIFF_SOURCES})
 target_link_libraries(ImageDiff ${IMAGE_DIFF_LIBRARIES})
+
+if (WIN32)
+    add_dependencies(ImageDiff ImageDiffLib)
+endif ()

Modified: trunk/Tools/ImageDiff/ImageDiff.cpp (233101 => 233102)


--- trunk/Tools/ImageDiff/ImageDiff.cpp	2018-06-22 21:53:57 UTC (rev 233101)
+++ trunk/Tools/ImageDiff/ImageDiff.cpp	2018-06-22 22:13:23 UTC (rev 233102)
@@ -37,6 +37,7 @@
 #ifdef _WIN32
 #include <fcntl.h>
 #include <io.h>
+#include <windows.h>
 #endif
 
 using namespace ImageDiff;
@@ -136,3 +137,10 @@
 
     return EXIT_SUCCESS;
 }
+
+#ifdef _WIN32
+extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, const char* argv[])
+{
+    return main(argc, argv);
+}
+#endif

Modified: trunk/Tools/ImageDiff/PlatformWin.cmake (233101 => 233102)


--- trunk/Tools/ImageDiff/PlatformWin.cmake	2018-06-22 21:53:57 UTC (rev 233101)
+++ trunk/Tools/ImageDiff/PlatformWin.cmake	2018-06-22 22:13:23 UTC (rev 233102)
@@ -1,5 +1,15 @@
 if (${WTF_PLATFORM_WIN_CAIRO})
+    add_definitions(-DWIN_CAIRO)
+
     include(Cairo.cmake)
 else ()
     include(PlatformMac.cmake)
 endif ()
+
+add_library(ImageDiffLib SHARED ${IMAGE_DIFF_SOURCES})
+target_link_libraries(ImageDiffLib ${IMAGE_DIFF_LIBRARIES})
+
+add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
+
+set(IMAGE_DIFF_SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp)
+set(IMAGE_DIFF_LIBRARIES shlwapi)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to