forked from TortoiseGit/TortoiseGit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.txt
89 lines (65 loc) · 4.03 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
79
80
81
82
83
84
85
86
87
88
89
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 2022 for
building the full TortoiseGit package.
The TortoiseGit teams uses VS2022 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++ 2022 v143 toolset (x86,x64) (checked by default)
* Visual C++ ATL-support (x86 and x64)
* Visual C++ MFC support (x86 and x64)
* Windows 11 SDK
* optional: NuGet packet manager (requirement for GoogleTestAdapter, see below)
* optional: GoogleTestAdapter (if you want to run the tests from within VS)
* optional: CodeSigning certificate (for Windows 11 start menu extension)
* For building ARM64 binaries (optional, also requires WiX >= 3.14):
* VC++ 2022 v143 toolset ARM64 (newest)
* Visual C++ ATL-support ARM64 (newest)
* Visual C++ MFC support ARM64 (newest)
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 VS2022 extension (https://github.com/wixtoolset/VisualStudioExtension/releases).
* If you want to build the installer you need to update the PuTTY binaries by running ext/putty/download.bat
* 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.
In order to not build the Windows 11 start menu extension you need to adjust the following settings:
* Set BuildWindows11ContextmenuExtension to 0 in src/TortoiseGit.settings.props
* Unload the CustomActions11 project in the project explorer
In order to build the Windows 11 start menu extension you need to put your code signing certificate info into:
* src/TortoiseGitSetup/SparsePackage/AppxManifest.xml
* src/identity.manifest
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 might need to apply TortoiseGit specific patches to the external libgit2 repository.
The patches, if any, 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 2017\Visualizers.
Then CGitHash will provide a readable preview of the SHA-1 and CTGitPath is also optimized.