Skip to content
Permalink
Browse files
[WPE] Use GNU install directories
https://bugs.webkit.org/show_bug.cgi?id=184377

Reviewed by Carlos Garcia Campos.

.:

Notably, this means all the CMake arguments that distributors use to customize install
directories (-DCMAKE_INSTALL_*DIR) will no longer be ignored.

* Source/cmake/OptionsCommon.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Merge ProcessExecutablePathGtk and ProcessExecutablePathWPE into ProcessExecutablePathGLib.
WPE will now load its secondary processes from PKGLIBEXECDIR, like WebKitGTK+.

* PlatformWPE.cmake:
* Shared/glib/ProcessExecutablePathGLib.cpp: Renamed from Source/WebKit/Shared/gtk/ProcessExecutablePathGtk.cpp.
(WebKit::getExecutablePath):
(WebKit::findWebKitProcess):
(WebKit::executablePathOfWebProcess):
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfStorageProcess):
* Shared/wpe/ProcessExecutablePathWPE.cpp: Removed.
* SourcesGTK.txt:
* SourcesWPE.txt:

Canonical link: https://commits.webkit.org/199968@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Michael Catanzaro committed Apr 9, 2018
1 parent b931906 commit cf59f9b8e1836d0334d5da8069dc2732380cca3f
@@ -1,3 +1,16 @@
2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Use GNU install directories
https://bugs.webkit.org/show_bug.cgi?id=184377

Reviewed by Carlos Garcia Campos.

Notably, this means all the CMake arguments that distributors use to customize install
directories (-DCMAKE_INSTALL_*DIR) will no longer be ignored.

* Source/cmake/OptionsCommon.cmake:
* Source/cmake/OptionsWPE.cmake:

2018-04-08 Fujii Hironori <Hironori.Fujii@sony.com>

[CMake] WebKit should link to WebCore as a PRIVATE library if WebCore is a static library
@@ -1,3 +1,25 @@
2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>

[WPE] Use GNU install directories
https://bugs.webkit.org/show_bug.cgi?id=184377

Reviewed by Carlos Garcia Campos.

Merge ProcessExecutablePathGtk and ProcessExecutablePathWPE into ProcessExecutablePathGLib.
WPE will now load its secondary processes from PKGLIBEXECDIR, like WebKitGTK+.

* PlatformWPE.cmake:
* Shared/glib/ProcessExecutablePathGLib.cpp: Renamed from Source/WebKit/Shared/gtk/ProcessExecutablePathGtk.cpp.
(WebKit::getExecutablePath):
(WebKit::findWebKitProcess):
(WebKit::executablePathOfWebProcess):
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfStorageProcess):
* Shared/wpe/ProcessExecutablePathWPE.cpp: Removed.
* SourcesGTK.txt:
* SourcesWPE.txt:

2018-04-09 Michael Catanzaro <mcatanzaro@igalia.com>

[GTK] WaylandCompositorDisplay leaks its wl_display
@@ -620,11 +620,12 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)

Shared/cairo/ShareableBitmapCairo.cpp

Shared/glib/ProcessExecutablePathGLib.cpp

Shared/gtk/NativeWebKeyboardEventGtk.cpp
Shared/gtk/NativeWebMouseEventGtk.cpp
Shared/gtk/NativeWebTouchEventGtk.cpp
Shared/gtk/NativeWebWheelEventGtk.cpp
Shared/gtk/ProcessExecutablePathGtk.cpp
Shared/gtk/WebEventFactory.cpp

Shared/soup/WebCoreArgumentCodersSoup.cpp
@@ -14,7 +14,7 @@ configure_file(wpe/wpe-webkit.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit.pc @ONLY)

add_definitions(-DWEBKIT2_COMPILATION)

add_definitions(-DLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
add_definitions(-DPKGLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")

if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
@@ -29,21 +29,19 @@

#include <WebCore/FileSystem.h>
#include <glib.h>

#if ENABLE(DEVELOPER_MODE)
#include <wtf/glib/GLibUtilities.h>
#endif

namespace WebKit {
using namespace WebCore;

namespace WebKit {

#if ENABLE(DEVELOPER_MODE)
static String getExecutablePath()
{
CString executablePath = getCurrentExecutablePath();
if (!executablePath.isNull())
return FileSystem::directoryName(FileSystem::stringFromFileSystemRepresentation(executablePath.data()));
return String();
return { };
}
#endif

@@ -70,22 +68,38 @@ static String findWebKitProcess(const char* processName)

String executablePathOfWebProcess()
{
#if PLATFORM(WPE)
return findWebKitProcess("WPEWebProcess");
#else
return findWebKitProcess("WebKitWebProcess");
#endif
}

String executablePathOfPluginProcess()
{
#if PLATFORM(WPE)
return findWebKitProcess("WPEPluginProcess");
#else
return findWebKitProcess("WebKitPluginProcess");
#endif
}

String executablePathOfNetworkProcess()
{
#if PLATFORM(WPE)
return findWebKitProcess("WPENetworkProcess");
#else
return findWebKitProcess("WebKitNetworkProcess");
#endif
}

String executablePathOfStorageProcess()
{
#if PLATFORM(WPE)
return findWebKitProcess("WPEStorageProcess");
#else
return findWebKitProcess("WebKitStorageProcess");
#endif
}

} // namespace WebKit

This file was deleted.

@@ -84,6 +84,7 @@ Shared/Plugins/unix/PluginSearchPath.cpp

Shared/cairo/ShareableBitmapCairo.cpp @no-unify

Shared/glib/ProcessExecutablePathGLib.cpp @no-unify
Shared/glib/WebContextMenuItemGlib.cpp

Shared/gtk/ArgumentCodersGtk.cpp
@@ -92,7 +93,6 @@ Shared/gtk/NativeWebMouseEventGtk.cpp
Shared/gtk/NativeWebTouchEventGtk.cpp
Shared/gtk/NativeWebWheelEventGtk.cpp
Shared/gtk/PrintInfoGtk.cpp
Shared/gtk/ProcessExecutablePathGtk.cpp @no-unify
Shared/gtk/WebErrorsGtk.cpp
Shared/gtk/WebEventFactory.cpp
Shared/gtk/WebSelectionData.cpp
@@ -74,6 +74,7 @@ Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp

Shared/cairo/ShareableBitmapCairo.cpp

Shared/glib/ProcessExecutablePathGLib.cpp
Shared/glib/WebContextMenuItemGlib.cpp

Shared/linux/WebMemorySamplerLinux.cpp
@@ -87,7 +88,6 @@ Shared/wpe/NativeWebKeyboardEventWPE.cpp
Shared/wpe/NativeWebMouseEventWPE.cpp
Shared/wpe/NativeWebTouchEventWPE.cpp
Shared/wpe/NativeWebWheelEventWPE.cpp
Shared/wpe/ProcessExecutablePathWPE.cpp
Shared/wpe/WebEventFactory.cpp

StorageProcess/glib/StorageProcessMainGLib.cpp
@@ -107,8 +107,8 @@ if (USE_OPENMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif ()

# GTK uses the GNU installation directories as defaults.
if (NOT PORT STREQUAL "GTK")
# GTK and WPE use the GNU installation directories as defaults.
if (NOT PORT STREQUAL "GTK" AND NOT PORT STREQUAL "WPE")
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Absolute path to library installation directory")
set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute path to executable installation directory")
set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Absolute path to install executables executed by the library")
@@ -6,6 +6,12 @@ set(WPE_API_VERSION 0.1)

CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 1 0 0)

# These are shared variables, but we special case their definition so that we can use the
# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory")
set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/wpe-webkit-${WPE_API_VERSION}" CACHE PATH "Absolute path to install executables executed by the library")

WEBKIT_OPTION_BEGIN()

include(GStreamerDefinitions)

0 comments on commit cf59f9b

Please sign in to comment.