Without this change, out-of-tree distcheck doesn't get very far.
Similarly, allow *.vcxproj, *.props to be in either the builddir or
the srcdir.
Finally, since I'm touching these lines anyway, eliminate some
useless uses of cat: "cat x | sed 's/foo/bar/' > y" is
equivalent to "sed 's/foo/bar/' < x > y".
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=748176
Reviewed-by: Chun-wei Fan <fanchunwei@src.gnome.org>
Make use of pattern rules when generating the Visual Studio 2012/2013
Projects from the Visual Studio 2010 projects, which will help to clean up
the file and also avoid problems when running items like 'make -jN dist'.
The current GdkScreen->is_composited() is a stub as we were having Windows
XP being supported, which does not support Desktop Window Manager (DWM),
which is used by Windows for composition.
Windows Vista and later support DWM, and it is always enabled on Windows 8/
Server 2012 and later.
Please note that as we are dropping XP support in this cycle, this is the
commit that would say goodbye to Windows XP support for GTK+-3.x, by
linking directly to dwmapi.dll. This means, we only check whether we are
on Windows 8 or Server 2012 (or later) to see whether we unconditionally
have composition enabled.
https://bugzilla.gnome.org/show_bug.cgi?id=741849
"Install" the .pdb files that were generated along with the build, to make
it easier for people to develop and debug GTK+, especially when used as a
stack, and as the .pdb files are already generated with all builds.
Also make the copy of the .dll, .lib and .exe files more selective so that
we do not accidently copy files that are not meant to be "installed", or
end up making extra copies of plugin DLLs in the wrong places, when the
projects here are included as a part of a grand solution that is used to
build the entire GTK+ stack, for example.
For Visual Studio 2010 and later, the .pdb filename needs to be explicitly
specified so that it will match the filename of the target, if the project
name differs from the filename of the target. Make sure that is the case
for the 3 DLLs that we build for Visual Studio 2010 and later.
Use the /MP compiler option, where the build time for release builds can
be cut down by quite a bit. This will however cause a brief warning with
debug builds due to the use of /Gm, but the code will otherwise build
normally. Unlike the Visual Studio 2010+ builds, we can't use /d2Zi+ as
Visual Studio 2008 does not support that, so we can't get a better
debugging experience for release builds here.
Use Multiprocessor compilation which can cut down build times by quite a
bit and use the /d2Zi+ flag to have better debugging info being logged to
the .pdb for release builds.
These are only applicable for Visual Studio 2010/2012 and later.
Rename the "install" projects as "gtk-install" as we are planning to have a
grand solution file that incorporates all project files of the GTK+ stack
with their dependencies, to make it easier for people to build GTK+ from
scratch from a stock installation of Visual Studio 2008 and later.
Since the support for GL support in the GDK Windows backend has landed in
master, we need to build it in the Visual Studio builds. Update the
projects for that and "install" the public header that was added.
As the print preview command is moved into the sources, don't define it in
the preprocessor definitions. However, define the
GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED in the preprocessor definitions, to
make the build in-line with the autotools builds.
The files for build of GtkInspector have been intergrated into the build of
the main GTK+ DLL, and the Visual Studio project templates for those have
been removed as well. Make that removal complete by removing from the
solution files references to it and make the 'gtk' project not to depend on
the gtk-inspector project.
...for Broadway builds, as it was producing a wrongly-named check file for
that configuration, so that a clean would not be correctly performed and
subsequently affected rebuilds.
The gtkglarea and sidebar demos have been added, so build them in the
projects. Note that the gtkglarea code is not usable under Windows at this
point as implementation is needed for the GDK-Win32 backend.
Patches have been submitted to the libepoxy project so that it can be built
under Visual Studio. This will allow the GDK, GTK and gtk3-demo projects
to build, but the gtkglarea code is not usable at this time as
implementation needs to be added to the GDK-Win32 backend for it.
"Install" gdkbroadwaydisplay.h, as it is a public header of GDK Broadway,
also fix the MSVC 2010+ gtk-copy-gdk-broadway.props property sheet as a
'>' is missing. Sorry for not noting these issues earlier, as MSVC
Broadway builds were recently restored. My bad :|
There is now a broadway-buffer.c source that needs to be built for this, so
add it into the projects. Since crypt() is no longer used, don't include
crypt.c in the builds, and so clean up the projects a bit.
Tell people that they need to download and install the Adwaita icon theme,
by following the instructions given on
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack.
Also tell people they can either use IJG JPEG or libjpeg-turbo for non-GDI+
builds of GDK-Pixbuf.
This updates the property sheets that are used to "install" builds of GTK+
after the libraries and the gtk3-demo programs are built. Note that these
are generated with scripts in regards to the headers part, so that we can
move the header installation part to use autocompletion by the autotools
build files in the next dev cycle or so, like the "gdk" and "gtk" project
files.
Make the Visual C++-related build files contain the actual GTK+ version, by
generating them during the configure stage and dist'ing them in the release
tarballs. This is especially important for builds of introspection files,
as one may need to look at the release version of GTK+ in those files.
Define ISOLATION_AWARE_ENABLED for the build of the GTK DLL so that visual
style can be applied to the Windows print dialog for all applications using
gtkprintoperation.
Update the script for the generation of gtk-win32.rc for MSVC to not try to
embed the manifest from it (but embed libgtk3.manifest by including it in
the project files, as we are now doing), and embedding the manifest file is
really not supported in MSVC 2010 and later.
Also fix up formatting in the GTK DLL projects.
https://bugzilla.gnome.org/show_bug.cgi?id=733773
Use the Python script that was used to create gtk-win32.rc from
gtk-win32.rc.in to similarly create libgtk3.manifest. As the wildcard
character can be used for all architectures, use that.
The libgtk3.manifest file needs to be specified explicitly in the projects,
so that it will be recognized and built into the GTK dll, so update the
project files as well on this part.
https://bugzilla.gnome.org/show_bug.cgi?id=733773
This utility would likely be useful for Windows builds of GTK+, given the
reasons Alex cited for coming up with this utility[1], and MSVC build
support for librsvg is not available at this time (possible, but not
implemented yet).
[1]: https://bugzilla.gnome.org/show_bug.cgi?id=730450
In bug 733773, gtk-win32.rc was removed from the dist in the attempt to
make the print dialog on Windows themed, so this script was added so that
the gtk-win32.rc file can be generated during the Visual Studio builds of
GTK+ from the autotools scripts. This is also intended for filling in the
arch of the build for MSVC builds for the manifest that is also required
for fixing bug 733773. Python is used as it is already needed for
This is done as a custom build rule in the Visual Studio projects so that
it is easy to clean and rebuild gtk-win32.rc upon an update.
https://bugzilla.gnome.org/show_bug.cgi?id=733773
Like the autotools builds of the introspection files, don't include gtkx.h
in the introspection prepropcessing as it should not be included by other
GTK+ headers.
We need to enclose paths containing $(BinDir) with double quotes as it
points to something like c:\foo\gtk+-x.yy.zz, which the copy command on
Windows does not like "+" in paths unless enclosed in quotes.
As the Visual Studio 2012/2013 are only slightly different from the Visual
Studio 2010 projects, we can provide support for them by using scripts to
copy the Visual Studio 2010 projects, and update the specific parts as
necessary.
Thus, there would be little maintenance overhead for these as only the 2010
projects need to be kept up-to-date as a result. This might change when we
do get the stack working with WinRT/Metro, but that's going to be another
totally different issue.
The stock icons are now built into the GTK+ DLL via resources, so don't
try to install the stock icons, and the icons don't reside in their former
positions anymore, causing messages indicating that the files cannot be
found.
This reverts commit 2e0ce67f8a.
Since g-i 1.40.0 we are using the .lib file(s) to determine the DLL(s) that
the introspection files should look for, instead of directly using the
DLL(s) directly, so it is no longer necessary to make copies of the GDK
.lib file to match the <namespace-name>-<namespace-version> convention when
we are building the introspection files for GdkWin32. Remove that from the
introspection build process as a result.
Copy the icons in stock_icons accordingly, so that the built-in icons can
be found by GTK, as it seems that not all of them are built into
gtkbuiltincache.h.
The a11y headers are now listed with the main Makefile.am of GTK, and
GDK introduced deprecated headers, so we need to account for them for the
build of the introspection files.
Currently, due to the way that Visual Studio 2010+ projects are handled,
the "install" project does not re-build upon changes to the sources, as it
does not believe that its dependencies have changed, although the changed
sources are automatically recompiled. This means that if a part or more
of the solution does not build, or if the sources need some other fixes
or enhancements, the up-to-date build is not copied automatically, which
can be misleading.
Improve on the situation by forcing the "install" project to trigger its
rebuild, so that the updated binaries can be copied. This does trigger an
MSBuild warning, but having that warning is way better than not having an
up-to-date build, especially during testing and development.
Like the GDK and GTK portions, use autotools scripts to generate the
complete projects for gtk-inspector as sources there seem to change from
time to time.
It might be so that this, like the a11y sources, will be referenced from
the main Makefile.am of GTK directly, but just do this so that the
projects can build properly.