mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 23:25:15 +00:00
Use webkitgtk without its headers
This commit is contained in:
3
.github/workflows/linux.yml
vendored
3
.github/workflows/linux.yml
vendored
@@ -88,9 +88,6 @@ jobs:
|
|||||||
DEFINE=""
|
DEFINE=""
|
||||||
if [ -n "${{ matrix.defines }}" ]; then
|
if [ -n "${{ matrix.defines }}" ]; then
|
||||||
DEFINE="-D ${{ matrix.defines }}=ON"
|
DEFINE="-D ${{ matrix.defines }}=ON"
|
||||||
if [ "${{ matrix.defines }}" == "DESKTOP_APP_DISABLE_DBUS_INTEGRATION" ]; then
|
|
||||||
DEFINE="$DEFINE -D DESKTOP_APP_DISABLE_WEBKITGTK=ON"
|
|
||||||
fi
|
|
||||||
echo Define from matrix: $DEFINE
|
echo Define from matrix: $DEFINE
|
||||||
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
|
echo "ARTIFACT_NAME=Telegram_${{ matrix.defines }}" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
|
@@ -9,10 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
|
|
||||||
#include "core/crash_reports.h"
|
#include "core/crash_reports.h"
|
||||||
#include "core/update_checker.h"
|
#include "core/update_checker.h"
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
#include "webview/platform/linux/webview_linux_webkit2gtk.h"
|
#include "webview/platform/linux/webview_linux_webkit2gtk.h"
|
||||||
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
|
||||||
@@ -64,14 +61,12 @@ int Launcher::exec() {
|
|||||||
Gio::init();
|
Gio::init();
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
for (auto i = begin(_arguments), e = end(_arguments); i != e; ++i) {
|
for (auto i = begin(_arguments), e = end(_arguments); i != e; ++i) {
|
||||||
if (*i == "-webviewhelper" && std::distance(i, e) > 2) {
|
if (*i == "-webviewhelper" && std::distance(i, e) > 2) {
|
||||||
Webview::WebKit2Gtk::SetServiceName(*(i + 2));
|
Webview::WebKit2Gtk::SetServiceName(*(i + 2));
|
||||||
return Webview::WebKit2Gtk::Exec(*(i + 1));
|
return Webview::WebKit2Gtk::Exec(*(i + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
|
|
||||||
return Core::Launcher::exec();
|
return Core::Launcher::exec();
|
||||||
}
|
}
|
||||||
|
@@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "core/core_settings.h"
|
#include "core/core_settings.h"
|
||||||
#include "core/update_checker.h"
|
#include "core/update_checker.h"
|
||||||
#include "window/window_controller.h"
|
#include "window/window_controller.h"
|
||||||
|
#include "webview/platform/linux/webview_linux_webkit2gtk.h"
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
#include "base/platform/linux/base_linux_glibmm_helper.h"
|
#include "base/platform/linux/base_linux_glibmm_helper.h"
|
||||||
@@ -33,10 +34,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "base/platform/linux/base_linux_xsettings.h"
|
#include "base/platform/linux/base_linux_xsettings.h"
|
||||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
#include "webview/platform/linux/webview_linux_webkit2gtk.h"
|
|
||||||
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtWidgets/QStyle>
|
#include <QtWidgets/QStyle>
|
||||||
#include <QtCore/QStandardPaths>
|
#include <QtCore/QStandardPaths>
|
||||||
@@ -741,14 +738,12 @@ void start() {
|
|||||||
}
|
}
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
const auto d = QFile::encodeName(QDir(cWorkingDir()).absolutePath());
|
const auto d = QFile::encodeName(QDir(cWorkingDir()).absolutePath());
|
||||||
char h[33] = { 0 };
|
char h[33] = { 0 };
|
||||||
hashMd5Hex(d.constData(), d.size(), h);
|
hashMd5Hex(d.constData(), d.size(), h);
|
||||||
|
|
||||||
Webview::WebKit2Gtk::SetServiceName(
|
Webview::WebKit2Gtk::SetServiceName(
|
||||||
kWebviewService.utf16().arg(h).arg("%1").toStdString());
|
kWebviewService.utf16().arg(h).arg("%1").toStdString());
|
||||||
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void finish() {
|
void finish() {
|
||||||
|
Submodule Telegram/lib_webview updated: 0a3584b8d8...7caea0cb01
2
cmake
2
cmake
Submodule cmake updated: fc65d3305d...051f7ba4e3
Reference in New Issue
Block a user