diff options
Diffstat (limited to 'src/process')
-rw-r--r-- | src/process/CMakeLists.txt | 39 | ||||
-rw-r--r-- | src/process/Info_mac.plist.in | 44 | ||||
-rw-r--r-- | src/process/QtWebEngineProcess.entitlements | 2 | ||||
-rw-r--r-- | src/process/main.cpp | 50 | ||||
-rw-r--r-- | src/process/process.pro | 78 | ||||
-rw-r--r-- | src/process/support_win.cpp | 40 |
6 files changed, 87 insertions, 166 deletions
diff --git a/src/process/CMakeLists.txt b/src/process/CMakeLists.txt index 8d146aa61..630ba42a8 100644 --- a/src/process/CMakeLists.txt +++ b/src/process/CMakeLists.txt @@ -1,5 +1,10 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + if(NOT DEFINED WEBENGINE_ROOT_SOURCE_DIR) - get_filename_component(WEBENGINE_ROOT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." REALPATH) + qt_internal_get_filename_path_mode(path_mode) + + get_filename_component(WEBENGINE_ROOT_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." ${path_mode}) endif() include(${WEBENGINE_ROOT_SOURCE_DIR}/cmake/Functions.cmake) @@ -20,7 +25,7 @@ if(WIN32) set_property(TARGET ${qtWebEngineProcessName} PROPERTY WIN32_EXECUTABLE TRUE) # get libs rsp file, since cmake is not aware of PUBLIC libs for WebEngineCore get_target_property(libs_rsp WebEngineCore LIBS_RSP) - target_link_options(${qtWebEngineProcessName} PRIVATE "@${libs_rsp}") + target_link_options(${qtWebEngineProcessName} PRIVATE "@${libs_rsp}" "/STACK:0x800000") endif() if(MACOS) @@ -41,21 +46,32 @@ qt_internal_extend_target(${qtWebEngineProcessName} target_include_directories(${qtWebEngineProcessName} PRIVATE ../core) qt_get_cmake_configurations(configs) + foreach(config ${configs}) string(TOUPPER "${config}" config_upper) + if(isFramework) + set(outputPath + "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers" + ) + else() + set(outputPath "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}") + endif() set_target_properties(${qtWebEngineProcessName} PROPERTIES - RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}") -endforeach() + RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${outputPath}" + ) -if(QT_FEATURE_debug_and_release) - set_target_properties(${qtWebEngineProcessName} PROPERTIES - OUTPUT_NAME_DEBUG ${qtWebEngineProcessName}${CMAKE_DEBUG_POSTFIX}) -endif() + if("${config}" STREQUAL "Debug") + set_target_properties(${qtWebEngineProcessName} PROPERTIES + OUTPUT_NAME_DEBUG ${qtWebEngineProcessName}${CMAKE_DEBUG_POSTFIX} + ) + endif() +endforeach() if(isFramework) set_target_properties(${qtWebEngineProcessName} PROPERTIES MACOSX_BUNDLE TRUE INSTALL_RPATH "@loader_path/../../../../../../../" + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info_mac.plist.in" ) target_sources(${qtWebEngineProcessName} PRIVATE QtWebEngineProcess.entitlements) @@ -70,10 +86,13 @@ if(isFramework) USES_TERMINAL ) install(TARGETS ${qtWebEngineProcessName} - BUNDLE DESTINATION ./lib/QtWebEngineCore.framework/Versions/A/Helpers + BUNDLE DESTINATION "${INSTALL_LIBDIR}/QtWebEngineCore.framework/Versions/A/Helpers" COMPONENT Runtime ) - qt_enable_separate_debug_info(${qtWebEngineProcessName} ./lib/QtWebEngineCore.framework/Versions/A/Helpers QT_EXECUTABLE) + qt_enable_separate_debug_info(${qtWebEngineProcessName} + "${INSTALL_LIBDIR}" QT_EXECUTABLE + DSYM_OUTPUT_DIR "${CMAKE_BINARY_DIR}/${INSTALL_LIBDIR}" + ) else() qt_apply_rpaths(TARGET ${qtWebEngineProcessName} INSTALL_PATH "${INSTALL_LIBEXECDIR}" RELATIVE_RPATH) install(TARGETS ${qtWebEngineProcessName} diff --git a/src/process/Info_mac.plist.in b/src/process/Info_mac.plist.in new file mode 100644 index 000000000..22c8c026d --- /dev/null +++ b/src/process/Info_mac.plist.in @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + + <key>CFBundleName</key> + <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> + <key>CFBundleExecutable</key> + <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + + <key>CFBundleVersion</key> + <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> + <key>CFBundleShortVersionString</key> + <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> + + <key>LSMinimumSystemVersion</key> + <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string> + + <key>NSHumanReadableCopyright</key> + <string>${MACOSX_BUNDLE_COPYRIGHT}</string> + + <key>CFBundleIconFile</key> + <string>${MACOSX_BUNDLE_ICON_FILE}</string> + + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleAllowMixedLocalizations</key> + <true/> + + <key>NSPrincipalClass</key> + <string>NSApplication</string> + + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> + <key>LSUIElement</key> + <true/> +</dict> +</plist> diff --git a/src/process/QtWebEngineProcess.entitlements b/src/process/QtWebEngineProcess.entitlements index f2fbabddb..59a4b6c15 100644 --- a/src/process/QtWebEngineProcess.entitlements +++ b/src/process/QtWebEngineProcess.entitlements @@ -8,5 +8,7 @@ <true/> <key>com.apple.security.cs.allow-jit</key> <true/> + <key>com.apple.security.cs.disable-executable-page-protection</key> + <true/> </dict> </plist> diff --git a/src/process/main.cpp b/src/process/main.cpp index 7cdc4f4ab..d71ab128e 100644 --- a/src/process/main.cpp +++ b/src/process/main.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h> #include <QCoreApplication> @@ -85,7 +49,7 @@ struct tm* localtime64_r_proxy(const time_t* timep, struct tm* result) return sandbox::localtime64_r_override(timep, result); } -#endif // defined(OS_LINUX) +#endif // defined(Q_OS_LINUX) #if defined(Q_OS_WIN32) namespace QtWebEngineProcess { @@ -125,6 +89,12 @@ int main(int argc, const char **argv) QCoreApplication qtApplication(argc, argv_.get()); - return QtWebEngineCore::processMain(argc, argv); + if (argc == 1) { + qInfo("%s(%s/%s)", qPrintable(qtApplication.applicationName()), qWebEngineVersion(), + qWebEngineChromiumVersion()); + return 0; + } else { + return QtWebEngineCore::processMain(argc, argv); + } } diff --git a/src/process/process.pro b/src/process/process.pro deleted file mode 100644 index bd5752f7c..000000000 --- a/src/process/process.pro +++ /dev/null @@ -1,78 +0,0 @@ -TARGET = $$QTWEBENGINEPROCESS_NAME - -# Needed to set LSUIElement=1 -QMAKE_INFO_PLIST = Info_mac.plist - -QT_PRIVATE += core-private webenginecore-private - -INCLUDEPATH += ../core - -SOURCES = main.cpp - -CONFIG -= ltcg - -# On windows we need to statically link to the windows sandbox code -win32 { - # The Chromium headers we include are not clean - CONFIG -= warnings_are_errors - - # Look for linking information produced by GN - linking_pri = $$OUT_PWD/../core/$$getConfigDir()/qtwebengine_sandbox_win.pri - - !include($$linking_pri) { - error("Could not find the linking information that gn should have generated.") - } - isEmpty(NINJA_OBJECTS): error("//sandbox/win:sandbox linking changed, update process.pro") - isEmpty(NINJA_ARCHIVES): error("//sandbox/win:sandbox linking changed, update process.pro") - - LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS $$NINJA_ARCHIVES $$NINJA_OBJECTS - QMAKE_LFLAGS += $$NINJA_LFLAGS - POST_TARGETDEPS += $$NINJA_TARGETDEPS - - CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir() - INCLUDEPATH += $$CHROMIUM_SRC_DIR \ - $$OUT_PWD/../core/$$getConfigDir()/gen - - SOURCES += \ - support_win.cpp - - msvc: QMAKE_LFLAGS += /MANIFESTINPUT:$$PWD/process.exe.manifest - VERSION = $${MODULE_VERSION}.0 -} else { - VERSION = $${MODULE_VERSION} -} - -TEMPLATE = app - -load(qt_build_paths) - -!build_pass:qtConfig(debug_and_release): CONFIG += release -CONFIG += relative_qt_rpath - -qtConfig(build_all): CONFIG += build_all - -qtConfig(framework) { - # Deploy the QtWebEngineProcess app bundle into the QtWebEngineCore framework. - DESTDIR = $$MODULE_BASE_OUTDIR/lib/QtWebEngineCore.framework/Versions/A/Helpers - - # Deploy the entitlements file so macdeployqt can use it. - entitlements.files = QtWebEngineProcess.entitlements - entitlements.path = Contents/Resources/ - QMAKE_BUNDLE_DATA += entitlements -} else { - CONFIG -= app_bundle - win32: DESTDIR = $$MODULE_BASE_OUTDIR/bin - else: DESTDIR = $$MODULE_BASE_OUTDIR/libexec -} -msvc: QMAKE_LFLAGS *= /LARGEADDRESSAWARE - -qtConfig(framework) { - target.path = $$[QT_INSTALL_LIBS]/QtWebEngineCore.framework/Versions/A/Helpers -} else { - target.path = $$[QT_INSTALL_LIBEXECS] -} - -load(qt_targets) -load(qt_common) - -INSTALLS += target diff --git a/src/process/support_win.cpp b/src/process/support_win.cpp index c2ff2d838..ab4436b47 100644 --- a/src/process/support_win.cpp +++ b/src/process/support_win.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWebEngine module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qlibrary.h> #include <qoperatingsystemversion.h> |