mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
remove more gtk2
This commit is contained in:
@@ -42,6 +42,7 @@ config_h.set('USE_OPENSSL', libssl_dep.found())
|
||||
config_h.set('USE_LIBCANBERRA', libcanberra_dep.found())
|
||||
config_h.set('USE_DBUS', dbus_glib_dep.found())
|
||||
config_h.set('USE_PLUGIN', get_option('plugin'))
|
||||
config_h.set('USE_GTK_FRONTEND', get_option('gtk-frontend'))
|
||||
|
||||
config_h.set('G_DISABLE_SINGLE_INCLUDES', true)
|
||||
config_h.set('GTK_DISABLE_DEPRECATED', true)
|
||||
|
||||
@@ -10,7 +10,7 @@ sysinfo_deps = [
|
||||
]
|
||||
|
||||
sysinfo_includes = []
|
||||
sysinfo_cargs = []
|
||||
sysinfo_cargs = ['-DHAVE_CONFIG_H']
|
||||
|
||||
system = host_machine.system()
|
||||
if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'darwin' or system == 'freebsd'
|
||||
@@ -19,6 +19,10 @@ if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system =
|
||||
'shared/df.c'
|
||||
]
|
||||
|
||||
if get_option('gtk-frontend')
|
||||
sysinfo_cargs += '-DUSE_GTK_FRONTEND'
|
||||
endif
|
||||
|
||||
if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'freebsd'
|
||||
libpci = dependency('libpci', required: false, method: 'pkg-config')
|
||||
if libpci.found()
|
||||
@@ -30,6 +34,10 @@ if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system =
|
||||
pciids = join_paths(picidsdir, 'pci.ids')
|
||||
sysinfo_cargs += '-DPCIIDS_FILE="@0@"'.format(pciids)
|
||||
endif
|
||||
if get_option('gtk-frontend')
|
||||
sysinfo_deps += dependency('gtk+-3.0', version: '>= 3.22')
|
||||
endif
|
||||
|
||||
sysinfo_includes += 'unix'
|
||||
sysinfo_sources += [
|
||||
'unix/backend.c',
|
||||
@@ -52,7 +60,7 @@ endif
|
||||
|
||||
shared_module('sysinfo', sysinfo_sources,
|
||||
dependencies: sysinfo_deps,
|
||||
include_directories: include_directories(sysinfo_includes),
|
||||
include_directories: [config_h_include, include_directories(sysinfo_includes)],
|
||||
c_args: sysinfo_cargs,
|
||||
install: true,
|
||||
install_dir: plugindir,
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "format.h"
|
||||
#include "df.h"
|
||||
|
||||
@@ -276,7 +280,7 @@ sysinfo_backend_get_network(void)
|
||||
|
||||
static const char *sysinfo_detect_toolkit(void)
|
||||
{
|
||||
#if defined(HAVE_GTK3)
|
||||
#if defined(USE_GTK_FRONTEND)
|
||||
return "GTK3";
|
||||
#else
|
||||
return NULL;
|
||||
|
||||
@@ -19,7 +19,11 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#if defined(HAVE_GTK3)
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_GTK_FRONTEND)
|
||||
#include <gdk/gdk.h>
|
||||
#endif
|
||||
#include "parse.h"
|
||||
@@ -175,7 +179,7 @@ char *sysinfo_backend_get_network(void)
|
||||
|
||||
static const char *sysinfo_detect_toolkit(void)
|
||||
{
|
||||
#if defined(HAVE_GTK3)
|
||||
#if defined(USE_GTK_FRONTEND)
|
||||
return "GTK3";
|
||||
#else
|
||||
return NULL;
|
||||
@@ -190,7 +194,7 @@ static const char *sysinfo_detect_display_backend(void)
|
||||
const gboolean session_wayland = session && g_ascii_strcasecmp(session, "wayland") == 0;
|
||||
|
||||
/* Best-effort: ask GDK what it actually opened, if available. */
|
||||
#if defined(HAVE_GTK3)
|
||||
#if defined(USE_GTK_FRONTEND)
|
||||
{
|
||||
GdkDisplay *display = gdk_display_get_default();
|
||||
if (display)
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../../../src/common/sysinfo/sysinfo.h"
|
||||
|
||||
#include "../format.h"
|
||||
@@ -106,7 +110,7 @@ static char *get_memory_info (void)
|
||||
|
||||
static const char *sysinfo_detect_toolkit(void)
|
||||
{
|
||||
#if defined(HAVE_GTK3)
|
||||
#if defined(USE_GTK_FRONTEND)
|
||||
return "GTK3";
|
||||
#else
|
||||
return NULL;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<!-- G_DISABLE_DEPRECATED is unfeasible due to g_completion_* -->
|
||||
<!-- must be buildable with GSEAL_ENABLE in the future, xtext, setup, and chanview-tabs stand in the way -->
|
||||
<OwnFlags>GTK_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;HAVE_X509_GET_SIGNATURE_NID;HAVE_SSL_CTX_GET_SSL_METHOD;DEFAULT_CERT_FILE="cert.pem";HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp;__inline__=__inline;$(GtkDefines)</OwnFlags>
|
||||
<OwnFlags>GTK_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;HAVE_X509_GET_SIGNATURE_NID;HAVE_SSL_CTX_GET_SSL_METHOD;DEFAULT_CERT_FILE="cert.pem";HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp;__inline__=__inline</OwnFlags>
|
||||
|
||||
<!-- FIXME: Add ability to use debug builds -->
|
||||
<DepsRoot>$(YourDepsPath)\$(ZoiteChatPlatform)\release</DepsRoot>
|
||||
@@ -67,7 +67,6 @@
|
||||
<Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>
|
||||
|
||||
<UsingGtk3 Condition="Exists('$(DepsRoot)\\include\\gtk-3.0\\gtk\\gtk.h')">true</UsingGtk3>
|
||||
<GtkDefines>HAVE_GTK3</GtkDefines>
|
||||
<Gtk3>$(DepsRoot)\include\gtk-3.0;$(DepsRoot)\lib\gtk-3.0\include</Gtk3>
|
||||
<GtkCommon>$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0;$(DepsRoot)\include\harfbuzz</GtkCommon>
|
||||
<Gtk>$(Gtk3);$(GtkCommon)</Gtk>
|
||||
|
||||
Reference in New Issue
Block a user