Skip to content

Commit

Permalink
chore: Adjust for skia issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Nov 1, 2024
1 parent 03eafec commit de87af5
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/azure-static-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
Expand Down
Binary file modified Uno.Gallery/Platforms/WebAssembly/aot-uitests.profile
Binary file not shown.
Binary file modified Uno.Gallery/Platforms/WebAssembly/aot.profile
Binary file not shown.
53 changes: 53 additions & 0 deletions Uno.Gallery/Uno.Gallery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@
<PackageReference Include="Xamarin.TestCloud.Agent" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0-browserwasm' ">
<WasmShellWebAppBasePath>/</WasmShellWebAppBasePath>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0-browserwasm' AND '$(Configuration)' == 'Release' ">
<WasmShellMonoRuntimeExecutionMode>InterpreterAndAOT</WasmShellMonoRuntimeExecutionMode>
<WasmShellEmccLinkOptimization>false</WasmShellEmccLinkOptimization>
<WasmShellEnableEmccProfiling>true</WasmShellEnableEmccProfiling>
<UnoXamlResourcesTrimming>true</UnoXamlResourcesTrimming>
<WasmShellObfuscateAssemblies>true</WasmShellObfuscateAssemblies>

<!--
Uncomment this block to generate a profile
-->
<WasmShellGenerateAOTProfile>true</WasmShellGenerateAOTProfile>
<WasmShellILLinkerEnabled>false</WasmShellILLinkerEnabled>
<UnoXamlResourcesTrimming>false</UnoXamlResourcesTrimming>
<WasmShellEnableJiterpreter>false</WasmShellEnableJiterpreter>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release' and '$(System_PullRequest_IsFork)'!='True' and '$(TargetFramework)'=='net9.0-maccatalyst'">
<MtouchUseLlvm>true</MtouchUseLlvm>
<CodeSigningKey>Apple Distribution: Uno Platform Inc. (PD74CHS9Z5)</CodeSigningKey>
Expand Down Expand Up @@ -129,7 +149,40 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

<EmbeddedResource Include="Platforms\WebAssembly\WasmScripts\UnoGallery.js" />

<ConfigFiles Include="Platforms\WebAssembly\tsconfig.json" />

<WasmShellMonoEnvironment Include="MONO_GC_PARAMS" Value="soft-heap-limit=512m,nursery-size=64m,evacuation-threshold=66,major=marksweep" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release' and '$(WasmShellMonoRuntimeExecutionMode)'=='InterpreterAndAOT'">
<WasmAotFileName Condition="'$(IsUiAutomationMappingEnabled)'==''">aot.profile</WasmAotFileName>

<!--
Use smaller profile for UI tests to avoid the browser's memory
use to go higher than the Ci agent's availability
-->

<WasmAotFileName Condition="'$(IsUiAutomationMappingEnabled)'=='True'">aot-uitests.profile</WasmAotFileName>
</PropertyGroup>


<!-- https://github.com/dotnet/runtime/issues/109289 -->
<Target Name="Issue109289_Workaround" AfterTargets="_BrowserWasmWriteRspForLinking" Condition=" $(NETCoreSdkVersion.Contains('rc.2')) ">
<ItemGroup>
<_WasmLinkStepArgs Remove="@(_EmccLinkStepArgs)" />
<_EmccLinkStepArgs Remove="&quot;%(_WasmNativeFileForLinking.Identity)&quot;" />
<_WasmLinkDependencies Remove="@(_WasmNativeFileForLinking)" />

<_SkiaSharpToReorder Include="@(_WasmNativeFileForLinking)" Condition="$([System.String]::Copy('%(FullPath)').Contains('SkiaSharp'))" />
<_WasmNativeFileForLinking Remove="@(_SkiaSharpToReorder)" />
<_WasmNativeFileForLinking Include="@(_SkiaSharpToReorder)" />

<_EmccLinkStepArgs Include="&quot;%(_WasmNativeFileForLinking.Identity)&quot;" />
<_WasmLinkDependencies Include="@(_WasmNativeFileForLinking)" />
<_WasmLinkStepArgs Include="@(_EmccLinkStepArgs)" />
</ItemGroup>
</Target>
</Project>

0 comments on commit de87af5

Please sign in to comment.