GTK+ 3 stack for Windows
This python script helps you build a full GTK+ library stack for Windows using Visual Studio.
The powershell script was originally developed by the HexChat developers, make sure to check their page for more information about the original script.
HexChat developers decided that their script should focus on their specific needs, this fork tries to be a bit more generic, in particular it pursues the following goals
* [Visual Studio for Windows Desktop](http://www.visualstudio.com/downloads) - 2013 (not for all projects), 2015, 2017 and 2019 are currently supported. * [msys2](https://msys2.github.io/) * [Python 3.6](https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64.exe) (install in C:\Python36 or use the --python-dir option to tell the script the correct location), or other package like [Miniconda 3](https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe)
Follow the instructions on the msys2 page to update the core packages. The needed packages for the script (make, diffutils, ...) are download and installed automatically if not presents in the msys2 installation.
Clone this repository to C:\gtk-build\github\gvsbuild It contains the build script, project files and patches.
Now start a command-line window as a regular user. Go to the gvsbuild directory and start building with the script. For example, to build 32-bit GTK+ 3 and its dependencies with Visual Studio 2013 (the default), run:
cd C:\gtk-build\github\gvsbuild python .\build.py build gtk3
To build the 64-bit version, run:
cd C:\gtk-build\github\gvsbuild python .\build.py build -p x64 gtk3
To build the 64-bit version with the Visual Studio 2017 (version 15) you need also to tell the script the visual studio version, run:
cd C:\gtk-build\github\gvsbuild python .\build.py build -p x64 --vs-ver 15 gtk3
For more information about the possible commands run:
python .\build.py --help
To get detailed help on the build command run:
python .\build.py build --help
Is possible to set some parameters from a file, e.g. vs2015-release.pro, putting the @ character before the file name. The file contains the option, one per line, separated by a carriage return:
--vs-ver 14 --win-sdk 8.1 -c release
Even if the format is not the easier to write or read in this way we eliminate the problem of escaping spaces is file names and directories. Then you can use it:
python .\build.py build @vs2015-release.pro gtk3-full
When the script is done, your GTK+ stack will be found under C:\gtk-build\gtk. Enjoy!
This build script is licensed under the GPL2.0 license, see the COPYING file for the full text.
The binaries produced by the build script are licensed under the license terms of the project that gets built (ie glib is LGPL so you can use glib.dll built with this script under the terms of LGPL).
Patches included in the repository are licensed under the license terms of the project they apply to.
To see and analyze the dependency between the various projects, in text or in a Graphviz format, use the script deps.py:
``` cd C:\gtk-build\github\gvsbuild python .\deps.py -g -o test.gv ```
Without option a simple dependency of all the projects is printed, as usual with --help a summary of the options/commands is printed.