mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Get rid of glibmm
This commit is contained in:
parent
3689e7dfbc
commit
d3715cc362
6 changed files with 7 additions and 96 deletions
|
@ -68,6 +68,7 @@ endif()
|
||||||
include(cmake/external/qt/package.cmake)
|
include(cmake/external/qt/package.cmake)
|
||||||
|
|
||||||
set(desktop_app_skip_libs
|
set(desktop_app_skip_libs
|
||||||
|
glibmm
|
||||||
variant
|
variant
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1679,11 +1679,6 @@ elseif (APPLE)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
target_link_libraries(Telegram
|
|
||||||
PRIVATE
|
|
||||||
desktop-app::external_glibmm
|
|
||||||
)
|
|
||||||
|
|
||||||
include(${cmake_helpers_loc}/external/glib/generate_dbus.cmake)
|
include(${cmake_helpers_loc}/external/glib/generate_dbus.cmake)
|
||||||
generate_dbus(Telegram org.freedesktop.portal. XdpBackground ${third_party_loc}/xdg-desktop-portal/data/org.freedesktop.portal.Background.xml)
|
generate_dbus(Telegram org.freedesktop.portal. XdpBackground ${third_party_loc}/xdg-desktop-portal/data/org.freedesktop.portal.Background.xml)
|
||||||
generate_dbus(Telegram org.freedesktop. XdgNotifications ${src_loc}/platform/linux/org.freedesktop.Notifications.xml)
|
generate_dbus(Telegram org.freedesktop. XdgNotifications ${src_loc}/platform/linux/org.freedesktop.Notifications.xml)
|
||||||
|
|
|
@ -35,8 +35,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include <kshell.h>
|
#include <kshell.h>
|
||||||
#include <ksandbox.h>
|
#include <ksandbox.h>
|
||||||
|
|
||||||
#include <glibmm.h>
|
|
||||||
|
|
||||||
#include <xdgdbus/xdgdbus.hpp>
|
#include <xdgdbus/xdgdbus.hpp>
|
||||||
#include <xdpbackground/xdpbackground.hpp>
|
#include <xdpbackground/xdpbackground.hpp>
|
||||||
#include <xdprequest/xdprequest.hpp>
|
#include <xdprequest/xdprequest.hpp>
|
||||||
|
@ -692,8 +690,6 @@ void start() {
|
||||||
GLib::set_prgname(cExeName().toStdString());
|
GLib::set_prgname(cExeName().toStdString());
|
||||||
GLib::set_application_name(AppName.data());
|
GLib::set_application_name(AppName.data());
|
||||||
|
|
||||||
Glib::init();
|
|
||||||
|
|
||||||
Webview::WebKitGTK::SetSocketPath(u"%1/%2-%3-webview-%4"_q.arg(
|
Webview::WebKitGTK::SetSocketPath(u"%1/%2-%3-webview-%4"_q.arg(
|
||||||
QDir::tempPath(),
|
QDir::tempPath(),
|
||||||
h,
|
h,
|
||||||
|
|
|
@ -705,27 +705,6 @@ RUN git clone -b 2.78.1 --depth=1 {{ GIT }}/GNOME/glib.git \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf glib
|
&& rm -rf glib
|
||||||
|
|
||||||
FROM patches AS glibmm
|
|
||||||
COPY --link --from=glib {{ LibrariesPath }}/glib-cache /
|
|
||||||
|
|
||||||
RUN git clone -b 2.78.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \
|
|
||||||
&& cd glibmm \
|
|
||||||
&& git apply ../patches/glibmm.patch \
|
|
||||||
&& CFLAGS="$CFLAGS {{ CFLAGS_LTO }}" CXXFLAGS="$CXXFLAGS {{ CFLAGS_LTO }}" 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 \
|
|
||||||
-Dsigc++-3.0:build-tests=false \
|
|
||||||
-Dsigc++-3.0:validation=false \
|
|
||||||
-Dmm-common:use-network=true \
|
|
||||||
&& meson compile -C build \
|
|
||||||
&& DESTDIR="{{ LibrariesPath }}/glibmm-cache" meson install -C build \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf glibmm
|
|
||||||
|
|
||||||
FROM builder AS gobject-introspection
|
FROM builder AS gobject-introspection
|
||||||
COPY --link --from=glib {{ LibrariesPath }}/glib-cache /
|
COPY --link --from=glib {{ LibrariesPath }}/glib-cache /
|
||||||
|
|
||||||
|
@ -873,7 +852,6 @@ COPY --link --from=openal {{ LibrariesPath }}/openal-cache /
|
||||||
COPY --link --from=openssl {{ LibrariesPath }}/openssl-cache /
|
COPY --link --from=openssl {{ LibrariesPath }}/openssl-cache /
|
||||||
COPY --link --from=xkbcommon {{ LibrariesPath }}/xkbcommon-cache /
|
COPY --link --from=xkbcommon {{ LibrariesPath }}/xkbcommon-cache /
|
||||||
COPY --link --from=glib {{ LibrariesPath }}/glib-cache /
|
COPY --link --from=glib {{ LibrariesPath }}/glib-cache /
|
||||||
COPY --link --from=glibmm {{ LibrariesPath }}/glibmm-cache /
|
|
||||||
COPY --link --from=gobject-introspection {{ LibrariesPath }}/gobject-introspection-cache /
|
COPY --link --from=gobject-introspection {{ LibrariesPath }}/gobject-introspection-cache /
|
||||||
COPY --link --from=qt {{ LibrariesPath }}/qt-cache /
|
COPY --link --from=qt {{ LibrariesPath }}/qt-cache /
|
||||||
COPY --link --from=breakpad {{ LibrariesPath }}/breakpad-cache /
|
COPY --link --from=breakpad {{ LibrariesPath }}/breakpad-cache /
|
||||||
|
|
|
@ -36,9 +36,6 @@ Or, to create a debug build, run (also using [your **api_id** and **api_hash**](
|
||||||
-D TDESKTOP_API_ID=YOUR_API_ID \
|
-D TDESKTOP_API_ID=YOUR_API_ID \
|
||||||
-D TDESKTOP_API_HASH=YOUR_API_HASH
|
-D TDESKTOP_API_HASH=YOUR_API_HASH
|
||||||
|
|
||||||
If you need a backward compatible binary (running on older OS like the official one), you should build the binary with LTO.
|
|
||||||
To do this, add `-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON` option.
|
|
||||||
|
|
||||||
The built files will be in the `out` directory.
|
The built files will be in the `out` directory.
|
||||||
|
|
||||||
[api_credentials]: api_credentials.md
|
[api_credentials]: api_credentials.md
|
||||||
|
|
|
@ -99,6 +99,7 @@ parts:
|
||||||
- libboost-regex1.74-dev
|
- libboost-regex1.74-dev
|
||||||
- libfmt-dev
|
- libfmt-dev
|
||||||
- libgirepository1.0-dev
|
- libgirepository1.0-dev
|
||||||
|
- libglib2.0-dev
|
||||||
- libheif-dev
|
- libheif-dev
|
||||||
- libopus-dev
|
- libopus-dev
|
||||||
- libpulse-dev
|
- libpulse-dev
|
||||||
|
@ -113,6 +114,7 @@ parts:
|
||||||
- libasound2
|
- libasound2
|
||||||
- libavif13
|
- libavif13
|
||||||
- libboost-regex1.74.0
|
- libboost-regex1.74.0
|
||||||
|
- libglib2.0-0
|
||||||
- libheif1
|
- libheif1
|
||||||
- libopus0
|
- libopus0
|
||||||
- libpulse0
|
- libpulse0
|
||||||
|
@ -156,7 +158,6 @@ parts:
|
||||||
after:
|
after:
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- libjxl
|
- libjxl
|
||||||
- glibmm
|
|
||||||
- mozjpeg
|
- mozjpeg
|
||||||
- openal
|
- openal
|
||||||
- protobuf
|
- protobuf
|
||||||
|
@ -176,18 +177,6 @@ parts:
|
||||||
rm -rf patches
|
rm -rf patches
|
||||||
stage: [-./*]
|
stage: [-./*]
|
||||||
|
|
||||||
meson-deps:
|
|
||||||
source: https://github.com/mesonbuild/meson.git
|
|
||||||
source-depth: 1
|
|
||||||
source-branch: 1.2.3
|
|
||||||
plugin: nil
|
|
||||||
build-packages:
|
|
||||||
- python3-pip
|
|
||||||
- ninja-build
|
|
||||||
override-build: |
|
|
||||||
pip install .
|
|
||||||
stage: [-./*]
|
|
||||||
|
|
||||||
desktop-qt:
|
desktop-qt:
|
||||||
source: https://github.com/desktop-app/snapcraft-desktop-helpers.git
|
source: https://github.com/desktop-app/snapcraft-desktop-helpers.git
|
||||||
source-depth: 1
|
source-depth: 1
|
||||||
|
@ -254,53 +243,6 @@ parts:
|
||||||
after:
|
after:
|
||||||
- mozjpeg
|
- mozjpeg
|
||||||
|
|
||||||
glib:
|
|
||||||
source: https://github.com/GNOME/glib.git
|
|
||||||
source-depth: 1
|
|
||||||
source-tag: 2.78.1
|
|
||||||
plugin: meson
|
|
||||||
build-packages:
|
|
||||||
- mm-common
|
|
||||||
- ninja-build
|
|
||||||
meson-parameters:
|
|
||||||
- --buildtype=release
|
|
||||||
- --prefix=/usr
|
|
||||||
- --strip
|
|
||||||
- -Dtests=false
|
|
||||||
prime:
|
|
||||||
- -./usr/include
|
|
||||||
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig
|
|
||||||
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
|
|
||||||
after:
|
|
||||||
- meson-deps
|
|
||||||
|
|
||||||
glibmm:
|
|
||||||
source: https://github.com/GNOME/glibmm.git
|
|
||||||
source-depth: 1
|
|
||||||
source-tag: 2.78.0
|
|
||||||
plugin: meson
|
|
||||||
build-packages:
|
|
||||||
- mm-common
|
|
||||||
- ninja-build
|
|
||||||
- libxml-parser-perl
|
|
||||||
meson-parameters:
|
|
||||||
- --buildtype=release
|
|
||||||
- --prefix=/usr
|
|
||||||
- --strip
|
|
||||||
- -Dbuild-documentation=false
|
|
||||||
- -Dbuild-examples=false
|
|
||||||
- -Dsigc++-3.0:build-documentation=false
|
|
||||||
- -Dsigc++-3.0:build-examples=false
|
|
||||||
- -Dsigc++-3.0:build-tests=false
|
|
||||||
- -Dsigc++-3.0:validation=false
|
|
||||||
prime:
|
|
||||||
- -./usr/include
|
|
||||||
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig
|
|
||||||
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
|
|
||||||
after:
|
|
||||||
- meson-deps
|
|
||||||
- glib
|
|
||||||
|
|
||||||
libjxl:
|
libjxl:
|
||||||
source: https://github.com/libjxl/libjxl.git
|
source: https://github.com/libjxl/libjxl.git
|
||||||
source-depth: 1
|
source-depth: 1
|
||||||
|
@ -418,6 +360,7 @@ parts:
|
||||||
- libegl-dev
|
- libegl-dev
|
||||||
- libfontconfig1-dev
|
- libfontconfig1-dev
|
||||||
- libfreetype-dev
|
- libfreetype-dev
|
||||||
|
- libglib2.0-dev
|
||||||
- libglx-dev
|
- libglx-dev
|
||||||
- libgtk-3-dev
|
- libgtk-3-dev
|
||||||
- libharfbuzz-dev
|
- libharfbuzz-dev
|
||||||
|
@ -456,6 +399,7 @@ parts:
|
||||||
- libegl1
|
- libegl1
|
||||||
- libfontconfig1
|
- libfontconfig1
|
||||||
- libfreetype6
|
- libfreetype6
|
||||||
|
- libglib2.0-0
|
||||||
- libglx0
|
- libglx0
|
||||||
- libgtk-3-0
|
- libgtk-3-0
|
||||||
- libharfbuzz0b
|
- libharfbuzz0b
|
||||||
|
@ -535,7 +479,6 @@ parts:
|
||||||
- -./usr/mkspecs
|
- -./usr/mkspecs
|
||||||
- -./usr/modules
|
- -./usr/modules
|
||||||
after:
|
after:
|
||||||
- glib
|
|
||||||
- mozjpeg
|
- mozjpeg
|
||||||
- patches
|
- patches
|
||||||
|
|
||||||
|
@ -579,6 +522,7 @@ parts:
|
||||||
- libegl-dev
|
- libegl-dev
|
||||||
- libgbm-dev
|
- libgbm-dev
|
||||||
- libgl-dev
|
- libgl-dev
|
||||||
|
- libglib2.0-dev
|
||||||
- libopenh264-dev
|
- libopenh264-dev
|
||||||
- libopus-dev
|
- libopus-dev
|
||||||
- libpipewire-0.3-dev
|
- libpipewire-0.3-dev
|
||||||
|
@ -597,6 +541,7 @@ parts:
|
||||||
- libegl1
|
- libegl1
|
||||||
- libgbm1
|
- libgbm1
|
||||||
- libgl1
|
- libgl1
|
||||||
|
- libglib2.0-0
|
||||||
- libopenh264-6
|
- libopenh264-6
|
||||||
- libopus0
|
- libopus0
|
||||||
- libssl3
|
- libssl3
|
||||||
|
@ -620,5 +565,4 @@ parts:
|
||||||
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.a
|
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.a
|
||||||
after:
|
after:
|
||||||
- ffmpeg
|
- ffmpeg
|
||||||
- glib
|
|
||||||
- mozjpeg
|
- mozjpeg
|
||||||
|
|
Loading…
Add table
Reference in a new issue