mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Update glibmm to latest version
This commit is contained in:
parent
67d99355ca
commit
1336a7149b
9 changed files with 33 additions and 64 deletions
|
@ -30,7 +30,7 @@ void UnsafeOpenUrl(const QString &url) {
|
|||
base::Platform::AppLaunchContext())) {
|
||||
return;
|
||||
}
|
||||
} catch (const Glib::Error &e) {
|
||||
} catch (const std::exception &e) {
|
||||
LOG(("App Error: %1").arg(QString::fromStdString(e.what())));
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
@ -60,7 +60,7 @@ void UnsafeLaunch(const QString &filepath) {
|
|||
base::Platform::AppLaunchContext())) {
|
||||
return;
|
||||
}
|
||||
} catch (const Glib::Error &e) {
|
||||
} catch (const std::exception &e) {
|
||||
LOG(("App Error: %1").arg(QString::fromStdString(e.what())));
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ constexpr auto kPropertiesInterface = "org.freedesktop.DBus.Properties"_cs;
|
|||
bool ShowXDPOpenWithDialog(const QString &filepath) {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
auto reply = connection->call_sync(
|
||||
std::string(base::Platform::XDP::kObjectPath),
|
||||
|
|
|
@ -178,7 +178,7 @@ bool UseUnityCounter() {
|
|||
static const auto Result = [&] {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
return base::Platform::DBus::NameHasOwner(
|
||||
connection,
|
||||
|
@ -280,7 +280,7 @@ void MainWindow::updateIconCounters() {
|
|||
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
connection->emit_signal(
|
||||
"/com/canonical/unity/launcherentry/"
|
||||
|
|
|
@ -53,9 +53,6 @@ void Noexcept(Fn<void()> callback, Fn<void()> failed = nullptr) noexcept {
|
|||
try {
|
||||
callback();
|
||||
return;
|
||||
} catch (const Glib::Error &e) {
|
||||
LOG(("Native Notification Error: %1").arg(
|
||||
QString::fromStdString(e.what())));
|
||||
} catch (const std::exception &e) {
|
||||
LOG(("Native Notification Error: %1").arg(
|
||||
QString::fromStdString(e.what())));
|
||||
|
@ -69,7 +66,7 @@ void Noexcept(Fn<void()> callback, Fn<void()> failed = nullptr) noexcept {
|
|||
std::unique_ptr<base::Platform::DBus::ServiceWatcher> CreateServiceWatcher() {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
const auto activatable = [&] {
|
||||
try {
|
||||
|
@ -109,7 +106,7 @@ std::unique_ptr<base::Platform::DBus::ServiceWatcher> CreateServiceWatcher() {
|
|||
void StartServiceAsync(Fn<void()> callback) {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
DBus::StartServiceByNameAsync(
|
||||
connection,
|
||||
|
@ -145,7 +142,7 @@ void StartServiceAsync(Fn<void()> callback) {
|
|||
bool GetServiceRegistered() {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
const auto hasOwner = [&] {
|
||||
try {
|
||||
|
@ -178,7 +175,7 @@ void GetServerInformation(
|
|||
Fn<void(const std::optional<ServerInformation> &)> callback) {
|
||||
Noexcept([&] {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
connection->call(
|
||||
std::string(kObjectPath),
|
||||
|
@ -224,7 +221,7 @@ void GetServerInformation(
|
|||
void GetCapabilities(Fn<void(const QStringList &)> callback) {
|
||||
Noexcept([&] {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
connection->call(
|
||||
std::string(kObjectPath),
|
||||
|
@ -263,7 +260,7 @@ void GetInhibited(Fn<void(bool)> callback) {
|
|||
|
||||
Noexcept([&] {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
connection->call(
|
||||
std::string(kObjectPath),
|
||||
|
@ -380,7 +377,7 @@ bool NotificationData::init(
|
|||
Window::Notifications::Manager::DisplayOptions options) {
|
||||
Noexcept([&] {
|
||||
_dbusConnection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
});
|
||||
|
||||
if (!_dbusConnection) {
|
||||
|
@ -600,7 +597,7 @@ void NotificationData::close() {
|
|||
{},
|
||||
std::string(kService),
|
||||
-1,
|
||||
Gio::DBus::CALL_FLAGS_NO_AUTO_START);
|
||||
Gio::DBus::CallFlags::NO_AUTO_START);
|
||||
_manager->clearNotification(_id);
|
||||
}
|
||||
|
||||
|
@ -849,7 +846,7 @@ Manager::Private::Private(not_null<Manager*> manager, Type type)
|
|||
|
||||
Noexcept([&] {
|
||||
_dbusConnection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
});
|
||||
|
||||
if (!_dbusConnection) {
|
||||
|
@ -873,7 +870,7 @@ Manager::Private::Private(not_null<Manager*> manager, Type type)
|
|||
const auto interface = GlibVariantCast<Glib::ustring>(
|
||||
parameters.get_child(0));
|
||||
|
||||
if (interface != std::string(kInterface)) {
|
||||
if (interface != kInterface.data()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ void PortalAutostart(bool start, bool silent) {
|
|||
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::BUS_TYPE_SESSION);
|
||||
Gio::DBus::BusType::SESSION);
|
||||
|
||||
const auto parentWindowId = [&]() -> Glib::ustring {
|
||||
const auto activeWindow = Core::App().activeWindow();
|
||||
|
@ -165,7 +165,7 @@ void PortalAutostart(bool start, bool silent) {
|
|||
window.show();
|
||||
loop->run();
|
||||
}
|
||||
} catch (const Glib::Error &e) {
|
||||
} catch (const std::exception &e) {
|
||||
if (!silent) {
|
||||
LOG(("Portal Autostart Error: %1").arg(
|
||||
QString::fromStdString(e.what())));
|
||||
|
@ -464,7 +464,7 @@ void start() {
|
|||
Gio::init();
|
||||
|
||||
Glib::set_prgname(cExeName().toStdString());
|
||||
Glib::set_application_name(std::string(AppName));
|
||||
Glib::set_application_name(AppName.data());
|
||||
|
||||
#ifdef DESKTOP_APP_USE_PACKAGED_RLOTTIE
|
||||
g_warning(
|
||||
|
|
|
@ -53,7 +53,7 @@ ENV CXXFLAGS $CFLAGS
|
|||
FROM builder AS patches
|
||||
RUN git clone {{ GIT }}/desktop-app/patches.git \
|
||||
&& cd patches \
|
||||
&& git checkout c95e7f1bb7 \
|
||||
&& git checkout b3b5f5cf92 \
|
||||
&& rm -rf .git
|
||||
|
||||
FROM builder AS nasm
|
||||
|
@ -625,47 +625,20 @@ RUN git clone -b xkbcommon-1.3.1 --depth=1 {{ GIT }}/xkbcommon/libxkbcommon.git
|
|||
&& cd .. \
|
||||
&& rm -rf libxkbcommon
|
||||
|
||||
FROM builder AS mm-common
|
||||
RUN git clone -b 1.0.3 --depth=1 {{ GIT }}/GNOME/mm-common.git \
|
||||
&& cd mm-common \
|
||||
&& NOCONFIGURE=1 ./autogen.sh \
|
||||
&& ./configure --enable-network \
|
||||
&& make -j$(nproc) \
|
||||
&& make DESTDIR="{{ LibrariesPath }}/mm-common-cache" install \
|
||||
&& cd .. \
|
||||
&& rm -rf mm-common
|
||||
|
||||
FROM builder AS libsigcplusplus
|
||||
COPY --link --from=mm-common {{ LibrariesPath }}/mm-common-cache /
|
||||
|
||||
RUN git clone -b 2.10.7 --depth=1 {{ GIT }}/libsigcplusplus/libsigcplusplus.git \
|
||||
&& cd libsigcplusplus \
|
||||
&& export ACLOCAL_PATH="/usr/local/share/aclocal" \
|
||||
&& NOCONFIGURE=1 ./autogen.sh \
|
||||
&& ./configure \
|
||||
--enable-maintainer-mode \
|
||||
--enable-static \
|
||||
--disable-documentation \
|
||||
&& make -j$(nproc) \
|
||||
&& make DESTDIR="{{ LibrariesPath }}/libsigcplusplus-cache" install \
|
||||
&& cd .. \
|
||||
&& rm -rf libsigcplusplus
|
||||
|
||||
FROM patches AS glibmm
|
||||
COPY --link --from=mm-common {{ LibrariesPath }}/mm-common-cache /
|
||||
COPY --link --from=libsigcplusplus {{ LibrariesPath }}/libsigcplusplus-cache /
|
||||
|
||||
RUN git clone -b 2.56.1 --depth=1 {{ GIT }}/GNOME/glibmm.git \
|
||||
RUN git clone -b 2.74.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \
|
||||
&& cd glibmm \
|
||||
&& git apply ../patches/glibmm.patch \
|
||||
&& export ACLOCAL_PATH="/usr/local/share/aclocal" \
|
||||
&& NOCONFIGURE=1 ./autogen.sh \
|
||||
&& ./configure \
|
||||
--enable-maintainer-mode \
|
||||
--enable-static \
|
||||
--disable-documentation \
|
||||
&& make -j$(nproc) \
|
||||
&& make DESTDIR="{{ LibrariesPath }}/glibmm-cache" install \
|
||||
&& meson build \
|
||||
--buildtype=plain \
|
||||
--default-library=both \
|
||||
-Dbuild-documentation=false \
|
||||
-Dbuild-examples=false \
|
||||
-Dsigc++-3.0:build-documentation=false \
|
||||
-Dsigc++-3.0:build-examples=false \
|
||||
-Dmm-common:use-network=true \
|
||||
&& meson compile -C build \
|
||||
&& DESTDIR="{{ LibrariesPath }}/glibmm-cache" meson install -C build \
|
||||
&& cd .. \
|
||||
&& rm -rf glibmm
|
||||
|
||||
|
@ -806,7 +779,6 @@ COPY --link --from=ffmpeg {{ LibrariesPath }}/ffmpeg-cache /
|
|||
COPY --link --from=openal {{ LibrariesPath }}/openal-cache /
|
||||
COPY --link --from=openssl {{ LibrariesPath }}/openssl-cache /
|
||||
COPY --link --from=xkbcommon {{ LibrariesPath }}/xkbcommon-cache /
|
||||
COPY --link --from=libsigcplusplus {{ LibrariesPath }}/libsigcplusplus-cache /
|
||||
COPY --link --from=glibmm {{ LibrariesPath }}/glibmm-cache /
|
||||
COPY --link --from=qt {{ LibrariesPath }}/qt-cache /
|
||||
COPY --link --from=breakpad {{ LibrariesPath }}/breakpad-cache /
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 986a867f85716843eafbef6e2ae0820ea30d6cfc
|
||||
Subproject commit 2dc6281594037047cd7ea376fff28629035d93e0
|
|
@ -1 +1 @@
|
|||
Subproject commit ef855c7325e81c3075ec3213f3ef504cd93edcf6
|
||||
Subproject commit bbd42f7dfebf5c05b76e507fda50159e91d25dae
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit 36ee4977bbac6d5de4f3c463777a4e0588c661f9
|
||||
Subproject commit cc8fc487d7d6fbe0704753d35b7043bf0bed4549
|
Loading…
Add table
Reference in a new issue