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