diff --git a/common/Labs.Head.Wasm.props b/common/Labs.Head.Wasm.props index ee5041b57..965a3e1f5 100644 --- a/common/Labs.Head.Wasm.props +++ b/common/Labs.Head.Wasm.props @@ -6,11 +6,11 @@ Because of this, this file must be import immediately after defining all other constant values. --> - False - False - False - True - False + false + false + false + true + false diff --git a/common/Labs.Head.WinAppSdk.props b/common/Labs.Head.WinAppSdk.props index b538a11b4..ddd2885d1 100644 --- a/common/Labs.Head.WinAppSdk.props +++ b/common/Labs.Head.WinAppSdk.props @@ -13,7 +13,7 @@ win10-$(Platform).pubxml true true - WINAPPSDK;WINDOWS_WINAPPSDK + $(DefineConstants);WINAPPSDK;WINDOWS_WINAPPSDK; app.manifest diff --git a/common/Labs.ProjectIdentifiers.props b/common/Labs.ProjectIdentifiers.props new file mode 100644 index 000000000..6cd087d95 --- /dev/null +++ b/common/Labs.ProjectIdentifiers.props @@ -0,0 +1,40 @@ + + + true + true + true + + true + true + true + + true + true + true + + true + true + true + + true + true + + true + + + Uwp + 2 + $(DefineConstants);WINUI2; + + + $(DefineConstants);HAS_UNO; + $(DefineConstants);WINDOWS_UWP;NETFX_CORE; + $(DefineConstants);WINDOWS_WINAPPSDK; + $(DefineConstants);__WASM__;HAS_UNO_WASM; + $(DefineConstants);__ANDROID__; + $(DefineConstants);__IOS__; + $(DefineConstants);__MACOS__; + $(DefineConstants);HAS_UNO_SKIA;__SKIA__;WINDOWS_WPF; + $(DefineConstants);HAS_UNO_SKIA;__SKIA__;__GTK__; + + diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index 9f264530b..27e5361a0 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -1,34 +1,6 @@ - - true - true - true - - true - true - true - - true - true - true - - true - true - true - - true - true - - true - - $(DefineConstants); - - Uwp - 2 - - diff --git a/common/Scripts/UseUnoWinUI.ps1 b/common/Scripts/UseUnoWinUI.ps1 index c050b0eac..3ab9cf4c4 100644 --- a/common/Scripts/UseUnoWinUI.ps1 +++ b/common/Scripts/UseUnoWinUI.ps1 @@ -3,7 +3,7 @@ Param ( [ValidateSet('2', '3')] [string]$winUIMajorVersion, - [Parameter(HelpMessage = "Disables suppressing changes to the Labs.Uno.props and Labs.Head.Uno.props files in git, allowing changes to be committed.")] + [Parameter(HelpMessage = "Disables suppressing changes to the affected files in git, allowing changes to be committed.")] [switch]$allowGitChanges = $false ) @@ -29,22 +29,27 @@ function ApplyWinUISwap([string] $filePath) { $fileContents = $fileContents -replace '2', '3'; $fileContents = $fileContents -replace 'Uwp', 'WinUI'; $fileContents = $fileContents -replace 'Uno.UI', 'Uno.WinUI'; - $fileContents = $fileContents -replace '\$\(DefineConstants\);', '$(DefineConstants);WINAPPSDK;'; + + $fileContents = $fileContents -replace '\$\(DefineConstants\);WINUI2;', '$(DefineConstants);WINUI3;WINAPPSDK;'; } if ($winUIMajorVersion -eq "2") { $fileContents = $fileContents -replace '3', '2'; $fileContents = $fileContents -replace 'WinUI', 'Uwp'; $fileContents = $fileContents -replace 'Uno.WinUI', 'Uno.UI'; - $fileContents = $fileContents -replace 'WINAPPSDK;', ''; + + $fileContents = $fileContents -replace '\$\(DefineConstants\);WINUI3;WINAPPSDK;', '$(DefineConstants);WINUI2;'; } Set-Content -Force -Path $filePath -Value $fileContents; + Write-Output "Updated $(Resolve-Path -Relative $filePath)" } +Write-Output "Switching to WinUI $winUIMajorVersion"; -ApplyWinUISwap $PSScriptRoot/../Labs.Head.Uno.props -ApplyWinUISwap $PSScriptRoot/../Labs.Uno.props +ApplyWinUISwap $PSScriptRoot\..\Labs.Head.Uno.props +ApplyWinUISwap $PSScriptRoot\..\Labs.Uno.props +ApplyWinUISwap $PSScriptRoot\..\Labs.ProjectIdentifiers.props if ($allowGitChanges.IsPresent) { Write-Warning "Changes to the default Uno package settings in Labs can now be committed.`r`nRun this command again without -allowGitChanges to disable committing further changes."; diff --git a/labs/CanvasLayout/samples/CanvasLayout.Samples/CanvasLayout.Samples.csproj b/labs/CanvasLayout/samples/CanvasLayout.Samples/CanvasLayout.Samples.csproj index b0398a9fa..d9dadd648 100644 --- a/labs/CanvasLayout/samples/CanvasLayout.Samples/CanvasLayout.Samples.csproj +++ b/labs/CanvasLayout/samples/CanvasLayout.Samples/CanvasLayout.Samples.csproj @@ -1,6 +1,7 @@ + diff --git a/labs/CanvasLayout/samples/CanvasLayout.Uwp/CanvasLayout.Uwp.csproj b/labs/CanvasLayout/samples/CanvasLayout.Uwp/CanvasLayout.Uwp.csproj index 407e52f08..8c7cfd2e7 100644 --- a/labs/CanvasLayout/samples/CanvasLayout.Uwp/CanvasLayout.Uwp.csproj +++ b/labs/CanvasLayout/samples/CanvasLayout.Uwp/CanvasLayout.Uwp.csproj @@ -1,15 +1,35 @@  + true + false + false + false + false + false + false + false + true + false + false + false + false + false + false + false + + + + CanvasLayoutExperiment.Samples CanvasLayoutExperiment.Samples.Uwp diff --git a/labs/CanvasLayout/samples/CanvasLayout.Wasm/CanvasLayout.Wasm.csproj b/labs/CanvasLayout/samples/CanvasLayout.Wasm/CanvasLayout.Wasm.csproj index 977cf256f..50133db1a 100644 --- a/labs/CanvasLayout/samples/CanvasLayout.Wasm/CanvasLayout.Wasm.csproj +++ b/labs/CanvasLayout/samples/CanvasLayout.Wasm/CanvasLayout.Wasm.csproj @@ -3,7 +3,23 @@ true + true + true + false + false + false + false + false + false + false + false + false + false + false + false + false + diff --git a/labs/CanvasLayout/samples/CanvasLayout.WinAppSdk/CanvasLayout.WinAppSdk.csproj b/labs/CanvasLayout/samples/CanvasLayout.WinAppSdk/CanvasLayout.WinAppSdk.csproj index 3a5f58cad..0b45d97a9 100644 --- a/labs/CanvasLayout/samples/CanvasLayout.WinAppSdk/CanvasLayout.WinAppSdk.csproj +++ b/labs/CanvasLayout/samples/CanvasLayout.WinAppSdk/CanvasLayout.WinAppSdk.csproj @@ -3,7 +3,23 @@ true + false + false + false + false + false + false + false + false + true + false + false + false + false + false + false + diff --git a/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj b/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj index ca4d3b90d..cceca5957 100644 --- a/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj +++ b/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj @@ -1,6 +1,7 @@ + diff --git a/labs/CanvasLayout/tests/CanvasLayout.Tests.Uwp/CanvasLayout.Tests.Uwp.csproj b/labs/CanvasLayout/tests/CanvasLayout.Tests.Uwp/CanvasLayout.Tests.Uwp.csproj index ffb6d5c2b..177461821 100644 --- a/labs/CanvasLayout/tests/CanvasLayout.Tests.Uwp/CanvasLayout.Tests.Uwp.csproj +++ b/labs/CanvasLayout/tests/CanvasLayout.Tests.Uwp/CanvasLayout.Tests.Uwp.csproj @@ -6,6 +6,7 @@ true + diff --git a/labs/CanvasLayout/tests/CanvasLayout.Tests.WinAppSdk/CanvasLayout.Tests.WinAppSdk.csproj b/labs/CanvasLayout/tests/CanvasLayout.Tests.WinAppSdk/CanvasLayout.Tests.WinAppSdk.csproj index 688b1c0cd..3a7ca4b4f 100644 --- a/labs/CanvasLayout/tests/CanvasLayout.Tests.WinAppSdk/CanvasLayout.Tests.WinAppSdk.csproj +++ b/labs/CanvasLayout/tests/CanvasLayout.Tests.WinAppSdk/CanvasLayout.Tests.WinAppSdk.csproj @@ -4,6 +4,7 @@ true + diff --git a/labs/SizerBase/samples/SizerBase.Samples/SizerBase.Samples.csproj b/labs/SizerBase/samples/SizerBase.Samples/SizerBase.Samples.csproj index 7ae88afbb..5b460836d 100644 --- a/labs/SizerBase/samples/SizerBase.Samples/SizerBase.Samples.csproj +++ b/labs/SizerBase/samples/SizerBase.Samples/SizerBase.Samples.csproj @@ -1,6 +1,7 @@ + diff --git a/labs/SizerBase/samples/SizerBase.Uwp/SizerBase.Uwp.csproj b/labs/SizerBase/samples/SizerBase.Uwp/SizerBase.Uwp.csproj index 6349aa85e..a7e53c784 100644 --- a/labs/SizerBase/samples/SizerBase.Uwp/SizerBase.Uwp.csproj +++ b/labs/SizerBase/samples/SizerBase.Uwp/SizerBase.Uwp.csproj @@ -1,15 +1,35 @@  + true + false + false + false + false + false + false + false + true + false + false + false + false + false + false + false + + + + SizerBaseExperiment.Samples SizerBaseExperiment.Samples.Uwp diff --git a/labs/SizerBase/samples/SizerBase.Wasm/SizerBase.Wasm.csproj b/labs/SizerBase/samples/SizerBase.Wasm/SizerBase.Wasm.csproj index a9457fd26..fdbad81f0 100644 --- a/labs/SizerBase/samples/SizerBase.Wasm/SizerBase.Wasm.csproj +++ b/labs/SizerBase/samples/SizerBase.Wasm/SizerBase.Wasm.csproj @@ -3,7 +3,23 @@ true + true + true + false + false + false + false + false + false + false + false + false + false + false + false + false + diff --git a/labs/SizerBase/samples/SizerBase.WinAppSdk/SizerBase.WinAppSdk.csproj b/labs/SizerBase/samples/SizerBase.WinAppSdk/SizerBase.WinAppSdk.csproj index 807fdcbf7..62c6d031b 100644 --- a/labs/SizerBase/samples/SizerBase.WinAppSdk/SizerBase.WinAppSdk.csproj +++ b/labs/SizerBase/samples/SizerBase.WinAppSdk/SizerBase.WinAppSdk.csproj @@ -3,7 +3,23 @@ true + false + false + false + false + false + false + false + false + true + false + false + false + false + false + false + diff --git a/labs/SizerBase/src/CommunityToolkit.Labs.WinUI.SizerBase.csproj b/labs/SizerBase/src/CommunityToolkit.Labs.WinUI.SizerBase.csproj index c7fb061f2..3b05a0bb0 100644 --- a/labs/SizerBase/src/CommunityToolkit.Labs.WinUI.SizerBase.csproj +++ b/labs/SizerBase/src/CommunityToolkit.Labs.WinUI.SizerBase.csproj @@ -1,6 +1,7 @@ + diff --git a/labs/SizerBase/tests/SizerBase.Tests.Uwp/SizerBase.Tests.Uwp.csproj b/labs/SizerBase/tests/SizerBase.Tests.Uwp/SizerBase.Tests.Uwp.csproj index 7a58e9cb2..ab485e20c 100644 --- a/labs/SizerBase/tests/SizerBase.Tests.Uwp/SizerBase.Tests.Uwp.csproj +++ b/labs/SizerBase/tests/SizerBase.Tests.Uwp/SizerBase.Tests.Uwp.csproj @@ -6,6 +6,7 @@ true + diff --git a/labs/SizerBase/tests/SizerBase.Tests.WinAppSdk/SizerBase.Tests.WinAppSdk.csproj b/labs/SizerBase/tests/SizerBase.Tests.WinAppSdk/SizerBase.Tests.WinAppSdk.csproj index 3d3b7fa0f..eda87fdfc 100644 --- a/labs/SizerBase/tests/SizerBase.Tests.WinAppSdk/SizerBase.Tests.WinAppSdk.csproj +++ b/labs/SizerBase/tests/SizerBase.Tests.WinAppSdk/SizerBase.Tests.WinAppSdk.csproj @@ -4,6 +4,7 @@ true + diff --git a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj index 64ec8d6d3..f484f86ef 100644 --- a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj +++ b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj @@ -5,9 +5,24 @@ - true true + true + false + false + false + true + false + false + false + false + false + false + false + false + false + false + diff --git a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj index 83fc6f3fc..1ad6a213d 100644 --- a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj @@ -1,13 +1,25 @@ - - True - False - False true + true + false + false + false + false + false + false + false + false + false + false + false + true + true + false + diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj index 30ac604b8..3b000ed11 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj @@ -1,13 +1,28 @@ - + + - False - True - False - False + true + true + false + false + false + false + false + false + false + false + true + true + false + false + false + false + + diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj index d49f2079b..bf587cf0e 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj @@ -1,15 +1,26 @@ - - False - True - True - False true + true + false + false + false + false + false + false + false + false + true + true + true + false + false + false $(WpfLibTargetFramework) + diff --git a/platforms/CommunityToolkit.Labs.Uwp/CommunityToolkit.Labs.Uwp.csproj b/platforms/CommunityToolkit.Labs.Uwp/CommunityToolkit.Labs.Uwp.csproj index 766e522cf..d17f7aaa8 100644 --- a/platforms/CommunityToolkit.Labs.Uwp/CommunityToolkit.Labs.Uwp.csproj +++ b/platforms/CommunityToolkit.Labs.Uwp/CommunityToolkit.Labs.Uwp.csproj @@ -1,11 +1,28 @@  + true + false + false + false + false + false + false + false + true + false + false + false + false + false + false + false + diff --git a/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj b/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj index 913cc5e5e..9d9ef6ae3 100644 --- a/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj +++ b/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj @@ -3,7 +3,23 @@ true + true + true + true + false + false + false + false + false + false + false + false + false + false + false + false + diff --git a/platforms/CommunityToolkit.Labs.WinAppSdk/CommunityToolkit.Labs.WinAppSdk.csproj b/platforms/CommunityToolkit.Labs.WinAppSdk/CommunityToolkit.Labs.WinAppSdk.csproj index 362e6fd36..5629ae128 100644 --- a/platforms/CommunityToolkit.Labs.WinAppSdk/CommunityToolkit.Labs.WinAppSdk.csproj +++ b/platforms/CommunityToolkit.Labs.WinAppSdk/CommunityToolkit.Labs.WinAppSdk.csproj @@ -3,7 +3,23 @@ true + false + false + false + false + false + false + false + false + true + false + false + false + false + false + false + diff --git a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj index 22ddcf726..ac7b2b2bb 100644 --- a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj +++ b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj @@ -5,9 +5,24 @@ - true true + true + false + false + false + false + false + true + false + false + false + false + false + false + false + false + diff --git a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj index 8ad08b623..11c114075 100644 --- a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj +++ b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj @@ -5,9 +5,24 @@ - true true + true + false + false + false + false + true + false + false + false + false + false + false + false + false + false + diff --git a/template/lab/samples/ProjectTemplate.Samples/ProjectTemplate.Samples.csproj b/template/lab/samples/ProjectTemplate.Samples/ProjectTemplate.Samples.csproj index 103c43018..7c3187b97 100644 --- a/template/lab/samples/ProjectTemplate.Samples/ProjectTemplate.Samples.csproj +++ b/template/lab/samples/ProjectTemplate.Samples/ProjectTemplate.Samples.csproj @@ -1,6 +1,7 @@ + diff --git a/template/lab/samples/ProjectTemplate.Uwp/ProjectTemplate.Uwp.csproj b/template/lab/samples/ProjectTemplate.Uwp/ProjectTemplate.Uwp.csproj index 4b1fb3e7d..313d8fea8 100644 --- a/template/lab/samples/ProjectTemplate.Uwp/ProjectTemplate.Uwp.csproj +++ b/template/lab/samples/ProjectTemplate.Uwp/ProjectTemplate.Uwp.csproj @@ -6,7 +6,23 @@ true + false + false + false + false + false + false + false + true + false + false + false + false + false + false + false + diff --git a/template/lab/samples/ProjectTemplate.Wasm/ProjectTemplate.Wasm.csproj b/template/lab/samples/ProjectTemplate.Wasm/ProjectTemplate.Wasm.csproj index 24f79b54f..932362c09 100644 --- a/template/lab/samples/ProjectTemplate.Wasm/ProjectTemplate.Wasm.csproj +++ b/template/lab/samples/ProjectTemplate.Wasm/ProjectTemplate.Wasm.csproj @@ -3,7 +3,23 @@ true + true + true + false + false + false + false + false + false + false + false + false + false + false + false + false + diff --git a/template/lab/samples/ProjectTemplate.WinAppSdk/ProjectTemplate.WinAppSdk.csproj b/template/lab/samples/ProjectTemplate.WinAppSdk/ProjectTemplate.WinAppSdk.csproj index 4ecf75251..c4561c798 100644 --- a/template/lab/samples/ProjectTemplate.WinAppSdk/ProjectTemplate.WinAppSdk.csproj +++ b/template/lab/samples/ProjectTemplate.WinAppSdk/ProjectTemplate.WinAppSdk.csproj @@ -3,7 +3,23 @@ true + false + false + false + false + false + false + false + false + true + false + false + false + false + false + false + diff --git a/template/lab/src/CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj b/template/lab/src/CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj index a467d1cc3..b84b68021 100644 --- a/template/lab/src/CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj +++ b/template/lab/src/CommunityToolkit.Labs.WinUI.ProjectTemplate.csproj @@ -1,6 +1,7 @@ + diff --git a/template/lab/tests/ProjectTemplate.Tests.Uwp/ProjectTemplate.Tests.Uwp.csproj b/template/lab/tests/ProjectTemplate.Tests.Uwp/ProjectTemplate.Tests.Uwp.csproj index 3cb92795e..18a47f530 100644 --- a/template/lab/tests/ProjectTemplate.Tests.Uwp/ProjectTemplate.Tests.Uwp.csproj +++ b/template/lab/tests/ProjectTemplate.Tests.Uwp/ProjectTemplate.Tests.Uwp.csproj @@ -1,11 +1,13 @@  + true + diff --git a/template/lab/tests/ProjectTemplate.Tests.WinAppSdk/ProjectTemplate.Tests.WinAppSdk.csproj b/template/lab/tests/ProjectTemplate.Tests.WinAppSdk/ProjectTemplate.Tests.WinAppSdk.csproj index a4dc416f6..1cb063d8f 100644 --- a/template/lab/tests/ProjectTemplate.Tests.WinAppSdk/ProjectTemplate.Tests.WinAppSdk.csproj +++ b/template/lab/tests/ProjectTemplate.Tests.WinAppSdk/ProjectTemplate.Tests.WinAppSdk.csproj @@ -4,6 +4,7 @@ true + diff --git a/tests/CommunityToolkit.Labs.Tests.Uwp/CommunityToolkit.Labs.Tests.Uwp.csproj b/tests/CommunityToolkit.Labs.Tests.Uwp/CommunityToolkit.Labs.Tests.Uwp.csproj index 6b81ff632..fb9630de6 100644 --- a/tests/CommunityToolkit.Labs.Tests.Uwp/CommunityToolkit.Labs.Tests.Uwp.csproj +++ b/tests/CommunityToolkit.Labs.Tests.Uwp/CommunityToolkit.Labs.Tests.Uwp.csproj @@ -1,11 +1,13 @@  + true + diff --git a/tests/CommunityToolkit.Labs.Tests.WinAppSdk/CommunityToolkit.Labs.Tests.WinAppSdk.csproj b/tests/CommunityToolkit.Labs.Tests.WinAppSdk/CommunityToolkit.Labs.Tests.WinAppSdk.csproj index 37aa373f4..8abbd39fd 100644 --- a/tests/CommunityToolkit.Labs.Tests.WinAppSdk/CommunityToolkit.Labs.Tests.WinAppSdk.csproj +++ b/tests/CommunityToolkit.Labs.Tests.WinAppSdk/CommunityToolkit.Labs.Tests.WinAppSdk.csproj @@ -4,6 +4,7 @@ true +