summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-07-29 20:08:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-29 21:51:43 (GMT)
commit976aaedca0c6f64b37f4241bf06fa7ab06095986 (patch)
tree0f15613264916870a1ef948e34135a514159eeb9 /compat
parent384a61bc6a8e6dc241d685acf4fb7b5a15003dbb (diff)
downloadgit-976aaedca0c6f64b37f4241bf06fa7ab06095986.zip
git-976aaedca0c6f64b37f4241bf06fa7ab06095986.tar.gz
git-976aaedca0c6f64b37f4241bf06fa7ab06095986.tar.bz2
msvc: add a Makefile target to pre-generate the Visual Studio solution
The entire idea of generating the VS solution makes only sense if we generate it via Continuous Integration; otherwise potential users would still have to download the entire Git for Windows SDK. If we pre-generate the Visual Studio solution, Git can be built entirely within Visual Studio, and the test scripts can be run in a regular Git for Windows (e.g. the Portable Git flavor, which does not include a full GCC toolchain and therefore weighs only about a tenth of Git for Windows' SDK). So let's just add a target in the Makefile that can be used to generate said solution; The generated files will then be committed so that they can be pushed to a branch ready to check out by Visual Studio users. To make things even more useful, we also generate and commit other files that are required to run the test suite, such as templates and bin-wrappers: with this, developers can run the test suite in a regular Git Bash after building the solution in Visual Studio. Note: for this build target, we do not actually need to initialize the `vcpkg` system, so we don't. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/vcbuild/README23
1 files changed, 23 insertions, 0 deletions
diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index b633e7d..1b6dabf 100644
--- a/compat/vcbuild/README
+++ b/compat/vcbuild/README
@@ -37,6 +37,29 @@ The Steps to Build Git with VS2015 or VS2017 from the command line.
================================================================
+Alternatively, run `make vcxproj` and then load the generated `git.sln` in
+Visual Studio. The initial build will install the vcpkg system and build the
+dependencies automatically. This will take a while.
+
+Instead of generating the `git.sln` file yourself (which requires a full Git
+for Windows SDK), you may want to consider fetching the `vs/master` branch of
+https://github.com/git-for-windows/git instead (which is updated automatically
+via CI running `make vcxproj`). The `vs/master` branch does not require a Git
+for Windows to build, but you can run the test scripts in a regular Git Bash.
+
+Note that `make vcxproj` will automatically add and commit the generated `.sln`
+and `.vcxproj` files to the repo. This is necessary to allow building a
+fully-testable Git in Visual Studio, where a regular Git Bash can be used to
+run the test scripts (as opposed to a full Git for Windows SDK): a number of
+build targets, such as Git commands implemented as Unix shell scripts (where
+`@@SHELL_PATH@@` and other placeholders are interpolated) require a full-blown
+Git for Windows SDK (which is about 10x the size of a regular Git for Windows
+installation).
+
+If your plan is to open a Pull Request with Git for Windows, it is a good idea
+to drop this commit before submitting.
+
+================================================================
The Steps of Build Git with VS2008
1. You need the build environment, which contains the Git dependencies