Title: [181395] trunk
Revision
181395
Author
carlo...@webkit.org
Date
2015-03-11 11:08:39 -0700 (Wed, 11 Mar 2015)

Log Message

[GTK] Add an option to enable MiniBrowser for non developer builds and always install it
https://bugs.webkit.org/show_bug.cgi?id=126688

Reviewed by Gustavo Noronha Silva.

.:

Add ENABLE_MINIBROWSER option, enabled by default for development
builds and disabled for production builds unless explicilty enabled.

* Source/cmake/OptionsGTK.cmake:

Tools:

* CMakeLists.txt: Build testing tools only for developer builds,
but MiniBrowser when ENABLE_MINIBROWSER option is ON.
* MiniBrowser/gtk/CMakeLists.txt: Only add
-DWEBKIT_INJECTED_BUNDLE_PATH to the build for developer builds,
and add a rule to install the MiniBrowser.
* MiniBrowser/gtk/main.c:
(main): Only set WEBKIT_INJECTED_BUNDLE_PATH env var for developer
builds.

Modified Paths

Diff

Modified: trunk/ChangeLog (181394 => 181395)


--- trunk/ChangeLog	2015-03-11 17:57:53 UTC (rev 181394)
+++ trunk/ChangeLog	2015-03-11 18:08:39 UTC (rev 181395)
@@ -1,5 +1,17 @@
 2015-03-11  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        [GTK] Add an option to enable MiniBrowser for non developer builds and always install it
+        https://bugs.webkit.org/show_bug.cgi?id=126688
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Add ENABLE_MINIBROWSER option, enabled by default for development
+        builds and disabled for production builds unless explicilty enabled.
+
+        * Source/cmake/OptionsGTK.cmake:
+
+2015-03-11  Carlos Garcia Campos  <cgar...@igalia.com>
+
         [GTK] Do not look for child processes in the UI process binary path
         https://bugs.webkit.org/show_bug.cgi?id=135752
 

Modified: trunk/Source/cmake/OptionsGTK.cmake (181394 => 181395)


--- trunk/Source/cmake/OptionsGTK.cmake	2015-03-11 17:57:53 UTC (rev 181394)
+++ trunk/Source/cmake/OptionsGTK.cmake	2015-03-11 18:08:39 UTC (rev 181395)
@@ -78,6 +78,7 @@
 
 WEBKIT_OPTION_BEGIN()
 WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 "Whether to build WebKitPluginProcess2 to load GTK2 based plugins." ON)
+WEBKIT_OPTION_DEFINE(ENABLE_MINIBROWSER "Whether to enable MiniBrowser compilation." OFF)
 
 if ((OPENGL_FOUND OR OPENGLES2_FOUND) AND (GLX_FOUND OR EGL_FOUND))
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL ON)
@@ -125,10 +126,10 @@
 endif ()
 
 if (DEVELOPER_MODE)
-    set(ENABLE_TOOLS ON)
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER ON)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS ON)
 else ()
-    set(ENABLE_TOOLS OFF)
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER OFF)
     WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS OFF)
     set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter")
 endif ()

Modified: trunk/Tools/CMakeLists.txt (181394 => 181395)


--- trunk/Tools/CMakeLists.txt	2015-03-11 17:57:53 UTC (rev 181394)
+++ trunk/Tools/CMakeLists.txt	2015-03-11 18:08:39 UTC (rev 181395)
@@ -1,21 +1,24 @@
-if (ENABLE_WEBKIT2)
+if ("${PORT}" STREQUAL "Efl")
     add_subdirectory(WebKitTestRunner)
-endif ()
-
-if ("${PORT}" STREQUAL "Efl")
     add_subdirectory(ImageDiff)
 
     add_subdirectory(MiniBrowser/efl)
     add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
 elseif ("${PORT}" STREQUAL "GTK")
-    add_subdirectory(ImageDiff)
-    if (ENABLE_WEBKIT2)
+    if (DEVELOPER_MODE)
+      add_subdirectory(WebKitTestRunner)
+      add_subdirectory(ImageDiff)
+      if (ENABLE_API_TESTS)
+          add_subdirectory(TestWebKitAPI/Tests/WebKit2Gtk)
+      endif ()
+      if (ENABLE_X11_TARGET)
+          add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
+      endif ()
+    endif ()
+
+    if (ENABLE_MINIBROWSER)
         add_subdirectory(MiniBrowser/gtk)
-        add_subdirectory(TestWebKitAPI/Tests/WebKit2Gtk)
     endif ()
-    if (ENABLE_X11_TARGET)
-        add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
-    endif ()
 endif ()
 
 if (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)

Modified: trunk/Tools/ChangeLog (181394 => 181395)


--- trunk/Tools/ChangeLog	2015-03-11 17:57:53 UTC (rev 181394)
+++ trunk/Tools/ChangeLog	2015-03-11 18:08:39 UTC (rev 181395)
@@ -1,3 +1,19 @@
+2015-03-11  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Add an option to enable MiniBrowser for non developer builds and always install it
+        https://bugs.webkit.org/show_bug.cgi?id=126688
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * CMakeLists.txt: Build testing tools only for developer builds,
+        but MiniBrowser when ENABLE_MINIBROWSER option is ON.
+        * MiniBrowser/gtk/CMakeLists.txt: Only add
+        -DWEBKIT_INJECTED_BUNDLE_PATH to the build for developer builds,
+        and add a rule to install the MiniBrowser.
+        * MiniBrowser/gtk/main.c:
+        (main): Only set WEBKIT_INJECTED_BUNDLE_PATH env var for developer
+        builds.
+
 2015-03-11  Brent Fulgham  <bfulg...@apple.com>
 
         Add some DateMath tests to TestWebKitAPI

Modified: trunk/Tools/MiniBrowser/gtk/CMakeLists.txt (181394 => 181395)


--- trunk/Tools/MiniBrowser/gtk/CMakeLists.txt	2015-03-11 17:57:53 UTC (rev 181394)
+++ trunk/Tools/MiniBrowser/gtk/CMakeLists.txt	2015-03-11 18:08:39 UTC (rev 181395)
@@ -45,10 +45,13 @@
     COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --header > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.h
     VERBATIM)
 
-add_definitions(-DWEBKIT_EXEC_PATH="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-add_definitions(-DWEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+if (DEVELOPER_MODE)
+    add_definitions(-DWEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+endif ()
 
 include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
 add_executable(MiniBrowser ${MiniBrowser_SOURCES})
 target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
 set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
+
+install(TARGETS MiniBrowser DESTINATION "${EXEC_INSTALL_DIR}")
\ No newline at end of file

Modified: trunk/Tools/MiniBrowser/gtk/main.c (181394 => 181395)


--- trunk/Tools/MiniBrowser/gtk/main.c	2015-03-11 17:57:53 UTC (rev 181394)
+++ trunk/Tools/MiniBrowser/gtk/main.c	2015-03-11 18:08:39 UTC (rev 181395)
@@ -256,7 +256,9 @@
 int main(int argc, char *argv[])
 {
     gtk_init(&argc, &argv);
+#if defined(DEVELOPMENT_BUILD)
     g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
+#endif
 
     const gchar *multiprocess = g_getenv("MINIBROWSER_MULTIPROCESS");
     if (multiprocess && *multiprocess) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to