Commit Graph

111 Commits

Author SHA1 Message Date
Chun-wei Fan
c6aee1bf15 Visual Studio builds: Build the gio tool
https://bugzilla.gnome.org/show_bug.cgi?id=768357
2016-07-18 10:39:20 +08:00
Chun-wei Fan
be16115e67 Visual Studio projects: Clean up a little bit
For the Visual Studio 201x projects, we can force the "install" projects
to always run in a simpler way, by specifying an output file that will
never exist.  Makes things look a bit cleaner.
2016-06-15 16:31:40 +08:00
Chun-wei Fan
33549086bc Visual Studio builds: Refine .pc creation
We may not have $(CopyDir) created, which the script that generates the
.pc files check for, so create it if it is not there.  This makes things a
bit more convenient for people.
2016-06-15 16:23:27 +08:00
Chun-wei Fan
374a61f245 MSVC builds: Add scripts to generate .pc files
Add a generic script, pc_base.py, which can be utilized to obtain path
info, along with user-input version info, which can be used to generate
pkg-config .pc files.  Also enhance replace.py a bit so that it can also
be used in the future to replace multiple items in a file in one shot.
This is done to make building introspection files easier, as it depends
much on the pkg-config .pc files to work.

Update the project files so that when Python is available, we can generate
the full, usable .pc files when we complete and 'install' the builds, and
copy them to appropriate locations so that pkg-config can be set to find
them easily.
2016-03-10 20:33:35 +08:00
Chun-wei Fan
99b30f389e Visual Studio builds: Move @GLIB_VERSION@ usage
... from glib-gen-srcs.[vsprops|props].in to
glib-version-paths.[vsprops|props].in, and instead let autotools generate
glib-version-paths.[vsprops|props] rather than
glib-gen-srcs.[vsprops|props], as this will need to be referenced for
other items as well, namely generating the .pc files which will become
useful for introspection builds.
2016-02-25 18:37:01 +08:00
Chun-wei Fan
57f9c590f9 Visual Studio builds: Include pcre_version.c in build
... for builds using the PCRE bundled with the GLib sources, so that
pcre_version() will also be defined, and be exported so that the regex test program
will properly link when the bundled PCRE sources are used.

This is a follow-up commit to 476f30a.
2016-01-20 17:20:27 +08:00
Chun-wei Fan
e3ab6ab38a Visual Studio builds: Rearrange build configs
This is a follow-up commit for commit 82c2461, where the default build is
to use the PCRE that is installed in the system, if it is available and is
not overridden with --with-internal-pcre.

For Visual Studio builds, this means that the new 'Debug' and 'Release'
configs will now use PCRE that is found on the system, which were renamed
from the '*_ExtPCRE' configs; and that there are now 'Debug_BundledPCRE'
and 'Release_BundledPCRE' configs which make use of the PCRE that is
supplied with the GLib sources, which, replaces the former 'Debug' and
'Release' configs.
2016-01-18 16:04:45 +08:00
Chun-wei Fan
c50bb218de MSVC 2010+ builds: Do not explicitly use /LTCG
This partially reverts dc4361f.

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:26:20 +08:00
Dan Winship
263aac125e .gitignore updates 2015-10-23 11:28:03 -04:00
Chun-wei Fan
dc4361f4cb MSVC 2010+ builds: Explicitly use /LTCG
The Visual Studio projects used a default setting for link-time code
generation, which is a part of the various linker optimizations that is
available, which is set as /LTCG for Visual Studio 2013 and earlier.

This changed in Visual Studio 2015 to become /LTCG:incremental, which would
cause GResources-generated code to be optimized out during linking, unless
they were referred to directly in the main line code (such as when the
GResource is manually registered), causing programs to crash as a result as
they can't find the needed code/data at run time.

Fix this by explicitly setting /LTCG for all release builds, for Visual
Studio 2010 and later.

https://bugzilla.gnome.org/show_bug.cgi?id=752837
2015-10-13 19:30:22 +08:00
Chun-wei Fan
b7e2973048 gobject: Further optimize MSVC builds
Use /ltcg (link time code generation) for linking as well.

In fact, whole program optimization and /ltcg are the default for Release
builds, so we don't really have to set them explicitly in the projects, so
as a result, we can clean up the projects a little bit.

https://bugzilla.gnome.org/show_bug.cgi?id=752837
2015-10-12 16:56:46 +08:00
Chun-wei Fan
670400ee33 gobject: MSVC builds-improve optimization a bit
Use whole program optimization (/GL) as we now use DllMain() to
initialize the library on Windows builds.

https://bugzilla.gnome.org/show_bug.cgi?id=752837
2015-10-12 15:05:23 +08:00
Chun-wei Fan
aef2d0c56d build/win32: Make "Install" Property Sheet Generation More Robust
List the files that are generated in the process to generate the
glib-install property sheets, so that we can use that list as a
depedency, as well as deleting those files in one shot after the
property sheet is generated, so we don't need to worry about those
in 'make distclean' or so.
2015-09-23 18:33:28 +08:00
Chun-wei Fan
9c7df09c3b MSVC Builds: Simplify Script to Generate glib-mkenums
Use a simple all-purpose utility script to generate the glib-mkenums
PERL script with the version info, and stop using the script that
tries to parse the autotools files.  Move the things that
were taken out from build/win32/setup.py back there.
2015-09-09 15:21:12 +08:00
Chun-wei Fan
1387a16bf4 MSVC Builds: Remove Static Items
... which are now generated with the new autotools module, so we just
need to ensure the generated items are being dist'ed.

https://bugzilla.gnome.org/show_bug.cgi?id=735429
2015-09-03 19:10:26 +08:00
Chun-wei Fan
041e77249a Cleanup and Enhance the MSVC Project Generation
Make use of the common autotools module that is used to generate the MSVC
project files from their respective templates so that the main build files
beccome cleaner, and enhance them in a way that the headers that should be
installed can be written to the property sheets during 'make dist', so that
the chances of missing headers for MSVC builds can be greatly reduced.

Also use this autotools module to fill in the projects for
glib-compile-schemas and glib-compile-resources.

https://bugzilla.gnome.org/show_bug.cgi?id=735429
2015-09-03 19:10:06 +08:00
Chun-wei Fan
74c9eaac11 MSVC Builds: Few More Enahncements
Update the .pdb file generation for the MSVC 2010+ DLLs (and the x64 gspawn
helper programs), so that they match the names of the DLLs/EXEs that are
built.  Also update the .lib generation so that all will use -$(ApiVersion)
from the property sheets instead of the -2.0 which was previously hard
coded (as we will eventually move into GLib 3.x in the future, for example)
2015-03-04 20:11:43 +08:00
Chun-wei Fan
6be1e678dc Visual Studio Builds: "Install" .pdb files
They are helpful in debugging in a stack.
2015-03-03 19:21:40 +08:00
Chun-wei Fan
6e117b3fcc MSVC Builds: GIO: Standardize zlib Linking
Link to zlib1.lib for all builds, as:
-The notion of zlib1d.lib is rather not standardized across the board for
 most cases.
-Easier for the grand all-in-one solution file.
2015-03-03 18:24:58 +08:00
Chun-wei Fan
7b1729f3c0 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 13:52:22 +08:00
Chun-wei Fan
94b9d87a43 MSVC Builds: Fix and Update "Installation"
The gobjectnotifyqueue.c was accidently dropped from the files to copy, and
a new public header for GIO was added, so address these parts.
2015-03-03 12:06:22 +08:00
Chun-wei Fan
dee57faa6c MSVC Builds: Fix "Installation" of GListModel Headers
Somehow I had the wrong path for getting the headers... oops.
2015-02-02 14:27:29 +08:00
Chun-wei Fan
444a5fcd4a MSVC Builds: Rename "install" Projects
Rename the project to "install" the GLib files, as we are planning to have
a grand solution file that would build the entire GTK+ stack with its deps,
to ease the process for people building the GTK+ stack from a stock
installation of Visual Studio.
2015-02-02 12:49:42 +08:00
Chun-wei Fan
65f4bd17a2 One More Update For MSVC Builds
We also need to "install" the headers for Lars' new APIs for GListModel/
GListStore.
2015-02-02 11:14:07 +08:00
Chun-wei Fan
50012fb426 MSVC Builds: "Install" the Autocleanup Headers
We are including the autocleanup headers as public headers for all builds,
although they work only for GCC in reality, so "install" them.

Also clean up a bit as we are having "\\" in places, where we only need
"\".
2015-02-02 10:51:25 +08:00
Chun-wei Fan
d2f3e11907 MSVC Builds: Update "Installation"
This updates the glib-install.[props|vsprops] so that the headers to
"install" for the build are kept up-to-date.  Note that this has been
generated by a script, so that this hopefully means that the header
"installation" can be maintained along with the autotools files for most
uses, to simplify maintenance.
2014-09-12 15:51:49 +08:00
Chun-wei Fan
52b5a06dea Visual C++ Builds: Update README.txt's
Update notes about usage of PCRE and for people attempting to build GLib
on a Chinese, Japanese or Korean locale.
2014-08-13 09:55:11 +08:00
Chun-wei Fan
3d89041220 MSVC Builds: Generate glib-mkenums If Possible
As glib-mkenums would likely be used in the building of the other
components of the stack, such as Cogl, Clutter and
gsettings-desktop-schemas, generate that using a Python script (if Python
can be found) and "install" it.
2014-08-08 17:39:48 +08:00
Michael Catanzaro
c3842d1969 Fix old wiki links 2014-07-01 23:52:19 -05:00
Chun-wei Fan
91b9aef0c9 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 10:27:36 +08:00
Chun-wei Fan
eb7ef594de Fix GLib MSVC Project
The glib/gthread-win32.c was accidently removed from the last commit, sorry
2014-01-06 12:31:18 +08:00
Chun-wei Fan
940b3c2250 Tidy Up the glib MSVC Project
Move the per-source define/undefine cflags into the property sheets, and
apply the cflags for the bundled PCRE sources to the PCRE sources only
2014-01-06 12:21:46 +08:00
Chun-wei Fan
16c41f0c36 Drop the testglib MSVC Projects
There are many test programs that are shipped with GLib, and this project
is a one-to-one project, which does not make sense to keep as various test
programs may have different CFLAGS, etc, which will require different build
options.
2014-01-06 11:22:39 +08:00
Chun-wei Fan
ddc29a9036 Visual Studio Projects: Cleanup Property Sheets
Make the projects include a single property sheet as necessary, which will
in turn include the other property sheet(s) as needed, so that we can avoid
warnings where we include the same property sheets twice in a single
project.

Also make the copying of pre-configured headers into custom build rules so
that they can be removed upon the clean command from the IDE and that they
can be re-copied if their counterpart *.h.win32 are updated.
2013-12-27 12:25:18 +08:00
Chun-wei Fan
d01a075632 Visual Studio Projects: Use Unix Line Endings
...where possible, to make application of patches easier in the future.
The README.txt's and the .sln files are still in Windows/DOS line endings
as they need to be so.
2013-12-27 10:50:35 +08:00
Chun-wei Fan
c488aa6785 Visual Studio Property Sheets: Use Unix Line Endings
This makes it easier to apply patches in the future.
2013-12-27 10:32:01 +08:00
Chun-wei Fan
aa7f1ba21a Update Visual C++ "Installation" Phase
Install the Python scripts that is used by gdbus-codegen in
share\glib-2.0\codegen, to be consistent with the other platforms.

Please see https://bugzilla.gnome.org/show_bug.cgi?id=702862 for details
on this.
2013-12-11 20:09:59 +08:00
Chun-wei Fan
52251a5237 Visual C++ Builds: Fix "install" Projects
Due to the split up of the property sheets, the install projects did not
have info on the Intermediate and Output Paths, which caused confusing
messages from Visual Studio to show up upon completing build+"install" and
closing Visual Studio on whether to reload the install project, at least on
Visual Studio 2008.

Include the property sheet which defines these properties to fix this.
2013-09-05 13:59:02 +08:00
Chun-wei Fan
2ff85ca47c Fix typo in last commit
The gio.vcxprojin and glib.vcxprojin were including .vsprops property
sheets, but it should have been .props instead.
2013-08-21 17:54:32 +08:00
Chun-wei Fan
113793a442 MSVC 2010 Project Files: Split up the Property Sheets
Like the Visual Studio 2008 project files, split up the property sheets
so to ease maintenace, and to prepare to use autotools to fill in the
header entries to "install".

Put some of the items that are frequently repeated in the projects as well,
also to simplify maintenance.

Also, update the autotools files to automate the upgrade of Visual Studio
2010 project as we now have multiple property sheets to copy and process.
2013-08-21 16:57:11 +08:00
Chun-wei Fan
716ec71ece GLib MSVC Projects: Consolidate PCRE items
Move the definitions of macros used to build PCRE that ships with GLib into
the property sheets, so that it can be easier to maintain
2013-08-21 13:55:52 +08:00
Chun-wei Fan
18f498c3fa GIO MSVC Projects: Drop Unneeded Defines
GIO_MODULE_DIR is dynamically constructed on Windows, so we don't really
need to define it here.
2013-08-21 13:34:42 +08:00
Chun-wei Fan
7145f06941 GIO MSVC Project: Link to iphlpapi.lib
This is needed for GetAdaptersAddresses()[1], which was used to implement
if_nametoindex on Windows, notably on Windows XP, in commit 01156b12.

if_nametoindex and if_indextoname, as noted in config.h.win32(.in), is
available with Windows Vista and later, so when we eventually drop
support for Windows XP, we can call them directly, and these functions
also reside in the same iphlpapi.lib

[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365915%28v=vs.85%29.aspx
2013-08-21 11:16:19 +08:00
Chun-wei Fan
d06400cbaf Visual Studio Builds: Update property sheets
"Install" the newly-introduced gpropertyaction.h header file, which is
required for GIO.
2013-07-17 16:54:35 +08:00
Chun-wei Fan
95f7dc9491 Visual Studio Builds: "Install" gdbus-codegen 2013-07-17 16:45:50 +08:00
Chun-wei Fan
97b82d8d21 Add MSVC Projects for Utility Programs
Build and "install" the gio-querymodules and gdbus utility programs so that
the Visual Studio builds of GLib is more comprehensive.  The Python scripts
for the GDBus codegen will be added to "installation" later.
2013-06-20 15:48:32 +08:00
Chun-wei Fan
ffaf57b936 Update Visual Studio Projects
Make all projects settings use the MultiByte character set when building
GLib to improve consistency.
2013-06-20 15:43:32 +08:00
Chun-wei Fan
26df5e0d94 Update Visual Studio Project Sheets
"Install" the newly-introduced gio/gbytesicon.h...
2013-05-28 12:56:28 +08:00
Chun-wei Fan
0d55c4aaf8 Fix the GObject Visual Studio Projects
Update G_LOG_DOMAIN to be "GLib-GObject" so that we are consistent with
the autotools builds, and that tests expecting the log domain to be
"GLib-GObject" would not fail.
2013-05-27 15:58:54 +08:00
Chun-wei Fan
524470d8e0 Fix the GLib Visual Studio Projects
Define the G_LOG_DOMAIN of the GLib DLL as "GLib", because:
-This makes it consistent with the autotools builds
-Some tests expect the log domain to be "GLib"
2013-05-27 13:23:58 +08:00