Skip to content

Commit 1229d8c

Browse files
author
Kevin Gosse
authored
Add dd-dotnet to path on Windows (#4863)
1 parent a005212 commit 1229d8c

File tree

5 files changed

+56
-18
lines changed

5 files changed

+56
-18
lines changed

shared/src/msi-installer/Product.wxs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
<Property Id="ARPURLINFOABOUT">https://datadoghq.com/</Property>
2121
<Property Id="ARPHELPLINK">https://datadoghq.com/support/</Property>
2222
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
23-
24-
<Property Id="INSTALLFOLDER">
23+
<Property Id="PATHSHORTCUT" Value="1" />
24+
<Property Id="DD_DOTNET_LINK" Value="https://docs.datadoghq.com/tracing/troubleshooting/dotnet_diagnostic_tool/" />
25+
26+
<Property Id="INSTALLFOLDER">
2527
<RegistrySearch Id="RegistrySearch" Type="raw" Root="HKLM" Win64="$(var.Win64)" Key="Software\$(var.Company)\$(var.ProductName)" Name="InstallPath"/>
2628
</Property>
2729

@@ -42,9 +44,6 @@
4244
<ComponentGroupRef Id="Shared.Files" />
4345
<ComponentGroupRef Id="Shared.Files.NativeLoader.32"/> <!-- 32-bit native files are always included, even in 64-bit builds -->
4446

45-
<ComponentGroupRef Id="dd_dotnet.cmd"/>
46-
<ComponentGroupRef Id="dd_dotnet.exe"/>
47-
4847
<ComponentGroupRef Id="ContinuousProfiler.EnvironmentVariables.Machine"/>
4948
<ComponentGroupRef Id="ContinuousProfiler.Files"/>
5049
<ComponentGroupRef Id="ContinuousProfiler.Files.Native.32"/> <!-- 32-bit native files are always included, even in 64-bit builds -->
@@ -60,6 +59,8 @@
6059

6160
<!-- Only include 64-bit native files in the 64-bit build -->
6261
<?if $(var.Win64) = yes ?>
62+
<ComponentGroupRef Id="dd_dotnet.cmd"/>
63+
<ComponentGroupRef Id="dd_dotnet.exe"/>
6364
<ComponentGroupRef Id="Shared.Files.NativeLoader.64"/>
6465
<ComponentGroupRef Id="ContinuousProfiler.Files.Native.64"/>
6566
<ComponentGroupRef Id="Tracer.Files.Native.64"/>

shared/src/msi-installer/Tracer/Files.wxs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
</Component>
3939
</ComponentGroup>
4040

41+
<?if $(var.Win64) = yes ?>
4142
<ComponentGroup Id="dd_dotnet.cmd" Directory="INSTALLFOLDER">
4243
<Component>
4344
<File Id="dd_dotnet.cmd"
@@ -54,5 +55,6 @@
5455
</File>
5556
</Component>
5657
</ComponentGroup>
58+
<?endif ?>
5759
</Fragment>
5860
</Wix>

shared/src/msi-installer/WindowsInstaller.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@
8585
<Target Name="AfterBuild">
8686
</Target>
8787
-->
88-
</Project>
88+
</Project>

shared/src/msi-installer/WixUI_InstallDir_Custom.wxs

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,38 @@ Patch dialog sequence:
2424
-->
2525

2626
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
27+
<?include $(sys.CURRENTDIR)\Config.wxi?>
2728
<Fragment>
29+
2830
<UI Id="WixUI_InstallDir_Custom">
29-
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8"/>
31+
<Dialog Id="MyInstallDirDlg" Width="370" Height="270" Title="!(loc.InstallDirDlg_Title)">
32+
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
33+
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
34+
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
35+
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
36+
</Control>
37+
38+
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.InstallDirDlgDescription)" />
39+
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.InstallDirDlgTitle)" />
40+
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
41+
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
42+
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
43+
44+
<Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="!(loc.InstallDirDlgFolderLabel)" />
45+
<Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" />
46+
<Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" />
47+
48+
<?if $(var.Win64) = yes ?>
49+
<Control Id="PathCheckBox" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="PATHSHORTCUT" CheckBoxValue="1" Text="Add dd-dotnet to path" />
50+
<Control Id="PathLink" Type="Hyperlink" X="20" Y="180" Width="290" Height="20" Property="DD_DOTNET_LINK" Text="Learn more about dd-dotnet">
51+
<Text>
52+
<![CDATA[<a href="https://docs.datadoghq.com/tracing/troubleshooting/dotnet_diagnostic_tool/">Learn more about dd-dotnet</a>]]>
53+
</Text>
54+
</Control>
55+
<?endif ?>
56+
</Dialog>
57+
58+
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8"/>
3059
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12"/>
3160
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes"/>
3261

@@ -57,17 +86,17 @@ Patch dialog sequence:
5786
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
5887

5988
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
60-
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
89+
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="MyInstallDirDlg">LicenseAccepted = "1"</Publish>
6190

62-
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
63-
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
64-
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
65-
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
66-
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
67-
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
68-
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
91+
<Publish Dialog="MyInstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
92+
<Publish Dialog="MyInstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
93+
<Publish Dialog="MyInstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
94+
<Publish Dialog="MyInstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
95+
<Publish Dialog="MyInstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
96+
<Publish Dialog="MyInstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
97+
<Publish Dialog="MyInstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
6998

70-
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
99+
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyInstallDirDlg" Order="1">NOT Installed</Publish>
71100
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
72101
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>
73102

shared/src/msi-installer/shared/EnvironmentVariables.wxs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@
1212

1313
<Environment Id="COR_PROFILER_PATH_32" Name="COR_PROFILER_PATH_32" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]win-x86\Datadog.Trace.ClrProfiler.Native.dll" Part="all" />
1414
<Environment Id="CORECLR_PROFILER_PATH_32" Name="CORECLR_PROFILER_PATH_32" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]win-x86\Datadog.Trace.ClrProfiler.Native.dll" Part="all" />
15-
16-
<?if $(var.Win64) = yes ?>
15+
<?if $(var.Win64) = yes ?>
1716
<Environment Id="COR_PROFILER_PATH_64" Name="COR_PROFILER_PATH_64" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]win-x64\Datadog.Trace.ClrProfiler.Native.dll" Part="all" />
1817
<Environment Id="CORECLR_PROFILER_PATH_64" Name="CORECLR_PROFILER_PATH_64" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]win-x64\Datadog.Trace.ClrProfiler.Native.dll" Part="all" />
1918
<?endif ?>
2019
</Component>
20+
<?if $(var.Win64) = yes ?>
21+
<Component Id="EnvironmentVariablePath" Guid="{5804E0CA-7126-4774-A715-42AE37B9E421}" Win64="$(var.Win64)">
22+
<Condition>PATHSHORTCUT = 1</Condition>
23+
<CreateFolder/>
24+
<Environment Id="PATH" Name="PATH" Action="set" Permanent="no" System="yes" Value="[INSTALLFOLDER]win-x64" Part="last" />
25+
</Component>
26+
<?endif ?>
2127
</ComponentGroup>
2228

2329
<ComponentGroup Id="Shared.EnvironmentVariables.IIS" Directory="INSTALLFOLDER">

0 commit comments

Comments
 (0)