Skip to content

Commit

Permalink
wip skia+wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Jun 28, 2024
1 parent 0fca432 commit 4fb8569
Show file tree
Hide file tree
Showing 17 changed files with 209 additions and 227 deletions.
27 changes: 14 additions & 13 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<Project>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<!--
<!--
Adding NoWarn to remove build warnings
NU1507: Warning when there are multiple package sources when using CPM with no source mapping
NETSDK1201: Warning that specifying RID won't create self containing app
PRI257: Ignore default language (en) not being one of the included resources (eg en-us, en-uk)
-->
<NoWarn>$(NoWarn);NU1507;NETSDK1201;PRI257</NoWarn>
</PropertyGroup>
<NoWarn>$(NoWarn);NU1507;NETSDK1201;PRI257</NoWarn>
</PropertyGroup>

<PropertyGroup>
<UnoExtensionsVersion>4.1.14</UnoExtensionsVersion>
<UnoToolkitVersion>6.0.18</UnoToolkitVersion>
<UnoThemesVersion>5.0.13</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.2.13</UnoCSharpMarkupVersion>
</PropertyGroup>
<PropertyGroup>
<UnoExtensionsVersion>4.1.14</UnoExtensionsVersion>
<UnoToolkitVersion>6.0.18</UnoToolkitVersion>
<UnoThemesVersion>5.0.13</UnoThemesVersion>
<UnoCSharpMarkupVersion>5.2.13</UnoCSharpMarkupVersion>
<UnoWasmBootstrapVersion>9.0.0-dev.96</UnoWasmBootstrapVersion>
</PropertyGroup>
</Project>
6 changes: 2 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="SkiaSharp.Skottie" Version="2.88.8" />
<PackageVersion Include="Uno.Core" Version="4.1.1" />
<PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.70" />
<PackageVersion Include="Xamarin.UITest" Version="4.3.4" />

<PackageVersion Include="Uno.ShowMeTheXAML" Version="2.0.0-dev0015" />
<PackageVersion Include="Uno.ShowMeTheXAML.MSBuild" Version="2.0.0-dev0015" />

<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls" Version="7.1.200" />
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.200" />
<PackageVersion Include="CommunityToolkit.WinUI.Lottie" Version="8.0.280225" />
Expand All @@ -28,12 +28,10 @@
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.ILLink.Tasks" Version="8.0.100-1.23067.1" />
<PackageVersion Include="Microsoft.TypeScript.Compiler" Version="3.1.5" />
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="4.6.4" />
<PackageVersion Include="NunitXml.TestLogger" Version="3.0.131" />
<PackageVersion Include="nventive.Nimue.Application.Packaging" Version="0.1.0-alpha.58" />
<PackageVersion Include="Xamarin.TestCloud.Agent" Version="0.23.2" />

</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ public static string CurrentFragment
{
get
{
return NativeMethods.GetCurrentFragment();
return ""; // NativeMethods.GetCurrentFragment();
}

set
{
var escaped = WebAssemblyRuntime.EscapeJs(value);
NativeMethods.SetCurrentFragment(escaped);
//var escaped = WebAssemblyRuntime.EscapeJs(value);
//NativeMethods.SetCurrentFragment(escaped);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Uno.Gallery/Platforms/WebAssembly/LinkerConfig.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<linker>
<assembly fullname="Gallery" />
<assembly fullname="Uno.Gallery" />

<!--
Uncomment this section when using JSON.NET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ internal static partial class NativeMethods

[JSImport($"{JsType}.setCurrentLocationHref")]
internal static partial string SetCurrentLocationHref(string locationHref);
}
}
}
}
18 changes: 7 additions & 11 deletions Uno.Gallery/Platforms/WebAssembly/Program.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
namespace Uno.Gallery;

using Uno.UI.Runtime.Skia.WebAssembly.Browser;
using Uno.UI.Xaml.Media;

public class Program
{
private static App? _app;

public static int Main(string[] args)
{
// Ask the browser to preload these fonts to avoid relayouting content
FontFamilyHelper.PreloadAsync("Symbols");

Microsoft.UI.Xaml.Application.Start(_ => _app = new App());

return 0;
}
public static async Task Main(string[] args)
{
var host = new PlatformHost(() => new App());
await host.Run();
}
}
31 changes: 0 additions & 31 deletions Uno.Gallery/Platforms/WebAssembly/WasmScripts/UnoGallery.d.ts

This file was deleted.

146 changes: 0 additions & 146 deletions Uno.Gallery/Platforms/WebAssembly/WasmScripts/UnoGallery.js

This file was deleted.

53 changes: 53 additions & 0 deletions Uno.Gallery/Platforms/WebAssembly/ts/FragmentNavigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4fb8569

Please sign in to comment.