From 8054b898fcb812bf2b08a3ee43a20fd0afe0e20e Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Tue, 13 Mar 2018 14:44:35 -0700 Subject: [PATCH] Add Ooui.Wasm package --- .gitignore | 13 ++------ Ooui.Wasm/Makefile | 11 ++----- Ooui.Wasm/Ooui.Wasm.nuspec | 26 ++++++++++++++++ Ooui.Wasm/Ooui.Wasm.targets | 22 ++++++++++++++ Ooui.Wasm/README.md | 26 ---------------- Ooui.Wasm/ooui-sample.cs | 38 ----------------------- Ooui.Wasm/ooui-sample.html | 60 ------------------------------------- 7 files changed, 53 insertions(+), 143 deletions(-) create mode 100644 Ooui.Wasm/Ooui.Wasm.nuspec create mode 100644 Ooui.Wasm/Ooui.Wasm.targets delete mode 100644 Ooui.Wasm/README.md delete mode 100644 Ooui.Wasm/ooui-sample.cs delete mode 100644 Ooui.Wasm/ooui-sample.html diff --git a/.gitignore b/.gitignore index 0be966e..d2a542c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,8 @@ # Wasm SDK -/Ooui.Wasm/bcl -/Ooui.Wasm/debug -/Ooui.Wasm/release -/Ooui.Wasm/managed -/Ooui.Wasm/driver.c -/Ooui.Wasm/mono.js -/Ooui.Wasm/ooui.js -/Ooui.Wasm/server.py -/Ooui.Wasm/sample* -/Ooui.Wasm/lib* -/Ooui.Wasm/*.w* +/Ooui.Wasm/*.nupkg /Ooui.Wasm.Test +/Ooui.Wasm.Old # Social media files /Media diff --git a/Ooui.Wasm/Makefile b/Ooui.Wasm/Makefile index 7151ccf..f5fedc5 100644 --- a/Ooui.Wasm/Makefile +++ b/Ooui.Wasm/Makefile @@ -1,9 +1,4 @@ - all: - msbuild /t:Restore ../Ooui.Forms/Ooui.Forms.csproj - msbuild ../Ooui.Forms/Ooui.Forms.csproj - cp ../Ooui.Forms/bin/Debug/netstandard1.0/Ooui.Forms.dll managed/ - cp ../Ooui/bin/Debug/netstandard1.0/Ooui.dll managed/ - csc /nostdlib /target:library \ - /r:managed/mscorlib.dll /r:managed/System.Runtime.dll /r:managed/Xamarin.Forms.Core.dll /r:managed/Xamarin.Forms.Xaml.dll /r:managed/Ooui.dll /r:managed/Ooui.Forms.dll \ - /out:managed/Ooui.Sample.dll ../Samples/ISample.cs ../Samples/XamlPreviewPageSample.cs ooui-sample.cs + msbuild /p:Configuration=Release /t:Restore ../Ooui.Wasm.Build.Tasks/Ooui.Wasm.Build.Tasks.csproj + msbuild /p:Configuration=Release ../Ooui.Wasm.Build.Tasks/Ooui.Wasm.Build.Tasks.csproj + nuget pack diff --git a/Ooui.Wasm/Ooui.Wasm.nuspec b/Ooui.Wasm/Ooui.Wasm.nuspec new file mode 100644 index 0000000..dff5611 --- /dev/null +++ b/Ooui.Wasm/Ooui.Wasm.nuspec @@ -0,0 +1,26 @@ + + + + Ooui.Wasm + 1.0.0 + Ooui.Wasm + praeclarum + praeclarum + https://github.com/praeclarum/Ooui/blob/master/LICENSE + https://github.com/praeclarum/Ooui + https://github.com/praeclarum/Ooui/raw/master/Documentation/Icon.png + false + WebAssembly support for Ooui apps + Copyright 2018 Frank A. Krueger + Ooui UI CrossPlatform Xamarin.Forms + + + + + + + + + + + diff --git a/Ooui.Wasm/Ooui.Wasm.targets b/Ooui.Wasm/Ooui.Wasm.targets new file mode 100644 index 0000000..ebeee45 --- /dev/null +++ b/Ooui.Wasm/Ooui.Wasm.targets @@ -0,0 +1,22 @@ + + + + + + + + $(CompileDependsOn); + BuildDist; + + + + + + <_BuildDistAlreadyExecuted>true + + + + + diff --git a/Ooui.Wasm/README.md b/Ooui.Wasm/README.md deleted file mode 100644 index 5bdc6b9..0000000 --- a/Ooui.Wasm/README.md +++ /dev/null @@ -1,26 +0,0 @@ - -## Install - -Download [Mono WebAssembly support on Jenkins](https://jenkins.mono-project.com//job/test-mono-mainline-webassembly/) by -grabbing the latest build's Azure Artifact. - -[mono-wasm-03914603a3b.zip](https://jenkins.mono-project.com/job/test-mono-mainline-webassembly/71/label=highsierra/Azure/processDownloadRequest/71/highsierra/sdks/wasm/mono-wasm-03914603a3b.zip) - -Expand that into this directory. - - - -## Build - -```bash -csc /nostdlib /target:library /r:managed/mscorlib.dll /r:managed/System.Runtime.dll /r:managed/Xamarin.Forms.Core.dll /r:managed/Ooui.dll /r:managed/Ooui.Forms.dll /out:managed/Ooui.Sample.dll ../Samples/ISample.cs ../Samples/BoxViewClockSample.cs ooui-sample.cs -``` - - -## Run - -```bash -python server.py -``` - -Go to [locahost:8000/ooui-sample.html](http://locahost:8000/ooui-sample.html) diff --git a/Ooui.Wasm/ooui-sample.cs b/Ooui.Wasm/ooui-sample.cs deleted file mode 100644 index 637d962..0000000 --- a/Ooui.Wasm/ooui-sample.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using Ooui; - -public class Program -{ - static Element GetButtonElement () - { - var l = new Label { Text = "Hello" }; - var b = new Button ("Click Me"); - var e = new Div (new Div (l), b); - int count = 0; - b.Click += (s, ee) => { - count++; - b.Text = $"Clicked {count} times"; - }; - return e; - } - - static Element GetXamarinFormsElement () - { - var s = new Samples.XamlPreviewPageSample (); - return s.CreateElement (); - } - - public static string Main (string a0, string a1) - { - Xamarin.Forms.Forms.Init (); - try { - var e = GetXamarinFormsElement (); - UI.SetGlobalElement ("main", e); - return e.ToString (); - } - catch (Exception e) { - Console.WriteLine (e); - return e.ToString (); - } - } -} diff --git a/Ooui.Wasm/ooui-sample.html b/Ooui.Wasm/ooui-sample.html deleted file mode 100644 index 5c649fb..0000000 --- a/Ooui.Wasm/ooui-sample.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - Ooui Wasm - - - - - -
-

Loading...

- -
- - - - - -