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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230429
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+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
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
https://bugs.webkit.org/show_bug.cgi?id=184406
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
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")
#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
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
+++ /dev/null
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY MOTOROLA INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MOTOROLA INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ProcessExecutablePath.h"
-
-#include <WebCore/FileSystem.h>
-#include <glib.h>
-#include <wtf/glib/GLibUtilities.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static String getExecutablePath()
-{
- CString executablePath = getCurrentExecutablePath();
- if (!executablePath.isNull())
- return FileSystem::directoryName(FileSystem::stringFromFileSystemRepresentation(executablePath.data()));
- return String();
-}
-
-static String findWebKitProcess(const char* processName)
-{
- static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH");
- if (execDirectory) {
- String processPath = FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(execDirectory), processName);
- if (FileSystem::fileExists(processPath))
- return processPath;
- }
-
- static String executablePath = getExecutablePath();
- if (!executablePath.isNull()) {
- String processPath = FileSystem::pathByAppendingComponent(executablePath, processName);
- if (FileSystem::fileExists(processPath))
- return processPath;
- }
-
- return FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(LIBEXECDIR), processName);
-}
-
-String executablePathOfWebProcess()
-{
- return findWebKitProcess("WPEWebProcess");
-}
-
-String executablePathOfPluginProcess()
-{
- return findWebKitProcess("WPEPluginProcess");
-}
-
-String executablePathOfNetworkProcess()
-{
- return findWebKitProcess("WPENetworkProcess");
-}
-
-String executablePathOfStorageProcess()
-{
- return findWebKitProcess("WPEStorageProcess");
-}
-
-} // namespace WebKit
Shared/cairo/ShareableBitmapCairo.cpp @no-unify
+Shared/glib/ProcessExecutablePathGLib.cpp @no-unify
Shared/glib/WebContextMenuItemGlib.cpp
Shared/gtk/ArgumentCodersGtk.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
Shared/cairo/ShareableBitmapCairo.cpp
+Shared/glib/ProcessExecutablePathGLib.cpp
Shared/glib/WebContextMenuItemGlib.cpp
Shared/linux/WebMemorySamplerLinux.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
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")
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)