grim/guifications2

Fix some issues with the windows build
draft
2 months ago, Gary Kramlich
e1f127b8b481
Parents 16609a36c7f6
Children bb8a7baad156
Fix some issues with the windows build
--- a/meson.build Tue Apr 13 14:04:39 2021 -0500
+++ b/meson.build Wed Apr 14 01:06:18 2021 -0500
@@ -26,8 +26,6 @@
###############################################################################
# Dependencies
###############################################################################
-pkgconfig = import('pkgconfig')
-
GLIB = dependency('glib-2.0', version : '>=2.14.0')
GTK2 = dependency('gtk+-2.0', version : '>=2.14.0')
CAIRO = dependency('cairo')
@@ -43,7 +41,10 @@
GETTEXT_PACKAGE = 'guifications'
LOCALE_DIR = get_option('prefix') / get_option('localedir')
-add_project_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c')
+if target_machine.system() != 'windows'
+ add_project_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c')
+endif
+
add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE),
language : 'c')
@@ -56,11 +57,17 @@
###############################################################################
compiler = meson.get_compiler('c')
+if target_machine.system() != 'windows'
+ add_project_arguments(
+ '-DDATADIR="@0@"'.format(get_option('prefix') / get_option('datadir')),
+ '-DPREFIX="@0@"'.format(get_option('prefix')),
+ language : 'c'
+ )
+endif
+
add_project_arguments(
- '-DDATADIR="@0@"'.format(get_option('prefix') / get_option('datadir')),
'-DGF_WEBSITE="https://keep.imfreedom.org/grim/guifications2"',
- '-DPREFIX="@0@"'.format(get_option('prefix')),
- '-DVERSION="@0@"'.format(meson.project_version()),
+ '-DGF_VERSION="@0@"'.format(meson.project_version()),
language : 'c'
)
--- a/src/gf_internal.h Tue Apr 13 14:04:39 2021 -0500
+++ b/src/gf_internal.h Wed Apr 14 01:06:18 2021 -0500
@@ -36,7 +36,8 @@
#include <glib/gstdio.h>
#ifdef _WIN32
-# include <win32dep.h>
+# include "libpurple/win32/win32dep.h"
+# include "pidgin/win32/gtkwin32dep.h"
#endif /* _WIN32 */
#ifdef HAVE_CONFIG_H
--- a/src/gf_win32_display.c Tue Apr 13 14:04:39 2021 -0500
+++ b/src/gf_win32_display.c Wed Apr 14 01:06:18 2021 -0500
@@ -28,6 +28,8 @@
typedef HMONITOR WINAPI GF_MonitorFromRect(LPCRECT,DWORD);
typedef BOOL WINAPI GF_GetMonitorInfo(HMONITOR,LPMONITORINFO);
+#include "gf_display.h"
+
/*******************************************************************************
* Uses _NET_WORKAREA or SPI_GETWORKAREA to get the geometry of a screen
******************************************************************************/
@@ -136,8 +138,8 @@
GdkScreen *screen = NULL;
display = gdk_display_get_default();
- screen = gdk_display_get_screen(display, disp_screen);
- gdk_screen_get_monitor_geometry(screen, disp_monitor, rect);
+ screen = gdk_display_get_screen(display, gf_display_get_screen());
+ gdk_screen_get_monitor_geometry(screen, gf_display_get_monitor(), rect);
win32_adjust_workarea(rect);