SEBWIN-300: Fixed error 0x80070001 (happening when executing the signed setup) by using the designated build targets of WiX for both setup and bundle.

This commit is contained in:
dbuechel 2019-08-22 13:32:56 +02:00
parent 3c1d6b38fe
commit d4fc6a81a0
2 changed files with 25 additions and 9 deletions

View file

@ -101,14 +101,6 @@
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<PropertyGroup>
<PostBuildEvent>signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 $(TargetPath)
git -C $(SolutionDir) checkout -- Setup/Components/Application.wxs
git -C $(SolutionDir) checkout -- Setup/Components/Configuration.wxs
git -C $(SolutionDir) checkout -- Setup/Components/Reset.wxs
git -C $(SolutionDir) checkout -- Setup/Components/Service.wxs</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>setlocal enabledelayedexpansion
set binaries=
@ -124,6 +116,12 @@ signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 %25bin
"$(WIX)bin\heat.exe" dir "$(SolutionDir)SebWindowsConfig\bin\$(PlatformName)\$(ConfigurationName)" -nologo -ag -g1 -scom -srd -sreg -cg ConfigurationComponents -dr ConfigurationDirectory -sfrag -var var.SebWindowsConfig.TargetDir -out $(ProjectDir)Components\Configuration.wxs -t $(ProjectDir)Components\Configuration.xslt
"$(WIX)bin\heat.exe" dir "$(SolutionDir)SafeExamBrowser.ResetUtility\bin\$(PlatformName)\$(ConfigurationName)" -nologo -ag -g1 -scom -srd -sreg -cg ResetComponents -dr ResetDirectory -sfrag -var var.SafeExamBrowser.ResetUtility.TargetDir -out $(ProjectDir)Components\Reset.wxs -t $(ProjectDir)Components\Reset.xslt
"$(WIX)bin\heat.exe" dir "$(SolutionDir)SafeExamBrowser.Service\bin\$(PlatformName)\$(ConfigurationName)" -nologo -ag -g1 -scom -srd -sreg -cg ServiceComponents -dr ServiceDirectory -sfrag -var var.SafeExamBrowser.Service.TargetDir -out $(ProjectDir)Components\Service.wxs -t $(ProjectDir)Components\Service.xslt</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>git -C $(SolutionDir) checkout -- Setup/Components/Application.wxs
git -C $(SolutionDir) checkout -- Setup/Components/Configuration.wxs
git -C $(SolutionDir) checkout -- Setup/Components/Reset.wxs
git -C $(SolutionDir) checkout -- Setup/Components/Service.wxs</PostBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
@ -133,4 +131,13 @@ signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 %25bin
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<SignOutput>true</SignOutput>
</PropertyGroup>
<Target Name="SignCabs">
<Exec Command="signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 &quot;%(SignCabs.FullPath)&quot;" />
</Target>
<Target Name="SignMsi">
<Exec Command="signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 &quot;%(SignMsi.FullPath)&quot;" />
</Target>
</Project>

View file

@ -62,7 +62,7 @@
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<PropertyGroup>
<PostBuildEvent>signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 $(TargetPath)</PostBuildEvent>
<PostBuildEvent />
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
@ -72,4 +72,13 @@
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<SignOutput>true</SignOutput>
</PropertyGroup>
<Target Name="SignBundleEngine">
<Exec Command="signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 &quot;@(SignBundleEngine)&quot;" />
</Target>
<Target Name="SignBundle">
<Exec Command="signtool sign /sm /tr http://timestamp.digicert.com /td sha256 /fd sha256 &quot;@(SignBundle)&quot;" />
</Target>
</Project>