2016-06-28 01:26:57 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<Target Name="MsiTargetsSetupInputOutputs" DependsOnTargets="Init">
|
|
|
|
<!-- AcquireWix Properties -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<WixVersion>3.10.2</WixVersion>
|
2016-07-15 19:36:01 +00:00
|
|
|
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/wix.$(WixVersion).zip</WixDownloadUrl>
|
2016-06-28 01:26:57 +00:00
|
|
|
<WixRoot>$(IntermediateDirectory)/WixTools/$(WixVersion)</WixRoot>
|
|
|
|
<WixDestinationPath>$(WixRoot)/WixTools.$(WixVersion).zip</WixDestinationPath>
|
|
|
|
<WixDownloadSentinel>$(WixRoot)/WixDownload.$(WixVersion).sentinel</WixDownloadSentinel>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Generate MSI/Bundle Properties -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
|
|
|
|
|
|
|
<CombinedFrameworkSdkHostBundleEngineName>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-engine.exe</CombinedFrameworkSdkHostBundleEngineName>
|
|
|
|
|
|
|
|
<SdkGenerateMsiPowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatemsi.ps1</SdkGenerateMsiPowershellScript>
|
|
|
|
<SdkGenerateBundlePowershellScript>$(RepoRoot)/packaging/windows/clisdk/generatebundle.ps1</SdkGenerateBundlePowershellScript>
|
|
|
|
|
|
|
|
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
|
|
|
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Consumed By Publish -->
|
|
|
|
<ItemGroup>
|
|
|
|
<GeneratedInstallers Include="$(SdkInstallerFile);$(CombinedFrameworkSdkHostInstallerFile)" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<GenerateGuidFromName Name="$(SdkInstallerFile)">
|
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
PropertyName="SdkInstallerUpgradeCode" />
|
|
|
|
</GenerateGuidFromName>
|
|
|
|
|
|
|
|
<GenerateGuidFromName Name="$(CombinedFrameworkSdkHostInstallerFile)">
|
|
|
|
<Output TaskParameter="OutputGuid"
|
|
|
|
PropertyName="CombinedFrameworkSDKHostInstallerUpgradeCode" />
|
|
|
|
</GenerateGuidFromName>
|
|
|
|
|
|
|
|
<!-- Test Sdk MSI Properties -->
|
|
|
|
<PropertyGroup>
|
|
|
|
<SdkTestMsiPowershellScript>$(RepoRoot)/test/Installer/testmsi.ps1</SdkTestMsiPowershellScript>
|
|
|
|
<SdkMsiTestedSentinel>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk).MsiTested.sentinel</SdkMsiTestedSentinel>
|
|
|
|
</PropertyGroup>
|
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="AcquireWix"
|
2016-06-28 01:26:57 +00:00
|
|
|
DependsOnTargets="Init;MsiTargetsSetupInputOutputs"
|
|
|
|
Inputs="$(WixDownloadSentinel)"
|
|
|
|
Outputs="$(WixDestinationPath)">
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<!-- Setup sentinel to take advantage of incrementality -->
|
|
|
|
<MakeDir Directories="$(WixRoot)" />
|
|
|
|
<WriteLinesToFile
|
|
|
|
File="$(WixDownloadSentinel)"
|
|
|
|
Lines="$(WixVersion)"
|
|
|
|
Overwrite="true"
|
|
|
|
Encoding="Unicode"/>
|
2016-07-26 04:29:59 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<DownloadFile
|
|
|
|
Uri="$(WixDownloadUrl)"
|
|
|
|
DestinationPath="$(WixDestinationPath)"
|
|
|
|
Overwrite="false" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<ZipFileExtractToDirectory
|
|
|
|
SourceArchive="$(WixDestinationPath)"
|
2016-06-29 23:21:46 +00:00
|
|
|
DestinationDirectory="$(WixRoot)" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateSdkMsi"
|
|
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
|
|
Inputs="$(SdkLayoutOutputDirectory);
|
|
|
|
$(SdkGenerateMsiPowershellScript)"
|
|
|
|
Outputs="$(SdkInstallerFile)">
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateMsiPowershellScript)
|
|
|
|
'$(SdkLayoutOutputDirectory)'
|
|
|
|
'$(SdkInstallerFile)'
|
|
|
|
'$(WixRoot)'
|
|
|
|
'$(SdkBrandName)'
|
|
|
|
'$(MsiVersion)'
|
|
|
|
'$(SimpleVersion)'
|
|
|
|
'$(NugetVersion)'
|
|
|
|
'$(SdkInstallerUpgradeCode)'
|
|
|
|
'$(Architecture)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="GenerateSdkBundle"
|
|
|
|
DependsOnTargets="Init;Layout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'"
|
|
|
|
Inputs="$(SdkInstallerFile);
|
|
|
|
$(DownloadedSharedFrameworkInstallerFile);
|
|
|
|
$(DownloadedHostFxrInstallerFile);
|
|
|
|
$(DownloadedSharedHostInstallerFile);
|
|
|
|
$(SdkGenerateBundlePowershellScript)"
|
|
|
|
Outputs="$(CombinedFrameworkSdkHostInstallerFile)">
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
|
|
|
|
'$(SdkInstallerFile)'
|
|
|
|
'$(DownloadedSharedFrameworkInstallerFile)'
|
|
|
|
'$(DownloadedHostFxrInstallerFile)'
|
|
|
|
'$(DownloadedSharedHostInstallerFile)'
|
|
|
|
'$(CombinedFrameworkSdkHostInstallerFile)'
|
|
|
|
'$(WixRoot)'
|
|
|
|
'$(SdkBrandName)'
|
|
|
|
'$(MsiVersion)'
|
|
|
|
'$(SimpleVersion)'
|
|
|
|
'$(NugetVersion)'
|
|
|
|
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)'
|
|
|
|
'$(Architecture)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="TestSdkMsi"
|
2016-06-28 01:26:57 +00:00
|
|
|
Inputs="$(SdkInstallerFile)"
|
|
|
|
Outputs="$(SdkMsiTestedSentinel)"
|
|
|
|
DependsOnTargets="Init;MsiTargetsSetupInputOutputs;GenerateSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'" >
|
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<Exec Command ="powershell -NoProfile -NoLogo $(SdkTestMsiPowershellScript)
|
|
|
|
-InputMsi '$(SdkInstallerFile)'
|
|
|
|
-DotnetDir '$(OutputDirectory)'" />
|
2016-06-28 01:26:57 +00:00
|
|
|
|
2016-06-29 23:21:46 +00:00
|
|
|
<WriteLinesToFile
|
|
|
|
File="$(SdkMsiTestedSentinel)"
|
|
|
|
Lines="$(SdkVersion)"
|
|
|
|
Overwrite="true"
|
|
|
|
Encoding="Unicode"/>
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<Target Name="GenerateMsis"
|
2016-06-28 01:26:57 +00:00
|
|
|
DependsOnTargets="Init;
|
|
|
|
Layout;
|
|
|
|
MsiTargetsSetupInputOutputs;
|
|
|
|
AcquireWix;
|
|
|
|
GenerateSdkMsi;
|
|
|
|
GenerateSdkBundle;
|
|
|
|
TestSdkMsi"
|
|
|
|
Condition=" '$(OS)' == 'Windows_NT'" />
|
|
|
|
|
|
|
|
<!-- These targets are used in signing, don't remove them! -->
|
2016-08-02 06:22:39 +00:00
|
|
|
<Target Name="ExtractEngineFromSdkBundle"
|
|
|
|
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
2016-07-26 04:29:59 +00:00
|
|
|
<Exec Command="$(WixRoot)/insignia.exe
|
|
|
|
-ib $(CombinedFrameworkSdkHostInstallerFile)
|
2016-06-29 23:21:46 +00:00
|
|
|
-o $(CombinedFrameworkSdkHostBundleEngineName)" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
|
2016-08-02 06:22:39 +00:00
|
|
|
<Target Name="ReattachEngineToSdkBundle"
|
|
|
|
DependsOnTargets="MsiTargetsSetupInputOutputs">
|
2016-07-26 04:29:59 +00:00
|
|
|
<Exec Command="$(WixRoot)/insignia.exe
|
|
|
|
-ab $(CombinedFrameworkSdkHostInstallerFile)
|
2016-06-29 23:21:46 +00:00
|
|
|
-o $(CombinedFrameworkSdkHostBundleEngineName)" />
|
2016-06-28 01:26:57 +00:00
|
|
|
</Target>
|
|
|
|
</Project>
|