|
| 1 | +The Steps to Build Git with VS2015 or VS2017 from the command line. |
| 2 | + |
| 3 | +1. Install the "vcpkg" open source package manager and build essential |
| 4 | + third-party libaries. The steps for this have been captured in a |
| 5 | + set of convenience scripts. These can be run from a stock Command |
| 6 | + Prompt or from an SDK bash window: |
| 7 | + |
| 8 | + $ cd <repo_root> |
| 9 | + $ ./compat/vcbuild/vcpkg_install.bat |
| 10 | + |
| 11 | + The vcpkg tools and all of the third-party sources will be installed |
| 12 | + in this folder: |
| 13 | + <repo_root>/compat/vcbuild/vcpkg/ |
| 14 | + |
| 15 | + A file will be created with a set of Makefile macros pointing to a |
| 16 | + unified "include", "lib", and "bin" directory (release and debug) for |
| 17 | + all of the required packages. This file will be included by the main |
| 18 | + Makefile: |
| 19 | + <repo_root>/compat/vcbuild/MSVC-DEFS-GEN |
| 20 | + |
| 21 | +2. OPTIONALLY copy the third-party *.dll and *.pdb files into the repo |
| 22 | + root to make it easier to run and debug git.exe without having to |
| 23 | + manipulate your PATH. This is especially true for debug sessions in |
| 24 | + Visual Studio. |
| 25 | + |
| 26 | + Use ONE of the following forms which should match how you want to |
| 27 | + compile git.exe. |
| 28 | + |
| 29 | + $ ./compat/vcbuild/vcpkg_copy_packages.bat debug |
| 30 | + $ ./compat/vcbuild/vcpkg_copy_packages.bat release |
| 31 | + |
| 32 | +3. Build git using MSVC from an SDK bash window using one of the |
| 33 | + following commands: |
| 34 | + |
| 35 | + $ make MSVC=1 |
| 36 | + $ make MSVC=1 DEBUG=1 |
| 37 | + |
| 38 | +================================================================ |
| 39 | + |
| 40 | +Alternatively, run `make MSVC=1 vcxproj` and then load the generated |
| 41 | +git.sln in Visual Studio. The initial build will install the vcpkg |
| 42 | +system and build the dependencies automatically. This will take a while. |
| 43 | + |
| 44 | +Note that this will automatically add and commit the generated |
| 45 | +.sln and .vcxproj files to the repo. You may want to drop this |
| 46 | +commit before submitting a Pull Request.... |
| 47 | + |
| 48 | +Or maybe we should put the .sln/.vcxproj files in the .gitignores |
| 49 | +and not do this. I'm not sure. |
| 50 | + |
| 51 | +================================================================ |
1 | 52 | The Steps of Build Git with VS2008
|
2 | 53 |
|
3 | 54 | 1. You need the build environment, which contains the Git dependencies
|
|
0 commit comments