Generate Windows installers
This commit is contained in:
parent
6c0c9119fc
commit
1e32ccfb7e
27 changed files with 226 additions and 178 deletions
|
@ -6,11 +6,15 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<Import Project="targets\BuildCoreSdkTasks.targets" />
|
||||
<Import Project="targets\Versions.targets" />
|
||||
<Import Project="targets\BundledComponents.targets" />
|
||||
<Import Project="targets\FileExtensions.targets" />
|
||||
<Import Project="targets\GetRuntimeInformation.targets" />
|
||||
<Import Project="targets\Versions.targets" />
|
||||
<Import Project="targets\SetBuildDefaults.targets" />
|
||||
<Import Project="targets\Branding.targets" />
|
||||
<Import Project="targets\GenerateLayout.targets" />
|
||||
<Import Project="targets\FileExtensions.targets" />
|
||||
|
||||
<Import Project="targets\GenerateArchives.targets" />
|
||||
<Import Project="targets\GenerateMSIs.targets" />
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
15
src/redist/targets/Branding.targets
Normal file
15
src/redist/targets/Branding.targets
Normal file
|
@ -0,0 +1,15 @@
|
|||
<Project>
|
||||
<Target Name="SetSdkBrandingInfo" DependsOnTargets="SetSdkVersionInfo">
|
||||
<PropertyGroup>
|
||||
<BuildName>cli</BuildName>
|
||||
<SdkBrandName>Microsoft .NET Core SDK $(CliBrandingVersion)</SdkBrandName>
|
||||
<MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName>
|
||||
<!-- TODO: "Preview" shouldn't be hardcoded in these properties -->
|
||||
<SharedFrameworkBrandName>Microsoft .NET Core Runtime $(CliVersionNoSuffix) - Preview</SharedFrameworkBrandName>
|
||||
<SharedHostBrandName>Microsoft .NET Core Host $(CliVersionNoSuffix) - Preview</SharedHostBrandName>
|
||||
<HostFxrBrandName>Microsoft .NET Core Host FX Resolver $(CliVersionNoSuffix) - Preview</HostFxrBrandName>
|
||||
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -23,5 +23,8 @@
|
|||
<UsingTask TaskName="DownloadFile" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="ExtractArchiveToDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="ZipFileCreateFromDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="TarGzFileCreateFromDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project>
|
||||
<Target Name="GenerateArchives"
|
||||
DependsOnTargets="LayoutBundledComponents"
|
||||
DependsOnTargets="GenerateLayout"
|
||||
AfterTargets="Build">
|
||||
|
||||
<ZipFileCreateFromDirectory
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<RedistLayoutPath>$(BaseOutputPath)$(Configuration)\dotnet\</RedistLayoutPath>
|
||||
<SdkInternalLayoutPath>$(BaseOutputPath)$(Configuration)\dotnet-internal\</SdkInternalLayoutPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetSdkVersionInfo">
|
||||
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetSdkVersionInfo;SetBuildDefaults">
|
||||
<PropertyGroup>
|
||||
<CoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</CoreSetupBlobRootUrl>
|
||||
<DotnetExtensionsBlobRootUrl Condition="'$(DotnetExtensionsBlobRootUrl)' == ''">https://dotnetcli.blob.core.windows.net/dotnet/</DotnetExtensionsBlobRootUrl>
|
||||
|
@ -112,6 +113,7 @@
|
|||
<DownloadFileName>dotnet-toolset-internal-$(ToolsetVersion).zip</DownloadFileName>
|
||||
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
|
||||
<RelativeLayoutPath>sdk/$(SdkVersion)</RelativeLayoutPath>
|
||||
<IncludeInInternalLayout>true</IncludeInInternalLayout>
|
||||
</BundledLayoutComponent>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -124,8 +126,9 @@
|
|||
<RelativeLayoutPath></RelativeLayoutPath>
|
||||
</BundledLayoutComponent>
|
||||
|
||||
<!-- Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFileName)' != '' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))" -->
|
||||
<BundledInstallerComponent Include="DownloadedAspNetCoreSharedFxInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFileName)' != '' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<BaseUrl>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)</BaseUrl>
|
||||
<DownloadFileName>$(DownloadedAspNetCoreSharedFxInstallerFileName)</DownloadFileName>
|
||||
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
|
||||
|
@ -187,11 +190,16 @@
|
|||
<MakeDir Directories="$(RedistLayoutPath)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutBundledComponents" DependsOnTargets="DownloadBundledComponents;CleanLayoutPath"
|
||||
<Target Name="GenerateLayout" DependsOnTargets="DownloadBundledComponents;CleanLayoutPath"
|
||||
AfterTargets="Build">
|
||||
|
||||
<ExtractArchiveToDirectory SourceArchive="%(BundledLayoutComponent.DownloadDestination)"
|
||||
DestinationDirectory="$(RedistLayoutPath)/%(BundledLayoutComponent.RelativeLayoutPath)" />
|
||||
|
||||
<!-- Create "SDK Internal" layout to create the MSI to bundle -->
|
||||
<ExtractArchiveToDirectory SourceArchive="%(BundledLayoutComponent.DownloadDestination)"
|
||||
DestinationDirectory="$(SdkInternalLayoutPath)/%(BundledLayoutComponent.RelativeLayoutPath)"
|
||||
Condition="'%(BundledLayoutComponent.IncludeInInternalLayout)' == 'true'"/>
|
||||
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,112 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupWixProperties" DependsOnTargets="GetCurrentRuntimeInformation">
|
||||
<!-- AcquireWix Properties -->
|
||||
<PropertyGroup>
|
||||
<WixVersion>3.10.4</WixVersion>
|
||||
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl>
|
||||
<WixRoot>$(IntermediateDirectory)/WixTools/$(WixVersion)</WixRoot>
|
||||
<WixRoot>$(ArtifactsDir)Tools/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>
|
||||
<CombinedFrameworkSdkHostBundleEngineName>$(ArtifactsShippingPackagesDir)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
|
||||
|
||||
<SdkGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
|
||||
<SdkStableFileIdForApphostTransform>$(RepoRoot)/packaging/windows/clisdk/stablefileidforapphosttransform.xslt</SdkStableFileIdForApphostTransform>
|
||||
<SdkGenerateBundlePowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
||||
<SdkGenerateNupkgPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatenupkg.ps1</SdkGenerateNupkgPowershellScript>
|
||||
<SdkGenerateMsiPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
|
||||
<SdkStableFileIdForApphostTransform>$(MSBuildThisFileDirectory)packaging/windows/clisdk/stablefileidforapphosttransform.xslt</SdkStableFileIdForApphostTransform>
|
||||
<SdkGenerateBundlePowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
||||
<SdkGenerateNupkgPowershellScript>$(MSBuildThisFileDirectory)packaging/windows/clisdk/generatenupkg.ps1</SdkGenerateNupkgPowershellScript>
|
||||
|
||||
<MSBuildExtensionsGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/msbuildextensions/generatemsi.ps1</MSBuildExtensionsGenerateMsiPowershellScript>
|
||||
<SdkInstallerNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.$(Architecture).nuspec</SdkInstallerNuspecFile>
|
||||
<SdkInstallerNupkgFile>$(ArtifactsShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.$(Architecture).$(FullNugetVersion).nupkg</SdkInstallerNupkgFile>
|
||||
|
||||
<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>
|
||||
<!--<SdkMSBuildExtensionsNuspecFile>$(MSBuildThisFileDirectory)packaging/windows/clisdk/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.nuspec</SdkMSBuildExtensionsNuspecFile>
|
||||
<SdkMSBuildExtensionsNupkgFile>$(ArtifactsShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.$(FullNugetVersion).nupkg</SdkMSBuildExtensionsNupkgFile>
|
||||
<SdkMSBuildExtensionsSwrFile>$(ArtifactsShippingPackagesDir)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>
|
||||
<SdkInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
<CombinedFrameworkSdkHostInstallerFile>$(ArtifactsShippingPackagesDir)$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
||||
|
||||
<SdkDebianIntermediateDirectory>$(IntermediateOutputPath)debian/sdk/</SdkDebianIntermediateDirectory>
|
||||
<LayoutDirectory Condition=" '$(OSName)' == 'ubuntu' OR '$(OSName)' == 'debian' ">$(SdkDebianIntermediateDirectory)debianLayoutDirectory</LayoutDirectory>
|
||||
<LayoutDirectory Condition=" '$(OSName)' != 'ubuntu' AND '$(OSName)' != 'debian' ">$(IntermediateOutputPath)layouts</LayoutDirectory>
|
||||
<SdkLayoutOutputDirectory>$(LayoutDirectory)$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
|
||||
<MSBuildExtensionsOutputDirectory>$(LayoutDirectory)MSBuildExtensions</MSBuildExtensionsOutputDirectory>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="MsiTargetsSetupInputOutputs" DependsOnTargets="Init">
|
||||
<!-- Generate SDK MSI Inputs -->
|
||||
<ItemGroup>
|
||||
<GenerateSdkMsiInputs Include="$(SdkLayoutOutputDirectory)/**/*;
|
||||
<Target Name="MsiTargetsSetupInputOutputs"
|
||||
DependsOnTargets="GenerateLayout;SetupWixProperties;GetCoreSdkGitCommitInfo">
|
||||
<!-- Generate SDK MSI Inputs -->
|
||||
<ItemGroup>
|
||||
<GenerateSdkMsiInputs Include="$(SdkInternalLayoutPath)**/*;
|
||||
$(SdkGenerateMsiPowershellScript)" />
|
||||
<GenerateMSBuildExtensionsMsiInputs Include="$(MSBuildExtensionsOutputDirectory)/**/*;
|
||||
$(MSBuildExtensionsGenerateMsiPowershellScript)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Consumed By Publish -->
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
||||
<!-- Disabling this for now because we don't have the MSBuildExtensions available. -->
|
||||
<!--
|
||||
<GeneratedInstallers Condition=" '$(Architecture)' == 'x86' " Include="$(MSBuildExtensionsInstallerFile)" />
|
||||
-->
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
|
||||
<GenerateMsiVersion CommitCount="$(CommitCount)"
|
||||
VersionMajor="$(VersionMajor)"
|
||||
VersionMinor="$(VersionMinor)"
|
||||
VersionPatch="$(VersionPatch)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||
</GenerateMsiVersion>
|
||||
<!-- Consumed By Publish -->
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<GenerateGuidFromName Name="$(SdkInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="SdkInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
<GenerateMsiVersion CommitCount="$(GitCommitCount)"
|
||||
VersionMajor="$(VersionMajor)"
|
||||
VersionMinor="$(VersionMinor)"
|
||||
VersionPatch="$(VersionPatch)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||
</GenerateMsiVersion>
|
||||
|
||||
<GenerateGuidFromName Name="$(MSBuildExtensionsInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="MSBuildExtensionsInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
<GenerateGuidFromName Name="$(SdkInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="SdkInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
|
||||
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
</Target>
|
||||
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
|
||||
<Output TaskParameter="OutputGuid"
|
||||
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
||||
</GenerateGuidFromName>
|
||||
</Target>
|
||||
|
||||
<Target Name="AcquireWix"
|
||||
DependsOnTargets="Init;MsiTargetsSetupInputOutputs"
|
||||
Inputs="$(WixDownloadSentinel)"
|
||||
Outputs="$(WixDestinationPath)">
|
||||
<Target Name="AcquireWix"
|
||||
DependsOnTargets="SetupWixProperties;MsiTargetsSetupInputOutputs"
|
||||
Inputs="$(WixDownloadSentinel)"
|
||||
Outputs="$(WixDestinationPath)">
|
||||
|
||||
<!-- Setup sentinel to take advantage of incrementality -->
|
||||
<MakeDir Directories="$(WixRoot)" />
|
||||
<WriteLinesToFile
|
||||
File="$(WixDownloadSentinel)"
|
||||
Lines="$(WixVersion)"
|
||||
Overwrite="true"
|
||||
Encoding="Unicode"/>
|
||||
<!-- 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" />
|
||||
<DownloadFile
|
||||
Uri="$(WixDownloadUrl)"
|
||||
DestinationPath="$(WixDestinationPath)"
|
||||
Overwrite="false" />
|
||||
|
||||
<ZipFileExtractToDirectory
|
||||
SourceArchive="$(WixDestinationPath)"
|
||||
DestinationDirectory="$(WixRoot)" />
|
||||
<ExtractArchiveToDirectory
|
||||
SourceArchive="$(WixDestinationPath)"
|
||||
DestinationDirectory="$(WixRoot)" />
|
||||
|
||||
</Target>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkMsi"
|
||||
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="@(GenerateSdkMsiInputs)"
|
||||
Outputs="$(SdkInstallerFile)">
|
||||
<Target Name="GenerateSdkMsi"
|
||||
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;SetSdkBrandingInfo"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="@(GenerateSdkMsiInputs)"
|
||||
Outputs="$(SdkInstallerFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript) ^
|
||||
'$(SdkLayoutOutputDirectory)' ^
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript) ^
|
||||
'$(SdkInternalLayoutPath.TrimEnd('\'))' ^
|
||||
'$(SdkInstallerFile)' ^
|
||||
'$(WixRoot)' ^
|
||||
'$(SdkBrandName)' ^
|
||||
|
@ -116,46 +111,26 @@
|
|||
'$(SdkInstallerUpgradeCode)' ^
|
||||
'$(Architecture)' ^
|
||||
'$(SdkStableFileIdForApphostTransform)' ^
|
||||
" />
|
||||
</Target>
|
||||
-InformationAction Continue" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateMSBuildExtensionsMsi"
|
||||
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
||||
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x86' "
|
||||
Inputs="@(GenerateMSBuildExtensionsMsiInputs)"
|
||||
Outputs="$(MSBuildExtensionsInstallerFile)">
|
||||
|
||||
<!-- Disabling this for now because we don't have the MSBuildExtensions available. -->
|
||||
|
||||
<!-- <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);
|
||||
<Target Name="GenerateSdkBundle"
|
||||
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="$(SdkInstallerFile);
|
||||
$(DownloadedSharedFrameworkInstallerFile);
|
||||
$(DownloadedHostFxrInstallerFile);
|
||||
$(DownloadedSharedHostInstallerFile);
|
||||
$(SdkGenerateBundlePowershellScript)"
|
||||
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
||||
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript) ^
|
||||
'$(SdkInstallerFile)' ^
|
||||
'$(DownloadedAspNetCoreSharedFxInstallerFile)' ^
|
||||
'$(DownloadedSharedFrameworkInstallerFile)' ^
|
||||
'$(DownloadedHostFxrInstallerFile)' ^
|
||||
'$(DownloadedSharedHostInstallerFile)' ^
|
||||
'$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFile)' ^
|
||||
'$(IntermediateOutputPath)downloads\$(DownloadedAspNetCoreSharedFxInstallerFileName)' ^
|
||||
'$(IntermediateOutputPath)downloads\$(DownloadedSharedFrameworkInstallerFileName)' ^
|
||||
'$(IntermediateOutputPath)downloads\$(DownloadedHostFxrInstallerFileName)' ^
|
||||
'$(IntermediateOutputPath)downloads\$(DownloadedSharedHostInstallerFileName)' ^
|
||||
'$(IntermediateOutputPath)downloads\$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)' ^
|
||||
'$(CombinedFrameworkSdkHostInstallerFile)' ^
|
||||
'$(WixRoot)' ^
|
||||
'$(SdkBrandName)' ^
|
||||
|
@ -165,35 +140,36 @@
|
|||
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^
|
||||
'$(Architecture)' ^
|
||||
'$(MicrosoftNETCoreAppPackageVersion)' ^
|
||||
'$(AspNetCoreVersion)'" />
|
||||
</Target>
|
||||
'$(AspNetCoreVersion)' ^
|
||||
-InformationAction Continue " />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkNupkg"
|
||||
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="$(CombinedFrameworkSdkHostInstallerFile);
|
||||
<Target Name="GenerateSdkNupkg"
|
||||
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
||||
Condition=" '$(OS)' == 'Windows_NT'"
|
||||
Inputs="$(CombinedFrameworkSdkHostInstallerFile);
|
||||
$(SdkInstallerNuspecFile);
|
||||
$(SdkGenerateNupkgPowershellScript)"
|
||||
Outputs="$(SdkInstallerNupkgFile)">
|
||||
Outputs="$(SdkInstallerNupkgFile)">
|
||||
|
||||
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
|
||||
<!--<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
|
||||
'$(CombinedFrameworkSdkHostInstallerFile)' ^
|
||||
'$(FullNugetVersion)' ^
|
||||
'$(SdkInstallerNuspecFile)' ^
|
||||
'$(SdkInstallerNupkgFile)'" />
|
||||
</Target>
|
||||
'$(SdkInstallerNupkgFile)'" />-->
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
|
||||
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
||||
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
|
||||
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
||||
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
|
||||
DependsOnTargets="GenerateLayout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
|
||||
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
|
||||
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
|
||||
$(SdkInstallerNuspecFile);
|
||||
$(SdkGenerateNupkgPowershellScript)"
|
||||
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
|
||||
Outputs="$(SdkMSBuildExtensionsNupkgFile);$(SdkMSBuildExtensionsSwrFile)">
|
||||
|
||||
<!-- Disabling this for now because we don't have the MSBuildExtensions available. -->
|
||||
<!-- Disabling this for now because we don't have the MSBuildExtensions available. -->
|
||||
|
||||
<!-- <Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateNupkgPowershellScript) ^
|
||||
<!-- <Exec Command="powershell -NoProfile -NoLogo -InformationAction Continue $(SdkGenerateNupkgPowershellScript) ^
|
||||
'$(MSBuildExtensionsLayoutDirectory)' ^
|
||||
'$(FullNugetVersion)' ^
|
||||
'$(SdkMSBuildExtensionsNuspecFile)' ^
|
||||
|
@ -201,23 +177,21 @@
|
|||
|
||||
<GenerateMSBuildExtensionsSWR MSBuildExtensionsLayoutDirectory="$(MSBuildExtensionsLayoutDirectory)"
|
||||
OutputFile="$(SdkMSBuildExtensionsSwrFile)"/> -->
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateMsis"
|
||||
DependsOnTargets="Init;
|
||||
Layout;
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateMsis"
|
||||
DependsOnTargets="GenerateLayout;
|
||||
MsiTargetsSetupInputOutputs;
|
||||
AcquireWix;
|
||||
GenerateSdkMsi;
|
||||
GenerateMSBuildExtensionsMsi;
|
||||
GenerateSdkBundle;
|
||||
GenerateSdkNupkg;
|
||||
GenerateSdkMSBuildExtensionsNupkg"
|
||||
Condition=" '$(OS)' == 'Windows_NT'" />
|
||||
Condition=" '$(OS)' == 'Windows_NT'" />
|
||||
|
||||
<!-- These targets are used in signing, don't remove them! -->
|
||||
<Target Name="ExtractEngineFromSdkBundle"
|
||||
<!-- 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>
|
||||
|
@ -225,5 +199,5 @@
|
|||
<Target Name="ReattachEngineToSdkBundle"
|
||||
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
||||
<Exec Command="$(WixRoot)/insignia.exe -ab $(CombinedFrameworkSdkHostBundleEngineName) $(CombinedFrameworkSdkHostInstallerFile) -o $(CombinedFrameworkSdkHostInstallerFile)" />
|
||||
</Target>
|
||||
</Target>-->
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Project>
|
||||
<Target Name="GetCurrentRuntimeInformation">
|
||||
<Target Name="GetCurrentRuntimeInformation" DependsOnTargets="SetSdkVersionInfo">
|
||||
<GetCurrentRuntimeInformation>
|
||||
<Output TaskParameter="Rid" PropertyName="HostRid" />
|
||||
<Output TaskParameter="OSName" PropertyName="HostOSName" />
|
||||
|
|
42
src/redist/targets/SetBuildDefaults.targets
Normal file
42
src/redist/targets/SetBuildDefaults.targets
Normal file
|
@ -0,0 +1,42 @@
|
|||
<Project>
|
||||
<Target Name="SetBuildDefaults" DependsOnTargets="GetCurrentRuntimeInformation">
|
||||
<PropertyGroup>
|
||||
<!-- Currently, 'arm*' SDK's do not include the LZMA for performance upon extraction of the NuGet archive. -->
|
||||
<!-- https://github.com/dotnet/cli/issues/8800 -->
|
||||
<IncludeNuGetPackageArchive Condition=" $(Architecture.StartsWith('arm')) ">false</IncludeNuGetPackageArchive>
|
||||
<!--<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>-->
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' AND
|
||||
($(Rid.StartsWith('rhel.6'))
|
||||
OR $(Rid.StartsWith('linux-musl'))
|
||||
OR $(Rid.StartsWith('fedora.27'))
|
||||
OR $(Rid.StartsWith('opensuse.42.3'))
|
||||
OR $(Rid.StartsWith('ubuntu.18.04')))">true</SkipBuildingInstallers>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
|
||||
|
||||
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' AND '$(Rid)' != 'rhel.6-x64' AND '$(Rid)' != 'linux-musl-x64' ">true</UsePortableLinuxSharedFramework>
|
||||
<!--<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == ''
|
||||
AND '$(Rid)' != 'linux-x64'
|
||||
AND '$(Rid)' != 'rhel.6-x64'
|
||||
AND '$(Rid)' != 'linux-musl-x64'
|
||||
AND '$(Rid)' != 'fedora.27-x64'
|
||||
AND '$(Rid)' != 'opensuse.42.3-x64'
|
||||
AND '$(Rid)' != 'ubuntu.18.04-x64'">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>-->
|
||||
<HighEntropyVA>true</HighEntropyVA>
|
||||
|
||||
<!-- Only use asset target fallback that we set (not implicit one to net461). -->
|
||||
<!--<DisableImplicitAssetTargetFallback>true</DisableImplicitAssetTargetFallback>-->
|
||||
|
||||
<!-- NU1701: Disable asset target fallback warning globally since it does not work transitively on NoWarn of individual packages -->
|
||||
<!-- Since we disabled the implict fallback to net461, this will only kick in when we have an explicit fallback and we don't need to be warned about it doing what we asked it to do. -->
|
||||
<!-- NU5104: Disable 'A stable release of a package should not have a prerelease dependency' warning globally -->
|
||||
<!-- The "pack" command under 'buildCrossTargeting' for 'Microsoft.DotNet.MSBuildSdkResolver' throws a "NU5104" warning/error while using a "2.1.300" stage0 SDK. For: Linux-x64, Linux-arm, and Linux-arm64 -->
|
||||
<!--<NoWarn>NU1701;NU5104</NoWarn>-->
|
||||
|
||||
<!--<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
|
||||
|
||||
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' AND '$(OS)' == 'Windows_NT' ">true</IncludeWpfAndWinForms>
|
||||
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' ">false</IncludeWpfAndWinForms>-->
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
|
@ -20,20 +20,17 @@ param(
|
|||
[Parameter(Mandatory=$true)][string]$AspNetCoreVersion
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1"
|
||||
$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.."
|
||||
|
||||
function RunCandleForBundle
|
||||
{
|
||||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Output Running candle for bundle..
|
||||
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
|
||||
$AuthWsxRoot = $PSScriptRoot
|
||||
|
||||
.\candle.exe -nologo `
|
||||
-dDotnetSrc="$inputDir" `
|
||||
-dMicrosoftEula="$RepoRoot\packaging\windows\clisdk\dummyeula.rtf" `
|
||||
-dMicrosoftEula="$PSScriptRoot\dummyeula.rtf" `
|
||||
-dProductMoniker="$ProductMoniker" `
|
||||
-dBuildVersion="$DotnetMSIVersion" `
|
||||
-dDisplayVersion="$DotnetCLIDisplayVersion" `
|
||||
|
@ -71,7 +68,7 @@ function RunLightForBundle
|
|||
pushd "$WixRoot"
|
||||
|
||||
Write-Output Running light for bundle..
|
||||
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
|
||||
$AuthWsxRoot = $PSScriptRoot
|
||||
|
||||
.\light.exe -nologo `
|
||||
-cultures:en-us `
|
|
@ -14,10 +14,7 @@ param(
|
|||
[Parameter(Mandatory=$true)][string]$StableFileIdForApphostTransform
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1"
|
||||
$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.."
|
||||
|
||||
$InstallFileswsx = "install-files.wxs"
|
||||
$InstallFileswsx = ".\install-files.wxs"
|
||||
$InstallFilesWixobj = "install-files.wixobj"
|
||||
|
||||
function RunHeat
|
||||
|
@ -25,29 +22,32 @@ function RunHeat
|
|||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Output Running heat..
|
||||
Write-Information "Running heat.."
|
||||
|
||||
# -t $StableFileIdForApphostTransform to avoid sign check baseline apphost.exe name changes every build. Sign check uses File Id in MSI as whitelist name.
|
||||
# Template apphost.exe get a new "File Id" in msi different every time (since File Id is generated according to file
|
||||
# path, and file path has version number)
|
||||
# use XSLT tranform to match the file path contains "AppHostTemplate\apphost.exe" and give it the same ID all the time.
|
||||
|
||||
.\heat.exe dir `"$inputDir`" -template fragment `
|
||||
$heatOutput = .\heat.exe dir `"$inputDir`" -template fragment `
|
||||
-sreg -gg `
|
||||
-var var.DotnetSrc `
|
||||
-cg InstallFiles `
|
||||
-srd `
|
||||
-dr DOTNETHOME `
|
||||
-t $StableFileIdForApphostTransform `
|
||||
-out $InstallFileswsx | Out-Host
|
||||
-out install-files.wxs
|
||||
|
||||
Write-Information "Heat output: $heatOutput"
|
||||
|
||||
if($LastExitCode -ne 0)
|
||||
{
|
||||
$result = $false
|
||||
Write-Output "Heat failed with exit code $LastExitCode."
|
||||
Write-Information "Heat failed with exit code $LastExitCode."
|
||||
}
|
||||
|
||||
popd
|
||||
Write-Information "RunHeat result: $result"
|
||||
return $result
|
||||
}
|
||||
|
||||
|
@ -56,12 +56,11 @@ function RunCandle
|
|||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Output Running candle..
|
||||
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
|
||||
Write-Information "Running candle.."
|
||||
|
||||
.\candle.exe -nologo `
|
||||
$candleOutput = .\candle.exe -nologo `
|
||||
-dDotnetSrc="$inputDir" `
|
||||
-dMicrosoftEula="$RepoRoot\packaging\windows\clisdk\dummyeula.rtf" `
|
||||
-dMicrosoftEula="$PSScriptRoot\clisdk\dummyeula.rtf" `
|
||||
-dProductMoniker="$ProductMoniker" `
|
||||
-dBuildVersion="$DotnetMSIVersion" `
|
||||
-dDisplayVersion="$DotnetCLIDisplayVersion" `
|
||||
|
@ -69,15 +68,17 @@ function RunCandle
|
|||
-dUpgradeCode="$UpgradeCode" `
|
||||
-arch "$Architecture" `
|
||||
-ext WixDependencyExtension.dll `
|
||||
"$AuthWsxRoot\dotnet.wxs" `
|
||||
"$AuthWsxRoot\provider.wxs" `
|
||||
"$AuthWsxRoot\registrykeys.wxs" `
|
||||
$InstallFileswsx | Out-Host
|
||||
"$PSScriptRoot\dotnet.wxs" `
|
||||
"$PSScriptRoot\provider.wxs" `
|
||||
"$PSScriptRoot\registrykeys.wxs" `
|
||||
$InstallFileswsx
|
||||
|
||||
Write-Information "Candle output: $candleOutput"
|
||||
|
||||
if($LastExitCode -ne 0)
|
||||
{
|
||||
$result = $false
|
||||
Write-Output "Candle failed with exit code $LastExitCode."
|
||||
Write-Information "Candle failed with exit code $LastExitCode."
|
||||
}
|
||||
|
||||
popd
|
||||
|
@ -89,26 +90,27 @@ function RunLight
|
|||
$result = $true
|
||||
pushd "$WixRoot"
|
||||
|
||||
Write-Output Running light..
|
||||
Write-Information "Running light.."
|
||||
$CabCache = Join-Path $WixRoot "cabcache"
|
||||
$AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\clisdk"
|
||||
|
||||
.\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
|
||||
$lightOutput = .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension `
|
||||
-cultures:en-us `
|
||||
dotnet.wixobj `
|
||||
provider.wixobj `
|
||||
registrykeys.wixobj `
|
||||
$InstallFilesWixobj `
|
||||
-b "$inputDir" `
|
||||
-b "$AuthWsxRoot" `
|
||||
-b "$PSScriptRoot" `
|
||||
-reusecab `
|
||||
-cc "$CabCache" `
|
||||
-out $DotnetMSIOutput | Out-Host
|
||||
-out $DotnetMSIOutput
|
||||
|
||||
Write-Information "Light output: $lightOutput"
|
||||
|
||||
if($LastExitCode -ne 0)
|
||||
{
|
||||
$result = $false
|
||||
Write-Output "Light failed with exit code $LastExitCode."
|
||||
Write-Information "Light failed with exit code $LastExitCode."
|
||||
}
|
||||
|
||||
popd
|
||||
|
@ -120,7 +122,7 @@ if(!(Test-Path $inputDir))
|
|||
throw "$inputDir not found"
|
||||
}
|
||||
|
||||
Write-Output "Creating dotnet MSI at $DotnetMSIOutput"
|
||||
Write-Information "Creating dotnet MSI at $DotnetMSIOutput"
|
||||
|
||||
if([string]::IsNullOrEmpty($WixRoot))
|
||||
{
|
||||
|
@ -129,16 +131,19 @@ if([string]::IsNullOrEmpty($WixRoot))
|
|||
|
||||
if(-Not (RunHeat))
|
||||
{
|
||||
Write-Information "Heat failed"
|
||||
Exit -1
|
||||
}
|
||||
|
||||
if(-Not (RunCandle))
|
||||
{
|
||||
Write-Information "Candle failed"
|
||||
Exit -1
|
||||
}
|
||||
|
||||
if(-Not (RunLight))
|
||||
{
|
||||
Write-Information "Light failed"
|
||||
Exit -1
|
||||
}
|
||||
|
||||
|
@ -148,6 +153,6 @@ if(!(Test-Path $DotnetMSIOutput))
|
|||
Exit -1
|
||||
}
|
||||
|
||||
Write-Output -ForegroundColor Green "Successfully created dotnet MSI - $DotnetMSIOutput"
|
||||
Write-Information -ForegroundColor Green "Successfully created dotnet MSI - $DotnetMSIOutput"
|
||||
|
||||
exit $LastExitCode
|
Loading…
Add table
Reference in a new issue