forked from TortoiseGit/TortoiseGit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.txt
78 lines (56 loc) · 3.54 KB
/
build.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Build instructions
==================
Compiling TortoiseGit is not very difficult, but it requires several steps
to finish, at least the first time.
Unlike other big open source projects, once you have built all the libraries
TortoiseGit depends on, you can use the familiar Visual Studio IDE to build
and debug the binaries. No need to run the build script for every little change.
So don't give up if you read through the next section and all the requirements.
You only have to do this once.
Requirements
------------
First, you need to install the compiler package:
* You need at least Visual Studio 2017 for
building the full TortoiseGit package.
The TortoiseGit teams uses VS2017 Community Edition which is free for open-source
projects (https://www.visualstudio.com/downloads/).
Make sure you select the workload "Desktop development with C++" and the following components:
* VC++ 2017 v141 toolset (x86,x64) (checked by default)
* Visual C++-ATL-support
* Windows 8.1 SDK and UCRT SDK
* MFC and ATL support (x86 and x64)
* Windows 10 SDK 17134.0 (for building the ribbon interface for TortoiseGitMerge)
* optional: NuGet packet manager (requirement for GoogleTestAdapter, see below)
* optional: GoogleTestAdapter (if you want to run the tests from within VS or use the package described below)
Next you might need to install some utilities/programs:
* If you want to build the MSI installer you need WiX 3.11 (http://wixtoolset.org/releases/)
and the VS2017 extension (https://marketplace.visualstudio.com/vsgallery/2eb3402e-ea6d-4dcd-8340-c88435e54ea9).
* For building the docs you need NAnt (http://nant.sourceforge.net/) and
https://sourceforge.net/projects/tortoisesvn/files/build%20tools/
See doc/readme.txt for more details on building the docs.
* If you want to execute the unit tests from within VisualStudio the GoogleTestAdaper extension is recommended
(https://marketplace.visualstudio.com/items?itemName=VisualCPPTeam.TestAdapterforGoogleTest).
Get external source code
------------------------
TortoiseGit comes with all required code in its repository included or linked as submodules:
Run
git submodule update --init
to download all linked repositories (submodules) automatically.
Alternatively, you can download submodules when cloning the main project with single command.
git clone --recursive https://gitlab.com/tortoisegit/tortoisegit.git
After that you need to apply TortoiseGit specific patches to the external libgit2 repository.
The patches are located in /ext/ and need to be applied to /ext/libgit2, e.g. using
cd ext/libgit2
for %%G in (..\libgit2-*.patch) do ( type %%G | git am --3way )
Building the packages
---------------------
Open TortoiseGit.sln in Visual Studio.
Build all projects.
You can also build TortoiseGit via command line by calling MSBuild
Open Developer Command Prompt for VS2017
MSBuild TortoiseGit.sln /p:Configuration=Release;Platform=Win32
MSBuild TortoiseGit.sln /p:Configuration=Release;Platform=x64
If you want to build the installer package, make sure you build the Win32 configuration before the x64 one
Also, build the docs before the installer packages (or copy existing TortoiseGit_en.chm and TortoiseMerge_en.chm files into the doc/output folder).
For optimized debugging copy TGitNatVis.dll and TortoiseGit.natvis from contrib\NatVis to %USERPROFILE%\Documents\Visual Studio 2013\Visualizers.
Then CGitHash will provide a readable preview of the SHA-1 and CTGitPath is also optimized.