blob 81da36a93bae44b51706996cb36e3b405b77890f 3873 bytes (raw)
name: compat/vcbuild/README # note: path name is non-authoritative(*)
The Steps to Build Git with VS2015 or VS2017 from the command line.
1. Install the "vcpkg" open source package manager and build essential
third-party libraries. The steps for this have been captured in a
set of convenience scripts. These can be run from a stock Command
Prompt or from an SDK bash window:
$ cd <repo_root>
The vcpkg tools and all of the third-party sources will be installed
in this folder:
A file will be created with a set of Makefile macros pointing to a
unified "include", "lib", and "bin" directory (release and debug) for
all of the required packages. This file will be included by the main
2. OPTIONALLY copy the third-party *.dll and *.pdb files into the repo
root to make it easier to run and debug git.exe without having to
manipulate your PATH. This is especially true for debug sessions in
Use ONE of the following forms which should match how you want to
$ ./compat/vcbuild/vcpkg_copy_packages.bat debug
$ ./compat/vcbuild/vcpkg_copy_packages.bat release
3. Build git using MSVC from an SDK bash window using one of the
$ make MSVC=1
$ make MSVC=1 DEBUG=1
Alternatively, run `make MSVC=1 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.
Note that this will automatically add and commit the generated
.sln and .vcxproj files to the repo. You may want to drop this
commit before submitting a Pull Request....
Or maybe we should put the .sln/.vcxproj files in the .gitignore file
and not do this. I'm not sure.
The Steps of Build Git with VS2008
1. You need the build environment, which contains the Git dependencies
to be able to compile, link and run Git with MSVC.
You can either use the binary repository:
Git: git clone git://repo.or.cz/msvcgit.git
and call the setup_32bit_env.cmd batch script before compiling Git,
(see repo/package README for details), or the source repository:
Git: git clone git://repo.or.cz/gitbuild.git
Zip: (None, as it's a project with submodules)
and build the support libs as instructed in that repo/package.
2. Ensure you have the msysgit environment in your path, so you have
GNU Make, bash and perl available.
Git: git clone git://repo.or.cz/msysgit.git
This environment is also needed when you use the resulting
executables, since Git might need to run scripts which are part of
the git operations.
3. Inside Git's directory run the command:
to generate the command-list.h file needed to compile git.
4. Then either build Git with the GNU Make Makefile in the Git projects
or generate Visual Studio solution/projects (.sln/.vcproj) with the
perl contrib/buildsystems/generate -g Vcproj
and open and build the solution with the IDE
devenv git.sln /useenv
or build with the IDE build engine directly from the command line
devenv git.sln /useenv /build "Release|Win32"
The /useenv option is required, so Visual Studio picks up the
environment variables for the support libraries required to build
Git, which you set up in step 1.
solving 81da36a93b ...
found 81da36a93b in https://email@example.com/
found 60fd873fe8 in https://80x24.org/mirrors/git.git
100644 60fd873fe801da608cdef1ac2bafd371a0855db0 compat/vcbuild/README
applying [1/1] https://firstname.lastname@example.org/
diff --git a/compat/vcbuild/README b/compat/vcbuild/README
index 60fd873fe8..81da36a93b 100644
Checking patch compat/vcbuild/README...
Applied patch compat/vcbuild/README cleanly.
100644 81da36a93bae44b51706996cb36e3b405b77890f compat/vcbuild/README
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).