|
17 | 17 | </PropertyGroup>
|
18 | 18 |
|
19 | 19 | <ItemGroup>
|
20 |
| - <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj" SetPlatform="Platform=x86" /> |
21 |
| - <ProjectReference Include="..\SharedFrameworkLib\SharedFrameworkLib.wixproj" SetPlatform="Platform=x64" /> |
| 20 | + <ProjectReference Include="..\SharedFrameworkBundle\SharedFrameworkBundle.wixproj" /> |
22 | 21 | <WixExtension Include="WixUtilExtension">
|
23 | 22 | <HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
24 | 23 | <Name>WixUtilExtension</Name>
|
|
40 | 39 | <Import Project="Product.targets" />
|
41 | 40 |
|
42 | 41 | <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
| 42 | + |
| 43 | + <PropertyGroup> |
| 44 | + <SharedFxPackageVersion>$(PackageVersion)</SharedFxPackageVersion> |
| 45 | + <SharedFxMsiVersion>$(PackageVersion)</SharedFxMsiVersion> |
| 46 | + <SharedFxMsiVersion |
| 47 | + Condition="! $(PackageVersion.Contains('$(_PreReleaseLabel)'))">$(PackageVersion)-$(_PreReleaseLabel)$(_BuildNumberLabels)</SharedFxMsiVersion> |
| 48 | + </PropertyGroup> |
| 49 | + |
| 50 | + <ItemGroup> |
| 51 | + <SharedFxInstallers Include="$(OutputPath)$(RuntimeInstallerBaseName)-$(SharedFxPackageVersion)-win-x64.exe"> |
| 52 | + <TargetPlatform>x64</TargetPlatform> |
| 53 | + <BundleNameProperty>SharedFxRedistInstallerx64</BundleNameProperty> |
| 54 | + <Version>$(SharedFxPackageVersion)</Version> |
| 55 | + </SharedFxInstallers> |
| 56 | + <SharedFxInstallers Include="$(OutputPath)$(RuntimeInstallerBaseName)-$(SharedFxPackageVersion)-win-x86.exe"> |
| 57 | + <TargetPlatform>x86</TargetPlatform> |
| 58 | + <BundleNameProperty>SharedFxRedistInstallerx86</BundleNameProperty> |
| 59 | + <Version>$(SharedFxPackageVersion)</Version> |
| 60 | + </SharedFxInstallers> |
| 61 | + </ItemGroup> |
| 62 | + |
| 63 | + <Target Name="ExtractPropertiesFromSharedFxMsi" DependsOnTargets="FetchDependencies" AfterTargets="ResolveProjectReferences"> |
| 64 | + <!-- Create properties that holds the executable name. These are passed to the bundles so we can reference them as variables |
| 65 | + from inside the ExePackage authoring. --> |
| 66 | + <CreateProperty Value="%(SharedFxInstallers.Filename)%(Extension)"> |
| 67 | + <Output TaskParameter="Value" PropertyName="%(SharedFxInstallers.BundleNameProperty)"/> |
| 68 | + </CreateProperty> |
| 69 | + |
| 70 | + <ItemGroup> |
| 71 | + <SharedFxPayload Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-x64.msi"> |
| 72 | + <ProductVersionProperty>SharedFxInstallerProductVersionx64</ProductVersionProperty> |
| 73 | + <ProductCodeProperty>SharedFxInstallerProductCodex64</ProductCodeProperty> |
| 74 | + </SharedFxPayload> |
| 75 | + <SharedFxPayload Include="$(InstallersOutputPath)$(RuntimeInstallerBaseName)-$(SharedFxMsiVersion)-win-x86.msi"> |
| 76 | + <ProductVersionProperty>SharedFxInstallerProductVersionx86</ProductVersionProperty> |
| 77 | + <ProductCodeProperty>SharedFxInstallerProductCodex86</ProductCodeProperty> |
| 78 | + </SharedFxPayload> |
| 79 | + </ItemGroup> |
| 80 | + |
| 81 | + <!-- Read MSI properties --> |
| 82 | + <GetMsiProperty InstallPackage="%(SharedFxPayload.Identity)" Property="ProductVersion"> |
| 83 | + <Output TaskParameter="Value" PropertyName="%(ProductVersionProperty)" /> |
| 84 | + </GetMsiProperty> |
| 85 | + <GetMsiProperty InstallPackage="%(SharedFxPayload.Identity)" Property="ProductCode"> |
| 86 | + <Output TaskParameter="Value" PropertyName="%(ProductCodeProperty)" /> |
| 87 | + </GetMsiProperty> |
| 88 | + |
| 89 | + <PropertyGroup> |
| 90 | + <DefineConstants>$(DefineConstants);SharedFxRedistInstallerx64=$(SharedFxRedistInstallerx64)</DefineConstants> |
| 91 | + <DefineConstants>$(DefineConstants);SharedFxInstallerProductVersionx64=$(SharedFxInstallerProductVersionx64)</DefineConstants> |
| 92 | + <DefineConstants>$(DefineConstants);SharedFxInstallerProductCodex64=$(SharedFxInstallerProductCodex64)</DefineConstants> |
| 93 | + <DefineConstants>$(DefineConstants);SharedFxRedistInstallerx86=$(SharedFxRedistInstallerx86)</DefineConstants> |
| 94 | + <DefineConstants>$(DefineConstants);SharedFxInstallerProductVersionx86=$(SharedFxInstallerProductVersionx86)</DefineConstants> |
| 95 | + <DefineConstants>$(DefineConstants);SharedFxInstallerProductCodex86=$(SharedFxInstallerProductCodex86)</DefineConstants> |
| 96 | + </PropertyGroup> |
| 97 | + </Target> |
43 | 98 | </Project>
|
0 commit comments