Honor renames in patch views
[TortoiseGit.git] / build.txt
blob9ba3715ea46ce12f977658cc2a32197b220fddae
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 2022 for\r
20    building the full TortoiseGit package.\r
21    The TortoiseGit teams uses VS2022 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++ 2022 v143 toolset (x86,x64) (checked by default)\r
25    * Visual C++ ATL-support (x86 and x64)\r
26    * Visual C++ MFC support (x86 and x64)\r
27    * Windows 11 SDK\r
28    * optional: NuGet packet manager (requirement for GoogleTestAdapter, see below)\r
29    * optional: GoogleTestAdapter (if you want to run the tests from within VS)\r
30    * optional: CodeSigning certificate (for Windows 11 start menu extension)\r
31    * For building ARM64 binaries (optional, also requires WiX >= 3.14):\r
32      * VC++ 2022 v143 toolset ARM64 (newest)\r
33      * Visual C++ ATL-support ARM64 (newest)\r
34      * Visual C++ MFC support ARM64 (newest)\r
36 Next you might need to install some utilities/programs:\r
37 *  If you want to build the MSI installer you need WiX 3.11 (http://wixtoolset.org/releases/)\r
38    and the VS2022 extension (https://github.com/wixtoolset/VisualStudioExtension/releases).\r
39 *  If you want to build the installer you need to update the PuTTY binaries by running ext/putty/download.bat\r
40 *  For building the docs you need NAnt (http://nant.sourceforge.net/) and\r
41    https://sourceforge.net/projects/tortoisesvn/files/build%20tools/\r
42    See doc/readme.txt for more details on building the docs.\r
44 In order to not build the Windows 11 start menu extension you need to adjust the following settings:\r
45 * Set BuildWindows11ContextmenuExtension to 0 in src/TortoiseGit.settings.props\r
46 * Unload the CustomActions11 project in the project explorer\r
48 In order to build the Windows 11 start menu extension you need to put your code signing certificate info into:\r
49 * src/TortoiseGitSetup/SparsePackage/AppxManifest.xml\r
50 * src/identity.manifest\r
52 Get external source code\r
53 ------------------------\r
55 TortoiseGit comes with all required code in its repository included or linked as submodules:\r
57 Run\r
59     git submodule update --init\r
61 to download all linked repositories (submodules) automatically.\r
62 Alternatively, you can download submodules when cloning the main project with single command.\r
64     git clone --recursive https://gitlab.com/tortoisegit/tortoisegit.git\r
67 After that you might need to apply TortoiseGit specific patches to the external libgit2 repository.\r
68 The patches, if any, are located in /ext/ and need to be applied to /ext/libgit2, e.g. using\r
70     cd ext/libgit2\r
71     for %%G in (..\libgit2-*.patch) do ( type %%G | git am --3way )\r
73 Building the packages\r
74 ---------------------\r
76 Open TortoiseGit.sln in Visual Studio.\r
77 Build all projects.\r
79 You can also build TortoiseGit via command line by calling MSBuild\r
80 Open Developer Command Prompt for VS20XX\r
82     MSBuild TortoiseGit.sln /p:Configuration=Release;Platform=Win32\r
83     MSBuild TortoiseGit.sln /p:Configuration=Release;Platform=x64\r
85 If you want to build the installer package, make sure you build the Win32 configuration before the x64 one\r
86 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