[glade/glade-3-38] Fix windows build on msys
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/glade-3-38] Fix windows build on msys
- Date: Wed, 14 Oct 2020 21:57:57 +0000 (UTC)
commit e15c7641aead60441a31fcbde61c9f24f6fd7751
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Tue Oct 6 20:34:11 2020 -0300
Fix windows build on msys
Use -Wl,--export-all-symbols and -Wl,--no-undefined to export
symbols on mingw
GladeApp: use PACKAGE_NAME instead of PACKAGE
Remove copyright symbol from resource files to avoid weird UTF error
building with mingw on msys
gladeui/glade-app.c | 6 +++---
gladeui/glade-previewer.rc.in | 4 ++--
gladeui/gladeui.rc.in | 2 +-
gladeui/meson.build | 10 +++++-----
meson.build | 3 +++
plugins/meson.build | 5 ++++-
src/glade-http.c | 5 +++--
src/glade.rc.in | 6 +++---
src/meson.build | 4 ++--
9 files changed, 26 insertions(+), 19 deletions(-)
---
diff --git a/gladeui/glade-app.c b/gladeui/glade-app.c
index c347400b..2942ebad 100644
--- a/gladeui/glade-app.c
+++ b/gladeui/glade-app.c
@@ -178,10 +178,10 @@ build_package_paths (void)
# endif
if (!pixmaps_dir)
- pixmaps_dir = g_build_filename (prefix, "share", PACKAGE, "pixmaps", NULL);
+ pixmaps_dir = g_build_filename (prefix, "share", PACKAGE_NAME, "pixmaps", NULL);
- catalogs_dir = g_build_filename (prefix, "share", PACKAGE, "catalogs", NULL);
- modules_dir = g_build_filename (prefix, "lib", PACKAGE, "modules", NULL);
+ catalogs_dir = g_build_filename (prefix, "share", PACKAGE_NAME, "catalogs", NULL);
+ modules_dir = g_build_filename (prefix, "lib", PACKAGE_NAME, "modules", NULL);
locale_dir = g_build_filename (prefix, "share", "locale", NULL);
bin_dir = g_build_filename (prefix, "bin", NULL);
lib_dir = g_build_filename (prefix, "lib", NULL);
diff --git a/gladeui/glade-previewer.rc.in b/gladeui/glade-previewer.rc.in
index 3ec103fa..0250b5b6 100644
--- a/gladeui/glade-previewer.rc.in
+++ b/gladeui/glade-previewer.rc.in
@@ -1,6 +1,6 @@
#include <winver.h>
-GLADE_ICON ICON "../data/icons/glade.ico"
+GLADE_ICON ICON "@SOURCE_ROOT@/data/icons/glade.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @GLADE_MAJOR_VERSION@,@GLADE_MINOR_VERSION@,@GLADE_MICRO_VERSION@,0
@@ -15,7 +15,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "CompanyName", "The GNOME Foundation"
VALUE "FileDescription", "Glade Interface Designer
@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@"
VALUE "FileVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
- VALUE "LegalCopyright", "Copyright � 2007 The GNOME Foundation"
+ VALUE "LegalCopyright", "Copyright 2007 The GNOME Foundation"
VALUE "OriginalFilename", "glade-previewer.exe"
VALUE "ProductName", "Glade Interface Designer"
VALUE "ProductVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
diff --git a/gladeui/gladeui.rc.in b/gladeui/gladeui.rc.in
index c1ae317c..401d09f2 100644
--- a/gladeui/gladeui.rc.in
+++ b/gladeui/gladeui.rc.in
@@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", "Glade Interface Designer
@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@"
VALUE "FileVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
VALUE "InternalName", "libgladeui-1-@GLADE_CURRENT_MINUS_AGE@"
- VALUE "LegalCopyright", "Copyright � 2007 The GNOME Foundation"
+ VALUE "LegalCopyright", "Copyright 2007 The GNOME Foundation"
VALUE "OriginalFilename", "libgladeui-1-@GLADE_CURRENT_MINUS_AGE@.dll"
VALUE "ProductName", "Glade Interface Designer"
VALUE "ProductVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@"
diff --git a/gladeui/meson.build b/gladeui/meson.build
index 484bf389..8ccf1b4f 100644
--- a/gladeui/meson.build
+++ b/gladeui/meson.build
@@ -184,8 +184,8 @@ endif
if glade_system == 'windows'
rc = configure_file(
- input: 'glade.rc.in',
- output: '@BASELINE@',
+ input: 'gladeui.rc.in',
+ output: 'gladeui.rc',
configuration: rc_conf,
)
@@ -193,8 +193,8 @@ if glade_system == 'windows'
ldflags += cc.get_supported_link_arguments([
# gmodule-export-2.0 on windows does not include -export-dynamic flag
- '-export-dynamic',
- '-no-undefined',
+ '-Wl,--export-all-symbols',
+ '-Wl,--no-undefined',
])
endif
@@ -264,7 +264,7 @@ ldflags = []
if glade_system == 'windows'
rc = configure_file(
input: 'glade-previewer.rc.in',
- output: '@BASELINE@',
+ output: 'glade-previewer.rc',
configuration: rc_conf,
)
diff --git a/meson.build b/meson.build
index bc2c2abc..32a9b4a2 100644
--- a/meson.build
+++ b/meson.build
@@ -65,6 +65,8 @@ glade_unstable = glade_minor_version.is_odd()
gnome = import('gnome')
i18n = import('i18n')
pkg = import('pkgconfig')
+
+# NOTE: On windows we only target MSYS2/mingw
windows = import('windows')
source_root = meson.current_source_dir()
@@ -181,6 +183,7 @@ if glade_system == 'windows'
rc_conf.set('GLADE_MINOR_VERSION', glade_minor_version)
rc_conf.set('GLADE_MICRO_VERSION', glade_micro_version)
rc_conf.set('GLADE_CURRENT_MINUS_AGE', gladeui_current_minus_age)
+ rc_conf.set('SOURCE_ROOT', source_root)
endif
subdir('po')
diff --git a/plugins/meson.build b/plugins/meson.build
index 88abd5d7..2f6626f4 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,6 +1,9 @@
ldflags = []
if glade_system == 'windows'
- ldflags += cc.get_supported_link_arguments('-no-undefined')
+ ldflags += cc.get_supported_link_arguments(
+ '-Wl,--export-all-symbols',
+ '-Wl,--no-undefined',
+ )
endif
plugins_kwargs = {
diff --git a/src/glade-http.c b/src/glade-http.c
index 1bf46a69..457ef977 100644
--- a/src/glade-http.c
+++ b/src/glade-http.c
@@ -1,11 +1,11 @@
/*
* Copyright (C) 2014, 2020 Juan Pablo Ugarte.
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -22,6 +22,7 @@
#include <glade-http.h>
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
struct _GladeHTTPPrivate
{
diff --git a/src/glade.rc.in b/src/glade.rc.in
index 6669a2cc..fbd02432 100644
--- a/src/glade.rc.in
+++ b/src/glade.rc.in
@@ -1,6 +1,6 @@
#include <winver.h>
-GLADE_ICON ICON "../data/icons/glade.ico"
+GLADE_ICON ICON "@SOURCE_ROOT@/data/icons/glade.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @GLADE_MAJOR_VERSION@,@GLADE_MINOR_VERSION@,@GLADE_MICRO_VERSION@,0
@@ -12,10 +12,10 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BLOCK "040904B0"
BEGIN
- VALUE "CompanyName", "GNOME Foundation"
+ VALUE "CompanyName", "The GNOME Foundation"
VALUE "FileDescription", "Glade Interface Designer
@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@"
VALUE "FileVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
- VALUE "LegalCopyright", "Copyright � 2012 The GNOME Foundation"
+ VALUE "LegalCopyright", "Copyright 2012 The GNOME Foundation"
VALUE "OriginalFilename", "glade.exe"
VALUE "ProductName", "Glade Interface Designer"
VALUE "ProductVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
diff --git a/src/meson.build b/src/meson.build
index e1d3c779..d1bc7c63 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -37,13 +37,13 @@ ldflags = []
if glade_system == 'windows'
rc = configure_file(
input: 'glade.rc.in',
- output: '@BASELINE@',
+ output: 'glade.rc',
configuration: rc_conf,
)
sources += windows.compile_resources(rc)
- test_ldflags = ['-export-dynamic']
+ test_ldflags = ['-Wl,--export-all-symbols']
if not glade_unstable
test_ldflags += ['-mwindows']
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]