MSVC Build: Add Simple Support for Visual Studio 2012
authorChun-wei Fan <fanchunwei@src.gnome.org>
Thu, 24 Apr 2014 11:46:55 +0000 (19:46 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 25 Apr 2014 00:28:11 +0000 (08:28 +0800)
As the format of the Visual Studio 2012 project files are not much
different as compared to the 2010 ones, we can use some simple autotools
scripts to copy the Visual Studio 2010 project file items, and replacing
Visual-Studio-version-specific strings as necessary, so we provide support
for it quite easily without much maintenance overhead.

https://bugzilla.gnome.org/show_bug.cgi?id=691991

build/Makefile-newvs.am [new file with mode: 0644]
build/win32/Makefile.am
build/win32/vs11/Makefile.am [new file with mode: 0644]
configure.ac

diff --git a/build/Makefile-newvs.am b/build/Makefile-newvs.am
new file mode 100644 (file)
index 0000000..58c1e15
--- /dev/null
@@ -0,0 +1,37 @@
+# Centralized autotools file
+# Create the Visual Studio 2012 project files
+# from the Visual Studio 2010 project files
+
+# Author: Fan, Chun-wei
+# November 05, 2012
+
+# MSVC_SLN: name of root project
+
+VCXPROJ_FILES =
+
+$(MSVC_SLN).sln: $(top_srcdir)/build/win32/vs10/$(MSVC_SLN).sln create_vcxproj copy_filters create_props
+       cat $(top_srcdir)/build/win32/vs10/$(MSVC_SLN).sln | sed 's/11\.00/12\.00/g' | sed 's/2010/2012/g' > $(top_builddir)/build/win32/vs11/$(MSVC_SLN).sln
+
+README.txt: $(top_srcdir)/build/win32/vs10/README.txt
+       cat $(top_srcdir)/build/win32/vs10/README.txt | sed 's/vs10/vs11/g' | sed 's/VS10/VS11/g' > $(top_builddir)/build/win32/vs11/README.txt
+
+create_vcxproj:
+       for F in `(cd $(top_builddir)/build/win32/vs10 && ls *.vcxproj)`; do \
+               case $$F in \
+                       *)      cat $(top_builddir)/build/win32/vs10/$$F | sed 's/v100/v110/g' > $(top_builddir)/build/win32/vs11/$$F \
+                       ;; \
+               esac; \
+       done
+
+create_props:
+       for F in `(cd $(top_builddir)/build/win32/vs10 && ls *.props)`; do \
+               case $$F in \
+                       *)      cat $(top_builddir)/build/win32/vs10/$$F | sed 's/10/11/g' > $(top_builddir)/build/win32/vs11/$$F \
+                       ;; \
+               esac; \
+       done
+
+copy_filters:
+       cp  $(top_srcdir)/build/win32/vs10/*.vcxproj.filters $(top_builddir)/build/win32/vs11/
+
+
index e013d16..44032db 100644 (file)
@@ -1,3 +1,4 @@
 SUBDIRS =      \
-       vs9  \
-       vs10
+       vs9     \
+       vs10    \
+       vs11
diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am
new file mode 100644 (file)
index 0000000..b97b077
--- /dev/null
@@ -0,0 +1,16 @@
+EXTRA_DIST = \
+       README.txt \
+       atk.sln \
+       atk.vcxproj \
+       atk.vcxproj.filters \
+       install.vcxproj \
+       atk-build-defines.props \
+       atk-install.props       \
+       atk-version-paths.props \
+       atk-gen-src.props
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_SLN = atk
+
+include $(top_srcdir)/build/Makefile-newvs.am
index 9ec6d62..e703633 100644 (file)
@@ -274,6 +274,7 @@ build/Makefile
 build/win32/Makefile
 build/win32/vs9/Makefile
 build/win32/vs10/Makefile
+build/win32/vs11/Makefile
 docs/Makefile
 docs/version.xml
 atk.spec