Fix bundle installer signing (dotnet/core-setup#7820)
authorDavis Goodin <dagood@users.noreply.github.com>
Fri, 23 Aug 2019 18:53:48 +0000 (13:53 -0500)
committerGitHub <noreply@github.com>
Fri, 23 Aug 2019 18:53:48 +0000 (13:53 -0500)
* Fix bundle installer signing

* Remove SignMsiFiles.proj MSBuild cycle

This OrderProjectReference is unnecessary: ensuring the MSI files are signed before bundling them is already handled by the infrastructure in the GetBundledMsiFiles target.

Commit migrated from https://github.com/dotnet/core-setup/commit/9528017ba529995cc42697abc1e3c59258303192

src/installer/pkg/packaging-tools/packaging-tools.targets
src/installer/pkg/packaging-tools/windows/wix.targets
src/installer/pkg/projects/netcoreapp/sfx/Microsoft.NETCore.App.SharedFx.sfxproj
src/installer/pkg/projects/windowsdesktop/sfx/Microsoft.WindowsDesktop.App.SharedFx.sfxproj
src/installer/signing/SignBurnBundleFiles.proj
src/installer/signing/SignMsiFiles.proj

index b881768..3f92965 100644 (file)
@@ -80,6 +80,7 @@
       <InstallerFileNameWithoutExtension>$(InstallerName)-$(InstallerBuildPart)</InstallerFileNameWithoutExtension>
       <InstallerFile Condition="'$(InstallerFile)' == ''">$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(InstallerExtension)</InstallerFile>
       <ExeBundleInstallerFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension).exe</ExeBundleInstallerFile>
+      <ExeBundleInstallerEngineFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension)-engine.exe</ExeBundleInstallerEngineFile>
       <CompressedArchiveFile>$(AssetOutputPath)$(InstallerFileNameWithoutExtension)$(CompressedFileExtension)</CompressedArchiveFile>
     </PropertyGroup>
 
index 1d08273..53b761c 100644 (file)
   </Target>
 
   <Target Name="ExtractEngineBundle"
-          DependsOnTargets="GetInstallerGenerationFlags">
+          DependsOnTargets="
+            GetInstallerGenerationFlags;
+            GetWixBuildConfiguration">
     <Exec
       Condition="'$(GenerateExeBundle)' == 'true'"
-      Command="insignia.exe -ib $(CombinedInstallerFile) -o $(CombinedInstallerEngine)"
+      Command="insignia.exe -ib $(OutInstallerFile) -o $(ExeBundleInstallerEngineFile)"
       WorkingDirectory="$(WixToolsDir)" />
   </Target>
 
   <Target Name="ReattachEngineToBundle"
-          DependsOnTargets="GetInstallerGenerationFlags">
+          DependsOnTargets="
+            GetInstallerGenerationFlags;
+            GetWixBuildConfiguration">
     <Exec
       Condition="'$(GenerateExeBundle)' == 'true'"
-      Command="insignia.exe -ab $(CombinedInstallerEngine) $(CombinedInstallerFile) -o $(CombinedInstallerFile)"
+      Command="insignia.exe -ab $(ExeBundleInstallerEngineFile) $(OutInstallerFile) -o $(OutInstallerFile)"
       WorkingDirectory="$(WixToolsDir)" />
   </Target>
 
index cba841c..c24c1a8 100644 (file)
@@ -27,8 +27,6 @@
     <PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetHost\Microsoft.NETCore.DotNetHost.pkgproj" />
     <PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetHostPolicy\Microsoft.NETCore.DotNetHostPolicy.pkgproj" />
     <PkgProjectReference Include="..\..\Microsoft.NETCore.DotNetHostResolver\Microsoft.NETCore.DotNetHostResolver.pkgproj" />
-
-    <OrderProjectReference Include="$(RepoRoot)signing\SignMsiFiles.proj" />
   </ItemGroup>
 
   <!--
index 31468cb..edd3cdb 100644 (file)
@@ -8,8 +8,6 @@
 
   <ItemGroup>
     <PkgProjectReference Include="..\pkg\Microsoft.WindowsDesktop.App.pkgproj" />
-
-    <OrderProjectReference Include="$(RepoRoot)signing\SignMsiFiles.proj" />
   </ItemGroup>
 
 </Project>
index 28eb9f2..55c7a8c 100644 (file)
@@ -4,7 +4,7 @@
   <Target Name="ReattachAllEnginesToBundles"
           BeforeTargets="RunArcadeSigning">
     <MSBuild
-      Projects="@(ProjectToBuild -> WithMetadataValue('SignPhase', 'Bundle'))"
+      Projects="@(ProjectToBuild -> WithMetadataValue('SignPhase', 'BundleInstallerFiles'))"
       Targets="ReattachEngineToBundle" />
   </Target>
 
index 7fd756d..55dd18d 100644 (file)
@@ -12,7 +12,7 @@
           DependsOnTargets="GetSharedFrameworkProjects"
           BeforeTargets="EnsureProjectsBuilt">
     <ItemGroup>
-      <StageProject Include="@(SharedFrameworkProjects)" />
+      <StageProject Include="@(SharedFrameworkProject)" />
     </ItemGroup>
   </Target>