Skip to content

Commit

Permalink
compat/vcbuild: document preferred way to build in Visual Studio
Browse files Browse the repository at this point in the history
We used to have that `make vcxproj` hack, but a hack it is. In the
meantime, we have a much cleaner solution: using CMake, either
explicitly, or even more conveniently via Visual Studio's built-in CMake
support (simply open Git's top-level directory via File>Open>Folder...).

Let's let the `README` reflect this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 22, 2022
1 parent 0f63eac commit af09265
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions compat/vcbuild/README
Expand Up @@ -37,27 +37,17 @@ 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
Alternatively, just open Git's top-level directory in Visual Studio, via
`File>Open>Folder...`. This will use CMake internally to generate the
project definitions. It will also 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.
You can also generate the Visual Studio solution manually by downloading
and running CMake explicitly rather than letting Visual Studio doing
that implicitly.

Another, deprecated option is to run `make vcxproj`. This option is
superseded by the CMake-based build, and will be removed at some point.

================================================================
The Steps of Build Git with VS2008
Expand Down

0 comments on commit af09265

Please sign in to comment.