Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<UsingToolVisualStudioIbcTraining Condition="'$(UsingToolVisualStudioIbcTraining)' == ''">false</UsingToolVisualStudioIbcTraining>
<UsingToolNuGetRepack Condition="'$(UsingToolNuGetRepack)' == ''">false</UsingToolNuGetRepack>
<UsingToolSymbolUploader Condition="'$(UsingToolSymbolUploader)' == ''">false</UsingToolSymbolUploader>
<!-- Set UsingToolWix3 to true if this repo produces WiX 3 MSI installers (wixpacks). -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defautling to false will be a breaking change for downstream repos. I'd default to true

<UsingToolWix3 Condition="'$(UsingToolWix3)' == ''">false</UsingToolWix3>
<!-- Set UsingToolWix5 to true if this repo produces WiX 5 MSI installers (wixpacks). -->
<UsingToolWix5 Condition="'$(UsingToolWix5)' == ''">false</UsingToolWix5>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand our upgrade path correct, UsingToolWix5 will be incorrectly named when we update to 6 or 7. Instead, maybe UsingToolWix5Plus?


<!-- Deprecated features -->
<!--
Expand Down
10 changes: 7 additions & 3 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Import Project="Sign.props" />

<!-- Import the wix props to get the install path -->
<Import Project="$(NuGetPackageRoot)microsoft.signed.wix\$(MicrosoftSignedWixVersion)\build\Microsoft.Signed.Wix.props" />
<Import Project="$(NuGetPackageRoot)microsoft.signed.wix\$(MicrosoftSignedWixVersion)\build\Microsoft.Signed.Wix.props" Condition="'$(UsingToolWix3)' == 'true'" />

<!-- Update sign infos that were using Microsoft400 to use the .NET-specific cert if UseDotNetCertificate is present.
This will update any use, even if explicitly specified.
Expand Down Expand Up @@ -60,6 +60,10 @@

<!-- SN is only available on Windows -->
<SNBinaryPath Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(NuGetPackageRoot)sn\$(SNVersion)\sn.exe</SNBinaryPath>

<!-- Only set WiX tool paths when the corresponding tool is opted-in -->
<_Wix3ToolsPath Condition="'$(UsingToolWix3)' == 'true'">$(WixInstallPath)</_Wix3ToolsPath>
<_WixToolsPath Condition="'$(UsingToolWix5)' == 'true'">$(NuGetPackageRoot)microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\x64</_WixToolsPath>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -90,8 +94,8 @@
DotNetPath="$(_DotNetCorePath)"
SNBinaryPath="$(SNBinaryPath)"
MicroBuildCorePath="$(NuGetPackageRoot)microsoft.visualstudioeng.microbuild.core\$(MicrosoftVisualStudioEngMicroBuildCoreVersion)"
Wix3ToolsPath="$(WixInstallPath)"
WixToolsPath="$(NuGetPackageRoot)microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\x64"
Wix3ToolsPath="$(_Wix3ToolsPath)"
WixToolsPath="$(_WixToolsPath)"
PkgToolPath="@(MacOSPkgCliItem)"
RepackParallelism="$(SignToolRepackParallelism)"
MaximumParallelFileSize="$(SignToolRepackMaximumParallelFileSize)"
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<PackageDownload Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="[$(MicrosoftVisualStudioEngMicroBuildCoreVersion)]" />
<PackageDownload Include="MicroBuild.Core.Sentinel" Version="[1.0.0]" />
<PackageDownload Include="vswhere" Version="[$(VSWhereVersion)]" />
<PackageDownload Include="Microsoft.Signed.Wix" Version="[$(MicrosoftSignedWixVersion)]" />
<PackageDownload Include="Microsoft.WixToolset.Sdk" Version="[$(MicrosoftWixToolsetSdkVersion)]" />
<PackageDownload Include="Microsoft.Signed.Wix" Version="[$(MicrosoftSignedWixVersion)]" Condition="'$(UsingToolWix3)' == 'true'" />
<PackageDownload Include="Microsoft.WixToolset.Sdk" Version="[$(MicrosoftWixToolsetSdkVersion)]" Condition="'$(UsingToolWix5)' == 'true'" />
<PackageDownload Include="Microsoft.DotNet.SignTool" Version="[$(MicrosoftDotNetSignToolVersion)]" />
<PackageDownload Include="Microsoft.DotNet.MacOsPkg.Cli" Version="[$(MicrosoftDotNetMacOsPkgVersion)]" />
<PackageDownload Include="Microsoft.SymbolUploader.Build.Task" Version="[$(MicrosoftSymbolUploaderBuildTaskVersion)]" Condition="'$(PublishToSymbolServer)' == 'true'" />
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.SignTool/src/BatchSignUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ List<FileSignInfo> identifyNextGroup()

internal static bool RunWixTool(string toolName, string arguments, string workingDirectory, string wixToolsPath, TaskLoggingHelper log)
{
if (wixToolsPath == null)
if (string.IsNullOrEmpty(wixToolsPath))
{
log.LogError("WixToolsPath must be defined to run WiX tooling. Wixpacks are used to produce signed msi's during post-build signing. If this repository is using in-build signing, remove '*.wixpack.zip' from ItemsToSign.");
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.DotNet.SignTool/src/SignToolTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ public void ExecuteImpl()
Log.LogError($"PkgToolPath ('{PkgToolPath}') does not exist & is required for unpacking, repacking, and notarizing .pkg files and .app bundles on MacOS.");
}
}
if(Wix3ToolsPath != null && !Directory.Exists(Wix3ToolsPath))
if(!string.IsNullOrEmpty(Wix3ToolsPath) && !Directory.Exists(Wix3ToolsPath))
{
Log.LogError($"Wix3ToolsPath ('{Wix3ToolsPath}') does not exist.");
}
if(WixToolsPath != null && !Directory.Exists(WixToolsPath))
if(!string.IsNullOrEmpty(WixToolsPath) && !Directory.Exists(WixToolsPath))
{
Log.LogError($"WixToolsPath ('{WixToolsPath}') does not exist.");
}
Expand Down
Loading