From 8fd83bec27e553eb3809cd499fcb5b73a8b25630 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 13 Nov 2024 14:51:23 +0700 Subject: [PATCH] .NET8 Windows for SIL.Windows.Forms.Keyboarding and .WritingSystems It builds, and the tests appear to be not catastrophic, but I'll wait for the build server to do the actual verification. For .Keyboarding, I completely removed the Linux\ folder on .NET8 Windows. Same for the test files directed at Linux. --- ...SIL.Windows.Forms.Keyboarding.Tests.csproj | 22 ++++++++++++++++++- .../KeyboardController.cs | 4 ++++ .../SIL.Windows.Forms.Keyboarding.csproj | 15 +++++++++++-- ....Windows.Forms.WritingSystems.Tests.csproj | 1 + .../SIL.Windows.Forms.WritingSystems.csproj | 1 + 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/SIL.Windows.Forms.Keyboarding.Tests/SIL.Windows.Forms.Keyboarding.Tests.csproj b/SIL.Windows.Forms.Keyboarding.Tests/SIL.Windows.Forms.Keyboarding.Tests.csproj index 0cf57183e..fd4b9c090 100644 --- a/SIL.Windows.Forms.Keyboarding.Tests/SIL.Windows.Forms.Keyboarding.Tests.csproj +++ b/SIL.Windows.Forms.Keyboarding.Tests/SIL.Windows.Forms.Keyboarding.Tests.csproj @@ -4,6 +4,7 @@ SIL.Windows.Forms.Keyboarding.Tests SIL.Windows.Forms.Keyboarding.Tests Unit tests for SIL.Windows.Forms.Keyboarding + $(TargetFrameworks);net8-windows true @@ -25,8 +26,27 @@ - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SIL.Windows.Forms.Keyboarding/KeyboardController.cs b/SIL.Windows.Forms.Keyboarding/KeyboardController.cs index 35ca4b3ad..468ce8368 100644 --- a/SIL.Windows.Forms.Keyboarding/KeyboardController.cs +++ b/SIL.Windows.Forms.Keyboarding/KeyboardController.cs @@ -12,7 +12,9 @@ using SIL.ObjectModel; using SIL.PlatformUtilities; using SIL.Reporting; +#if NETFRAMEWORK using SIL.Windows.Forms.Keyboarding.Linux; +#endif using SIL.Windows.Forms.Keyboarding.Windows; namespace SIL.Windows.Forms.Keyboarding @@ -217,10 +219,12 @@ private void SetDefaultKeyboardAdaptors() } : new IKeyboardRetrievingAdaptor[] { +#if NETFRAMEWORK new XkbKeyboardRetrievingAdaptor(), new IbusKeyboardRetrievingAdaptor(), new UnityXkbKeyboardRetrievingAdaptor(), new UnityIbusKeyboardRetrievingAdaptor(), new CombinedIbusKeyboardRetrievingAdaptor(), new GnomeShellIbusKeyboardRetrievingAdaptor() +#endif } ); } diff --git a/SIL.Windows.Forms.Keyboarding/SIL.Windows.Forms.Keyboarding.csproj b/SIL.Windows.Forms.Keyboarding/SIL.Windows.Forms.Keyboarding.csproj index c4e519ad0..78662a08a 100644 --- a/SIL.Windows.Forms.Keyboarding/SIL.Windows.Forms.Keyboarding.csproj +++ b/SIL.Windows.Forms.Keyboarding/SIL.Windows.Forms.Keyboarding.csproj @@ -4,7 +4,15 @@ SIL.Windows.Forms.Keyboarding SIL.Windows.Forms.Keyboarding The SIL.Windows.Forms.Keyboarding library provides cross-platform functionality for keyboard selection and switching in Windows Forms applications. Currently, this library supports system and Keyman keyboards on Windows, and X keyboard extension (XKB) and Intelligent Input Bus (IBus) keyboards on Linux. + $(TargetFrameworks);net8-windows + + + + + + + @@ -23,6 +31,11 @@ + + + + + ..\lib\Keyman10Interop.dll @@ -33,8 +46,6 @@ ..\lib\KeymanLink.dll - - diff --git a/SIL.Windows.Forms.WritingSystems.Tests/SIL.Windows.Forms.WritingSystems.Tests.csproj b/SIL.Windows.Forms.WritingSystems.Tests/SIL.Windows.Forms.WritingSystems.Tests.csproj index be2fa479f..f710e7444 100644 --- a/SIL.Windows.Forms.WritingSystems.Tests/SIL.Windows.Forms.WritingSystems.Tests.csproj +++ b/SIL.Windows.Forms.WritingSystems.Tests/SIL.Windows.Forms.WritingSystems.Tests.csproj @@ -7,6 +7,7 @@ false true true + $(TargetFrameworks);net8-windows true diff --git a/SIL.Windows.Forms.WritingSystems/SIL.Windows.Forms.WritingSystems.csproj b/SIL.Windows.Forms.WritingSystems/SIL.Windows.Forms.WritingSystems.csproj index bb7abe38c..fe3047c3c 100644 --- a/SIL.Windows.Forms.WritingSystems/SIL.Windows.Forms.WritingSystems.csproj +++ b/SIL.Windows.Forms.WritingSystems/SIL.Windows.Forms.WritingSystems.csproj @@ -4,6 +4,7 @@ SIL.Windows.Forms.WritingSystems SIL.Windows.Forms.WritingSystems SIL.Windows.Forms.WritingSystems contains Windows Forms UI elements for displaying and editing writing systems as defined by the SIL.WritingSystems assembly. + $(TargetFrameworks);net8-windows true true