dotnet-installer/build/package/Installer.MSI.targets
Livar Cunha 8408322652 Merge branch 'release/2.1.1xx' into merge_release_211xx
* release/2.1.1xx: (45 commits)
  Adding the VBCSCompiler to the list of signed files due to crossgen.
  Remove obsolete F# satellite package
  MSBuild 15.6.76
  Update F# to match dev15.6 preview 4
  Excluding shared framework assemblies from the Roslyn folder in the SDK.
  Insert NuGet Build 4.6.0-rtm-4880 into cli
  Updating Roslyn to 2.7.0-beta3-62529-05.
  Update fsharp compiler to match preview 4
  Insert NuGet Build 4.6.0-rtm-4862 into cli
  MSBuild 15.6.70
  Insert NuGet Build 4.6.0-rtm-4859 into cli
  MSBuild 15.6.69
  Update package reference
  update fsharp compiler to match vs2017.6 preview 3
  Insert NuGet Build 4.6.0-rtm-4825 into cli
  Fixing the prefercliruntime asset
  Updating the SDK dependency to 15.5.0-preview-62518-04 to fix the signing issue
  Updating the channel to release/2.1.1xx. We can manually update release/2.0 if necessary, but LTS is always updated every time we release.
  MSBuild 15.6.54
  Updates the TestPlatform to 15.6.0-preview-20180109-01
  ...

 Conflicts:
	build/BranchInfo.props
	build/Branding.props
	build/DependencyVersions.props
	build/NugetConfigFile.targets
	build/Version.props
	build/package/Installer.DEB.proj
	build/package/Installer.DEB.targets
	build/package/Installer.RPM.targets
	build_projects/dotnet-cli-build/dotnet-cli-build.csproj
	packaging/osx/clisdk/resources/cs.lproj/conclusion.html
	packaging/osx/clisdk/resources/de.lproj/conclusion.html
	packaging/osx/clisdk/resources/en.lproj/conclusion.html
	packaging/osx/clisdk/resources/es.lproj/conclusion.html
	packaging/osx/clisdk/resources/fr.lproj/conclusion.html
	packaging/osx/clisdk/resources/it.lproj/conclusion.html
	packaging/osx/clisdk/resources/ja.lproj/conclusion.html
	packaging/osx/clisdk/resources/ko.lproj/conclusion.html
	packaging/osx/clisdk/resources/pl.lproj/conclusion.html
	packaging/osx/clisdk/resources/pt-br.lproj/conclusion.html
	packaging/osx/clisdk/resources/ru.lproj/conclusion.html
	packaging/osx/clisdk/resources/tr.lproj/conclusion.html
	packaging/osx/clisdk/resources/zh-hans.lproj/conclusion.html
	packaging/osx/clisdk/resources/zh-hant.lproj/conclusion.html
	packaging/windows/clisdk/bundle.wxl
	scripts/obtain/dotnet-install.ps1
	scripts/obtain/dotnet-install.sh
	src/tool_fsharp/tool_fsc.csproj
	test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
	test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
2018-02-07 12:30:22 -08:00

235 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- AcquireWix Properties -->
<PropertyGroup>
<WixVersion>3.10.4</WixVersion>
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl>
<WixRoot>$(IntermediateDirectory)/WixTools/$(WixVersion)</WixRoot>
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
</PropertyGroup>
<!-- Generate MSI/Bundle Properties -->
<PropertyGroup>
<CombinedFrameworkSdkHostBundleEngineName>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
<SdkGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
<SdkGenerateBundlePowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
<SdkGenerateNupkgPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1</SdkGenerateNupkgPowershellScript>
<MSBuildExtensionsGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/msbuildextensions/generatemsi.ps1</MSBuildExtensionsGenerateMsiPowershellScript>
<SdkInstallerNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
<SdkInstallerNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile>
<SdkMSBuildExtensionsNuspecFile>$(RepoRoot)/packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.nuspec</SdkMSBuildExtensionsNuspecFile>
<SdkMSBuildExtensionsNupkgFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.$(FullNugetVersion).nupkg</SdkMSBuildExtensionsNupkgFile>
<SdkMSBuildExtensionsSwrFile>$(InstallerOutputDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr</SdkMSBuildExtensionsSwrFile>
</PropertyGroup>
<!-- Test Sdk MSI Properties -->
<PropertyGroup>
<SdkTestMsiPowershellScript>$(RepoRoot)/test/Installer/testmsi.ps1</SdkTestMsiPowershellScript>
<SdkMsiTestedSentinel>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk).MsiTested.sentinel</SdkMsiTestedSentinel>
</PropertyGroup>
<Target Name="MsiTargetsSetupInputOutputs" DependsOnTargets="Init">
<!-- Generate SDK MSI Inputs -->
<ItemGroup>
<GenerateSdkMsiInputs Include="$(SdkLayoutOutputDirectory)/**/*;
$(SdkGenerateMsiPowershellScript)" />
<GenerateMSBuildExtensionsMsiInputs Include="$(MSBuildExtensionsOutputDirectory)/**/*;
$(MSBuildExtensionsGenerateMsiPowershellScript)" />
</ItemGroup>
<!-- Consumed By Publish -->
<ItemGroup>
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
<GeneratedInstallers Condition=" '$(Architecture)' == 'x86' " Include="$(MSBuildExtensionsInstallerFile)" />
</ItemGroup>
<GenerateMsiVersion CommitCount="$(CommitCount)"
VersionMajor="$(VersionMajor)"
VersionMinor="$(VersionMinor)"
VersionPatch="$(VersionPatch)">
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
</GenerateMsiVersion>
<GenerateGuidFromName Name="$(SdkInstallerFile)">
<Output TaskParameter="OutputGuid"
PropertyName="SdkInstallerUpgradeCode" />
</GenerateGuidFromName>
<GenerateGuidFromName Name="$(MSBuildExtensionsInstallerFile)">
<Output TaskParameter="OutputGuid"
PropertyName="MSBuildExtensionsInstallerUpgradeCode" />
</GenerateGuidFromName>
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
<Output TaskParameter="OutputGuid"
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
</GenerateGuidFromName>
</Target>
<Target Name="AcquireWix"
DependsOnTargets="Init;MsiTargetsSetupInputOutputs"
Inputs="$(WixDownloadSentinel)"
Outputs="$(WixDestinationPath)">
<!-- Setup sentinel to take advantage of incrementality -->
<MakeDir Directories="$(WixRoot)" />
<WriteLinesToFile
File="$(WixDownloadSentinel)"
Lines="$(WixVersion)"
Overwrite="true"
Encoding="Unicode"/>
<DownloadFile
Uri="$(WixDownloadUrl)"
DestinationPath="$(WixDestinationPath)"
Overwrite="false" />
<ZipFileExtractToDirectory
SourceArchive="$(WixDestinationPath)"
DestinationDirectory="$(WixRoot)" />
</Target>
<Target Name="GenerateSdkMsi"
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
Condition=" '$(OS)' == 'Windows_NT'"
Inputs="@(GenerateSdkMsiInputs)"
Outputs="$(SdkInstallerFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
'$(SdkLayoutOutputDirectory)'
'$(SdkInstallerFile)'
'$(WixRoot)'
'$(SdkBrandName)'
'$(MsiVersion)'
'$(SimpleVersion)'
'$(NugetVersion)'
'$(SdkInstallerUpgradeCode)'
'$(Architecture)'" />
</Target>
<Target Name="GenerateMSBuildExtensionsMsi"
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x86' "
Inputs="@(GenerateMSBuildExtensionsMsiInputs)"
Outputs="$(MSBuildExtensionsInstallerFile)">
<Exec Command="powershell -NoProfile -NoLogo $(MSBuildExtensionsGenerateMsiPowershellScript)
'$(MSBuildExtensionsOutputDirectory)'
'$(MSBuildExtensionsInstallerFile)'
'$(WixRoot)'
'$(MSBuildExtensionsBrandName)'
'$(SimpleVersion)'
'$(SimpleVersion)'
'$(NugetVersion)'
'$(MSBuildExtensionsInstallerUpgradeCode)'
'$(Architecture)'" />
</Target>
<Target Name="GenerateSdkBundle"
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
Condition=" '$(OS)' == 'Windows_NT'"
Inputs="$(SdkInstallerFile);
$(DownloadedSharedFrameworkInstallerFile);
$(DownloadedHostFxrInstallerFile);
$(DownloadedSharedHostInstallerFile);
$(SdkGenerateBundlePowershellScript)"
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
'$(SdkInstallerFile)'
'$(DownloadedAspNetCoreSharedFxInstallerFile)'
'$(DownloadedSharedFrameworkInstallerFile)'
'$(DownloadedHostFxrInstallerFile)'
'$(DownloadedSharedHostInstallerFile)'
'$(CombinedFrameworkSdkHostInstallerFile)'
'$(WixRoot)'
'$(SdkBrandName)'
'$(MsiVersion)'
'$(SimpleVersion)'
'$(NugetVersion)'
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)'
'$(Architecture)'" />
</Target>
<Target Name="GenerateSdkNupkg"
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
Condition=" '$(OS)' == 'Windows_NT'"
Inputs="$(CombinedFrameworkSdkHostInstallerFile);
$(SdkInstallerNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
Outputs="$(SdkInstallerNupkgFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
'$(CombinedFrameworkSdkHostInstallerFile)'
'$(FullNugetVersion)'
'$(SdkInstallerNuspecFile)'
'$(SdkInstallerNupkgFile)'" />
</Target>
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
Condition=" '$(OS)' == 'Windows_NT'"
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
$(SdkInstallerNuspecFile);
$(SdkGenerateNupkgPowershellScript)"
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript)
'$(MSBuildExtensionsLayoutDirectory)'
'$(FullNugetVersion)'
'$(SdkMSBuildExtensionsNuspecFile)'
'$(SdkMSBuildExtensionsNupkgFile)'" />
<GenerateMSBuildExtensionsSWR MSBuildExtensionsLayoutDirectory="$(MSBuildExtensionsLayoutDirectory)"
OutputFile="$(SdkMSBuildExtensionsSwrFile)"/>
</Target>
<Target Name="TestSdkMsi"
Inputs="$(SdkInstallerFile)"
Outputs="$(SdkMsiTestedSentinel)"
DependsOnTargets="Init;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
Condition=" '$(OS)' == 'Windows_NT'" >
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
-InputMsi '$(SdkInstallerFile)'
-DotnetDir '$(PreviousStageDirectory)'
-TestDir '$(TestOutputDir)'" />
<WriteLinesToFile
File="$(SdkMsiTestedSentinel)"
Lines="$(SdkVersion)"
Overwrite="true"
Encoding="Unicode"/>
</Target>
<Target Name="GenerateMsis"
DependsOnTargets="Init;
Layout;
MsiTargetsSetupInputOutputs;
AcquireWix;
GenerateSdkMsi;
GenerateMSBuildExtensionsMsi;
GenerateSdkBundle;
GenerateSdkNupkg;
GenerateSdkMSBuildExtensionsNupkg;
TestSdkMsi"
Condition=" '$(OS)' == 'Windows_NT'" />
<!-- These targets are used in signing, don't remove them! -->
<Target Name="ExtractEngineFromSdkBundle"
DependsOnTargets="MsiTargetsSetupInputOutputs">
<Exec Command="$(WixRoot)/insignia.exe -ib $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostBundleEngineName)" />
</Target>
<Target Name="ReattachEngineToSdkBundle"
DependsOnTargets="MsiTargetsSetupInputOutputs">
<Exec Command="$(WixRoot)/insignia.exe -ab $(CombinedFrameworkSdkHostBundleEngineName) $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostInstallerFile)" />
</Target>
</Project>