Commit 20142e2a authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

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
parent 9f4097cd
......@@ -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);
......
#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"
......
......@@ -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@"
......
......@@ -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,
)
......
......@@ -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')
......
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 = {
......
......@@ -22,6 +22,7 @@
#include <glade-http.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
struct _GladeHTTPPrivate
{
......
#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"
......
vcs_tag(input: 'version.h.in', output: 'version.h')
fs = import('fs')
if fs.exists('../.git')
vcs_tag(input: 'version.h.in', output: 'version.h')
else
config = configuration_data()
config.set ('VCS_TAG', glade_version)
configure_file(
input: 'version.h.in',
output: 'version.h',
configuration: config
)
endif
sources = files(
'glade-http.c',
......@@ -39,13 +51,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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment