|
| 1 | +<Project> |
| 2 | + <Target Name="FetchSatori" AfterTargets="ResolveRuntimePackAssets"> |
| 3 | + <DownloadFile |
| 4 | + SourceUrl="https://github.com/files-community/Satori/releases/latest/download/windows_$(Platform).zip" |
| 5 | + DestinationFolder="$(IntermediateOutputPath)$([System.Guid]::NewGuid().ToString('N'))" |
| 6 | + Retries="3"> |
| 7 | + <Output TaskParameter="DownloadedFile" ItemName="SatoriArchive" /> |
| 8 | + </DownloadFile> |
| 9 | + </Target> |
| 10 | + |
| 11 | + <Target Name="ExtractSatori" AfterTargets="FetchSatori" DependsOnTargets="FetchSatori"> |
| 12 | + <Unzip |
| 13 | + SourceFiles="@(SatoriArchive)" |
| 14 | + DestinationFolder="$(IntermediateOutputPath)Satori" |
| 15 | + OverwriteReadOnlyFiles="true" |
| 16 | + /> |
| 17 | + <Delete Files="@(SatoriArchive)" /> |
| 18 | + </Target> |
| 19 | + |
| 20 | + <Target Name="IncludeSatoriInRuntimePackAssets" AfterTargets="ExtractSatori" DependsOnTargets="ExtractSatori"> |
| 21 | + <ItemGroup> |
| 22 | + <RuntimePackAsset Remove="@(RuntimePackAsset)" |
| 23 | + Condition=" '%(RuntimePackAsset.Filename)' == 'coreclr' |
| 24 | + Or '%(RuntimePackAsset.Filename)' == 'clrjit' |
| 25 | + Or '%(RuntimePackAsset.Filename)' == 'System.Private.CoreLib' " /> |
| 26 | + |
| 27 | + <SatoriRuntimePackAsset Include="$(IntermediateOutputPath)Satori\System.Private.CoreLib.dll"> |
| 28 | + <AssetType>runtime</AssetType> |
| 29 | + </SatoriRuntimePackAsset> |
| 30 | + <SatoriRuntimePackAsset Include="$(IntermediateOutputPath)Satori\clrjit.dll;$(IntermediateOutputPath)Satori\coreclr.dll"> |
| 31 | + <AssetType>native</AssetType> |
| 32 | + <DropFromSingleFile>true</DropFromSingleFile> |
| 33 | + </SatoriRuntimePackAsset> |
| 34 | + <RuntimePackAsset Include="@(SatoriRuntimePackAsset)"> |
| 35 | + <DestinationSubPath>%(Filename)%(Extension)</DestinationSubPath> |
| 36 | + <RuntimeIdentifier>$(RuntimeIdentifier)</RuntimeIdentifier> |
| 37 | + <CopyLocal>true</CopyLocal> |
| 38 | + <NuGetPackageId>Microsoft.NETCore.App.Runtime.win-x64</NuGetPackageId> |
| 39 | + <FileVersion>42.42.42.42424</FileVersion> |
| 40 | + <NuGetPackageVersion>42.42.42.42424</NuGetPackageVersion> |
| 41 | + </RuntimePackAsset> |
| 42 | + </ItemGroup> |
| 43 | + </Target> |
| 44 | +</Project> |
0 commit comments