From 2333daa5dbd65c0d44800efe4ef4414af5e7ae69 Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Wed, 21 May 2025 16:19:37 -0700 Subject: [PATCH 1/5] Added nuspec file to package both uap and net9 targeted uwp libraries together --- .gitignore | 5 ++- .../Lottie-Windows-WinUI3.csproj | 1 + Lottie-Windows/Lottie-Windows.props | 1 - build/Lottie-Windows-Uwp.nuspec | 42 +++++++++++++++++++ build/build.cake | 14 +++++++ 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 build/Lottie-Windows-Uwp.nuspec diff --git a/.gitignore b/.gitignore index 5539efd0e..203b9893e 100644 --- a/.gitignore +++ b/.gitignore @@ -234,4 +234,7 @@ msbuild.binlog LottieGenOutput-*/ # Visual Studio debugging configuration file. -launchSettings.json \ No newline at end of file +launchSettings.json + +# Nuget Package files. +pack/ diff --git a/Lottie-Windows/Lottie-Windows-WinUI3/Lottie-Windows-WinUI3.csproj b/Lottie-Windows/Lottie-Windows-WinUI3/Lottie-Windows-WinUI3.csproj index 36d54c654..5f78d9efc 100644 --- a/Lottie-Windows/Lottie-Windows-WinUI3/Lottie-Windows-WinUI3.csproj +++ b/Lottie-Windows/Lottie-Windows-WinUI3/Lottie-Windows-WinUI3.csproj @@ -8,6 +8,7 @@ CommunityToolkit.WinUI.Lottie CommunityToolkit.WinUI.Lottie WinUI3 Toolkit Windows Animations Lottie XAML + True enable Microsoft diff --git a/Lottie-Windows/Lottie-Windows.props b/Lottie-Windows/Lottie-Windows.props index aea4f17d2..94830cdd4 100644 --- a/Lottie-Windows/Lottie-Windows.props +++ b/Lottie-Windows/Lottie-Windows.props @@ -6,7 +6,6 @@ This library provides the LottieVisualSource which is consumed by the Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer to render Lottie JSON files. - True latest bin\AnyCPU\Release\CommunityToolkit.WinUI.Lottie.xml diff --git a/build/Lottie-Windows-Uwp.nuspec b/build/Lottie-Windows-Uwp.nuspec new file mode 100644 index 000000000..f865605ce --- /dev/null +++ b/build/Lottie-Windows-Uwp.nuspec @@ -0,0 +1,42 @@ + + + + CommunityToolkit.UwpUnified.Lottie + 0.0.0-SpecifyVersionOnCommandline + Microsoft.Toolkit + true + https://github.com/windows-toolkit/Lottie-Windows/blob/master/license.md + https://github.com/windows-toolkit/Lottie-Windows + https://raw.githubusercontent.com/windows-toolkit/WindowsCommunityToolkit/master/build/nuget.png + This library provides the LottieVisualSource which is consumed by the Microsoft.UI.Xaml.Controls.AnimatedVisualPlayer to render Lottie JSON files in runtime. + Release https://github.com/windows-toolkit/Lottie-Windows/releases + (c) .NET Foundation and Contributors. All rights reserved. + UWP Toolkit Windows Animations Lottie XAML + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/build.cake b/build/build.cake index 8e4cbdc2d..599ff5a76 100644 --- a/build/build.cake +++ b/build/build.cake @@ -244,6 +244,20 @@ Task("Package") // Invoke the pack target to generate the code to be packed. MSBuildSolution("Pack", ("GenerateLibraryLayout", "true"), ("PackageOutputPath", nupkgDir)); + var stage = Directory("./pack"); + + var net9Dir = stage + Directory("lib") + Directory("net9.0-windows10.0.26100.0"); + var uapDir = stage + Directory("lib") + Directory("uap10.0.16299"); + + // clean & recreate + CleanDirectory(stage); + EnsureDirectoryExists(net9Dir); + EnsureDirectoryExists(uapDir); + + // copy the Release builds + CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-UwpNet/bin/{configuration}/net9.0-windows10.0.26100.0/*", net9Dir); + CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-Uwp/bin/{configuration}/uap10.0.16299/*", uapDir); + foreach (var nuspec in GetFiles("./*.nuspec")) { var nuGetPackSettings = new NuGetPackSettings From 220ae767c9ad699f019d1db1251719cec37304d9 Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Wed, 21 May 2025 17:36:52 -0700 Subject: [PATCH 2/5] Fixed relative dir path --- build/Lottie-Windows-Uwp.nuspec | 2 +- build/build.cake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/Lottie-Windows-Uwp.nuspec b/build/Lottie-Windows-Uwp.nuspec index f865605ce..d1764d254 100644 --- a/build/Lottie-Windows-Uwp.nuspec +++ b/build/Lottie-Windows-Uwp.nuspec @@ -37,6 +37,6 @@ - + \ No newline at end of file diff --git a/build/build.cake b/build/build.cake index 599ff5a76..cd4d8dde3 100644 --- a/build/build.cake +++ b/build/build.cake @@ -244,10 +244,10 @@ Task("Package") // Invoke the pack target to generate the code to be packed. MSBuildSolution("Pack", ("GenerateLibraryLayout", "true"), ("PackageOutputPath", nupkgDir)); - var stage = Directory("./pack"); + var stage = Directory($"{buildDir}/pack/lib"); - var net9Dir = stage + Directory("lib") + Directory("net9.0-windows10.0.26100.0"); - var uapDir = stage + Directory("lib") + Directory("uap10.0.16299"); + var net9Dir = stage + Directory("net9.0-windows10.0.26100.0"); + var uapDir = stage + Directory("uap10.0.16299"); // clean & recreate CleanDirectory(stage); @@ -256,7 +256,7 @@ Task("Package") // copy the Release builds CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-UwpNet/bin/{configuration}/net9.0-windows10.0.26100.0/*", net9Dir); - CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-Uwp/bin/{configuration}/uap10.0.16299/*", uapDir); + CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-Uwp/bin/{configuration}/uap10.0.16299/*", uapDir); foreach (var nuspec in GetFiles("./*.nuspec")) { From df44358afc3bd14d3887cd9e1280293145e2a097 Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Thu, 22 May 2025 10:44:12 -0700 Subject: [PATCH 3/5] Fix package name --- build/Lottie-Windows-Uwp.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Lottie-Windows-Uwp.nuspec b/build/Lottie-Windows-Uwp.nuspec index d1764d254..70a058dea 100644 --- a/build/Lottie-Windows-Uwp.nuspec +++ b/build/Lottie-Windows-Uwp.nuspec @@ -1,7 +1,7 @@ - CommunityToolkit.UwpUnified.Lottie + CommunityToolkit.Uwp.Lottie 0.0.0-SpecifyVersionOnCommandline Microsoft.Toolkit true From 9e46e5e33eac72eebeab854e9c4b6aa4a5d43183 Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Thu, 22 May 2025 15:14:02 -0700 Subject: [PATCH 4/5] Fixed structure of the package --- build/Lottie-Windows-Uwp.nuspec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/build/Lottie-Windows-Uwp.nuspec b/build/Lottie-Windows-Uwp.nuspec index 70a058dea..8fe925ea7 100644 --- a/build/Lottie-Windows-Uwp.nuspec +++ b/build/Lottie-Windows-Uwp.nuspec @@ -37,6 +37,29 @@ - + + + + + + + + + + + + + \ No newline at end of file From 953c84e1bdc324199e61ac55731efe1a89b8f190 Mon Sep 17 00:00:00 2001 From: Andrii Borziak Date: Thu, 22 May 2025 17:19:32 -0700 Subject: [PATCH 5/5] fixes --- build/Lottie-Windows-Uwp.nuspec | 15 ++------------- build/build.cake | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/build/Lottie-Windows-Uwp.nuspec b/build/Lottie-Windows-Uwp.nuspec index 8fe925ea7..864b4f727 100644 --- a/build/Lottie-Windows-Uwp.nuspec +++ b/build/Lottie-Windows-Uwp.nuspec @@ -37,23 +37,12 @@ - - - - - - - - diff --git a/build/build.cake b/build/build.cake index cd4d8dde3..d881231a8 100644 --- a/build/build.cake +++ b/build/build.cake @@ -255,8 +255,8 @@ Task("Package") EnsureDirectoryExists(uapDir); // copy the Release builds - CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-UwpNet/bin/{configuration}/net9.0-windows10.0.26100.0/*", net9Dir); - CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-Uwp/bin/{configuration}/uap10.0.16299/*", uapDir); + CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-UwpNet/bin/AnyCPU/{configuration}/net9.0-windows10.0.26100.0/*", net9Dir); + CopyFiles($"{baseDir}/Lottie-Windows/Lottie-Windows-Uwp/bin/AnyCPU/{configuration}/uap10.0.16299/*", uapDir); foreach (var nuspec in GetFiles("./*.nuspec")) {