Skip to content

Commit

Permalink
Merge r181395 - [GTK] Add an option to enable MiniBrowser for non dev…
Browse files Browse the repository at this point in the history
…eloper 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.
  • Loading branch information
carlosgcampos committed Mar 16, 2015
1 parent ed6d2ef commit b045cae
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 14 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
@@ -1,3 +1,15 @@
2015-03-11 Carlos Garcia Campos <cgarcia@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 <cgarcia@igalia.com>

[GTK] Do not look for child processes in the UI process binary path
Expand Down
5 changes: 3 additions & 2 deletions Source/cmake/OptionsGTK.cmake
Expand Up @@ -78,6 +78,7 @@ endif ()

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)
Expand Down Expand Up @@ -125,10 +126,10 @@ else ()
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 ()
Expand Down
23 changes: 13 additions & 10 deletions Tools/CMakeLists.txt
@@ -1,20 +1,23 @@
if (ENABLE_WEBKIT2)
add_subdirectory(WebKitTestRunner)
endif ()

if ("${PORT}" STREQUAL "Efl")
add_subdirectory(WebKitTestRunner)
add_subdirectory(ImageDiff)

add_subdirectory(MiniBrowser/efl)
add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
elseif ("${PORT}" STREQUAL "GTK")
add_subdirectory(ImageDiff)
if (ENABLE_WEBKIT2)
add_subdirectory(MiniBrowser/gtk)
add_subdirectory(TestWebKitAPI/Tests/WebKit2Gtk)
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_X11_TARGET)
add_subdirectory(DumpRenderTree/TestNetscapePlugIn)

if (ENABLE_MINIBROWSER)
add_subdirectory(MiniBrowser/gtk)
endif ()
endif ()

Expand Down
16 changes: 16 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,19 @@
2015-03-11 Carlos Garcia Campos <cgarcia@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-06 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
Expand Down
7 changes: 5 additions & 2 deletions Tools/MiniBrowser/gtk/CMakeLists.txt
Expand Up @@ -45,10 +45,13 @@ add_custom_command(
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}")
2 changes: 2 additions & 0 deletions Tools/MiniBrowser/gtk/main.c
Expand Up @@ -256,7 +256,9 @@ aboutURISchemeRequestCallback(WebKitURISchemeRequest *request, gpointer userData
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) {
Expand Down

0 comments on commit b045cae

Please sign in to comment.