-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.wxs
421 lines (397 loc) · 15.8 KB
/
main.wxs
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<?xml version="1.0" encoding="UTF-8"?>
<?define var.AppUrl = "https://git-scm.com/doc" ?>
<?define var.AboutUrl = "https://git-scm.com/community" ?>
<?define var.ReadmeUrl = "https://github.com/git-for-windows/git/releases/tag/v2.43.0.windows.1" ?>
<?define var.AppContact = "oliver@raumzeitfalle" ?>
<?define var.ReferenceUrl = "https://git-scm.com/docs" ?>
<?define var.BookUrl = "https://git-scm.com/book" ?>
<?define var.Manufacturer = "Raumzeitfalle.de" ?>
<?define var.Application = "Git for Windows" ?>
<?define var.Version = "2.43.0.1" ?>
<?define var.ProgramDir = "git-scm" ?>
<?define var.ProgramGroup = "Git for Windows" ?>
<?define var.gitconfig = "gitconfig" ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
UpgradeCode="7b18ef36-119f-471b-997d-bb671c27fbc5"
Version="$(var.Version)"
Language="1033"
Name="$(var.Application)"
Manufacturer="$(var.Manufacturer)">
<Package InstallerVersion="400" Compressed="yes" InstallScope="perUser" InstallPrivileges="limited"/>
<Media Id="1" Cabinet="gitcustom.cab" EmbedCab="yes" />
<MajorUpgrade
Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit.">
</MajorUpgrade>
<SetProperty Id="ProgramFilesFolder" Value="[LocalAppDataFolder]" Before="CostFinalize">
<![CDATA[NOT Privileged]]>
</SetProperty>
<!-- License agreement text: dummy. Real text is set in WXS file -->
<WixVariable Id="WixUILicenseRtf" Value="Resources\LICENSE.rtf" />
<!-- Replace UI bitmaps -->
<WixVariable Id="WixUIBannerBmp" Value="Bitmaps\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="Bitmaps\dlgbmp.bmp" />
<!-- Define icons -->
<Icon Id="StartMenuGitBash.exe" SourceFile="PortableGit\git-bash.exe"/>
<Icon Id="StartMenuGitCmd.exe" SourceFile="PortableGit\git-cmd.exe"/>
<Icon Id="ApplicationIcon.ico" SourceFile="gwindows_logo.ico"/>
<Icon Id="GitGui.ico" SourceFile="git-gui.ico"/>
<Icon Id="OnlineDocumentationIcon.ico" SourceFile="Git-Icon-1788C.ico"/>
<!-- Set properties for add/remove programs -->
<Property Id="ARPPRODUCTICON" Value="ApplicationIcon.ico" />
<Property Id="ARPHELPLINK" Value="$(var.AppUrl)" />
<Property Id="ARPREADME" Value="$(var.ReadmeUrl)" />
<Property Id="ARPCONTACT" Value="$(var.AppContact)" />
<Property Id="ARPURLINFOABOUT" Value="$(var.AboutUrl)" />
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" /> <!-- Remove repair -->
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" /> <!-- Remove modify -->
<Property Id="GitBookUrl" Value="$(var.BookUrl)" />
<Property Id="GitReferenceUrl" Value="$(var.ReferenceUrl)" />
<Property Id="GitCommunityUrl" Value="$(var.AboutUrl)" />
<!-- ARPURLUPDATEINFO,ARPHELPTELEPHONE -->
<!-- Define the directory structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Application Directory -->
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProgramDir)">
<Directory Id="GitGuiDirectory" Name="cmd">
</Directory>
<Directory Id="GitEtcDirectory" Name="etc">
</Directory>
</Directory>
</Directory>
<Directory Id="PersonalFolder">
</Directory>
<!-- Start menu -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProgramGroup)">
<Component Id="GitBashShortcut" Guid="ab355007-4027-4162-bc25-23894f0600f7">
<Shortcut Id="GitBashApplicationMenuShortCut"
Name="Git-Bash"
Description="MSys2 Git Bash for Windows"
WorkingDirectory="PersonalFolder"
Target="[APPLICATIONROOTDIRECTORY]\git-bash.exe"
Advertise="no"
Icon="StartMenuGitBash.exe">
</Shortcut>
<RegistryKey Root="HKCU" Key="Software\GitForWindowsCustom\Uninstall">
<RegistryValue Value="GitBashShortcut" Type="string" KeyPath="yes" />
</RegistryKey>
<RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
</Component>
<Component Id="GitCmdShortcut" Guid="4d2ca504-84f9-4294-a072-7c9ac2c27ce7">
<Shortcut Id="GitCmdApplicationMenuShortCut"
Name="Git-Cmd"
Description="Git CMD for Windows"
WorkingDirectory="PersonalFolder"
Target="[APPLICATIONROOTDIRECTORY]\git-cmd.exe"
Advertise="no"
Icon="StartMenuGitCmd.exe">
</Shortcut>
<RegistryKey Root="HKCU" Key="Software\GitForWindowsCustom\Uninstall">
<RegistryValue Value="GitCmdShortcut" Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
<Component Id="GitGuiShortcut" Guid="299ea5c8-f70d-43d3-90c0-e415aff84c4b">
<Shortcut Id="GitGuiApplicationMenuShortCut"
Name="Git-GUI"
Description="Very simplistic UI for Git"
WorkingDirectory="PersonalFolder"
Target="[GitGuiDirectory]\git-gui.exe"
Advertise="no"
Icon="GitGui.ico">
</Shortcut>
<RegistryKey Root="HKCU" Key="Software\GitForWindowsCustom\Uninstall">
<RegistryValue Value="GitGuiShortcut" Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
<Component Id="GitBookShortcut" Guid="82A0CFF1-1B05-4C35-B52B-22A515BF0241">
<Shortcut Id="GitBookOnline"
Name="Git Pro (the book)"
Description="The Git Book (online)"
Icon="OnlineDocumentationIcon.ico"
Target="[GitBookUrl]" />
<RegistryKey Root="HKCU" Key="Software\GitForWindowsCustom\Uninstall">
<RegistryValue Value="GitBookShortcut" Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
<Component Id="GitReferenceShortcut" Guid="86004768-42cf-41a2-8776-2f72788d48f1">
<Shortcut Id="GitReferenceOnline"
Name="Git Reference"
Description="Comprehensive online reference to Git"
Icon="OnlineDocumentationIcon.ico"
Target="[GitReferenceUrl]" />
<RegistryKey Root="HKCU" Key="Software\GitForWindowsCustom\Uninstall">
<RegistryValue Value="GitReferenceShortcut" Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
<Component Id="GitCommunityShortcut" Guid="8b40c391-860d-4021-a68e-88acfcdf7314">
<Shortcut Id="GitCommunityOnline"
Name="Git Community"
Description="Mailing List and Bug Reporting"
Icon="OnlineDocumentationIcon.ico"
Target="[GitCommunityUrl]" />
<RegistryKey Root="HKCU" Key="Software\GitForWindowsCustom\Uninstall">
<RegistryValue Value="GitCommunityShortcut" Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="GitEtcDirectory">
<Component Id="GitConfig" Guid="b47339b1-25c5-4b38-bb97-fd3f32ea0ae8">
<CreateFolder />
<!-- CORE -->
<IniFile Id="IniSymlinks"
Action="createLine"
Section="core"
Name="$(var.gitconfig)"
Directory="GitEtcDirectory"
Key="symlinks"
Value="false" />
<IniFile Id="IniAutoCrlf"
Action="createLine"
Section="core"
Name="$(var.gitconfig)"
Directory="GitEtcDirectory"
Key="autocrlf"
Value="true" />
<IniFile Id="IniFscache"
Action="createLine"
Section="core"
Name="$(var.gitconfig)"
Directory="GitEtcDirectory"
Key="fscache"
Value="true" />
<IniFile Id="IniEditor"
Action="createLine"
Section="core"
Name="$(var.gitconfig)"
Directory="GitEtcDirectory"
Key="editor"
Value="nano.exe" />
<!-- COLOR -->
<IniFile Id="IniColor"
Action="createLine"
Section="color"
Name="$(var.gitconfig)"
Directory="GitEtcDirectory"
Key="interactive"
Value="true" />
<IniFile Id="IniUi"
Action="createLine"
Section="color"
Name="$(var.gitconfig)"
Directory="GitEtcDirectory"
Key="ui"
Value="auto" />
<!-- CREDENTIAL -->
<IniFile Id="IniCredential"
Action="createLine"
Section="credential"
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="helper"
Value="manager" />
<!-- DIFF "astextplain" -->
<IniFile Id="IniDiff"
Action="createLine"
Section='diff "astextplain"'
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="textconv"
Value="astextplain" />
<!-- FILTER "lfs" -->
<IniFile Id="IniFilterClean"
Action="createLine"
Section='filter "lfs"'
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="clean"
Value="git-lfs clean -- %f" />
<IniFile Id="IniFilterSmudge"
Action="createLine"
Section='filter "lfs"'
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="smudge"
Value="git-lfs smudge -- %f" />
<IniFile Id="IniFilterProgress"
Action="createLine"
Section='filter "lfs"'
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="process"
Value="git-lfs filter-process" />
<IniFile Id="IniFilterRequired"
Action="createLine"
Section='filter "lfs"'
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="required"
Value=" true" />
<!-- HELP -->
<IniFile Id="IniHelp"
Action="createLine"
Section="help"
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="format"
Value="html" />
<!-- HTTP -->
<IniFile Id="IniHttp"
Action="createLine"
Section="http"
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="sslBackend"
Value="schannel" />
<!-- INIT -->
<IniFile Id="IniGitInit"
Action="createLine"
Section="init"
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="defaultBranch "
Value="master" />
<!-- PULL -->
<IniFile Id="IniGitPull"
Action="createLine"
Section="pull"
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="rebase"
Value="false" />
<!-- REBASE -->
<IniFile Id="IniGitRebase"
Action="createLine"
Section="rebase"
Directory="GitEtcDirectory"
Name="$(var.gitconfig)"
Key="autosquash"
Value="true" />
</Component>
</DirectoryRef>
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
<Component Id="EnvironmentPathBash" Guid="eae60b81-b7e8-49f5-86dd-bd7c50f5d141">
<CreateFolder/>
<Environment Id="UpdatePathWithGitBash" Name="PATH" Action="set" Permanent="no" System="no" Part="last" Value="[APPLICATIONROOTDIRECTORY]" />
</Component>
<Component Id="GitBashHereRegistryEntries" Guid="511bf218-609c-495f-aa0b-27176ac9c4c4">
<RegistryKey Root="HKCU"
Key="SOFTWARE\Classes\Directory\background\shell\git_bash_here">
<RegistryValue Type="string" Value="Git Ba&sh Here" KeyPath="yes"/>
<RegistryValue Type="string" Name="Icon" Value="[APPLICATIONROOTDIRECTORY]\git-bash.exe"/>
</RegistryKey>
<RegistryKey Root="HKCU"
Key="SOFTWARE\Classes\Directory\background\shell\git_bash_here\command">
<RegistryValue Type="string" Value='"[APPLICATIONROOTDIRECTORY]\git-bash.exe" "--cd=%v."'/>
</RegistryKey>
</Component>
<Component Id="GitCmdHereRegistryEntries" Guid="a2078f0a-b66f-47dc-8baf-c25a27490606">
<RegistryKey Root="HKCU"
Key="SOFTWARE\Classes\Directory\background\shell\git_cmd_here">
<RegistryValue Type="string" Value="Git C&md Here" KeyPath="yes"/>
<RegistryValue Type="string" Name="Icon" Value="[APPLICATIONROOTDIRECTORY]\git-cmd.exe"/>
</RegistryKey>
<RegistryKey Root="HKCU"
Key="SOFTWARE\Classes\Directory\background\shell\git_cmd_here\command">
<RegistryValue Type="string" Value='"[APPLICATIONROOTDIRECTORY]\git-cmd.exe" "--cd=%v."'/>
</RegistryKey>
</Component>
</DirectoryRef>
<DirectoryRef Id="GitGuiDirectory">
<Component Id="EnvironmentPathGui" Guid="380d4813-af23-4ce1-9650-a0e212cdd9ea">
<CreateFolder/>
<Environment Id="UpdatePathWithGitGuiGitK" Name="PATH" Action="set" Permanent="no" System="no" Part="last" Value="[GitGuiDirectory]" />
</Component>
<Component Id="GitGuiHereRegistryEntries" Guid="f3416549-5259-4f94-86af-96723536b8d5">
<RegistryKey Root="HKCU"
Key="SOFTWARE\Classes\Directory\background\shell\git_gui_here">
<RegistryValue Type="string" Value="Git &GUI Here" KeyPath="yes"/>
<RegistryValue Type="string" Name="Icon" Value="[GitGuiDirectory]\git-gui.exe"/>
</RegistryKey>
<RegistryKey Root="HKCU"
Key="SOFTWARE\Classes\Directory\background\shell\git_gui_here\command">
<RegistryValue Type="string" Value='"[GitGuiDirectory]\git-gui.exe" "--working-dir" "%v."'/>
</RegistryKey>
</Component>
</DirectoryRef>
<!-- Define all installable features -->
<Feature Id="Programs"
Title="Git-for-Windows"
Level="1"
Absent="disallow"
Description="Git for Windows, pre-configured to use Windows Secure Channels instead of OpenSSL."
AllowAdvertise="no"
ConfigurableDirectory="APPLICATIONROOTDIRECTORY">
<ComponentGroupRef Id="GIT_PORTABLE" />
<ComponentRef Id="GitConfig" />
<Feature Id="ApplicationMenuShortcuts"
Title="Add Applications to the Start Menu"
Level="1"
Absent="allow"
Description="Allows to start Git-Bash, Git-CMD and also Git-GUI from Windows Startmenu."
AllowAdvertise="no" >
<ComponentRef Id="GitBashShortcut" />
<ComponentRef Id="GitCmdShortcut" />
<ComponentRef Id="GitGuiShortcut" />
</Feature>
<Feature Id="AddPathToEnvironment"
Title="Update PATH variable"
Level="1"
Absent="allow"
Description="Allows to call 'git-bash', 'git-cmd' and also 'git' and 'git-gui' from command line as all commands are published through the users PATH environment variable."
AllowAdvertise="no" >
<ComponentRef Id="EnvironmentPathBash" />
<ComponentRef Id="EnvironmentPathGui" />
</Feature>
<Feature Id="ExplorerIntegration"
Title="Explorer Integration"
Level="1"
Absent="allow"
Description="Adds 'Git Bash Here', 'Git CMD here' and 'Git GUI Here' commands to the Explorer context menu."
AllowAdvertise="no" >
<Feature Id="GitGuiHereFeature"
Title="Git GUI Here"
Level="1"
Absent="allow"
Description="Adds 'Git GUI Here' command Explorer context menu."
AllowAdvertise="no" >
<ComponentRef Id="GitGuiHereRegistryEntries" />
</Feature>
<Feature Id="GitBashHereFeature"
Title="Git Bash Here"
Level="1"
Absent="allow"
Description="Adds 'Git Bash Here' command Explorer context menu."
AllowAdvertise="no" >
<ComponentRef Id="GitBashHereRegistryEntries" />
</Feature>
<Feature Id="GitCmdHereFeature"
Title="Git CMD Here"
Level="1"
Absent="allow"
Description="Adds 'Git CMD Here' command Explorer context menu."
AllowAdvertise="no" >
<ComponentRef Id="GitCmdHereRegistryEntries" />
</Feature>
</Feature>
<Feature Id="DocumentationShortcuts"
Title="Add Documentation Start Menu Links"
Level="1"
Absent="allow"
Description="Add links to Git documentation to start menu group."
AllowAdvertise="no" >
<ComponentRef Id="GitBookShortcut" />
<ComponentRef Id="GitReferenceShortcut" />
<ComponentRef Id="GitCommunityShortcut" />
</Feature>
</Feature>
<!-- Define installer UI to be used -->
<UIRef Id="WixUI_FeatureTree" />
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONROOTDIRECTORY"></Property>
<UIRef Id="WixUI_ErrorProgressText"/>
</Product>
</Wix>