Commit 71bb1beb authored by Chun-wei Fan's avatar Chun-wei Fan

Visual Studio builds: Generate .pc files

Generate .pc files for the package, so that it would be easier for
building introspection for packages that depend on GTK+.  Also split
PythonPath into PythonPath and PythonPathX64 to facilitate the build of
introspection files, which need to have Python that is built with the
same ac=rchitecture where GTK+ is built.

Clean up the formatting and spacing a bit.
parent 75df7c16
......@@ -38,6 +38,8 @@ EXTRA_DIST += \
introspection-msvc.mak \
gtk-introspection-msvc.mak \
replace.py \
pc_base.py \
gtkpc.py \
$(GENERATED_ITEMS)
-include $(top_srcdir)/git.mk
#!/usr/bin/python
#
# Utility script to generate .pc files for GTK+
# for Visual Studio builds, to be used for
# building introspection files
# Author: Fan, Chun-wei
# Date: April 26, 2016
import os
import sys
import argparse
from replace import replace_multi, replace
from pc_base import BasePCItems
def main(argv):
base_pc = BasePCItems()
gdk_parser = argparse.ArgumentParser(description='Setup basic .pc file info')
gdk_parser.add_argument('--broadway',
action='store_const',
const=1,
help='GDK with Broadway backend')
gdk_parser.add_argument('--host',
required=True,
help='Build type')
base_pc.setup(argv, gdk_parser)
atk_min_ver = '2.15.1'
cairo_min_ver = '1.14.0'
gdk_pixbuf_min_ver = '2.30.0'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
glib_min_ver = '2.45.8'
cairo_backends = 'cairo-win32'
gdk_backends = 'win32'
gio_package = 'gio-2.0 >= ' + glib_min_ver
broadway_extra_libs = ''
gdk_args = gdk_parser.parse_args()
if getattr(gdk_args, 'broadway', None) is 1:
# On Visual Studio, we link to zlib1.lib
broadway_extra_libs = '-lzlib1'
gdk_backends += ' broadway'
cairo_backends += ' cairo'
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
'@GDK_BACKENDS@': gdk_backends}
pkg_required_packages = 'gdk-pixbuf >= ' + gdk_pixbuf_min_ver + ' ' + \
'cairo >= ' + cairo_min_ver + ' ' + \
'cairo-gobject >= ' + cairo_min_ver
gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
'pangowin32 pangocairo' + ' ' + \
pkg_required_packages,
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_EXTRA_CFLAGS@': '',
'gdk-3': 'gdk-3.0'}
gtk_pc_replace_items = {'@host@': gdk_args.host,
'@GTK_BINARY_VERSION@': '3.0.0',
'@GTK_PACKAGES@': 'atk >= ' + atk_min_ver + ' ' + \
pkg_required_packages + ' ' + \
gio_package,
'@GTK_PRIVATE_PACKAGES@': 'atk',
'@GTK_EXTRA_CFLAGS@': '',
'@GTK_EXTRA_LIBS@': '',
'@GTK_EXTRA_CFLAGS@': '',
'gtk-3': 'gtk-3.0'}
gail_pc_replace_items = {'gailutil-3': 'gailutil-3.0'}
pkg_replace_items.update(base_pc.base_replace_items)
gdk_pc_replace_items.update(pkg_replace_items)
gtk_pc_replace_items.update(pkg_replace_items)
gail_pc_replace_items.update(base_pc.base_replace_items)
# Generate gdk-3.0.pc
replace_multi(base_pc.top_srcdir + '/gdk-3.0.pc.in',
base_pc.srcdir + '/gdk-3.0.pc',
gdk_pc_replace_items)
# Generate gtk+-3.0.pc
replace_multi(base_pc.top_srcdir + '/gtk+-3.0.pc.in',
base_pc.srcdir + '/gtk+-3.0.pc',
gtk_pc_replace_items)
# Generate gail-3.0.pc
replace_multi(base_pc.top_srcdir + '/gail-3.0.pc.in',
base_pc.srcdir + '/gail-3.0.pc',
gail_pc_replace_items)
if __name__ == '__main__':
sys.exit(main(sys.argv))
#!/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})
......@@ -21,12 +21,19 @@ valid_actions = ['remove-prefix',
'replace-str',
'remove-str']
def replace(src, dest, instring, outstring):
def replace_multi(src, dest, replace_items):
with open(src, 'r') as s:
with open(dest, 'w') as d:
for line in s:
i = line.replace(instring, outstring)
d.write(i)
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:
......
......@@ -33,6 +33,7 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxprojin \
gdk3-win32.vcxproj.filtersin \
gdk3-broadway.vcxprojin \
......@@ -60,6 +61,7 @@ EXTRA_DIST += \
gailutil-3.vcxprojin \
gailutil-3.vcxproj.filtersin \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-build-defines.props \
gtk3-copy-gdk-broadway.props \
gtk3-gen-srcs.props \
......
......@@ -168,13 +168,13 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSources)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body">
......
......@@ -4,30 +4,19 @@
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<GenConfigH>
copy ..\..\..\config.h.win32 ..\..\..\config.h
</GenConfigH>
<GenConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</GenConfigH>
<GenGdkConfigHWin32>
if exist ..\..\..\MSVC_$(Configuration) goto DONE_GDKCONFIG_H
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD
if exist ..\..\..\MSVC_$(Configuration)_Broadway del ..\..\..\MSVC_$(Configuration)_Broadway
if exist $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll
if exist $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib del $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib
if "$(Configuration)" == "Release" del ..\..\..\MSVC_Debug
if "$(Configuration)" == "Debug" del ..\..\..\MSVC_Release
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\GDK_WIN32ONLY_BUILD
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)
:DONE_GDKCONFIG_H
......@@ -35,35 +24,23 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)
<GenGdkConfigHBroadway>
if exist ..\..\..\MSVC_$(Configuration)_Broadway goto DONE_GDKCONFIG_H
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD
if exist ..\..\..\MSVC_Release del ..\..\..\MSVC_Release
if exist ..\..\..\MSVC_Debug del ..\..\..\MSVC_Debug
if "$(Configuration)" == "Release_Broadway" del ..\..\..\MSVC_Debug_Broadway
if "$(Configuration)" == "Debug_Broadway" del ..\..\..\MSVC_Release_Broadway
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
:DONE_GDKCONFIG_H
</GenGdkConfigHBroadway>
<GenerateGtkDbusBuiltSources>
cd ..\..\..\gtk
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
cd $(SolutionDir)
</GenerateGtkDbusBuiltSources>
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
......@@ -81,9 +58,15 @@ cd $(SolutionDir)
<BuildMacro Include="GenGdkConfigHBroadway">
<Value>$(GenGdkConfigHBroadway)</Value>
</BuildMacro>
<BuildMacro Include="GDbusCodeGenCmd">
<Value>$(GDbusCodeGenCmd)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkDbusBuiltSources">
<Value>$(GenerateGtkDbusBuiltSources)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkDbusBuiltSourcesX64">
<Value>$(GenerateGtkDbusBuiltSourcesX64)</Value>
</BuildMacro>
<BuildMacro Include="CopyGtkWin32RC">
<Value>$(CopyGtkWin32RC)</Value>
</BuildMacro>
......
......@@ -5,12 +5,9 @@
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<InstalledDlls>$(BinDir)\$(GtkDllPrefix)gdk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gtk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gailutil(GtkDllSuffix).dll</InstalledDlls>
<InstalledBins>$(BinDir)\gtk3-demo.exe;$(BinDir)\gtk3-demo-application.exe;$(BinDir)\gtk3-icon-browser.exe;$(BinDir)\gtk-encode-symbolic-svg.exe</InstalledBins>
<InstalledBroadwayBins>$(BinDir)\broadwayd.exe</InstalledBroadwayBins>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib
mkdir $(CopyDir)\lib\pkgconfig
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
......@@ -93,6 +90,10 @@ copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
echo off
......@@ -138,6 +139,9 @@ copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gd
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
#include "gdk3-broadway.vs10.headers"
</GtkDoInstallBroadwayHeaders>
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3installsprops</_PropertySheetDisplayName>
......@@ -164,5 +168,14 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPC">
<Value>$(GenerateGtkPC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPCX64">
<Value>$(GenerateGtkPCX64)</Value>
</BuildMacro>
<BuildMacro Include="GtkPCFiles">
<Value>$(GtkPCFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>
......@@ -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'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">blah;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\gtkpc.py">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkPC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenerateGtkPC) --broadway</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkPCX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenerateGtkPCX64) --broadway</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkPC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenerateGtkPC) --broadway</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkPCX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Generating .pc files...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenerateGtkPCX64) --broadway</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
......
<?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="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\gtkpc.py"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
</Project>
<?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="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32_broadway"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\demos\gtk-demo\demos.h.win32"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
</Project>
......@@ -12,7 +12,8 @@
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
<PythonPath>c:\python27</PythonPath>
<PythonPath>c:\python34</PythonPath>
<PythonPathX64>$(PythonPath).x64</PythonPathX64>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
......@@ -54,5 +55,8 @@
<BuildMacro Include="PythonPath">
<Value>$(PythonPath)</Value>
</BuildMacro>
<BuildMacro Include="PythonPathX64">
<Value>$(PythonPathX64)</Value>
</BuildMacro>
</ItemGroup>
</Project>
......@@ -4,6 +4,7 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
......@@ -27,6 +28,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \
......
......@@ -4,6 +4,7 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
......@@ -27,6 +28,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \
......
......@@ -4,6 +4,7 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
......@@ -27,6 +28,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \
......
......@@ -180,14 +180,14 @@
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
......
......@@ -54,13 +54,17 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
/>
<UserMacro
Name="GDbusCodeGenCmd"
Value="$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSources"
Value="
cd ..\..\..\gtk&#x0D;&#x0A;
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
"
Value="cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSourcesX64"
Value="cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="CopyGtkWin32RC"
......
......@@ -28,7 +28,7 @@
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
/>
</Configuration>
......@@ -41,7 +41,7 @@
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
/>
</Configuration>
......@@ -55,7 +55,7 @@
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
/>
</Configuration>
......@@ -68,7 +68,7 @@
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
/>
</Configuration>
......@@ -83,7 +83,7 @@
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
/>
</Configuration>
......@@ -97,7 +97,7 @@
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
/>
</Configuration>
......@@ -112,7 +112,7 @@
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
/>
</Configuration>
......@@ -126,7 +126,7 @@
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
Name="VCPostBuildEventTool"
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
/>
</Configuration>
......@@ -134,6 +134,70 @@
<References>
</References>
<Files>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File RelativePath="..\..\..\gtkpc.py">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating .pc files..."
CommandLine="$(GenerateGtkPC)"
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating .pc files..."
CommandLine="$(GenerateGtkPC)"
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating .pc files..."
CommandLine="$(GenerateGtkPCX64)"
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating .pc files..."
CommandLine="$(GenerateGtkPCX64)"
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating .pc files..."
CommandLine="$(GenerateGtkPC) --broadway"
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
/>
</FileConfiguration>