Commit Graph

203 Commits

Author SHA1 Message Date
Chun-wei Fan
c049581f79 MSVC builds: Build more tools in gtk/
Build the gtk-update-icon-cache, gtk-builder-tool and gtk-query-settings
tools and run gtk-update-icon-cache as part of the post-build
"installation" process.

Pointed out (and reminded) by Paolo Borelli in bug 759436 that we should
build, "install" and run gtk-update-icon-cache in the MSVC builds as well.
2015-12-15 15:37:33 +08:00
Chun-wei Fan
dbe430f6ec MSVC builds: Use /opt:ref for release builds
glib-compile-resources have been updated to ensure that the symbols
generated are referred to, so that they will not be optimized out by the
linker in release builds.  We can change from /opt:noref to /opt:ref,
which should improve optimization a bit.
2015-11-12 18:16:33 +08:00
Chun-wei Fan
97b44e02a9 MSVC 2010+ builds: Do not explicitly use /LTCG
This partially reverts de16a4e.

As we now ensure that items using GResources and GConstructors are always
referenced so that the linker does not optimize them out in a default
Release build, we no longer need to enforce the use of /LTCG, so
/LTCG:incremental will work as well.
2015-11-12 15:53:47 +08:00
Chun-wei Fan
de16a4e07c MSVC release builds: Ensure that /LTCG is used
MSVC 2015 changed its default link-time code generation setting to
/LTCG:incremental, which causes problems if /opt:noref is to be used,
meaning that some code will be optimized out by the linker.

Avoid this situtation here by enforcing the use of /LTCG for MSVC 2010+
builds.
2015-10-23 10:33:41 +08:00
Chun-wei Fan
6f7029bb67 MSVC builds: Fix "install"
Use $(GlibEtcInstallRoot) when invoking glib-compile-schemas, as CopyDir
is not GlibInstallRoot for GTK+ (due to quoting issues), meaning that the
glib-compile-schemas tool may not be found in certain cases.

Issue pointed out by Ignacio Casal Quinteiro.
2015-10-12 23:22:35 +08:00
Matthias Clasen
c0e3b6ce71 fixup 2015-10-03 14:08:42 -04:00
Chun-wei Fan
8eea531f25 build/Makefile-newvs.am: Update Comments for Usage
Update the notes that this is also used for Visual Studio 2015 support,
and correct the MSVC_VER_LONG for MSVC 2015, which is 14, not 2015.

Also add a note that this can be used for other projects that have
Visual Studio build support.
2015-09-25 20:23:39 +08:00
Chun-wei Fan
e88e68c2bd Build: Make Makefile.msvcproj A Bit More Generic
Handle also the situation where $(srcdir) == $(top_srcdir), so that this
can also be used in cases like librsvg and gobject-introspection.
2015-09-25 20:23:38 +08:00
Chun-wei Fan
975e1cc41c build/win32: Fix 'make -jN dist'
The recent changes to build/win32/vs9|10/Makefile.am fixed 'make distclean'
but broke 'make -jN dist', so fix that by listing the *.headers and using
that list as a dependency and to remove those files in one single command
right after we generate the gtk-install.vsprops template, so that we don't
have to worry about them in 'make distclean'.
2015-09-23 18:31:22 +08:00
Matthias Clasen
52dd61ac45 Fix distclean 2015-09-21 22:02:14 -04:00
Chun-wei Fan
a3ba6f7475 MSVC Builds: Update Project GUIDs
This updates the Visual Studio Project GUIDs so that they don't repeat with
the GTK+-2.24.x ones, as the 3.x projects can be used with the 2.24.x in a
all-in-one solution file (such as when one wants to use a complete GTK+2
and GTK+3 stack when porting Windows applications from GTK+2 to GTK+3), and
each project in a solution file is expected to have an unique GUID.
2015-09-21 16:50:00 +08:00
Chun-wei Fan
78d2db383d MSVC Builds: Make Re-use Comment in Autotools Module Clearer 2015-09-17 09:19:10 +08:00
Chun-wei Fan
9a4990f4ca MSVC Builds: "Add" Visual Studio 2015 Projects
"Add" Visual Studio 2015 projects by what we did before: Copy the Visual
Studio 2010 project files and replace the items in there as needed, as
the formats of the 2010 and 2015 projects are largely the same.
2015-09-15 19:59:14 +08:00
Chun-wei Fan
a526f15b7d MSVC Builds: Remove Old MSVC Project-Related Files
Since we have the new files, remove the old ones.
2015-09-15 18:52:03 +08:00
Chun-wei Fan
6423a02c55 MSVC Builds: Massive Rename of Projects
We need to rename the projects so that when these projects are added
into an all-in-one solution file that will build the GTK+ 2/3 stack,
the names of the projects will not collide with the GTK+-2.x ones,
especially as GTK+-2.x and GTK+-3.x are done to co-exist on the same
system.  This is due to the case that the MSVC projects are directly
carried over from the GTK+-2.x ones and was then updated for 3.x.

We still need to update the GUIDs of the projects, so that they won't
conflict with the GTK+-2.x ones.
2015-09-15 18:51:33 +08:00
Chun-wei Fan
908850c087 MSVC Builds: Remove the Old Static Projects
Remove the static projects that were supereceded by the templates, which
are used to generate the complete projects during 'make dist'.

https://bugzilla.gnome.org/show_bug.cgi?id=681965
2015-09-15 18:49:49 +08:00
Chun-wei Fan
76825ffc6a Revert "MSVC Builds: Remove Old MSVC Project-Related Files"
Sorry, pushed the patch in the wrong order, should be done with
the renaming of the projects.

This reverts commit d963bd1d32.
2015-09-15 18:40:19 +08:00
Chun-wei Fan
d963bd1d32 MSVC Builds: Remove Old MSVC Project-Related Files
Since we have the new files, remove the old ones.
2015-09-15 18:39:01 +08:00
Chun-wei Fan
d836a52b68 build: Clean Up Visual Studio Project Generation
Use the common automake module from the previous commit in the
Makefile.am's, which means that the Makefile.am's in gdk/ and gtk/ can be
cleaned up as a result.  As a side effect, the property sheet that is used
to "install" the build results and headers can now be generated in terms of
the listing of headers to copy during 'make dist', where we can acquire
most of the list of headers to "install", so that we can largely avoid the
situation where the property sheet files are not updated in time for this,
causing missing headers when this build of GTK+ is being used.

Also use the Visual Studio Project file generation for the following
projects:
gtk3-demo
gtk3-demo-application
gtk3-icon-browser
gdk-win32
gdk-broadway
gail-util

So that the maintenace of these project files can be simplified as well.

https://bugzilla.gnome.org/show_bug.cgi?id=681965
2015-09-15 18:37:37 +08:00
Chun-wei Fan
deb632c9b6 build: Add Common Autotools Module for MSVC Projects
This adds a common autotools module that can be used by various projects to
generate the Visual Studio projects as needed, and if necessary, generate
the headers listings to "install" for that project, based on items passed
in to this.  This is modeled on the Makefile.introspection autotools file
that is used by many GNOME projects to generate the introspection files.

https://bugzilla.gnome.org/show_bug.cgi?id=681965
2015-09-15 18:33:37 +08:00
Chun-wei Fan
e8063bcb21 MSVC Introspection Builds: Remove GCC Requirement
Sorry, the last commit added a generated file instead of the
template.

G-I has been updated to not require a Windows GCC installation
anymore to generate the .gir files, so update the NMake Makefiles
that are used for this purpose.

As a result, it is no longer necessary to define time_t for the .gir
generation as we are on the same compiler throughout the process.
2015-08-17 19:20:04 +08:00
Chun-wei Fan
40a1905207 Revert "MSVC Introspection Builds: Remove GCC Requirement"
This reverts commit aea7809f55.
2015-08-17 19:18:03 +08:00
Chun-wei Fan
aea7809f55 MSVC Introspection Builds: Remove GCC Requirement
G-I has been updated to not require a Windows GCC installation
anymore to generate the .gir files, so update the NMake Makefiles
that are used for this purpose.

As a result, it is no longer necessary to define time_t for the .gir
generation as we are on the same compiler throughout the process.
2015-08-17 19:11:53 +08:00
Chun-wei Fan
9c37fe94d1 MSVC Builds: Fix Introspection Build
The deprecated and a11y sources of GTK+ were spun off some time ago into
their own Makefile.inc, which is then included by gtk/Makefile.am.  Fix the
generation of file sources for the GTK+ .gir.
2015-07-24 17:39:55 +08:00
Chun-wei Fan
28b8541847 gtk-demo: Don't Distribute demos.h
Since demos.h is now generated according to the platform for which GTK+ is
built, don't distribute it. Generate a Windows-specific demos.h.win32 and
distribute that instead, in which the Visual Studio build files will copy
it to demos.h, so that the build will proceed normally.

https://bugzilla.gnome.org/show_bug.cgi?id=749622
2015-06-19 23:46:05 +08:00
Rico Tzschichholz
ab72da0c41 build: Fix make dist
Revert 2 hunks introduced by 36c65c1aca
2015-06-02 17:12:18 +02:00
Chun-wei Fan
36c65c1aca Fix GDK MSVC Projects
We need to link to dwmapi.lib for all configs, not just the Broadway
ones, so fix the build.
2015-05-29 18:10:59 +08:00
Chun-wei Fan
2ba7977114 gtk3-demo: Fix Visual Studio Builds
Add the new cursors demo to the projects, so that gtk-demo will properly
build.
2015-05-20 17:36:44 +08:00
Simon McVittie
384a795275 Makefile-newvs: some .vcxproj.filters files are in builddir, some in srcdir
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>
2015-04-29 15:26:17 +08:00
Chun-wei Fan
3d937b6b44 build/Makfile-newvs.am: Use Pattern Rules
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'.
2015-04-17 14:00:31 +08:00
Chun-wei Fan
b85f0ccc67 gdk-win32: Really Implement GdkScreen->is_composited()
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
2015-04-17 11:23:53 +08:00
Chun-wei Fan
f53737ad03 Visual Studio Builds: Fix Header "Installation"
gtksidebar.h was renamed as gtkstacksidebar.h, so fix that in the header
"installation".
2015-04-10 16:21:11 +08:00
Chun-wei Fan
45da8bf045 MSVC Builds: "Install" .pdb Files
"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.
2015-03-06 10:40:46 +08:00
Chun-wei Fan
91bc414360 MSVC 2010+ Builds: Fix .pdb Generation
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.
2015-03-06 10:25:18 +08:00
Chun-wei Fan
48c93fb347 MSVC 2008 Builds: Speed Up Release Builds
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.
2015-03-03 18:40:32 +08:00
Chun-wei Fan
163f7e75bf Fix "MSVC Builds: Update icon-browser Projects"
The Visual Studio 2008 Project was not updated correctly, so fix that.
2015-03-03 18:37:26 +08:00
Chun-wei Fan
05ef31362d MSVC Builds: Update icon-browser Projects
There is a new source file that needs to be built, so fix the projects...
2015-03-03 14:08:51 +08:00
Chun-wei Fan
a4f69408ac MSVC Builds: Improve Build Speed and Debugging
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.
2015-03-03 14:07:26 +08:00
Chun-wei Fan
2820c342f6 MSVC Builds: Rename "install" Projects
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.
2015-02-04 13:06:16 +08:00
Chun-wei Fan
8f3bd8ef0c MSVC Builds: "Install" autocleanup headers
These are public headers that are needed in the package, although the
macros are essentially no-ops for Visual Studio builds currently.
2015-02-04 12:42:24 +08:00
David King
9a50203408 docs: Fix some old live.gnome.org URLs 2015-01-09 14:08:20 +00:00
Chun-wei Fan
14e5ca584b Visual Studio Builds: Update Header "Installation"
The list of headers became a bit out-of-date as development went on, so
make it up-to-date.
2014-12-18 15:31:58 +08:00
Chun-wei Fan
6f3385aa60 MSVC Builds: Build and "Install" GDK-Win32 GL Items
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.
2014-12-17 16:24:54 +08:00
Chun-wei Fan
8ec72dd2b1 Visual Studio Build: Update GTK DLL Build Flags
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.
2014-12-02 09:26:35 +08:00
Chun-wei Fan
79e916f6af MSVC Builds: Finish Removal of the gtk-inspector Projects
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.
2014-12-01 12:06:28 +08:00
Matthias Clasen
13b5e0b6e6 Drop vs build stuff for inspector
Now that the inspector sources are built as part of gtk/, this should
no longer be needed.
2014-11-30 19:05:09 -05:00
Chun-wei Fan
4744058832 Visual Studio Builds: Fix gdkconfig.h Generation
...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.
2014-11-20 22:35:05 +08:00
Chun-wei Fan
579c56ffd7 Visual Studio Builds: Update "Installation"
Add the newly-added public headers for GDK and GTK into the list of files
to "install".
2014-10-24 15:59:18 +08:00
Chun-wei Fan
8b1648fe5b Visual Studio Builds: Update the gtk3-demo Projects
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.
2014-10-24 15:58:20 +08:00
Chun-wei Fan
aa47269273 Visual Studio Builds: Link to libepoxy
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.
2014-10-24 15:56:46 +08:00