Commit Graph

229 Commits

Author SHA1 Message Date
Chun-wei Fan
efd92da101 Visual Studio builds: Rename broadwayd to gtk4-broadwayd
We need to update the solution file and the projects that refer to
broadwayd.
2016-11-21 15:51:21 +08:00
Chun-wei Fan
18b1305d08 build: Complete renaming of broadwayd to gtk4-broadwayd
The parts where the Visual Studio projects are generated must also be updated
so that 'make dist' will work properly.
2016-11-21 15:09:35 +08:00
Chun-wei Fan
e4c5ce4cc3 Visual Studio builds: Use gtk-4.lib for the .lib file
As with the autotools builds, use gtk-4 as the name of the .lib file that
is produced from the build.

Actually this is already done with GTK-3.x with the autotools builds,
but this update is not done there as gtk-3.0.lib/gdk-3.0.lib/gailutil-3.0.lib
was used for such a long time that changing it there might have caused
trouble for people there.
2016-11-03 17:46:32 +08:00
Chun-wei Fan
493ad0cad4 Visual Studio builds: Build GTK+ as a monolithic DLL
Update the project configs to build GDK/GSK as a static lib and include
them into the GTK+ DLL as a monolithic DLL, which is in line with what is
done in the autotools builds, since the code changes needed for Windows
builds for a monolithic build are now in place.
2016-11-03 17:37:49 +08:00
Chun-wei Fan
71b7435c56 MSVC builds: Simplify "install" property sheet
Use a for loop to loop through the icon sizes to copy them.
2016-10-27 14:28:45 +08:00
Chun-wei Fan
874b0daea2 MSVC builds: Make the GSK project functional
Add the needed custom build steps to generate the GResource and
enumeration sources that is needed for the build, and make sure that the
build is able to find the Graphene headers and lib.

Also add the necessary CFLAGS needed for building GSK.
2016-10-27 14:17:28 +08:00
Chun-wei Fan
80ff8d6d89 MSVC builds: Fix previous patch on .sln file
We need to change the filenames of the .vcxproj project files as well,
oops.
2016-10-27 14:17:28 +08:00
Chun-wei Fan
1f791b59d8 build/win32/vs12/gtk4-gen-srcs.props: Fix XML reference URL
Visual Studio can be picky about this, causing projects not to load.
2016-10-27 12:48:49 +08:00
Chun-wei Fan
710e706643 Visual Studio projects: Rename tools to become gtk4-*
This follows what happens in the autotools builds.

Also fix some project namespaces and the install project where there is a typo
in a project dep, which may cause a problem during the build.
2016-10-27 12:48:49 +08:00
Chun-wei Fan
ac875073fc GSK: Add initial Visual Studio projects
This adds the initial MSVC build items needed to build GSK under Visual Studio,
this is part of it that is required, we need to add items to the property sheets
to generate the code that is generated via glib-mkenums and glib-compile-resources.

This set includes, with the autotools scripts for the complete:
-GSK project files, which is integrated into the gtk+-4.sln.
-The NMake snippets to build the introspection files for GSK.
-The .bat files to call glib-mkenums to generate the enumeration sources.
2016-10-26 18:30:09 +08:00
Chun-wei Fan
2ba64e0b62 MSVC builds: Support MSVC 2013 and later
We now need C99 features from the compiler which are only supported by
Visual Studio 2013 and later, so drop the MSVC 2008~2012 projects, and make
the baseline supported Visual Studio version be 2013.  Update the build files
as a result.
2016-10-26 16:46:38 +08:00
Chun-wei Fan
910300bcb2 build/Makefile.msvcproj: Add rules for MSVC 2013 to be baseline version
GTK+-3.89.0 and later will require C99 features that is only supported on
Visual Studio 2013 and later, so prepare build/Makefile.msvcproj for this.

We still keep the 2008~2010 stuff here as this strives to be a shared module,
and there are projects using this that still supports building on pre-2013
Visual Studio.
2016-10-26 16:46:38 +08:00
Chun-wei Fan
2e103e85cc Remove gtk4-install.props's during re-generation
This is to ensure the changes in the generated
build/win32/vs10/gtk4-install.props are applied in
build/win32/vs[11|12|14] as well.
2016-10-26 16:46:38 +08:00
Chun-wei Fan
8b8f378050 Visual Studio builds: Update from [gdk|gtk]-3 to [gdk|gtk]-4
This updates all the projects files to be be named appropriately as we move from GTK-3.x to 4.x,
and updates the autotools files so that things are distributed and generated properly.

Also remove deprecated/gtkstatusicon-quartz.c from gtk/Makefile.am, as that was causing 'make dist'
to fail as that file has been removed.

This fixes 'make dist' with the updated existing project files in proper order.

Note that this does not include the new GSK, which will be added later, so the project files do
not yet build the whole stack on Visual Studio at this point.
2016-10-19 18:39:36 +08:00
Chun-wei Fan
51b7146138 Visual Studio Solutions: Drop references to libgail-util
We dropped it...
2016-10-19 16:13:54 +08:00
Chun-wei Fan
594ec7cfdd 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 15:56:10 +08:00
Chun-wei Fan
c2ba9ca810 Visual Studio builds: Make .pc generation more flexible
Allow the use of ${exec_prefix} for libdir and includedir when passing
them in as arguments to the script.
2016-06-22 15:22:58 +08:00
Chun-wei Fan
7a0941c090 Visual Studio builds: Refine "installation" process
Split out the part where we generate/update the caches for the GSchemas
and the icons, so that it is easier to ensure that things continue to
function correctly when we have GlibEtcInstallRoot != CopyDir.
2016-05-10 13:18:23 +08:00
Chun-wei Fan
8cda93d389 Visual Studio builds: Clean up projects a bit
Consolidate the .lib's that we need to link to for GDK and GTK+ into the
property sheets, and also link to setupapi.lib as that is needed by
the port to the new GdkMonitor API.
2016-05-09 15:35:26 +08:00
Chun-wei Fan
71bb1bebc0 Visual Studio builds: Generate .pc files
Generate .pc files for the package, so that it would be easier for
building introspection for packages that depend on GTK+.  Also split
PythonPath into PythonPath and PythonPathX64 to facilitate the build of
introspection files, which need to have Python that is built with the
same ac=rchitecture where GTK+ is built.

Clean up the formatting and spacing a bit.
2016-04-26 20:15:45 +08:00
Chun-wei Fan
9a87b6be2b MSVC builds: Update how introspection builds are done
This first adds a common autotools module that can be included by
the Makefile.am's to generate the file lists and the g-ir-scanner/
g-ir-compiler command lines to build the introspection files.

The autotools files for gdk/ and gtk/ are then updated to generate
the full file lists needed to build the introspection files, with
the full command lines for g-ir-scanner and g-ir-compiler as NMake
Makefile modules that can be used to build the introspection files
for Visual Studio builds.

https://bugzilla.gnome.org/show_bug.cgi?id=765195
2016-04-19 14:50:25 +08:00
Chun-wei Fan
ea8873da55 MSVC build: Drop crypt implementation for MSVC
We are actually not using the crypt() in GDK-Broadway for quite a while,
so the code implementation for MSVC is actually not used.  So, it's time
to get rid of this.
2016-03-02 16:52:30 +08:00
Chun-wei Fan
e15ab84e35 MSVC builds: Re-arrange include paths
Search also for the headers in include/gio-win32-2.0, as gio.h will
include those headers at some point, and arrange the include paths in a
dependency hierarchy style, top-to-down.
2016-03-02 13:02:30 +08:00
Chun-wei Fan
07d32687d8 MSVC 2008 builds: Fix previous commit
The previous commit had the MSVC 2008 property sheet in the wrong place.
Fix that.
2016-02-22 22:23:26 +08:00
Chun-wei Fan
5962daef4f Windows: Update how gtk-win32.rc is generated
On Visual Studio, unlike MinGW, manifest files are embedded via
including the manifest file as a resource file in the projects, not
via the .rc file.  This means that the line in the .rc file that
specifies the manifest file would cause trouble, so that line gets
removed when the full gtk3-win32.rc is generated on Visual Studio builds,
otherwise 2010+ Visual Studio will complain when compiling the .rc file.
Also, the inclusion of winuser.h will cause warnings during the
compilation of the .rc file.

Fix this by isolating the Win32 resource portions of gtk-win32.rc.in to
gtk-win32.rc.body.in and:
-On MinGW, construct the full gtk-win32.rc by doing the winver.h and
 winuser.h inclusion first, then append the contents of gtk-win32.rc.body,
 and then appending the line to embed the manifest file.
-On Visual Studio, simply copy the gtk-win32.rc.body to gtk-win32.rc,
 and generate the full libgtk3.manifest file.

https://bugzilla.gnome.org/show_bug.cgi?id=762311
2016-02-22 17:40:17 +08:00
Chun-wei Fan
1fec39ef0b Visual Studio builds: Use _USE_MATH_DEFINES
... to fix the build as some C99 math constant macros are being used, such
as M_SQRT2.
2016-01-06 21:12:19 +08:00
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