diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2016-04-21 18:03:13 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2016-04-21 19:06:27 +0800 |
commit | 626e3c4a4a5dffecb5b6cb9227843db50701f594 (patch) | |
tree | 8387d1bbb7ef2d5cff489abf37062bca391955ff /build | |
parent | 9549b7ad68bdbbf22e09940ea43735b9c5396547 (diff) | |
download | pango-626e3c4a4a5dffecb5b6cb9227843db50701f594.tar.gz |
Visual Studio builds: Generate .pc files
If python can be found at $(PythonPath)\python.exe (x86 builds) or
$(PythonPathX64)\python.exe (x64 builds), generate .pc files for Pango, as
appropriate with the build config chosen. This will make building
introspection on Visual Studio easier with packages that depend on Pango.
Diffstat (limited to 'build')
-rw-r--r-- | build/win32/Makefile.am | 3 | ||||
-rw-r--r-- | build/win32/pangopc.py | 55 | ||||
-rw-r--r-- | build/win32/pc_base.py | 108 | ||||
-rw-r--r-- | build/win32/replace.py | 109 | ||||
-rw-r--r-- | build/win32/vs10/Makefile.am | 1 | ||||
-rw-r--r-- | build/win32/vs10/pango-install.propsin | 29 | ||||
-rw-r--r-- | build/win32/vs10/pango-install.vcxproj | 50 | ||||
-rw-r--r-- | build/win32/vs10/pango-install.vcxproj.filters | 13 | ||||
-rw-r--r-- | build/win32/vs11/Makefile.am | 1 | ||||
-rw-r--r-- | build/win32/vs12/Makefile.am | 1 | ||||
-rw-r--r-- | build/win32/vs14/Makefile.am | 1 | ||||
-rw-r--r-- | build/win32/vs9/pango-install.vcproj | 88 | ||||
-rw-r--r-- | build/win32/vs9/pango-install.vspropsin | 14 |
13 files changed, 449 insertions, 24 deletions
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am index 71e5b477..90b9c093 100644 --- a/build/win32/Makefile.am +++ b/build/win32/Makefile.am @@ -34,6 +34,9 @@ EXTRA_DIST = \ pango-introspection-msvc.mak \ introspection-msvc.mak \ detectenv-msvc.mak \ + pangopc.py \ + pc_base.py \ + replace.py \ $(GENERATED_ITEMS) -include $(top_srcdir)/git.mk diff --git a/build/win32/pangopc.py b/build/win32/pangopc.py new file mode 100644 index 00000000..c5c27f35 --- /dev/null +++ b/build/win32/pangopc.py @@ -0,0 +1,55 @@ +#!/usr/bin/python +# +# Utility script to generate .pc files for Pango +# for Visual Studio builds, to be used for +# building introspection files + +# Author: Fan, Chun-wei +# Date: April 21, 2016 + +import os +import sys +import argparse + +from replace import replace_multi +from pc_base import BasePCItems + +def main(argv): + base_pc = BasePCItems() + + pango_parser = argparse.ArgumentParser(description='Setup basic .pc file info') + pango_parser.add_argument('--pangoft2', + action='store_const', + const=1, + help='Create .pc for PangoFT2') + base_pc.setup(argv, pango_parser) + base_pkg_replace_items = {'@PANGO_API_VERSION@': '1.0'} + + base_pkg_replace_items.update(base_pc.base_replace_items) + + # Generate pango.pc + replace_multi(base_pc.top_srcdir + '/pango.pc.in', + base_pc.srcdir + '/pango.pc', + base_pkg_replace_items) + + # Generate pangowin32.pc + replace_multi(base_pc.top_srcdir + '/pangowin32.pc.in', + base_pc.srcdir + '/pangowin32.pc', + base_pkg_replace_items) + + # Generate pangoft2.pc, if requested + pango_args = pango_parser.parse_args() + if getattr(pango_args, 'pangoft2', None) is 1: + replace_multi(base_pc.top_srcdir + '/pangoft2.pc.in', + base_pc.srcdir + '/pangoft2.pc', + base_pkg_replace_items) + + # Generate pangocairo.pc + pangocairo_replace_items = {'@PKGCONFIG_CAIRO_REQUIRES@': 'cairo'} + pangocairo_replace_items.update(base_pkg_replace_items) + replace_multi(base_pc.top_srcdir + '/pangocairo.pc.in', + base_pc.srcdir + '/pangocairo.pc', + pangocairo_replace_items) + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/build/win32/pc_base.py b/build/win32/pc_base.py new file mode 100644 index 00000000..da10560a --- /dev/null +++ b/build/win32/pc_base.py @@ -0,0 +1,108 @@ +#!/usr/bin/python +# +# Simple utility script to generate the basic info +# needed in a .pc (pkg-config) file, used especially +# for introspection purposes + +# This can be used in various projects where +# there is the need to generate .pc files, +# and is copied from GLib's $(srcroot)/build/win32 + +# Author: Fan, Chun-wei +# Date: March 10, 2016 + +import os +import sys +import argparse + +class BasePCItems: + def __init__(self): + self.base_replace_items = {} + self.exec_prefix = '' + self.includedir = '' + self.libdir = '' + self.prefix = '' + self.srcdir = os.path.dirname(__file__) + self.top_srcdir = self.srcdir + '\\..\\..' + self.version = '' + + def setup(self, argv, parser=None): + if parser is None: + parser = argparse.ArgumentParser(description='Setup basic .pc file info') + parser.add_argument('--prefix', help='prefix of the installed library', + required=True) + parser.add_argument('--exec-prefix', + help='prefix of the installed programs, \ + if different from the prefix') + parser.add_argument('--includedir', + help='includedir of the installed library, \ + if different from ${prefix}/include') + parser.add_argument('--libdir', + help='libdir of the installed library, \ + if different from ${prefix}/lib') + parser.add_argument('--version', help='Version of the package', + required=True) + args = parser.parse_args() + + self.version = args.version + + # check whether the prefix and exec_prefix are valid + if not os.path.exists(args.prefix): + raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix) + + # check and setup the exec_prefix + if getattr(args, 'exec_prefix', None) is None: + input_exec_prefix = args.prefix + else: + input_exec_prefix = args.exec_prefix + if not os.path.exists(input_exec_prefix): + raise SystemExit('Specified exec-prefix \'%s\' is invalid' % + input_exec_prefix) + + + # check and setup the includedir + if getattr(args, 'includedir', None) is None: + self.includedir = '${prefix}/include' + else: + if args.includedir.startswith('${prefix}'): + includedir_use_shorthand = True + input_includedir = args.prefix + args.includedir[len('${prefix}'):] + else: + includedir_use_shorthand = False + input_includedir = args.includedir + if not os.path.exists(input_includedir): + raise SystemExit('Specified includedir \'%s\' is invalid' % + args.includedir) + if includedir_use_shorthand is True: + self.includedir = args.includedir.replace('\\','/') + else: + self.includedir = os.path.abspath(input_includedir).replace('\\','/') + + # check and setup the libdir + if getattr(args, 'libdir', None) is None: + self.libdir = '${prefix}/lib' + else: + if args.libdir.startswith('${prefix}'): + libdir_use_shorthand = True + input_libdir = args.prefix + args.libdir[len('${prefix}'):] + else: + libdir_use_shorthand = False + input_libdir = args.libdir + if not os.path.exists(input_libdir): + raise SystemExit('Specified libdir \'%s\' is invalid' % + args.libdir) + if libdir_use_shorthand is True: + self.libdir = args.libdir.replace('\\','/') + else: + self.libdir = os.path.abspath(input_libdir).replace('\\','/') + + # use absolute paths for prefix and exec_prefix + self.prefix = os.path.abspath(args.prefix).replace('\\','/') + self.exec_prefix = os.path.abspath(input_exec_prefix).replace('\\','/') + + # setup dictionary for replacing items in *.pc.in + self.base_replace_items.update({'@VERSION@': self.version}) + self.base_replace_items.update({'@prefix@': self.prefix}) + self.base_replace_items.update({'@exec_prefix@': self.exec_prefix}) + self.base_replace_items.update({'@libdir@': self.libdir}) + self.base_replace_items.update({'@includedir@': self.includedir}) diff --git a/build/win32/replace.py b/build/win32/replace.py new file mode 100644 index 00000000..a81bab94 --- /dev/null +++ b/build/win32/replace.py @@ -0,0 +1,109 @@ +#!/usr/bin/python +# +# Simple utility script to manipulate +# certain types of strings in a file + +# This can be used in various projects where +# there is the need to replace strings in files, +# and is copied from GLib's $(srcroot)/build/win32 + +# Author: Fan, Chun-wei +# Date: September 03, 2014 + +import os +import sys +import re +import string +import argparse + +valid_actions = ['remove-prefix', + 'replace-var', + 'replace-str', + 'remove-str'] + +def replace_multi(src, dest, replace_items): + with open(src, 'r') as s: + with open(dest, 'w') as d: + for line in s: + replace_dict = dict((re.escape(key), value) \ + for key, value in replace_items.items()) + replace_pattern = re.compile("|".join(replace_dict.keys())) + d.write(replace_pattern.sub(lambda m: \ + replace_dict[re.escape(m.group(0))], line)) + +def replace(src, dest, instring, outstring): + replace_item = {instring: outstring} + replace_multi(src, dest, replace_item) + +def check_required_args(args, params): + for param in params: + if getattr(args, param, None) is None: + raise SystemExit('%s: error: --%s argument is required' % (__file__, param)) + +def warn_ignored_args(args, params): + for param in params: + if getattr(args, param, None) is not None: + print('%s: warning: --%s argument is ignored' % (__file__, param)) + +def main(argv): + + parser = argparse.ArgumentParser(description='Process strings in a file.') + parser.add_argument('-a', + '--action', + help='Action to carry out. Can be one of:\n' + 'remove-prefix\n' + 'replace-var\n' + 'replace-str\n' + 'remove-str', + choices=valid_actions) + parser.add_argument('-i', '--input', help='Input file') + parser.add_argument('-o', '--output', help='Output file') + parser.add_argument('--instring', help='String to replace or remove') + parser.add_argument('--var', help='Autotools variable name to replace') + parser.add_argument('--outstring', + help='New String to replace specified string or variable') + parser.add_argument('--removeprefix', help='Prefix of string to remove') + + args = parser.parse_args() + + input_string = '' + output_string = '' + + # We must have action, input, output for all operations + check_required_args(args, ['action','input','output']) + + # Build the arguments by the operation that is to be done, + # to be fed into replace() + + # Get rid of prefixes from a string + if args.action == 'remove-prefix': + check_required_args(args, ['instring','removeprefix']) + warn_ignored_args(args, ['outstring','var']) + input_string = args.removeprefix + args.instring + output_string = args.instring + + # Replace an m4-style variable (those surrounded by @...@) + if args.action == 'replace-var': + check_required_args(args, ['var','outstring']) + warn_ignored_args(args, ['instring','removeprefix']) + input_string = '@' + args.var + '@' + output_string = args.outstring + + # Replace a string + if args.action == 'replace-str': + check_required_args(args, ['instring','outstring']) + warn_ignored_args(args, ['var','removeprefix']) + input_string = args.instring + output_string = args.outstring + + # Remove a string + if args.action == 'remove-str': + check_required_args(args, ['instring']) + warn_ignored_args(args, ['var','outstring','removeprefix']) + input_string = args.instring + output_string = '' + + replace(args.input, args.output, input_string, output_string) + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am index 834fde26..1ba048f1 100644 --- a/build/win32/vs10/Makefile.am +++ b/build/win32/vs10/Makefile.am @@ -26,6 +26,7 @@ EXTRA_DIST = \ pangocairo.vcxprojin \ pangocairo.vcxproj.filtersin \ pango-install.vcxproj \ + pango-install.vcxproj.filters \ README.txt \ $(GENERATED_ITEMS) diff --git a/build/win32/vs10/pango-install.propsin b/build/win32/vs10/pango-install.propsin index f8cba892..efac8945 100644 --- a/build/win32/vs10/pango-install.propsin +++ b/build/win32/vs10/pango-install.propsin @@ -5,12 +5,14 @@ </ImportGroup> <PropertyGroup Label="UserMacros"> <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir> - <InstalledDlls>$(BinDir)\$(PangoDllPrefix)pango(PangoDllSuffix).dll;$(BinDir)\$(PangoDllPrefix)pangowin32(PangoDllSuffix).dll;$(BinDir)\$(PangoDllPrefix)pangocairo(PangoDllSuffix).dll</InstalledDlls> - <InstalledFCDlls>$(BinDir)\$(PangoDllPrefix)pangoft2(PangoDllSuffix).dll</InstalledFCDlls> <PangoInstallHeadersData> mkdir $(CopyDir)\include\pango-$(ApiVersion)\pango #include "pango.vs10.headers" +if exist ..\pango.pc (mkdir $(CopyDir)\lib\pkgconfig & copy ..\pango.pc $(CopyDir)\lib\pkgconfig) +if exist ..\pangowin32.pc copy ..\pangowin32.pc $(CopyDir)\lib\pkgconfig +if exist ..\pangocairo.pc copy ..\pangocairo.pc $(CopyDir)\lib\pkgconfig + if "$(Configuration)" == "Release" goto END if "$(Configuration)" == "Debug" goto END @@ -20,8 +22,13 @@ copy ..\..\..\pango\pangofc-fontmap.h $(CopyDir)\include\pango-$(ApiVersion)\pan copy ..\..\..\pango\pango-ot.h $(CopyDir)\include\pango-$(ApiVersion)\pango copy ..\..\..\pango\pangoft2.h $(CopyDir)\include\pango-$(ApiVersion)\pango +if exist ..\pangoft2.pc copy ..\pangoft2.pc $(CopyDir)\lib\pkgconfig :END </PangoInstallHeadersData> + <GenPangoPC>if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)</GenPangoPC> + <GenPangoPCX64>if exist $(PythonPathX64)\python.exe $(PythonPathX64)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)</GenPangoPCX64> + <PangoPCFiles>..\pango.pc;..\pangowin32.pc;..\pangocairo.pc</PangoPCFiles> + <PangoFT2PCFiles>..\pangoft2.pc</PangoFT2PCFiles> </PropertyGroup> <PropertyGroup> <_PropertySheetDisplayName>pangoinstallprops</_PropertySheetDisplayName> @@ -32,14 +39,20 @@ copy ..\..\..\pango\pangoft2.h $(CopyDir)\include\pango-$(ApiVersion)\pango <BuildMacro Include="BinDir"> <Value>$(BinDir)</Value> </BuildMacro> - <BuildMacro Include="InstalledDlls"> - <Value>$(InstalledDlls)</Value> - </BuildMacro> - <BuildMacro Include="InstalledFCDlls"> - <Value>$(InstalledFCDlls)</Value> - </BuildMacro> <BuildMacro Include="PangoInstallHeadersData"> <Value>$(PangoInstallHeadersData)</Value> </BuildMacro> + <BuildMacro Include="GenPangoPC"> + <Value>$(GenPangoPC)</Value> + </BuildMacro> + <BuildMacro Include="GenPangoPCX64"> + <Value>$(GenPangoPCX64)</Value> + </BuildMacro> + <BuildMacro Include="PangoPCFiles"> + <Value>$(PangoPCFiles)</Value> + </BuildMacro> + <BuildMacro Include="PangoFT2PCFiles"> + <Value>$(PangoFT2PCFiles)</Value> + </BuildMacro> </ItemGroup> </Project> diff --git a/build/win32/vs10/pango-install.vcxproj b/build/win32/vs10/pango-install.vcxproj index ac0289f0..28ac16e9 100644 --- a/build/win32/vs10/pango-install.vcxproj +++ b/build/win32/vs10/pango-install.vcxproj @@ -157,29 +157,63 @@ <ItemGroup> <CustomBuild Include="..\..\..\config.h.win32"> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PangoPCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">$(PangoPCFiles);$(PangoFT2PCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">$(InstalledDlls);$(InstalledFCDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PangoPCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">$(PangoPCFiles);$(PangoFT2PCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">$(InstalledDlls);$(InstalledFCDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PangoPCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">$(PangoPCFiles);$(PangoFT2PCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">$(InstalledDlls);$(InstalledFCDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PangoPCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">blah;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">Installing Build Results...</Message> + <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">$(PangoPCFiles);$(PangoFT2PCFiles)</AdditionalInputs> <Command Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">$(PangoDoInstallBin) $(PangoInstallHeadersData)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">$(InstalledDlls);$(InstalledFCDlls);%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">blah;%(Outputs)</Outputs> + </CustomBuild> + <CustomBuild Include="..\pangopc.py"> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenPangoPC)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PangoPCFiles);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">$(GenPangoPC) --pangoft2</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|Win32'">$(PangoPCFiles);$(PangoFT2PCFile);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenPangoPCX64)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PangoPCFiles);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">$(GenPangoPCX64) --pangoft2</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_FC|x64'">$(PangoPCFiles);$(PangoFT2PCFile);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenPangoPC)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PangoPCFiles);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">$(GenPangoPC) --pangoft2</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|Win32'">$(PangoPCFiles);$(PangoFT2PCFile);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenPangoPCX64)</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PangoPCFiles);%(Outputs)</Outputs> + <Message Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">Generating .pc files...</Message> + <Command Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">$(GenPangoPCX64) --pangoft2</Command> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release_FC|x64'">$(PangoPCFiles);$(PangoFT2PCFile);%(Outputs)</Outputs> </CustomBuild> </ItemGroup> <ItemGroup> diff --git a/build/win32/vs10/pango-install.vcxproj.filters b/build/win32/vs10/pango-install.vcxproj.filters new file mode 100644 index 00000000..9a12c756 --- /dev/null +++ b/build/win32/vs10/pango-install.vcxproj.filters @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <CustomBuild Include="..\pangopc.py"><Filter>Resource Files</Filter></CustomBuild> + <CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild> + </ItemGroup> +</Project> diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am index 3984bafd..ff4af39e 100644 --- a/build/win32/vs11/Makefile.am +++ b/build/win32/vs11/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = \ pangocairo.vcxproj \ pangocairo.vcxproj.filters \ pango-install.vcxproj \ + pango-install.vcxproj.filters \ README.txt DISTCLEANFILES = $(EXTRA_DIST) diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am index 146d90c0..b30d7899 100644 --- a/build/win32/vs12/Makefile.am +++ b/build/win32/vs12/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = \ pangocairo.vcxproj \ pangocairo.vcxproj.filters \ pango-install.vcxproj \ + pango-install.vcxproj.filters \ README.txt DISTCLEANFILES = $(EXTRA_DIST) diff --git a/build/win32/vs14/Makefile.am b/build/win32/vs14/Makefile.am index 0d210eca..e735ba50 100644 --- a/build/win32/vs14/Makefile.am +++ b/build/win32/vs14/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = \ pangocairo.vcxproj \ pangocairo.vcxproj.filters \ pango-install.vcxproj \ + pango-install.vcxproj.filters \ README.txt DISTCLEANFILES = $(EXTRA_DIST) diff --git a/build/win32/vs9/pango-install.vcproj b/build/win32/vs9/pango-install.vcproj index 39fc1983..aba571b1 100644 --- a/build/win32/vs9/pango-install.vcproj +++ b/build/win32/vs9/pango-install.vcproj @@ -28,7 +28,7 @@ DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -41,7 +41,7 @@ DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -55,7 +55,7 @@ WholeProgramOptimization="1" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -69,7 +69,7 @@ WholeProgramOptimization="1" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -82,7 +82,7 @@ DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -95,7 +95,7 @@ DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -109,7 +109,7 @@ DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -123,7 +123,7 @@ DeleteExtensionsOnClean="" > <Tool - Name="VCPreBuildEventTool" + Name="VCPostBuildEventTool" CommandLine="$(PangoInstallBin) $(PangoInstallHeadersData)" /> </Configuration> @@ -131,6 +131,78 @@ <References> </References> <Files> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File RelativePath="..\pangopc.py"> + <FileConfiguration Name="Debug_FC|Win32"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPC) --pangoft2" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc;..\pangoft2.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Debug|Win32"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPC)" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Release_FC|Win32"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPC) --pangoft2" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc;..\pangoft2.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Release|Win32"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPC)" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Debug_FC|x64"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPCX64) --pangoft2" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc;..\pangoft2.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Debug|x64"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPCX64)" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Release_FC|x64"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPCX64) --pangoft2" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc;..\pangoft2.pc" + /> + </FileConfiguration> + <FileConfiguration Name="Release|x64"> + <Tool + Name="VCCustomBuildTool" + Description="Generating .pc files..." + CommandLine="$(GenPangoPCX64)" + Outputs="..\pango.pc;..\pangowin32.pc;..\pangocairo.pc" + /> + </FileConfiguration> + </File> + </Filter> </Files> <Globals> </Globals> diff --git a/build/win32/vs9/pango-install.vspropsin b/build/win32/vs9/pango-install.vspropsin index 955e4a3f..3ea9cb25 100644 --- a/build/win32/vs9/pango-install.vspropsin +++ b/build/win32/vs9/pango-install.vspropsin @@ -11,6 +11,10 @@ mkdir $(CopyDir)\include\pango-$(ApiVersion)\pango
 #include "pango.headers" +if exist ..\pango.pc (mkdir $(CopyDir)\lib\pkgconfig & copy ..\pango.pc $(CopyDir)\lib\pkgconfig)
 +if exist ..\pangowin32.pc copy ..\pangowin32.pc $(CopyDir)\lib\pkgconfig
 +if exist ..\pangocairo.pc copy ..\pangocairo.pc $(CopyDir)\lib\pkgconfig
 + if "$(ConfigurationName)" == "Release" goto END
 if "$(ConfigurationName)" == "Debug" goto END
 @@ -20,7 +24,17 @@ copy ..\..\..\pango\pangofc-fontmap.h $(CopyDir)\include\pango-$(ApiVersion)\pan copy ..\..\..\pango\pango-ot.h $(CopyDir)\include\pango-$(ApiVersion)\pango
 copy ..\..\..\pango\pangoft2.h $(CopyDir)\include\pango-$(ApiVersion)\pango
 +if exist ..\pangoft2.pc copy ..\pangoft2.pc $(CopyDir)\lib\pkgconfig
 + :END
 " /> + <UserMacro + Name="GenPangoPC" + Value="if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)" + /> + <UserMacro + Name="GenPangoPCX64" + Value="if exist $(PythonPathX64)\python.exe $(PythonPathX64)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)" + /> </VisualStudioPropertySheet> |