Commit Graph

71 Commits

Author SHA1 Message Date
Simon McVittie
0709370184 New upstream version 2.24.33 2020-12-28 12:15:46 +00:00
Chun-wei Fan
61f871404c Visual Studio projects: Clean up generating gtk.def
It turns out that we do not need to have separate command lines for
running the Visual Studio preprocessor for 32-bit builds and 64-bit
builds as `_WIN64` is automatically defined by the 64-bit compilers.

This means that we can clean up the project files a bit.
2020-09-21 12:02:24 +08:00
Chun-wei Fan
a63b70f1dc Visual Studio builds: "Add" Visual Studio 2019 projects
Copy and update the relevant fields from the Visual Studio 2010 projects
so that we can have project files that work out-of-the-box for Visual
Studio 2019, as we did for Visual Studio 2012 through 2017.

Also update the NMake Makefiles for building the introspection files
so that we properly detect that we are building with Visual Studio 2019.
2019-06-18 16:24:54 +08:00
Chun-wei Fan
6b55898162 MSVC introspection: Make more robust and avoid confusion
This updates the introspection build process that we also check on
changes in the Makefiles when we generate the NMake Makefile snippets
and file lists, so that any changes to the source file list can be
reflected.  Also ensure that we build against the freshly-built
libraries.

Make the NMake Makefiles also output the built introspection items to
the output directories of the various Visual Studio versions, according
to the build configuration and architecture, so that we avoid confusion
for different Visual Studio build configs.
2019-01-21 12:53:37 +08:00
Chun-wei Fan
16682dd237 MSVC builds: Fix pkg-config file generation
We are not passing in the correct architecture to the script that we use
to generate the pkg-config files for Release/x86 builds and Debug/x64
builds.  Fix this.
2018-12-21 13:25:14 +08:00
Chun-wei Fan
0b7ee9880a MSVC builds: Improve pkg-config files generation
Just link to Cairo instead of looking for the Cairo .pc file as the
Cairo build system for Visual Studio currently does not generate a
pkg-config file for us.  This will eliminate the need to hand-craft a
pkg-config file for Cairo to be able to use the pkg-config files that we
generate here.
2018-12-21 13:22:19 +08:00
Chun-wei Fan
417c4f9a5f MSVC projects: "Install" libwimp.pdb
Also "install" the libwimp's (Win32 theme engine) PDB file, for
completeness' sake, and to aid in debugging the item, if necessary.
2018-12-21 12:21:42 +08:00
Jeremy Bicha
3f67785787 New upstream version 2.24.32 2018-01-20 07:01:47 -05:00
Jeremy Bicha
a5bbaa1975 New upstream version 2.24.31 2017-12-20 08:11:13 -05:00
Chun-wei Fan
5ce6f249d7 Fix introspection builds on Visual Studio 2017
Detect Visual Studio 2017 properly, so that we won't mistaken it for
2015.
2017-12-06 20:44:19 +08:00
Chun-wei Fan
b7e5da4cd4 Visual Studio builds: Improve binary security
Ensure that the /DYNAMICBASE linker option (which is actually the
default option) is enabled, as we inadvertly disabled it in our
projects.

Also, for x64 builds on MSVC 2012 or later, use the /HIGHENTROPYVA
linker option to improve the security of the built bianries.

Pointed out by Ignacio Casal Quinteiro.
2017-10-20 17:11:46 +08:00
Chun-wei Fan
ca2e62da22 build/win32/replace.py: Fix replacing items in files with UTF-8 content
Some files that this script will process might have UTF-8 items in
there, which can cause problems on Python 3.x as it is more strict and
careful on unicode issues.

Fix this by:
-Doing what we did before on Python 2.x
-Opening the file with encoding='utf-8' on Python 3.x
2017-05-09 18:37:58 -07:00
Chun-wei Fan
cfc41158cd build/Makefile.msvcproj: Remove MSVC 2017 projects before re-generation
This ensures a fresh version from the 2010 projects are copied and
processed.
2017-03-03 17:37:20 +08:00
Chun-wei Fan
e3cd67d258 Visual Studio builds: Support Visual Studio 2017
Update the autotools scripts so that we can copy the Visual Studio
2010 and update items as necessary to obtain the Visual Studio 2017
projects.

Note that the toolset version string format has changed for Visual
Studio 2017, so a custom toolset version string is allowed and used
if specified, otherwise the toolset version string is generated as
we did before.

Note also that Visual Studio 2017 aims to be compatible with Visual
Studio 2015 on the CRT level, so it should be possible to use 2017-
compiled binaries with 2015-compiled binaries without problems.
2017-02-17 14:24:11 +08:00
Chun-wei Fan
ea7159dc87 Visual Studio 201x builds: "Install" gtk-update-icon-cache.exe
Most people should be on GTK+-3.x by now, but in case they don't and are
using GTK+-2.24.x, we ought to "install" the gtk-update-icon-cache tool,
like we did for the 2008 builds, as it is still much used, and is already
built by the projects.
2016-11-16 16:46:06 +08:00
Chun-wei Fan
07e5a32d62 Visual Studio builds: Fix 201x property sheet
One closing tag was missed, fix that.
2016-11-16 03:14:10 +08:00
Chun-wei Fan
4cd65c7c5b Visual Studio builds: Make .pc generation optional
Generate the .pc files when a Python installation can be found at the
location specified by PythonPath (32-bit) or PythonPathX64 (64-bit), which
is found in gtk-version-paths.[vsprops|props].
2016-11-15 18:29:42 +08:00
Chun-wei Fan
ad7597415f Visual Studio builds: Add support scripts to generate .pc files 2016-11-15 18:24:16 +08:00
Chun-wei Fan
7e5d11f9d4 Visual Studio builds: Generate .pc files
Like the 3.x and 4.x builds, generate the .pc files for GTK+-2.x, for
the convenience of people, and copy them during "install".
2016-11-15 17:10:08 +08:00
Chun-wei Fan
479372c068 Remove gtk-install.props's during re-generation
This is to ensure the changes in the generated
build/win32/vs10/gtk-install.props are applied in
build/win32/vs[11|12|14] as well.
2016-10-19 18:54:19 +08:00
Chun-wei Fan
45fd538b9b build/: Force MSVC project file generation on Makefile.am changes
Make the Makefile.am targets for generating the Visual Studio projects re-generate the
project files and the header listings whenever the Makefile.am's that include
build/Makefile.msvcproj changes, so that whenever a source/header is added, they will
be reflected in the projects and in the property sheets that are used to copy the
headers.

Also ensure that these are applied to the vs11, vs12 and vs14 projects when this
happens, as they are copied and processed from the Visual Studio 2010 projects.
2016-10-19 18:51:17 +08:00
Chun-wei Fan
9dbee22630 MSVC builds: Add experimental introspection support
This adds a set of NMake Makefiles to enable introspection building
under Visual Studio builds.  As the status of introspection of GTK+-2.24.x
is considered experimental, this support is also considered experimental.

https://bugzilla.gnome.org/show_bug.cgi?id=765193
2016-04-18 15:30:04 +08:00
Chun-wei Fan
00b30f5b79 MSVC builds: Look for headers in include/gio-win32-2.0
At some point we are going to include headers from there for gio.h, so
make sure everything needed can be found.
2016-04-12 14:07:06 +08:00
Chun-wei Fan
6de93df9a4 MSVC builds: Build gtk-update-icon-cache
As pointed out by  Paolo Borelli in bug 759436, we ought to build
gtk-update-icon-cache, "install" it and run it nowadays as it becomes more
and more common that we are going to use an external icon theme package,
so that gtk+ programs will run better and faster.
2015-12-15 16:54:00 +08:00
Chun-wei Fan
c9899ca93f build: Add support for Visual Studio 2015
This adds support for building with Visual Studio 2015 out-of-the-box
by what we did before: copying the 2010 projects and updating items
in there to make those projects compatible with 2015, as the formats
of the project files are largely unchanged.
2015-12-15 16:46:11 +08:00
Chun-wei Fan
339fd3d3f6 Clean Up MSVC Project Generation
Use the common autotools module that was added in the last commit so that
we can clean up the various Makefile.am's in gdk/ and gtk/, and also
make more Visual Studio projects completed during 'make dist', by adding
minimal items to those other Makefile.am's.  This also allows us to make
the property sheets that does the copying of headers and built items
completed at 'make dist', so that we won't have to worry too much about
headers being added (although it would be unlikely for GTK+-2.x).
2015-12-15 16:44:47 +08:00
Chun-wei Fan
d1c13ba580 build: Update Makefile-newvs.am
This updates the autotools module copying and generating the MSVC
2012-2015 projects by copying it from from GLib, which also has the
advantage of making things work better when doing 'make -jN dist', and
the Makefile.am's in bui;d/win32/vs[11|12] have been updated accordingly.
2015-12-15 16:38:11 +08:00
Chun-wei Fan
8b4e346a26 build/: Add common autotoold module to generate MSVC projects
This adds an autotools module that is copied from GLib, which is
included by the Makefile.am's to generate the complete Visual Studio
projects from their repsective templates, which:

-Cleans up those autotools files
-Make 'make -jN dist' work better
2015-12-15 16:37:45 +08:00
Chun-wei Fan
b2d60ff8cb MSVC Builds: Update GUID of "Install" Project
The GUID of the "Install" project files happen to be the same as Pango's
"install" projects, so we need to update the GUID here so that the projects
can cooperate with each other when used in an all-in-one build for the GTK+
stack.
2015-07-17 17:13:42 +08:00
Chun-wei Fan
df09ce5e87 MSVC Builds: Rename "Install" Projects
Rename the install projects as gtk-install, to ease the integration of the
projects in a grand solution that may be used to build, for example, the
entire GTK+ stack.
2015-03-06 16:56:19 +08:00
Chun-wei Fan
bf92167b01 MSVC Builds: "Install" the .pdb Files
"Install" the .pdb files to help people use them to debug the GTK+ stack,
or for their GTK-using applications, as they are already generated for all
builds.

Also update the copying of the DLLs, LIBs and EXEs so that we ensure that
we only copy the items from GTK+-2.x, without accidently copying items that
are not meant to be copied, or make extra copies of items in the wrong
places, such as when the projects here are used in parts of grand solutions
used to build the entire GTK+ stack.
2015-03-06 15:21:52 +08:00
Chun-wei Fan
e129c94171 MSVC 2010+ Builds: Fix .pdb Generation
The .pdb file name must be specified for Visual Studio 2010+ later in order
fo match the output filename if the output filename is different from the
project name.  Update the projects as necessary.
2015-03-06 15:16:39 +08:00
Chun-wei Fan
8995a3e19c MSVC 2010+ Builds: Clean up gtk-install.props
Remove empty lines, they aren't really necessary.
2015-03-06 11:17:39 +08:00
Chun-wei Fan
de7ec7a0a9 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:41:59 +08:00
Chun-wei Fan
639845d21e 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:11:18 +08:00
Chun-wei Fan
8e5f8440a6 Build: Provide Simple Support for MSVC 2012/2013
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.  This is being provided to help people still needing GTK+-2.x
and also to help them to transition to GTK+-3.x easier.

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.
2014-07-01 16:39:32 +08:00
Chun-wei Fan
6e9781c32b Fix "Installation" for Visual Studio 2010+
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.
2014-07-01 16:36:26 +08:00
Chun-wei Fan
a3d672a415 MSVC 2010+ Projects: Update "Installation" Process
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.
2014-06-09 12:21:55 +08:00
Chun-wei Fan
a533c83e8d Visual Studio 2010 Projects: Revamp the Projects
As we are likely to have GTK+-2.x around for some time, revamp the Visual
Studio 2010 projects like what was done for rest of the GTK+ stack, namely:

-Split the property sheets, in a way like what was done for the rest of the
 stack.  Also clean up the resulting property sheets a bit, and update the
 projects to use these property sheets.
-Use UNIX line endings for all projects and property sheets, to ease future
 application of patches.
-Make the copying of config.h.win32 and gdkconfig.h.win32 into custom build
 rules, so that they may be removed properly and re-copied during change
 and update.
-Add a PlatformToolset tag, so if we want to support building with Visual
 Studio 2012/2013, the transition can be done quite easily with a script,
 such as what is now being done for the Visual Studio 2012 projects for
 GLib.
2014-04-02 22:05:03 +08:00
Chun-wei Fan
8ef1cff3bb Visual Studio 2008 Projects: Revamp the Projects
As we are likely to have GTK+-2.x around for some time, revamp the Visual
Studio 2008 projects like what was done for rest of the GTK+ stack, namely:

-Split the property sheets, in a way like what was done for the rest of the
 stack.  Also clean up the resulting property sheets a bit, and update the
 projects to use these property sheets.
-Use UNIX line endings for all projects and property sheets, to ease future
 application of patches.
-Make the copying of config.h.win32 and gdkconfig.h.win32 into custom build
 rules, so that they may be removed properly and re-copied during change
 and update.

Similar updates will be applied for the Visual Studio 2010 projects ASAP.
2014-04-02 17:57:13 +08:00
Chun-wei Fan
7674fc9683 Visual Studio builds: Fix the Debug configs
The debug builds must link to the Debug version of the CRT, otherwise
trouble will arise due to the mixing of different CRTs
2013-03-18 17:27:21 +08:00
Chun-wei Fan
011bb7ccdc VS2008 Projects: Drop gdk-pixbuf Projects
The GDK-Pixbuf Visual Studio 2008 project files have long been moved and
maintain in the gdk-pixbuf project, soon after that was made independent
from the GTK+ project, so these files should no longer exist in the GTK+
git repo, especially as they are no longer distributed for a long time.
2013-03-18 17:27:20 +08:00
Chun-wei Fan
44402df7dd Fix gailutil Visual C++ projects
...so that we will include the correct gdkconfig.h, which would be
in $(srcroot)\gdk\ during the Visual C++ build.

Also prepare support for Visual Studio 2012 in this project, so it would
be easy to use a script to copy and replace the necessary items in the
Visual Studio 2010 project set to make it a Visual Studio 2012 set.
2012-12-28 15:10:34 +08:00
Chun-wei Fan
b7c30152d0 Bug 687575: Update Visual C++ 2010 projects
The Visual C++ project files for GTK+-2.24.x need to be updated as the
Windows theme engine (libwimp) currently has to be built as a DLL.

This adds the Visual C++ 2010 project file to build libwimp as a
standalone module/DLL, and the property sheets, .sln file and
gtk.vcxprojin/gtk.vcxproj.filtersin/install.vcxproj are updated
accordingly so that the needed stuff get built properly and go
to the proper places for the Windows Themes to work correctly
with the Visual C++ builds.

Thanks to nus for pointing this out.
2012-12-06 12:20:26 +08:00
Chun-wei Fan
bad6675d74 gtk-demo.vcproj: Remove unneeded macros
We don't actually need the GtkPrefixDefine when building the gtk-demo demo
program on Windows.
2012-12-06 11:34:44 +08:00
Chun-wei Fan
a441107979 Bug 687575: Update Visual C++ 2008 projects
The Visual C++ project files for GTK+-2.24.x need to be updated as the
Windows theme engine (libwimp) currently has to be built as a DLL.

This adds the Visual C++ 2008 project file to build libwimp as a standalone
module/DLL, and the property sheets, .sln file and gtk.vcprojin are updated
accordingly so that the needed stuff get built properly and go to the
proper places for the Windows Themes to work correctly with the Visual C++
builds.

Thanks to nus for pointing this out.  Visual C++ 2010 projects files will
be updated in the next 1-2 days.
2012-12-05 23:53:53 +08:00
Chun-wei Fan
b9575dddfd gtk+.props: (VS2010) Update include paths
Correct the include paths for GDK-Pixbuf, as that update was somehow
forgotten :|

Thanks to Berke Viktor for pointing this out.
2012-10-07 22:53:39 +08:00
Chun-wei Fan
6389671336 Update Visual C++ property sheets
"Install" the gtk-demo program and data files more like the way done by the
autotools build.
2012-09-26 18:57:13 +08:00
Chun-wei Fan
8f5ab02369 Visual C++ support: Add projeccts to build gailutil
This adds Visual C++ 2008/2010 projects to build the gailutil DLL, like
the 3.x releases.
2012-09-18 17:56:17 +08:00
Chun-wei Fan
51fb0419c2 Fix "install" paths in VS property sheets 2012-03-15 16:48:35 +08:00