1 <?xml version="1.0" encoding="utf-8"?>
\r
2 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
\r
3 <?include Includes.wxi?>
\r
4 <Product UpgradeCode="$(var.UpgradeGuid)" Name="$(var.ProductName) $(var.VersionNumberUserVisible) $(var.PlatformUserVisible)" Id="*" Version="$(var.VersionNumberInternal)" Manufacturer="TortoiseGit" Language="1033" Codepage="1252">
\r
6 <Package Id="*" Keywords="$(var.PackageKeywords)" Description="$(var.PackageDescription)" Comments="$(var.TortoiseGitOrg)" Manufacturer="$(var.PackageManufacturer)" InstallerVersion="405" Platform="$(var.PackagePlatforms)" Languages="1033" Compressed="yes" SummaryCodepage="1252" InstallPrivileges="elevated" />
\r
7 <Upgrade Id="$(var.UpgradeGuid)">
\r
8 <!-- upgrade is flagged if current-install is newer than or equal to package -->
\r
9 <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.VersionNumberInternal)" OnlyDetect="yes" />
\r
11 <UpgradeVersion Property="CLOSETGITCACHE" Maximum="2.2.2.0" IncludeMaximum="no" OnlyDetect="yes" />
\r
13 <!-- flag is set if the install will trigger an upgrade of an existing install -->
\r
14 <UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Maximum="$(var.VersionNumberInternal)" IncludeMaximum="no" MigrateFeatures="yes" />
\r
17 <MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallValidate" />
\r
18 <Media Id="1" Cabinet="TGIT.cab" EmbedCab="yes" CompressionLevel="high" />
\r
20 <!-- Specify the REINSTALLMODE property to allow proper installation of downgraded components. -->
\r
21 <Property Id="REINSTALLMODE" Value="dmus" />
\r
23 <Icon Id="TGITIcon" SourceFile="..\Resources\Tortoise.ico" />
\r
25 <Property Id="SSHTOOL" Secure="yes">Plink</Property>
\r
26 <Property Id="OLDSSH" Secure="yes">
\r
27 <RegistrySearch Id="oldSSHSetting" Root="HKCU" Key="Software\[Manufacturer]" Name="SSH" Type="raw" />
\r
30 <!-- Launch Condition related properties ................................................................................. -->
\r
31 <Property Id="SHOWCHANGELOG" Secure="yes">1</Property>
\r
32 <Property Id="FIRSTSTARTWIZARD" Secure="yes">1</Property>
\r
33 <Property Id="ALLUSERS" Secure="yes">1</Property>
\r
35 <Condition Message="[ProductName] requires Windows 7 or later."><![CDATA[(VersionNT >= 601)]]></Condition>
\r
37 <?if $(var.Platform) = "x86" ?>
\r
38 <Condition Message="You are attempting to run the 32-bit installer on a 64-bit version of Windows. Please install the 64-bit version of TortoiseGit instead.">NOT Msix64</Condition>
\r
41 <?if $(var.Platform) = "x64" ?>
\r
42 <Upgrade Id="$(var.UpgradeGuid32)">
\r
43 <UpgradeVersion Minimum="0.0.0.0" OnlyDetect="yes" Property="WIN32TGITFOUND" />
\r
45 <Condition Message="Please uninstall all 32-bit versions of TortoiseGit before installing [ProductName].">NOT WIN32TGITFOUND</Condition>
\r
48 <!-- test for the universal CRT -->
\r
49 <Property Id="UCRTVERSION" Secure="yes">
\r
50 <?if $(var.Platform) = "x64" ?>
\r
51 <DirectorySearch Id="SystemFolder64V" Path="[System64Folder]">
\r
52 <FileSearch Name="ucrtbase.dll" MinVersion="0.0.0.0"/>
\r
55 <DirectorySearch Id="SystemFolder32V" Path="[SystemFolder]">
\r
56 <FileSearch Name="ucrtbase.dll" MinVersion="0.0.0.0"/>
\r
60 <Condition Message="Please install the Universal CRT first. You can install it via Windows Update (KB2999226) or you can manually download it from Microsoft by doing a search for 'vcredist 2019 download'">UCRTVERSION</Condition>
\r
62 <!-- Show/Don't-show changelog related properties and custom actions ..................................................... -->
\r
63 <Property Id="TEXTEDITOR" Secure="yes">
\r
64 <DirectorySearch Id="FileSearchTextEditorExe" Path="[WindowsFolder]">
\r
65 <FileSearch Id="FileSearchTextEditorExe" Name="notepad.exe" />
\r
68 <CustomAction Id="Set_ShowChangelog" Property="SHOWCHANGELOG" Value="" Return="check" />
\r
69 <CustomAction Id="ShowChangelogAction" Property="TEXTEDITOR" ExeCommand="[INSTALLDIR]changelog.txt" Return="asyncNoWait" />
\r
71 <CustomAction Id="Set_FirstStartWizard" Property="FIRSTSTARTWIZARD" Value="" Return="check" />
\r
72 <CustomAction Id="FirstStartWizardAction" Directory="D__Bin" ExeCommand=""[INSTALLDIR]bin\TortoiseGitProc.exe" /command:firststart" Return="asyncNoWait" />
\r
74 <CustomAction Id="ShowDonatePage" BinaryKey="CustomActionsDLL" DllEntry="OpenDonatePage" />
\r
75 <CustomAction Id="RemoveAllUserSettings" BinaryKey="CustomActionsDLL" DllEntry="RemoveAllUserSettings" />
\r
77 <CustomAction Id="KillCache" BinaryKey="CustomActionsDLL" DllEntry="TerminateCache" />
\r
78 <Binary Id="CustomActionsDLL" SourceFile="..\..\bin\$(var.ReleasePath)\bin\CustomActions.dll" />
\r
79 <CustomAction Id="RestartExplorer" BinaryKey="CustomActionsDLL" DllEntry="RestartExplorer" />
\r
80 <?if ($(var.Platform) = "x64" OR $(var.Platform) = "ARM64") AND $(var.BuildWindows11ContextmenuExtension) = "1" ?>
\r
81 <!-- only needed for Windows 11; there is no x86 version -->
\r
82 <Binary Id="CustomActionsDLL11" SourceFile="..\..\bin\$(var.ReleasePath)\bin\CustomActions11.dll" />
\r
83 <CustomAction Id="RegisterSparsePackage" Impersonate="yes" BinaryKey="CustomActionsDLL11" DllEntry="RegisterSparsePackage"/>
\r
84 <CustomAction Id="UnregisterSparsePackage" Impersonate="yes" BinaryKey="CustomActionsDLL11" DllEntry="UnregisterSparsePackage"/>
\r
87 <!-- Unsafe-check properties and custom actions .......................................................................... -->
\r
88 <Property Id="VSDUIANDADVERTISED" Secure="yes">This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic.</Property>
\r
89 <CustomAction Id="ERRCA_UIANDADVERTISED" Error="[VSDUIANDADVERTISED]" />
\r
91 <!-- Figure out where a previous installation was, if any ................................................................ -->
\r
92 <?if $(var.Platform) = "x64" OR $(var.Platform) = "ARM64" ?>
\r
93 <CustomAction Id="DefaultTargetDir" Property="INSTALLDIR" Value="[ProgramFiles64Folder]$(var.ProductName)" Execute="immediate" />
\r
94 <Property Id="INSTALLDIR" Secure="yes">
\r
95 <RegistrySearch Id="PreviousInstallLocationRegistrySearch" Root="HKLM" Key="Software\[Manufacturer]" Name="Directory" Type="raw" Win64="$(var.Win64YesNo)" />
\r
98 <CustomAction Id="DefaultTargetDir" Property="INSTALLDIR" Value="[ProgramFilesFolder]$(var.ProductName)" Execute="immediate" />
\r
99 <Property Id="INSTALLDIR" Secure="yes">
\r
100 <RegistrySearch Id="PreviousInstallLocationRegistrySearch" Root="HKLM" Key="Software\[Manufacturer]" Name="Directory" Type="raw" Win64="$(var.Win64YesNo)" />
\r
104 <Property Id="LANGUAGEFOLDER" Secure="yes">
\r
105 <RegistrySearch Key="SOFTWARE\[Manufacturer]" Root="HKLM" Type="raw" Id="LANGUAGEFOLDER_REGSEARCH" Name="LanguageFolderPath" Win64="$(var.Win64YesNo)"/>
\r
108 <?if ($(var.Platform) = "x64" OR $(var.Platform) = "ARM64") AND $(var.BuildWindows11ContextmenuExtension) = "1" ?>
\r
109 <!-- only needed for Windows 11; there is no x86 version -->
\r
110 <!-- msiexec does not have a manifest, so it always reports the version of system dlls as
\r
111 for Win7 (6.3.x.x). So we check for 6.3 but use the build number to actually check
\r
113 <Property Id="WIN11FOUND" Secure="yes">
\r
114 <DirectorySearch Id="searchSystem" Path="[System64Folder]" AssignToProperty="yes">
\r
115 <FileSearch Id="searchFile" Name="shell32.dll" MinVersion="6.3.21999.0"/>
\r
119 <!-- properties for the custom actions to (un)register the sparse package -->
\r
120 <Property Id="SPARSEPACKAGEFILE" Value="package.msix" Secure="yes"/>
\r
121 <Property Id="SPARSEPACKAGENAME" Value="0BF99681-825C-4B2A-A14F-2AC01DB9B70E" Secure="yes"/>
\r
124 <?include FeaturesFragment.wxi?>
\r
125 <?include StructureFragment.wxi?>
\r
126 <?include UIFragment.wxi?>
\r
127 <?if $(var.Platform) != "ARM64" ?>
\r
128 <?include Win7LibraryAndExplorerToolbarActions.wxi?>
\r
130 <?include ProtocolSupport.wxi?>
\r
131 <?include TortoiseUDiff.wxi?>
\r
134 <FragmentRef Id="StructureFragment" />
\r
135 <FragmentRef Id="FeaturesFragment" />
\r
136 <FragmentRef Id="UIFragment" />
\r
139 <!-- Execute Sequencing ................................................................................................. -->
\r
140 <AdminExecuteSequence />
\r
141 <InstallExecuteSequence>
\r
142 <!-- AppSearch must be done before RemoveExistingProducts and before FindRelatedProducts -->
\r
143 <AppSearch Sequence="1" />
\r
144 <LaunchConditions After="AppSearch" />
\r
145 <Custom Action="DefaultTargetDir" After="LaunchConditions">INSTALLDIR=""</Custom>
\r
146 <Custom Action="KillCache" After="ValidateProductID">Installed OR REMOVE OR CLOSETGITCACHE</Custom>
\r
147 <?if ($(var.Platform) = "x64" OR $(var.Platform) = "ARM64") AND $(var.BuildWindows11ContextmenuExtension) = "1" ?>
\r
148 <!-- only needed for Windows 11; there is no x86 version -->
\r
149 <Custom Action="RegisterSparsePackage" After="InstallFinalize">NOT (REMOVE~="ALL") AND (NOT WIN11FOUND="")</Custom>
\r
150 <Custom Action="UnregisterSparsePackage" Before="RemoveFiles">(REMOVE~="ALL") AND (NOT WIN11FOUND="")</Custom>
\r
152 </InstallExecuteSequence>
\r
154 <!-- UI Sequencing ...................................................................................................... -->
\r
156 <Show Dialog="FatalErrorDlg" OnExit="error" />
\r
157 <Show Dialog="UserExit" OnExit="cancel" />
\r
158 <Show Dialog="ExitDlg" OnExit="success" />
\r
159 <Show Dialog="PrepareDlg" Before="CostInitialize"><![CDATA[]]></Show>
\r
160 <Show Dialog="AdminWelcomeDlg" After="CostFinalize" />
\r
161 <Show Dialog="ProgressDlg" After="AdminWelcomeDlg" />
\r
164 <InstallUISequence>
\r
165 <Show Dialog="FatalErrorDlg" OnExit="error" />
\r
166 <Show Dialog="UserExit" OnExit="cancel" />
\r
167 <Show Dialog="ExitDlg" OnExit="success" />
\r
168 <Show Dialog="PrepareDlg" After="LaunchConditions" />
\r
169 <Show Dialog="WelcomeDlg" After="MigrateFeatureStates"><![CDATA[NOT Installed]]></Show>
\r
170 <Show Dialog="ResumeDlg" After="WelcomeDlg"><![CDATA[Installed AND (RESUME OR Preselected)]]></Show>
\r
171 <Show Dialog="PatchWelcomeDlg" After="ResumeDlg"><![CDATA[Installed AND NOT RESUME AND PATCH]]></Show>
\r
172 <Show Dialog="MaintenanceWelcomeDlg" After="ResumeDlg"><![CDATA[Installed AND NOT RESUME AND NOT Preselected and NOT PATCH]]></Show>
\r
173 <Show Dialog="ProgressDlg" After="MaintenanceWelcomeDlg" />
\r
175 <FindRelatedProducts Suppress="no">1</FindRelatedProducts>
\r
177 <Custom Action="DefaultTargetDir" After="PrepareDlg">INSTALLDIR=""</Custom>
\r
178 <Custom Action="ERRCA_UIANDADVERTISED" Before="AppSearch">ProductState=1</Custom>
\r
179 <Custom Action="Set_ShowChangelog" After="LaunchConditions">NOT (NEWERVERSIONDETECTED OR PREVIOUSVERSIONSINSTALLED OR PATCH)</Custom>
\r
180 <Custom Action="Set_FirstStartWizard" After="LaunchConditions">(NEWERVERSIONDETECTED OR PREVIOUSVERSIONSINSTALLED OR PATCH)</Custom>
\r
181 </InstallUISequence>
\r