summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanc999@yahoo.com.tw>2018-09-12 12:27:27 +0800
committerAlejandro PiƱeiro <apinheiro@igalia.com>2019-03-09 11:58:15 +0100
commit917f7dccf0b9e180a5022c67624f56ae6209df18 (patch)
tree8aae093d2390d4302da7d5ca8e71c5066996450c
parenta6eb6d7974fd605d8276f49e61b2919ecf43a1ae (diff)
downloadatk-917f7dccf0b9e180a5022c67624f56ae6209df18.tar.gz
build: Add build instructions for Visual Studio
Since we are no longer providing Visual Studio project files, add a README.msvc to tell people how builds using Visual Studio are done via Meson.
-rw-r--r--README.msvc79
1 files changed, 79 insertions, 0 deletions
diff --git a/README.msvc b/README.msvc
new file mode 100644
index 0000000..d53f734
--- /dev/null
+++ b/README.msvc
@@ -0,0 +1,79 @@
+Building ATK with Visual Studio
+===============================
+
+Meson is now the supported method of building ATK using Visual Studio.
+
+Building ATK requires GLib, which should preferably be built with the
+same compiler that is now being used to build ATK. If building the
+introspection files are desired, GObject-Introspection is also needed.
+
+You will need the following tools to build ATK, in addition to Visual
+Studio (2008 and later are supported).
+
+-Python 3.6.x. You will then need to install or update Meson by using pip.
+-The Ninja build tool, required for Visual Studio 2008, 2012 and 2013 builds,
+ and optional for 2010, 2015 and 2017 builds, where Visual Studio projects
+ can be generated instead of the Ninja build files.
+-GIT for Windows is highly recommended, in the case where some required
+ dependencies are not found, and Meson makes use of GIT to download
+ the sources to build in the build process.
+-pkg-config or pkgconf is highly recommended (pkg-config is used to denote
+ this from this point on). Note that pkg-config 0.29.1 and later can be
+ built with Visual Studio directly from the sources since we need GLib here
+ already. Note that the pkg-config files for GLib needs to be found by
+ pkg-config, possibly by setting PKG_CONFIG_PATH in the current Visual Studio
+ command prompt to contain the path that GLib's pkg-config files are located.
+
+Note that you will need GLib, which should preferably be built with the
+same compiler that is now being used to build GLib. As GLib and
+GObject-Introspection are also built using Meson on Visual Studio, ensure that
+their pkg-config (.pc) files can be found by pkg-config, possibly
+by setting the PKG_CONFIG_PATH environment variable in the Visual Studio
+command prompt that is being used to build ATK.
+
+One can also refer to the following page for building the dependencies:
+
+https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack
+
+To do a build using Meson, do the following:
+
+-Open a Visual Studio (or SDK) command prompt that matches the Visual Studio
+ version and build platform (Win32/x86, x64, etc.) that will be used in all
+ the following steps.
+
+-Create an empty directory/folder for the build. It needs to be in the same
+ drive as where your ATK sources are located (i.e. $(ATK_SRCDIR)). cd into
+ that directory/folder.
+
+-Setup your PATH envvar:
+
+ set PATH=%PATH%;$(PYTHON_INSTALL_DIR);$(NINJA_DIR)
+
+ where PYTHON_INSTALL_DIR is where Python 3.6.x+ is installed to, and NINJA_DIR
+ is where your ninja executable can be found. The NINJA_DIR can be omitted if one
+ passes --backend=vs to the Meson configuration line, for Visual Studio 2010, 2015
+ and 2017 builds.
+
+-Configure the build using Meson:
+
+ python $(PYTHON_INSTALL_DIR)\scripts\meson.py $(ATK_SRCDIR) --buildtype=$(build_configuration) --prefix=$(INSTALL_PREFIX) [--backend=vs]
+
+ Please see the Meson docs for an explanation for --buildtype, the path passed for
+ --prefix need not to be on the same drive as where the build is carried out, but
+ it is recommended to use forward slashes for this path. The --backend=vs can be
+ used if the Visual Studio project generator is preferred over using Ninja, for
+ Visual Studio 2010, 2015 and 2017 builds.
+
+-Build, test and install the build:
+ Run ninja (and ninja test and ninja install) or open the generated Visual Studio
+ projects to compile, test and install the build.
+
+Note that if building the sources with Visual Studio 2008, note the following
+additional items:
+
+-You need to run the following lines from your build directory, to embed the manifests
+ that are generated during the build, assuming the built binaries are installed
+ to $(PREFIX), after a successful build/installation:
+
+for /r %f in (*.dll.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f $(PREFIX)\bin\%~nf;2
+for /r %f in (*.exe.manifest) do if exist $(PREFIX)\bin\%~nf mt /manifest %f $(PREFIX)\bin\%~nf;1