Skip to content

Commit

Permalink
Here goes nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
lewing committed Aug 1, 2022
1 parent 900bf4d commit 22ae3bd
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 13 deletions.
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
<WorkloadSdkBandVersion>7.0.100</WorkloadSdkBandVersion>
<EmscriptenVersion>3.1.12</EmscriptenVersion>
<EmscriptenVersionNet6>2.1.13</EmscriptenVersionNet6>
<PackageVersionNet6>6.0.8</PackageVersionNet6>
</PropertyGroup>
<PropertyGroup>
<MicrosoftDotNetBuildTasksPackagingVersion>7.0.0-beta.22372.1</MicrosoftDotNetBuildTasksPackagingVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<!-- Override the id to include the sdk band as per the workload installer spec -->
<PropertyGroup>
<Id>Microsoft.NET.Workload.Emscripten.Manifest-$(WorkloadSdkBandVersion)</Id>
<Id>Microsoft.NET.Workload.Emscripten.Manifest.net6-$(WorkloadSdkBandVersion)</Id>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -34,8 +34,8 @@

<ItemGroup>
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(EmscriptenVersion)" />
<_WorkloadManifestValues Include="PackageVersionNet6" Value="$(PackageVersionNet6)" />
<_WorkloadManifestValues Include="EmscriptenVersionNet6" Value="$(EmscriptenVersionNet6)" />
</ItemGroup>

<GenerateFileFromTemplate
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"version": "${WorkloadVersion}",
"workloads": {
"microsoft-net-sdk-emscripten-net6": {
"abstract": true,
"description": "Emscripten SDK compiler tooling",
"packs": [
"Microsoft.NET.Runtime.Emscripten.Node.net6",
"Microsoft.NET.Runtime.Emscripten.Python.net6",
"Microsoft.NET.Runtime.Emscripten.Sdk.net"
],
"platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ]
}
},
"packs": {
"Microsoft.NET.Runtime.Emscripten.Node.net6" : {
"version": "${PacakgeVersionNet6}",
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Node.win-x64",
"linux-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Node.linux-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Node.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Node.osx-x64"
}
},
"Microsoft.NET.Runtime.Emscripten.Python.net6" : {
"kind": "Sdk",
"version": "${PacakgeVersionNet6}",
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Python.win-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Python.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Python.osx-x64"
}
},
"Microsoft.NET.Runtime.Emscripten.Sdk.net6" : {
"kind": "Sdk",
"version": "${PacakgeVersionNet6}",
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Sdk.win-x64",
"linux-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Sdk.linux-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Sdk.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersionNet6}.Sdk.osx-x64"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFrameworkVersion)' == '6.0'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net6" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net6" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net6" />
</ImportGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Project DefaultTargets="Build">
<Import Project="$(RepoRoot)\Directory.Build.props" />

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.props" />
<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.templating\$(MicrosoftDotNetBuildTasksTemplatingVersion)\build\Microsoft.DotNet.Build.Tasks.Templating.props" />
<Import Project="$([MSBuild]::GetPathOfFileAbove(Microsoft.NET.Runtime.Emscripten.Common.props))" />

<PropertyGroup>
<PackageDescription>Internal toolchain package not meant for direct consumption. Please do not reference directly.</PackageDescription>
<Description>Internal toolchain package not meant for direct consumption. Please do not reference directly.</Description>
</PropertyGroup>

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles" Returns="@(PackageFile)">
<!-- Override the id to include the sdk band as per the workload installer spec -->
<PropertyGroup>
<Id>Microsoft.NET.Workload.Emscripten.Manifest.net7-$(WorkloadSdkBandVersion)</Id>
</PropertyGroup>

<PropertyGroup>
<WorkloadManifestPath>$(IntermediateOutputPath)WorkloadManifest.json</WorkloadManifestPath>
</PropertyGroup>

<ItemGroup>
<PackageFile Include="$(WorkloadManifestPath)" TargetPath="data" />
<PackageFile Include="WorkloadManifest.targets" TargetPath="data" />
</ItemGroup>
</Target>

<!-- Running this target ensures we have the fully evaluated PackageVersion -->
<Target Name="_WriteManifestValues" AfterTargets="CalculatePackageVersion">
<PropertyGroup>
<PackagePathVersion>PackageVersion=$(PackageVersion);</PackagePathVersion>
</PropertyGroup>

<ItemGroup>
<_WorkloadManifestValues Include="WorkloadVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="PackageVersion" Value="$(PackageVersion)" />
<_WorkloadManifestValues Include="EmscriptenVersion" Value="$(EmscriptenVersion)" />
</ItemGroup>

<GenerateFileFromTemplate
TemplateFile="WorkloadManifest.json.in"
Properties="@(_WorkloadManifestValues->'%(Identity)=%(Value)')"
OutputPath="$(WorkloadManifestPath)" />
</Target>

<Import Project="$(NuGetPackageRoot)\microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\build\Microsoft.DotNet.Build.Tasks.Packaging.targets" />
<Import Project="$(RepoRoot)\Directory.Build.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "${WorkloadVersion}",
"workloads": {
"microsoft-net-sdk-emscripten": {
"microsoft-net-sdk-emscripten-net7": {
"abstract": true,
"description": "Emscripten SDK compiler tooling",
"packs": [
Expand All @@ -13,17 +13,15 @@
}
},
"packs": {
"Microsoft.NET.Runtime.Emscripten.Node" : {
"kind": "Sdk",
"version": "${PackageVersion}",
"Microsoft.NET.Runtime.Emscripten.Node.net7" : {
"alias-to": {
"win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.win-x64",
"linux-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.linux-x64",
"osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.osx-x64",
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Node.osx-x64"
}
},
"Microsoft.NET.Runtime.Emscripten.Python" : {
"Microsoft.NET.Runtime.Emscripten.Python.net7" : {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
Expand All @@ -32,7 +30,7 @@
"osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Python.osx-x64"
}
},
"Microsoft.NET.Runtime.Emscripten.Sdk" : {
"Microsoft.NET.Runtime.Emscripten.Sdk.net7" : {
"kind": "Sdk",
"version": "${PackageVersion}",
"alias-to": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<WasmNativeWorkload>false</WasmNativeWorkload>
</PropertyGroup>

<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk" />
<ImportGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(UsingBrowserRuntimeWorkload)' == 'true' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(TargetFrameworkVersion)' == '7.0'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python.net7" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node.net7" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk.net7" />
</ImportGroup>
</Project>

0 comments on commit 22ae3bd

Please sign in to comment.