summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2013-12-16 11:25:36 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2013-12-16 11:27:03 +0800
commit56e07beb2df88f6b27cc647eea5b00bfc4ab34a1 (patch)
tree5bc48c79278eb4cebfce1302768e556f4f9d14ac
parentc403ddfa064ef3ffaa908fae6323de0dd2519b7d (diff)
downloadatk-56e07beb2df88f6b27cc647eea5b00bfc4ab34a1.tar.gz
build: Use Python to Generate the MSVC Projects
This would move the generation of the ATK Visual C++ 2008/2010 project to Python 2/3 scripts from autotools scripts. This would have the following advantages: -Reduce congestion in the autotools files, most notably atk/Makefile.am, and make everything that concerns the completion of MSVC project files fo under build/ -Easier to maintain and test, as a standard installation of Python (even on Windows) is enough to generate the Project files, and this can still be easily called during 'make dist'. -Also paves the first steps for people wanting to build ATK from a GIT checkout, as this will help simplify the process There is now a dependency on Python 2/3 for people that are wishing to do 'make dist', as naturally the scripts to do the Visual C++ project generation is done with Python, but since one is likely going to generate the .gir files for ATK when doing 'make dist'/'make distcheck', this is satisfied as the scripts used to generate the .gir files are Python 2.6+ scripts as well. https://bugzilla.gnome.org/show_bug.cgi?id=690145
-rw-r--r--atk/Makefile.am32
-rw-r--r--build/Makefile.am4
-rw-r--r--build/atk_msvc_files.py68
-rw-r--r--build/msvcfiles.py254
-rw-r--r--build/win32/vs10/.gitignore1
-rw-r--r--build/win32/vs10/Makefile.am8
-rw-r--r--build/win32/vs10/atk-install.props90
-rw-r--r--build/win32/vs10/atk-install.propsin28
-rw-r--r--build/win32/vs10/atk.vcxproj.filtersin4
-rw-r--r--build/win32/vs10/atk.vcxprojin2
-rw-r--r--build/win32/vs9/.gitignore1
-rw-r--r--build/win32/vs9/Makefile.am8
-rw-r--r--build/win32/vs9/atk-install.vsprops53
-rw-r--r--build/win32/vs9/atk-install.vspropsin22
-rw-r--r--build/win32/vs9/atk.vcprojin2
-rw-r--r--configure.ac14
16 files changed, 412 insertions, 179 deletions
diff --git a/atk/Makefile.am b/atk/Makefile.am
index 4761a66..1279ff0 100644
--- a/atk/Makefile.am
+++ b/atk/Makefile.am
@@ -221,38 +221,6 @@ atk-$(ATK_API_VERSION).lib: libatk-$(ATK_API_VERSION).la atk.def
EXTRA_DIST = atk.symbols atk.rc.in atkmarshal.list atk.rc atkversion.h.in
-dist-hook: ../build/win32/vs9/atk.vcproj ../build/win32/vs10/atk.vcxproj ../build/win32/vs10/atk.vcxproj.filters
-
-../build/win32/vs9/atk.vcproj: ../build/win32/vs9/atk.vcprojin
- for F in $(libatk_1_0_la_SOURCES); do \
- case $$F in \
- *.c) echo ' <File RelativePath="..\..\..\atk\'$$F'" />' \
- ;; \
- esac; \
- done >libatk.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs9/atk.vcprojin >$@
- rm libatk.sourcefiles
-
-../build/win32/vs10/atk.vcxproj: ../build/win32/vs10/atk.vcxprojin
- for F in $(libatk_1_0_la_SOURCES); do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\atk\'$$F'" />' \
- ;; \
- esac; \
- done >libatk.vs10.sourcefiles
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/atk.vcxprojin >$@
- rm libatk.vs10.sourcefiles
-
-../build/win32/vs10/atk.vcxproj.filters: ../build/win32/vs10/atk.vcxproj.filtersin
- for F in $(libatk_1_0_la_SOURCES); do \
- case $$F in \
- *.c) echo ' <ClCompile Include="..\..\..\atk\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
- ;; \
- esac; \
- done >libatk.vs10.sourcefiles.filters
- $(CPP) -P - <$(top_srcdir)/build/win32/vs10/atk.vcxproj.filtersin >$@
- rm libatk.vs10.sourcefiles.filters
-
DISTCLEANFILES = \
stamp-atkmarshal.h stamp-atkmarshal.c \
s-enum-types-h s-enum-types-c
diff --git a/build/Makefile.am b/build/Makefile.am
index 1e47317..5699d6f 100644
--- a/build/Makefile.am
+++ b/build/Makefile.am
@@ -1,3 +1,7 @@
SUBDIRS = \
win32
+EXTRA_DIST = \
+ atk_msvc_files.py \
+ msvcfiles.py
+
diff --git a/build/atk_msvc_files.py b/build/atk_msvc_files.py
new file mode 100644
index 0000000..0707ef5
--- /dev/null
+++ b/build/atk_msvc_files.py
@@ -0,0 +1,68 @@
+#! /usr/bin/python
+
+# Expand The Visual Studio Files from their templates
+
+import os
+import optparse
+import sys
+
+from msvcfiles import parent_dir
+from msvcfiles import check_output_type
+from msvcfiles import generate_src_list
+from msvcfiles import gen_vs9_project
+from msvcfiles import gen_vs10_project
+from msvcfiles import generate_nmake_makefiles
+from msvcfiles import gen_vs_inst_list
+
+def main(argv):
+ parser = optparse.OptionParser()
+ parser.add_option('-t', '--type', dest='output_type', metavar='string', action='store', help='Visual Studio output build file type to generate ("nmake-exe","vs9","vs10")')
+ opt, args = parser.parse_args(argv)
+
+ srcroot = parent_dir(__file__)
+ output_type = check_output_type (opt.output_type)
+ if (output_type == -1):
+ sys.exit()
+
+ elif (output_type == 3):
+ # Generate the executable list from tests/
+ test_filters_progs = ['noinst_PROGRAMS']
+ test_filters_conds = {}
+ test_src_dir = os.path.join(srcroot, 'tests')
+ test_progs = generate_src_list (srcroot, test_src_dir, test_filters_progs, test_filters_conds, False, None)
+ generate_nmake_makefiles(srcroot, test_src_dir, "test", "testatk_vc.mak", test_progs)
+
+ elif (output_type == 1 or output_type == 2):
+ # Generate the ATK MSVC 2008 or 2010 project files
+ atk_filters_src = ['libatk_1_0_la_SOURCES']
+ atk_filters_conds = {}
+ atk_src_dir = os.path.join(srcroot, 'atk')
+ atk_src_files = generate_src_list (srcroot, atk_src_dir, atk_filters_src, atk_filters_conds, True, None)
+ if (output_type == 1):
+ gen_vs9_project ('atk', srcroot, 'atk', atk_src_files)
+ else:
+ gen_vs10_project ('atk', srcroot, 'atk', atk_src_files)
+
+
+ # Generate the ATK headers list to "install" for MSVC 2008/2010
+ atk_filters_h_conds = {}
+ atk_filters_h = ['libatkinclude_HEADERS']
+ atk_h_files_raw = generate_src_list (srcroot, atk_src_dir, atk_filters_h, atk_filters_h_conds, False, None)
+ atk_h_files = [files.replace('/atk/', '') for files in atk_h_files_raw]
+
+ srcdirs = ['atk']
+
+ inst_h_lists = [atk_h_files]
+
+ inst_h_dirs = ['include\\atk-$(ApiVersion)\\atk']
+
+ if (output_type == 1):
+ gen_vs_inst_list ('atk', srcroot, srcdirs, inst_h_lists, inst_h_dirs, True)
+ else:
+ gen_vs_inst_list ('atk', srcroot, srcdirs, inst_h_lists, inst_h_dirs, False)
+
+ else:
+ raise Exception ("Somehow your output_type is wrong.\nShould not have seen this message!")
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/build/msvcfiles.py b/build/msvcfiles.py
new file mode 100644
index 0000000..05957ac
--- /dev/null
+++ b/build/msvcfiles.py
@@ -0,0 +1,254 @@
+#!/usr/bin/python
+# vim: encoding=utf-8
+#expand *.in files
+import os
+import sys
+import re
+import optparse
+
+def parent_dir(path):
+ if not os.path.isabs(path):
+ path = os.path.abspath(path)
+ if os.path.isfile(path):
+ path = os.path.dirname(path)
+ return os.path.split(path)[0]
+
+def check_output_type (btype):
+ print_bad_type = False
+ output_type = -1
+ if (btype is None):
+ output_type = -1
+ print_bad_type = False
+ elif (btype == "vs9"):
+ output_type = 1
+ elif (btype == "vs10"):
+ output_type = 2
+ elif (btype == "nmake-exe"):
+ output_type = 3
+ else:
+ output_type = -1
+ print_bad_type = True
+ if (output_type == -1):
+ if (print_bad_type is True):
+ print ("The entered output build file type '%s' is not valid" % btype)
+ else:
+ print ("Output build file type is not specified.\nUse -t <type> to specify the output build file type.")
+ print ("Valid output build file types are: nmake-exe, vs9 , vs10")
+ return output_type
+
+def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
+ '''
+ path: path to the Makefile.am
+ vars: predefined variables
+ conds: condition variables for Makefile
+ filters: if None, all variables defined are returned,
+ otherwise, it is a list contains that variables should be returned
+ '''
+ cur_vars = vars.copy()
+ RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
+ RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
+ RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
+ RE_AM_VAR_ADD = re.compile(r'^\s*(\w+)\s*\+=(.*)$')
+ RE_AM_CONTINUING = re.compile(r'\\\s*$')
+ RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
+ RE_AM_ELSE = re.compile(r'^\s*else')
+ RE_AM_ENDIF = re.compile(r'^\s*endif')
+ def am_eval(cont):
+ return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
+ with open(path, 'r') as f:
+ contents = f.readlines()
+ #combine continuing lines
+ i = 0
+ ncont = []
+ while i < len(contents):
+ line = contents[i]
+ if RE_AM_CONTINUING.search(line):
+ line = RE_AM_CONTINUING.sub('', line)
+ j = i + 1
+ while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
+ line += RE_AM_CONTINUING.sub('', contents[j])
+ j += 1
+ else:
+ if j < len(contents):
+ line += contents[j]
+ i = j
+ else:
+ i += 1
+ ncont.append(line)
+
+ #include, var define, var evaluation
+ i = -1
+ skip = False
+ oldskip = []
+ while i < len(ncont) - 1:
+ i += 1
+ line = ncont[i]
+ mo = RE_AM_IF.search(line)
+ if mo:
+ oldskip.append(skip)
+ skip = False if mo.group(1) in conds and conds[mo.group(1)] \
+ else True
+ continue
+ mo = RE_AM_ELSE.search(line)
+ if mo:
+ skip = not skip
+ continue
+ mo = RE_AM_ENDIF.search(line)
+ if mo:
+ if oldskip:
+ skip = oldskip.pop()
+ continue
+ if not skip:
+ mo = RE_AM_INCLUDE.search(line)
+ if mo:
+ cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
+ continue
+ mo = RE_AM_VAR.search(line)
+ if mo:
+ cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
+ continue
+ mo = RE_AM_VAR_ADD.search(line)
+ if mo:
+ try:
+ cur_vars[mo.group(1)] += ' '
+ except KeyError:
+ cur_vars[mo.group(1)] = ''
+ cur_vars[mo.group(1)] += am_eval(mo.group(2).strip())
+ continue
+
+ #filter:
+ if filters != None:
+ ret = {}
+ for i in filters:
+ ret[i] = cur_vars.get(i, '')
+ return ret
+ else:
+ return cur_vars
+
+def process_include(src, dest, includes):
+ RE_INCLUDE = re.compile(r'^\s*#include\s+"(.*)"')
+ with open(src, 'r') as s:
+ with open(dest, 'w') as d:
+ for i in s:
+ mo = RE_INCLUDE.search(i)
+ if mo:
+ target = ''
+ for j in includes:
+ #print "searching in ", j
+ if mo.group(1) in os.listdir(j):
+ target = os.path.join(j, mo.group(1))
+ break
+ if not target:
+ raise Exception("Couldn't find include file %s" % mo.group(1))
+ else:
+ with open(target, 'r') as t:
+ for inc in t.readlines():
+ d.write(inc)
+ else:
+ d.write(i)
+
+#Generate the source files listing that is used
+def generate_src_list (srcroot, srcdir, filters_src, filter_conds, filter_c, mk_am_file):
+ mkfile = ''
+ if mk_am_file is None or mk_am_file == '':
+ mkfile = 'Makefile.am'
+ else:
+ mkfile = mk_am_file
+ vars = read_vars_from_AM(os.path.join(srcdir, mkfile),
+ vars = {'top_srcdir': srcroot},
+ conds = filter_conds,
+ filters = filters_src)
+ files = []
+ for src_filters_item in filters_src:
+ files += vars[src_filters_item].split()
+ if filter_c is True:
+ sources = [i for i in files if i.endswith('.c') ]
+ return sources
+ else:
+ return files
+
+# Generate the Visual Studio 2008 Project Files from the templates
+def gen_vs9_project (projname, srcroot, srcdir_name, sources_list):
+ vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
+
+ with open (os.path.join (vs_file_list_dir,
+ projname + '.sourcefiles'), 'w') as vs9srclist:
+ for i in sources_list:
+ vs9srclist.write ('\t\t\t<File RelativePath="..\\..\\..\\' + srcdir_name + '\\' + i.replace('/', '\\') + '" />\n')
+
+ process_include (os.path.join(srcroot, 'build', 'win32', 'vs9', projname + '.vcprojin'),
+ os.path.join(srcroot, 'build', 'win32', 'vs9', projname + '.vcproj'),
+ includes = [vs_file_list_dir])
+
+ os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.sourcefiles'))
+
+# Generate the Visual Studio 2010 Project Files from the templates
+def gen_vs10_project (projname, srcroot, srcdir_name, sources_list):
+ vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
+
+ with open (os.path.join (vs_file_list_dir,
+ projname + '.vs10.sourcefiles'), 'w') as vs10srclist:
+ for j in sources_list:
+ vs10srclist.write (' <ClCompile Include="..\\..\\..\\' + srcdir_name + '\\' + j.replace('/', '\\') + '" />\n')
+
+ with open (os.path.join (vs_file_list_dir,
+ projname + '.vs10.sourcefiles.filters'), 'w') as vs10srclist_filter:
+ for k in sources_list:
+ vs10srclist_filter.write (' <ClCompile Include="..\\..\\..\\' + srcdir_name + '\\' + k.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
+
+ process_include (os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxprojin'),
+ os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj'),
+ includes = [vs_file_list_dir])
+ process_include (os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj.filtersin'),
+ os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj.filters'),
+ includes = [vs_file_list_dir])
+
+ os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.vs10.sourcefiles'))
+ os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.vs10.sourcefiles.filters'))
+
+def gen_vs_inst_list (projname, srcroot, srcdirs, inst_lists, destdir_names, isVS9):
+ vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
+ vsver = ''
+ vsprops_line_ending = ''
+ vsprops_file_ext = ''
+ if isVS9 is True:
+ vsver = '9'
+ vsprops_line_ending = '&#x0D;&#x0A;\n'
+ vsprops_file_ext = '.vsprops'
+ else:
+ vsver = '10'
+ vsprops_line_ending = '\n\n'
+ vsprops_file_ext = '.props'
+
+ with open (os.path.join (vs_file_list_dir,
+ projname + '.vs' + vsver + 'instfiles'), 'w') as vsinstlist:
+
+ for file_list, srcdir, dir_name in zip (inst_lists, srcdirs, destdir_names):
+ for i in file_list:
+ vsinstlist.write ('copy ..\\..\\..\\' +
+ srcdir + '\\' +
+ i.replace ('/', '\\') +
+ ' $(CopyDir)\\' +
+ dir_name +
+ vsprops_line_ending)
+ process_include (os.path.join(srcroot, 'build', 'win32', 'vs' + vsver, projname + '-install' + vsprops_file_ext + 'in'),
+ os.path.join(srcroot, 'build', 'win32', 'vs' + vsver, projname + '-install' + vsprops_file_ext),
+ includes = [vs_file_list_dir])
+
+ os.unlink(os.path.join (vs_file_list_dir, projname + '.vs' + vsver + 'instfiles'))
+
+def generate_nmake_makefiles(srcroot, srcdir, base_name, makefile_name, progs_list):
+ file_list_dir = os.path.join (srcroot, 'build', 'win32')
+
+ with open (os.path.join (file_list_dir,
+ base_name + '_progs'), 'w') as proglist:
+ for i in progs_list:
+ proglist.write ('\t' + i + '$(EXEEXT)\t\\\n')
+
+
+ process_include (os.path.join(srcdir, makefile_name + 'in'),
+ os.path.join(srcdir, makefile_name),
+ includes = [file_list_dir])
+
+ os.unlink(os.path.join (file_list_dir, base_name + '_progs'))
+
diff --git a/build/win32/vs10/.gitignore b/build/win32/vs10/.gitignore
index 73afdd0..0231580 100644
--- a/build/win32/vs10/.gitignore
+++ b/build/win32/vs10/.gitignore
@@ -1,2 +1,3 @@
atk.vcxproj
atk.vcxproj.filters
+atk-install.props
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
index 7623024..34f1c58 100644
--- a/build/win32/vs10/Makefile.am
+++ b/build/win32/vs10/Makefile.am
@@ -11,4 +11,12 @@ EXTRA_DIST = \
atk-gen-src.props \
atk-gengir.props \
atk-install.props \
+ atk-install.propsin \
atk-version-paths.props
+
+atk-install.props atk.vcxproj.filter: atk.vcxproj
+
+atk.vcxproj:
+ $(PYTHON) $(top_srcdir)/build/atk_msvc_files.py -t vs10
+
+DISTCLEANFILES = atk.vcxproj atk.vcxproj.filters atk-install.props
diff --git a/build/win32/vs10/atk-install.props b/build/win32/vs10/atk-install.props
deleted file mode 100644
index 0a9907d..0000000
--- a/build/win32/vs10/atk-install.props
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ImportGroup Label="PropertySheets">
- <Import Project="atk-build-defines.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros">
- <AtkDoInstall>
-mkdir $(CopyDir)\bin
-
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
-
-
-mkdir $(CopyDir)\lib
-
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
-
-
-mkdir $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atk.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkaction.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkcomponent.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkdocument.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkeditabletext.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkgobjectaccessible.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkhyperlink.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkhyperlinkimpl.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkhypertext.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atknoopobject.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atknoopobjectfactory.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkobject.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkobjectfactory.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkplug.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkimage.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkregistry.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkrelation.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkrelationtype.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkrelationset.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkselection.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atksocket.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkstate.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkstateset.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkstreamablecontent.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atktable.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atktext.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkutil.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkmisc.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkvalue.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkwindow.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atkversion.h $(CopyDir)\include\atk-$(ApiVersion)\atk
-
-copy ..\..\..\atk\atk-enum-types.h $(CopyDir)\include\atk-$(ApiVersion)\atk
- </AtkDoInstall>
- </PropertyGroup>
- <ItemGroup>
- <BuildMacro Include="AtkDoInstall">
- <Value>$(AtkDoInstall)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
diff --git a/build/win32/vs10/atk-install.propsin b/build/win32/vs10/atk-install.propsin
new file mode 100644
index 0000000..f952345
--- /dev/null
+++ b/build/win32/vs10/atk-install.propsin
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="atk-build-defines.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <AtkDoInstall>
+mkdir $(CopyDir)\bin
+
+copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
+
+
+mkdir $(CopyDir)\lib
+
+copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
+
+
+mkdir $(CopyDir)\include\atk-$(ApiVersion)\atk
+
+#include "atk.vs10instfiles"
+ </AtkDoInstall>
+ </PropertyGroup>
+ <ItemGroup>
+ <BuildMacro Include="AtkDoInstall">
+ <Value>$(AtkDoInstall)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/atk.vcxproj.filtersin b/build/win32/vs10/atk.vcxproj.filtersin
index 13bd339..d83ee42 100644
--- a/build/win32/vs10/atk.vcxproj.filtersin
+++ b/build/win32/vs10/atk.vcxproj.filtersin
@@ -15,7 +15,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
-#include "libatk.vs10.sourcefiles.filters"
+#include "atk.vs10.sourcefiles.filters"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
@@ -27,4 +27,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/build/win32/vs10/atk.vcxprojin b/build/win32/vs10/atk.vcxprojin
index b2fc326..66eb5fc 100644
--- a/build/win32/vs10/atk.vcxprojin
+++ b/build/win32/vs10/atk.vcxprojin
@@ -161,7 +161,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
-#include "libatk.vs10.sourcefiles"
+#include "atk.vs10.sourcefiles"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32">
diff --git a/build/win32/vs9/.gitignore b/build/win32/vs9/.gitignore
index 063f099..0e18109 100644
--- a/build/win32/vs9/.gitignore
+++ b/build/win32/vs9/.gitignore
@@ -1 +1,2 @@
atk.vcproj
+atk-install.vsprops
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
index 29520a8..f7ed4f5 100644
--- a/build/win32/vs9/Makefile.am
+++ b/build/win32/vs9/Makefile.am
@@ -9,4 +9,12 @@ EXTRA_DIST = \
atk-gen-src.vsprops \
atk-gengir.vsprops \
atk-install.vsprops \
+ atk-install.vspropsin \
atk-version-paths.vsprops
+
+atk-install.vsprops: atk.vcproj
+
+atk.vcproj:
+ $(PYTHON) $(top_srcdir)/build/atk_msvc_files.py -t vs9
+
+DISTCLEANFILES = atk.vcproj atk-install.vsprops
diff --git a/build/win32/vs9/atk-install.vsprops b/build/win32/vs9/atk-install.vsprops
deleted file mode 100644
index 67caef6..0000000
--- a/build/win32/vs9/atk-install.vsprops
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="atkinstallprops"
- InheritedPropertySheets=".\atk-build-defines.vsprops"
- >
- <UserMacro
- Name="AtkDoInstall"
- Value="
-mkdir $(CopyDir)&#x0D;&#x0A;
-mkdir $(CopyDir)\bin&#x0D;&#x0A;
-copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin&#x0D;&#x0A;
-
-mkdir $(CopyDir)\lib&#x0D;&#x0A;
-copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
-
-mkdir $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atk.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkaction.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkcomponent.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkdocument.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkeditabletext.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkgobjectaccessible.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkhyperlink.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkhyperlinkimpl.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkhypertext.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atknoopobject.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atknoopobjectfactory.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkobject.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkobjectfactory.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkplug.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkimage.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkregistry.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkrelation.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkrelationtype.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkrelationset.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkselection.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atksocket.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkstate.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkstateset.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkstreamablecontent.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atktable.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atktext.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkutil.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkmisc.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkvalue.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkwindow.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atkversion.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-copy ..\..\..\atk\atk-enum-types.h $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
-"
- />
-</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/atk-install.vspropsin b/build/win32/vs9/atk-install.vspropsin
new file mode 100644
index 0000000..5bf3b73
--- /dev/null
+++ b/build/win32/vs9/atk-install.vspropsin
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="atkinstallprops"
+ InheritedPropertySheets=".\atk-build-defines.vsprops"
+ >
+ <UserMacro
+ Name="AtkDoInstall"
+ Value="
+mkdir $(CopyDir)&#x0D;&#x0A;
+mkdir $(CopyDir)\bin&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin&#x0D;&#x0A;
+
+mkdir $(CopyDir)\lib&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
+
+mkdir $(CopyDir)\include\atk-$(ApiVersion)\atk&#x0D;&#x0A;
+#include "atk.vs9instfiles"
+"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/atk.vcprojin b/build/win32/vs9/atk.vcprojin
index 6dcd55d..ec1174c 100644
--- a/build/win32/vs9/atk.vcprojin
+++ b/build/win32/vs9/atk.vcprojin
@@ -158,7 +158,7 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
-#include "libatk.sourcefiles"
+#include "atk.sourcefiles"
</Filter>
<Filter
Name="Headers"
diff --git a/configure.ac b/configure.ac
index 8478a1b..3b2d309 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,6 +215,20 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
+# option to specify python interpreter to use; this just sets $PYTHON, so that
+# we will fallback to reading $PYTHON if --with-python is not given, and
+# python.m4 will get the expected input.
+# This dependency on Python is for 'make dist', so normal builds would not
+# need Python
+AC_ARG_WITH(python,
+ AS_HELP_STRING([--with-python=PATH],
+ [Path to Python interpreter; searches $PATH if only a program name is given; if not given, searches for a few standard names such as "python3" or "python2"]),
+ [PYTHON="$withval"], [])
+if test x"$PYTHON" = xyes; then
+ AC_MSG_ERROR([--with-python option requires a path or program argument])
+fi
+AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
+
GNOME_COMPILE_WARNINGS([maximum])
AC_CONFIG_FILES([