Commit 6dfc6fee authored by Chun-wei Fan's avatar Chun-wei Fan

Visual Studio builds: Move project files to win32/

It was suggested that the project files be moved here as we don't actually
need to go two directory layers from $(srcroot), and would help us to
standardize on things in the future across the board.
parent b14b09c8
......@@ -7,7 +7,7 @@ include $(top_srcdir)/glib.mk
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs tests
DIST_SUBDIRS = $(SUBDIRS) build
DIST_SUBDIRS = $(SUBDIRS) build win32
bin_SCRIPTS = glib-gettextize
......
......@@ -191,15 +191,15 @@ information. Note that you will need a libintl implementation, zlib, and
libFFI.
If you are building from a GIT checkout, you will first need to use some
Unix-like environment or run build/win32/setup.py,
Unix-like environment or run win32/setup.py,
which will expand the VS 2008/2010 project files, the DLL resouce files and
other miscellanious files required for the build. Run build/win32/setup.py
other miscellanious files required for the build. Run win32/setup.py
as follows:
$python build/win32/setup.py --perl path_to_your_perl.exe
$python win32/setup.py --perl path_to_your_perl.exe
for more usage on this script, run
$python build/win32/setup.py -h/--help
$python win32/setup.py -h/--help
Building with MSVC and NMAKE
============================
......
SUBDIRS = \
dirent \
vs9 \
vs10 \
vs11 \
vs12 \
vs14
dirent
EXTRA_DIST = \
glibpc.py \
make.msc \
module.defs \
pc_base.py \
replace.py
module.defs
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files\libcharset">
<UniqueIdentifier>{bb961775-fd45-4205-b1fd-901c3c8fd64c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\gnulib">
<UniqueIdentifier>{f630c518-4c58-4dfa-ab43-5fa0b0eb10f1}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\pcre">
<UniqueIdentifier>{9fef0e23-cf71-48aa-979b-7eb84df56143}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<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>
#include "glib.vs10.sourcefiles.filters"
<ClCompile Include="..\..\..\glib\giowin32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gspawn-win32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gthread-win32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gwin32.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\libcharset\localcharset.c">
<Filter>Source Files\libcharset</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gnulib\asnprintf.c">
<Filter>Source Files\gnulib</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gnulib\printf-args.c">
<Filter>Source Files\gnulib</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gnulib\printf-parse.c">
<Filter>Source Files\gnulib</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gnulib\printf.c">
<Filter>Source Files\gnulib</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\gnulib\vasnprintf.c">
<Filter>Source Files\gnulib</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_byte_order.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_chartables.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_compile.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_config.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_dfa_exec.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_exec.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_fullinfo.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_get.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_globals.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_jit_compile.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_newline.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_ord2utf8.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_string_utils.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_study.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_tables.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_valid_utf8.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_version.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
<ClCompile Include="..\..\..\glib\pcre\pcre_xclass.c">
<Filter>Source Files\pcre</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\glib\glibconfig.h.win32"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\glib\glib.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
......@@ -3434,13 +3434,14 @@ Makefile
build/Makefile
build/win32/Makefile
build/win32/dirent/Makefile
build/win32/vs9/Makefile
build/win32/vs9/glib-version-paths.vsprops
build/win32/vs10/Makefile
build/win32/vs10/glib-version-paths.props
build/win32/vs11/Makefile
build/win32/vs12/Makefile
build/win32/vs14/Makefile
win32/Makefile
win32/vs9/Makefile
win32/vs9/glib-version-paths.vsprops
win32/vs10/Makefile
win32/vs10/glib-version-paths.props
win32/vs11/Makefile
win32/vs12/Makefile
win32/vs14/Makefile
glib/Makefile
glib/libcharset/Makefile
glib/gnulib/Makefile
......
......@@ -947,15 +947,15 @@ glib_compile_schemas_EXCLUDES = dummy
gio_tool_FILES = $(gio_SOURCES)
gio_tool_EXCLUDES = dummy
include $(top_srcdir)/build/Makefile.msvcproj
include $(top_srcdir)/win32/Makefile.msvcproj
dist-hook: \
$(BUILT_EXTRA_DIST) \
$(top_builddir)/build/win32/vs9/gio.vcproj \
$(top_builddir)/build/win32/vs9/gio.headers \
$(top_builddir)/build/win32/vs9/glib-compile-schemas.vcproj \
$(top_builddir)/build/win32/vs9/glib-compile-resources.vcproj \
$(top_builddir)/build/win32/vs9/gio-tool.vcproj
$(top_builddir)/win32/vs9/gio.vcproj \
$(top_builddir)/win32/vs9/gio.headers \
$(top_builddir)/win32/vs9/glib-compile-schemas.vcproj \
$(top_builddir)/win32/vs9/glib-compile-resources.vcproj \
$(top_builddir)/win32/vs9/gio-tool.vcproj
files='$(BUILT_EXTRA_DIST)'; \
for f in $$files; do \
if test -f $$f; then d=.; else d=$(srcdir); fi; \
......
......@@ -466,9 +466,9 @@ glib_HEADERS_DIR = $(glibsubincludedir)
glib_HEADERS_INST = $(deprecatedinclude_HEADERS) $(glibsubinclude_HEADERS)
glib_HEADERS_EXCLUDES = dummy
include $(top_srcdir)/build/Makefile.msvcproj
include $(top_srcdir)/win32/Makefile.msvcproj
dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/build/win32/vs9/glib.vcproj $(top_builddir)/build/win32/vs9/glib.headers
dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/win32/vs9/glib.vcproj $(top_builddir)/win32/vs9/glib.headers
files='$(BUILT_EXTRA_DIST)'; \
for f in $$files; do \
if test -f $$f; then d=.; else d=$(srcdir); fi; \
......
......@@ -242,9 +242,9 @@ gobject_HEADERS_DIR = $(libgobjectincludedir)
gobject_HEADERS_INST = $(gobject_public_h_sources)
gobject_HEADERS_EXCLUDES = dummy
include $(top_srcdir)/build/Makefile.msvcproj
include $(top_srcdir)/win32/Makefile.msvcproj
dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/build/win32/vs9/gobject.vcproj $(top_builddir)/build/win32/vs9/gobject.headers
dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/win32/vs9/gobject.vcproj $(top_builddir)/win32/vs9/gobject.headers
files='$(BUILT_EXTRA_DIST)'; \
for f in $$files; do \
if test -f $$f; then d=.; else d=$(srcdir); fi; \
......
......@@ -3,8 +3,7 @@
# from the Visual Studio 2010 project files
# This autotools file, from GLib, can be used in other projects
# that have Visual Studio build support, and is copied into
# $(srcroot)/build/.
# that have Visual Studio build support.
# Author: Fan, Chun-wei
# November 05, 2012
......@@ -16,32 +15,32 @@
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
%.sln:
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
sed 's/$(MSVC_BASE_VER_LONG)/$(MSVC_VER_LONG)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
%.txt:
sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/vs$(MSVC_BASE_VER)/vs$(MSVC_VER)/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
sed 's/VS$(MSVC_BASE_VER)/VS$(MSVC_VER)/g' < $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/win32/vs$(MSVC_VER)/$@.tmp
%.vcxproj:
if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \
sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
else \
sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
sed 's/v$(MSVC_BASE_VER)0/v$(MSVC_VER)0/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
fi
%.props: $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/Makefile
if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
sed 's/<VSVer>$(MSVC_BASE_VER)<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
%.props: $(top_builddir)/win32/vs$(MSVC_BASE_VER)/Makefile
if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \
sed 's/<VSVer>$(MSVC_BASE_VER)<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
else \
sed 's/<VSVer>$(MSVC_BASE_VER)<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
sed 's/<VSVer>$(MSVC_BASE_VER)<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ > $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
fi
%.vcxproj.filters:
if test -e $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@; then \
cp $(top_srcdir)/build/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
if test -e $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@; then \
cp $(top_srcdir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
else \
cp $(top_builddir)/build/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
cp $(top_builddir)/win32/vs$(MSVC_BASE_VER)/$@ $(top_builddir)/win32/vs$(MSVC_VER)/$@; \
fi
SUBDIRS = vs9 vs10 vs11 vs12 vs14
EXTRA_DIST = \
glibpc.py \
pc_base.py \
replace.py
......@@ -3,8 +3,7 @@
# Projects from their templates
# This autotools file, from GLib, can be used in other projects
# that have Visual Studio build support, and is copied into
# $(srcroot)/build/.
# that have Visual Studio build support.
# * Input variables:
#
......@@ -13,7 +12,7 @@
# * Simple tutorial
#
# Add this to Makefile.am where your library/program is built:
# include $(top_srcdir)/build/Makefile.msvcproj
# include <this Makefile.msvcproj>
# MSVCPROJS = YourProject (can be multiple projects in a single srcdir)
# YourProject_FILES = $(libyourlib_1_0_SOURCES)
# YourProject_EXCLUDES = ... # list of sources to exclude, separated by '|', wildcards allowed; use random unsed value if none
......@@ -23,13 +22,13 @@
# YourProject_HEADERS_EXCLUDES = ... # <list of headers to exclude from installation, separated by '|', wildcards allowed; use random unsed value if none>
#
# dist-hook: \ # (or add to it if it is already there, note the vs9 items will also call the vs10 items in the process)
# $(top_builddir)/build/win32/vs9/YourProject.vcproj \
# $(top_builddir)/build/win32/vs9/YourProject.headers # if headers need to be installed
# $(top_builddir)/win32/vs9/YourProject.vcproj \
# $(top_builddir)/win32/vs9/YourProject.headers # if headers need to be installed
#
# --or, if Visual Studio 2013 or later is required--
# dist-hook: \ # (or add to it if it is already there, this does -not- call other vs items in the process)
# $(top_builddir)/build/win32/vs12/YourProject.vcxproj \
# $(top_builddir)/build/win32/vs12/YourProject.vs12.headers # if headers need to be installed
# $(top_builddir)/win32/vs12/YourProject.vcxproj \
# $(top_builddir)/win32/vs12/YourProject.vs12.headers # if headers need to be installed
# Private functions
......@@ -59,22 +58,22 @@ _headers_destdir=$(subst /,\\,$(_headers_dest_posix))
define msvcproj-builder
$(top_builddir)/build/win32/vs10/$(1).vcxproj: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(top_builddir)/build/win32/vs10/$(1).vcxproj.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(top_builddir)/win32/vs10/$(1).vcxproj: $(top_builddir)/win32/vs9/$(1).vcproj
$(top_builddir)/win32/vs10/$(1).vcxproj.filters: $(top_builddir)/win32/vs9/$(1).vcproj
$(1).sourcefiles: $(top_builddir)/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles: $(top_builddir)/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles.filters: $(top_builddir)/win32/vs9/$(1).vcproj
$(top_builddir)/build/win32/vs9/$(1).vcproj: Makefile
-$(RM) $(top_builddir)/build/win32/vs9/$(1).vcproj
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj.filters
$(top_builddir)/win32/vs9/$(1).vcproj: Makefile
-$(RM) $(top_builddir)/win32/vs9/$(1).vcproj
-$(RM) $(top_builddir)/win32/vs10/$(1).vcxproj
-$(RM) $(top_builddir)/win32/vs10/$(1).vcxproj.filters
-$(RM) $(top_builddir)/win32/vs11/$(1).vcxproj
-$(RM) $(top_builddir)/win32/vs11/$(1).vcxproj.filters
-$(RM) $(top_builddir)/win32/vs12/$(1).vcxproj
-$(RM) $(top_builddir)/win32/vs12/$(1).vcxproj.filters
-$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj
-$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj.filters
for F in $(_proj_files); do \
......@@ -82,69 +81,69 @@ $(top_builddir)/build/win32/vs9/$(1).vcproj: Makefile
$(_proj_filters)) \
;; \
*.c|*.cpp|*.cc|*.cxx) \
echo ' <File RelativePath="..\..\..'$(_proj_subdir)$$$$F'" />' >>$(1).sourcefiles && \
echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'" />' >>$(1).vs10.sourcefiles && \
echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'"><Filter>Source Files</Filter></ClCompile>' >>$(1).vs10.sourcefiles.filters \
echo ' <File RelativePath="..\..'$(_proj_subdir)$$$$F'" />' >>$(1).sourcefiles && \
echo ' <ClCompile Include="..\..'$(_proj_subdir)$$$$F'" />' >>$(1).vs10.sourcefiles && \
echo ' <ClCompile Include="..\..'$(_proj_subdir)$$$$F'"><Filter>Source Files</Filter></ClCompile>' >>$(1).vs10.sourcefiles.filters \
;; \
esac; \
done
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/$(1).vcprojin >$(top_builddir)/build/win32/vs9/$(1).vcproj
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/$(1).vcxprojin >$(top_builddir)/build/win32/vs10/$(1).vcxproj
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/$(1).vcxproj.filtersin >$(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
$(CPP) -P - <$(top_srcdir)/win32/vs9/$(1).vcprojin >$(top_builddir)/win32/vs9/$(1).vcproj
$(CPP) -P - <$(top_srcdir)/win32/vs10/$(1).vcxprojin >$(top_builddir)/win32/vs10/$(1).vcxproj
$(CPP) -P - <$(top_srcdir)/win32/vs10/$(1).vcxproj.filtersin >$(top_builddir)/win32/vs10/$(1).vcxproj.filters
$(RM) $(1).sourcefiles
$(RM) $(1).vs10.sourcefiles
$(RM) $(1).vs10.sourcefiles.filters
$(top_builddir)/build/win32/vs10/$(1).vs10.headers: $(top_builddir)/build/win32/vs9/$(1).headers
$(top_builddir)/win32/vs10/$(1).vs10.headers: $(top_builddir)/win32/vs9/$(1).headers
$(top_builddir)/build/win32/vs9/$(1).headers: Makefile
-$(RM) $(top_builddir)/build/win32/vs9/$(1).headers
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers
$(top_builddir)/win32/vs9/$(1).headers: Makefile
-$(RM) $(top_builddir)/win32/vs9/$(1).headers
-$(RM) $(top_builddir)/win32/vs10/$(1).vs10.headers
for F in $(_proj_headers); do \
case $$$$F in \
$(_proj_headers_excludes)) \
;; \
*.h|*.hpp|*.hh|*.hxx) \
echo 'copy ..\..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F'&#x0D;&#x0A;' >>$(top_builddir)/build/win32/vs9/$(1).headers && \
echo 'copy ..\..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/build/win32/vs10/$(1).vs10.headers \
echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F'&#x0D;&#x0A;' >>$(top_builddir)/win32/vs9/$(1).headers && \
echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/win32/vs10/$(1).vs10.headers \
;; \
esac; \
done
$(top_builddir)/build/win32/vs12/$(1).vcxproj.filters: $(top_builddir)/build/win32/vs12/$(1).vcxproj
$(top_builddir)/win32/vs12/$(1).vcxproj.filters: $(top_builddir)/win32/vs12/$(1).vcxproj
$(top_builddir)/build/win32/vs12/$(1).vcxproj: Makefile
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj.filters
$(top_builddir)/win32/vs12/$(1).vcxproj: Makefile
-$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj
-$(RM) $(top_builddir)/win32/vs14/$(1).vcxproj.filters
for F in $(_proj_files); do \
case $$$$F in \
$(_proj_filters)) \
;; \
*.c|*.cpp|*.cc|*.cxx) \
echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'" />' >>$(1).vs12.sourcefiles && \
echo ' <ClCompile Include="..\..\..'$(_proj_subdir)$$$$F'"><Filter>Source Files</Filter></ClCompile>' >>$(1).vs12.sourcefiles.filters \
echo ' <ClCompile Include="..\..'$(_proj_subdir)$$$$F'" />' >>$(1).vs12.sourcefiles && \
echo ' <ClCompile Include="..\..'$(_proj_subdir)$$$$F'"><Filter>Source Files</Filter></ClCompile>' >>$(1).vs12.sourcefiles.filters \
;; \
esac; \
done
$(CPP) -P - <$(top_srcdir)/build/win32/vs12/$(1).vcxprojin >$(top_builddir)/build/win32/vs12/$(1).vcxproj
$(CPP) -P - <$(top_srcdir)/build/win32/vs12/$(1).vcxproj.filtersin >$(top_builddir)/build/win32/vs12/$(1).vcxproj.filters
$(CPP) -P - <$(top_srcdir)/win32/vs12/$(1).vcxprojin >$(top_builddir)/win32/vs12/$(1).vcxproj
$(CPP) -P - <$(top_srcdir)/win32/vs12/$(1).vcxproj.filtersin >$(top_builddir)/win32/vs12/$(1).vcxproj.filters
$(RM) $(1).vs12.sourcefiles
$(RM) $(1).vs12.sourcefiles.filters
$(top_builddir)/build/win32/vs12/$(1).vs12.headers: Makefile
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vs12.headers
$(top_builddir)/win32/vs12/$(1).vs12.headers: Makefile
-$(RM) $(top_builddir)/win32/vs12/$(1).vs12.headers
for F in $(_proj_headers); do \
case $$$$F in \
$(_proj_headers_excludes)) \
;; \
*.h|*.hpp|*.hh|*.hxx) \
echo 'copy ..\..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/build/win32/vs12/$(1).vs12.headers \
echo 'copy ..\..'$(_proj_subdir)$$$$F' $$$$(CopyDir)\include'$(_headers_destdir)'\'$$$$F >>$(top_builddir)/win32/vs12/$(1).vs12.headers \
;; \
esac; \
done
......
......@@ -23,7 +23,7 @@ class BasePCItems:
self.libdir = ''
self.prefix = ''
self.srcdir = os.path.dirname(__file__)
self.top_srcdir = self.srcdir + '\\..\\..'
self.top_srcdir = self.srcdir + '\\..'
self.version = ''
def setup(self, argv, parser=None):
......
......@@ -42,7 +42,7 @@ def get_srcroot():
else:
path = __file__
dirname = os.path.dirname(path)
return os.path.abspath(os.path.join(dirname, '..', '..'))
return os.path.abspath(os.path.join(dirname, '..'))
def process_include(src, dest, includes):
RE_INCLUDE = re.compile(r'^\s*#include\s+"(.*)"')
......@@ -82,15 +82,15 @@ def generate_libgio_sourcefiles(srcroot, dest, stype):
if stype == '9':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<File RelativePath="..\\..\\..\\gio\\' + i.replace('/', '\\') + '"/>\n')
d.write('\t\t\t<File RelativePath="..\\..\\gio\\' + i.replace('/', '\\') + '"/>\n')
elif stype == '10':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<ClCompile Include="..\\..\\..\\gio\\' + i.replace('/', '\\') + '"/>\n')
d.write('\t\t\t<ClCompile Include="..\\..\\gio\\' + i.replace('/', '\\') + '"/>\n')
elif stype == '10f':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<ClCompile Include="..\\..\\..\\gio\\' + i.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
d.write('\t\t\t<ClCompile Include="..\\..\\gio\\' + i.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
else:
raise Exception("Must specify project type (9, 10 or 10f)")
......@@ -122,15 +122,15 @@ def generate_libglib_sourcefiles(srcroot, dest, stype):
if stype == '9':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<File RelativePath="..\\..\\..\\glib\\' + i.replace('/', '\\') + '"/>\n')
d.write('\t\t\t<File RelativePath="..\\..\\glib\\' + i.replace('/', '\\') + '"/>\n')
elif stype == '10':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<ClCompile Include="..\\..\\..\\glib\\' + i.replace('/', '\\') + '"/>\n')
d.write('\t\t\t<ClCompile Include="..\\..\\glib\\' + i.replace('/', '\\') + '"/>\n')
elif stype == '10f':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<ClCompile Include="..\\..\\..\\glib\\' + i.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
d.write('\t\t\t<ClCompile Include="..\\..\\glib\\' + i.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
else:
raise Exception("Must specify project type (9, 10 or 10f)")
......@@ -146,15 +146,15 @@ def generate_libgobject_sourcefiles(srcroot, dest, stype):
if stype == '9':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<File RelativePath="..\\..\\..\\gobject\\' + i.replace('/', '\\') + '"/>\n')
d.write('\t\t\t<File RelativePath="..\\..\\gobject\\' + i.replace('/', '\\') + '"/>\n')
elif stype == '10':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<ClCompile Include="..\\..\\..\\gobject\\' + i.replace('/', '\\') + '"/>\n')
d.write('\t\t\t<ClCompile Include="..\\..\\gobject\\' + i.replace('/', '\\') + '"/>\n')
elif stype == '10f':
with open(dest, 'w') as d:
for i in sources:
d.write('\t\t\t<ClCompile Include="..\\..\\..\\gobject\\' + i.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
d.write('\t\t\t<ClCompile Include="..\\..\\gobject\\' + i.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
else:
raise Exception("Must specify project type (9, 10 or 10f)")
......@@ -263,23 +263,23 @@ def main(argv):
#------------ submodule gobject -------------------
generate_libglib_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libglib.sourcefiles'), '9')
os.path.join(srcroot, 'win32', 'libglib.sourcefiles'), '9')
generate_libglib_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libglib.vs10.sourcefiles'), '10')
os.path.join(srcroot, 'win32', 'libglib.vs10.sourcefiles'), '10')
generate_libglib_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libglib.vs10.sourcefiles.filters'), '10f')
process_include(os.path.join(srcroot, 'build', 'win32', 'vs9', 'glib.vcprojin'),
os.path.join(srcroot, 'build', 'win32', 'vs9', 'glib.vcproj'),
includes = [os.path.join(srcroot, 'build', 'win32')])
process_include(os.path.join(srcroot, 'build', 'win32', 'vs10', 'glib.vcxprojin'),
os.path.join(srcroot, 'build', 'win32', 'vs10', 'glib.vcxproj'),
includes = [os.path.join(srcroot, 'build', 'win32')])
process_include(os.path.join(srcroot, 'build', 'win32', 'vs10', 'glib.vcxproj.filtersin'),
os.path.join(srcroot, 'build', 'win32', 'vs10', 'glib.vcxproj.filters'),
includes = [os.path.join(srcroot, 'build', 'win32')])
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libglib.sourcefiles'))
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libglib.vs10.sourcefiles'))
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libglib.vs10.sourcefiles.filters'))
os.path.join(srcroot, 'win32', 'libglib.vs10.sourcefiles.filters'), '10f')
process_include(os.path.join(srcroot, 'win32', 'vs9', 'glib.vcprojin'),
os.path.join(srcroot, 'win32', 'vs9', 'glib.vcproj'),
includes = [os.path.join(srcroot, 'win32')])
process_include(os.path.join(srcroot, 'win32', 'vs10', 'glib.vcxprojin'),
os.path.join(srcroot, 'win32', 'vs10', 'glib.vcxproj'),
includes = [os.path.join(srcroot, 'win32')])
process_include(os.path.join(srcroot, 'win32', 'vs10', 'glib.vcxproj.filtersin'),
os.path.join(srcroot, 'win32', 'vs10', 'glib.vcxproj.filters'),
includes = [os.path.join(srcroot, 'win32')])
os.unlink(os.path.join(srcroot, 'win32', 'libglib.sourcefiles'))
os.unlink(os.path.join(srcroot, 'win32', 'libglib.vs10.sourcefiles'))
os.unlink(os.path.join(srcroot, 'win32', 'libglib.vs10.sourcefiles.filters'))
with open(os.path.join(srcroot, 'glib', 'gspawn-win32-helper-console.c'), 'w') as c:
c.write('#define HELPER_CONSOLE\n')
c.write('#include "gspawn-win32-helper.c"\n')
......@@ -318,45 +318,45 @@ def main(argv):
os.chdir(cwd)
generate_libgobject_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libgobject.sourcefiles'), '9')
os.path.join(srcroot, 'win32', 'libgobject.sourcefiles'), '9')
generate_libgobject_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libgobject.vs10.sourcefiles'), '10')
os.path.join(srcroot, 'win32', 'libgobject.vs10.sourcefiles'), '10')
generate_libgobject_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libgobject.vs10.sourcefiles.filters'), '10f')
process_include(os.path.join(srcroot, 'build', 'win32', 'vs9', 'gobject.vcprojin'),
os.path.join(srcroot, 'build', 'win32', 'vs9', 'gobject.vcproj'),
includes = [os.path.join(srcroot, 'build', 'win32')])
process_include(os.path.join(srcroot, 'build', 'win32', 'vs10', 'gobject.vcxprojin'),
os.path.join(srcroot, 'build', 'win32', 'vs10', 'gobject.vcxproj'),
includes = [os.path.join(srcroot, 'build', 'win32')])
process_include(os.path.join(srcroot, 'build', 'win32', 'vs10', 'gobject.vcxproj.filtersin'),
os.path.join(srcroot, 'build', 'win32', 'vs10', 'gobject.vcxproj.filters'),
includes = [os.path.join(srcroot, 'build', 'win32')])
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libgobject.sourcefiles'))
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libgobject.vs10.sourcefiles'))
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libgobject.vs10.sourcefiles.filters'))
os.path.join(srcroot, 'win32', 'libgobject.vs10.sourcefiles.filters'), '10f')
process_include(os.path.join(srcroot, 'win32', 'vs9', 'gobject.vcprojin'),
os.path.join(srcroot, 'win32', 'vs9', 'gobject.vcproj'),
includes = [os.path.join(srcroot, 'win32')])
process_include(os.path.join(srcroot, 'win32', 'vs10', 'gobject.vcxprojin'),
os.path.join(srcroot, 'win32', 'vs10', 'gobject.vcxproj'),
includes = [os.path.join(srcroot, 'win32')])
process_include(os.path.join(srcroot, 'win32', 'vs10', 'gobject.vcxproj.filtersin'),
os.path.join(srcroot, 'win32', 'vs10', 'gobject.vcxproj.filters'),
includes = [os.path.join(srcroot, 'win32')])
os.unlink(os.path.join(srcroot, 'win32', 'libgobject.sourcefiles'))
os.unlink(os.path.join(srcroot, 'win32', 'libgobject.vs10.sourcefiles'))
os.unlink(os.path.join(srcroot, 'win32', 'libgobject.vs10.sourcefiles.filters'))
#------------ end of submodule gobject -------------------
#------------ submodule gio -------------------
#depends on glib-mkenums
generate_libgio_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libgio.sourcefiles'), '9')
os.path.join(srcroot, 'win32', 'libgio.sourcefiles'), '9')
generate_libgio_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libgio.vs10.sourcefiles'), '10')
os.path.join(srcroot, 'win32', 'libgio.vs10.sourcefiles'), '10')
generate_libgio_sourcefiles(srcroot,
os.path.join(srcroot, 'build', 'win32', 'libgio.vs10.sourcefiles.filters'), '10f')
process_include(os.path.join(srcroot, 'build', 'win32', 'vs9', 'gio.vcprojin'),
os.path.join(srcroot, 'build', 'win32', 'vs9', 'gio.vcproj'),
includes = [os.path.join(srcroot, 'build', 'win32')])
process_include(os.path.join(srcroot, 'build', 'win32', 'vs10', 'gio.vcxprojin'),
os.path.join(srcroot, 'build', 'win32', 'vs10', 'gio.vcxproj'),
includes = [os.path.join(srcroot, 'build', 'win32')])
process_include(os.path.join(srcroot, 'build', 'win32', 'vs10', 'gio.vcxproj.filtersin'),
os.path.join(srcroot, 'build', 'win32', 'vs10', 'gio.vcxproj.filters'),
includes = [os.path.join(srcroot, 'build', 'win32')])
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libgio.sourcefiles'))
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libgio.vs10.sourcefiles'))
os.unlink(os.path.join(srcroot, 'build', 'win32', 'libgio.vs10.sourcefiles.filters'))
os.path.join(srcroot, 'win32', 'libgio.vs10.sourcefiles.filters'), '10f')
process_include(os.path.join(srcroot, 'win32', 'vs9', 'gio.vcprojin'),
os.path.join(srcroot, 'win32', 'vs9', 'gio.vcproj'),
includes = [os.path.join(srcroot, 'win32')])
process_include(os.path.join(srcroot, 'win32', 'vs10', 'gio.vcxprojin'),
os.path.join(srcroot, 'win32', 'vs10', 'gio.vcxproj'),
includes = [os.path.join(srcroot, 'win32')])
process_include(os.path.join(srcroot, 'win32', 'vs10', 'gio.vcxproj.filtersin'),
os.path.join(srcroot, 'win32', 'vs10', 'gio.vcxproj.filters'),
includes = [os.path.join(srcroot, 'win32')])
os.unlink(os.path.join(srcroot, 'win32', 'libgio.sourcefiles'))
os.unlink(os.path.join(srcroot, 'win32', 'libgio.vs10.sourcefiles'))
os.unlink(os.path.join(srcroot, 'win32', 'libgio.vs10.sourcefiles.filters'))
generate_libgio_enumtypes(srcroot, opt.perl)
#------------ end of submodule gio -------------------
......