[pango] meson: Build .rc files on Windows



commit 2b4f16068602a2ed9e3af0ea4d4273812cf3973c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 4 17:38:30 2017 +0800

    meson: Build .rc files on Windows
    
    Like the autotools builds, build the .rc files for the PangoCairo,
    PangoFT2, PangoWin32 and Pango DLLs so that people can see the version
    info more easily.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783274

 pango/meson.build      |   39 +++++++++++++++++++++++++++++++++++++++
 pango/pango.rc.in      |    2 +-
 pango/pangocairo.rc.in |    2 +-
 pango/pangoft2.rc.in   |    2 +-
 pango/pangowin32.rc.in |    2 +-
 5 files changed, 43 insertions(+), 4 deletions(-)
---
diff --git a/pango/meson.build b/pango/meson.build
index e963aaa..a335abb 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -64,6 +64,8 @@ pango_features_conf = configuration_data()
 pango_features_conf.set('PANGO_VERSION_MAJOR', pango_major_version)
 pango_features_conf.set('PANGO_VERSION_MINOR', pango_minor_version)
 pango_features_conf.set('PANGO_VERSION_MICRO', pango_micro_version)
+pango_features_conf.set('PANGO_API_VERSION', pango_api_version)
+pango_features_conf.set('PANGO_CURRENT_MINUS_AGE', '0')
 
 configure_file(input: 'pango-features.h.meson',
                output: 'pango-features.h',
@@ -80,6 +82,16 @@ pango_enums = gnome.mkenums('pango-enum-types',
                             install_header: true)
 pango_enum_h = pango_enums[1]
 
+if host_system == 'windows'
+  pango_rc = configure_file(
+    input: 'pango.rc.in',
+    output: 'pango.rc',
+    configuration: pango_features_conf,
+  )
+  pango_res = import('windows').compile_resources(pango_rc)
+  pango_sources += pango_res
+endif
+
 pango_cflags = [
   '-DG_LOG_DOMAIN="Pango"',
   '-DG_LOG_USE_STRUCTURED=1',
@@ -156,6 +168,16 @@ if freetype_dep.found()
     'pango-ot-tag.c',
   ]
 
+  if host_system == 'windows'
+    pangoft2_rc = configure_file(
+      input: 'pangoft2.rc.in',
+      output: 'pangoft2.rc',
+      configuration: pango_features_conf,
+    )
+    pangoft2_res = import('windows').compile_resources(pangoft2_rc)
+    pangoft2_sources += pangoft2_res
+  endif
+
   install_headers(pangoft2_headers, subdir: pango_api_path)
 
   libpangoft2 = shared_library('pangoft2-@0@'.format(pango_api_version),
@@ -265,6 +287,14 @@ if host_system == 'windows'
     cc.find_library('usp10'),
   ]
 
+  pangowin32_rc = configure_file(
+    input: 'pangowin32.rc.in',
+    output: 'pangowin32.rc',
+    configuration: pango_features_conf,
+  )
+  pangowin32_res = import('windows').compile_resources(pangowin32_rc)
+  pangowin32_sources += pangowin32_res
+
   install_headers(pangowin32_headers, subdir: pango_api_path)
 
   libpangowin32 = shared_library('pangowin32-@0@'.format(pango_api_version),
@@ -317,6 +347,15 @@ if cairo_dep.found()
       'pangocairo-win32font.c',
       'pangocairo-win32fontmap.c',
     ]
+
+    pangocairo_rc = configure_file(
+      input: 'pangocairo.rc.in',
+      output: 'pangocairo.rc',
+      configuration: pango_features_conf,
+    )
+    pangocairo_res = import('windows').compile_resources(pangocairo_rc)
+    pangocairo_sources += pangocairo_res
+
     pangocairo_deps += cc.find_library('gdi32')
     pangocairo_deps += libpangowin32_dep
   endif
diff --git a/pango/pango.rc.in b/pango/pango.rc.in
index a6cd252..3af8144 100644
--- a/pango/pango.rc.in
+++ b/pango/pango.rc.in
@@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
        VALUE "FileDescription", "Pango"
        VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
        VALUE "InternalName", "pango-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
-       VALUE "LegalCopyright", "Copyright � 1999 Red Hat Software."
+       VALUE "LegalCopyright", "Copyright 1999 Red Hat Software."
        VALUE "OriginalFilename", "pango-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
        VALUE "ProductName", "Pango"
        VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
diff --git a/pango/pangocairo.rc.in b/pango/pangocairo.rc.in
index 728cce7..26ce7da 100644
--- a/pango/pangocairo.rc.in
+++ b/pango/pangocairo.rc.in
@@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
        VALUE "FileDescription", "PangoCairo"
        VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
        VALUE "InternalName", "pangocairo-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
-       VALUE "LegalCopyright", "Copyright � 2010 Red Hat Software."
+       VALUE "LegalCopyright", "Copyright 2010 Red Hat Software."
        VALUE "OriginalFilename", "pangocairo-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
        VALUE "ProductName", "PangoCairo"
        VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
diff --git a/pango/pangoft2.rc.in b/pango/pangoft2.rc.in
index c7ed164..d9367ae 100644
--- a/pango/pangoft2.rc.in
+++ b/pango/pangoft2.rc.in
@@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
        VALUE "FileDescription", "PangoFT2"
        VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
        VALUE "InternalName", "pangoft2-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
-       VALUE "LegalCopyright", "Copyright � 1999 Red Hat Software. Copyright � 2000 Tor Lillqvist"
+       VALUE "LegalCopyright", "Copyright 1999 Red Hat Software. Copyright 2000 Tor Lillqvist"
        VALUE "OriginalFilename", "pangoft2-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
        VALUE "ProductName", "PangoFT2"
        VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
diff --git a/pango/pangowin32.rc.in b/pango/pangowin32.rc.in
index f78465d..fb020a0 100644
--- a/pango/pangowin32.rc.in
+++ b/pango/pangowin32.rc.in
@@ -17,7 +17,7 @@ VS_VERSION_INFO VERSIONINFO
        VALUE "FileDescription", "PangoWin32"
        VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
        VALUE "InternalName", "pangowin32-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
-       VALUE "LegalCopyright", "Copyright � 1999 Red Hat Software. Copyright � 2000 Tor Lillqvist"
+       VALUE "LegalCopyright", "Copyright 1999 Red Hat Software. Copyright 2000 Tor Lillqvist"
        VALUE "OriginalFilename", "pangowin32-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
        VALUE "ProductName", "PangoWin32"
        VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]