diff --git a/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml b/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml index c5333dac..715a3eea 100644 --- a/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml +++ b/.idea/.idea.TweetDuck/.idea/runConfigurations/TweetDuck.xml @@ -11,8 +11,8 @@ <option name="PROJECT_EXE_PATH_TRACKING" value="1" /> <option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> <option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> - <option name="PROJECT_KIND" value="Console" /> - <option name="PROJECT_TFM" value=".NETFramework,Version=v4.7.2" /> + <option name="PROJECT_KIND" value="DotNetCore" /> + <option name="PROJECT_TFM" value="net6.0-windows7.0" /> <method v="2"> <option name="Build" /> </method> diff --git a/README.md b/README.md index a7672b5c..fb84756a 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,14 @@ Download links and system requirements are on the [official website](https://twe Building TweetDuck for Windows requires at minimum [Visual Studio 2019](https://visualstudio.microsoft.com/downloads) and Windows 7. Before opening the solution, open Visual Studio Installer and make sure you have the following Visual Studio workloads and components installed: * **.NET desktop development** - * .NET Framework 4.7.2 targeting pack + * .NET SDK * F# desktop language support * **Desktop development with C++** * MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.20 / Latest) -In the **Installation details** panel, you can expand the workloads you selected, and uncheck any components that are not listed above to save space. +In the **Installation details** panel, you can expand the workloads you selected, and uncheck any components that are not listed above to save space. You may uncheck the .NET SDK component if you installed the [.NET 6 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) directly. -Building TweetDuck for Linux requires [.NET 5](https://docs.microsoft.com/en-us/dotnet/core/install/linux). The Linux project has its own solution file in the `linux/` folder. +Building TweetDuck for Linux requires [.NET 6 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux). The Linux project has its own solution file in the `linux/` folder. ### Editors @@ -84,13 +84,13 @@ On Windows, TweetDuck uses the [CefSharp](https://github.com/cefsharp/CefSharp/) On Linux, TweetDuck uses the [ChromiumGtk](https://github.com/lunixo/ChromiumGtk) library, which combines [CefGlue](https://gitlab.com/xiliumhq/chromiumembedded/cefglue) for the browser component and [GtkSharp](https://github.com/GtkSharp/GtkSharp) for the GUI. -The solution contains several C# projects for executables and libraries, and F# projects for automated tests. +The solution contains several C# projects for executables and libraries, and F# projects for automated tests. All projects target `.NET 6`. Projects are organized into folders: -* Windows projects are in the `windows/` folder, and target `.NET Framework 4.7.2` + `C# 8.0` -* Linux projects are in the `linux/` folder, and target `.NET 5` + `C#` -* Libraries (`TweetLib.*`) are in the `lib/` folder, and target `.NET Standard 2.0` + `C# 9.0` -* Tests (`TweetTest.*`) are also in the `lib/` folder, and target `.NET Framework 4.7.2` + `F#` +* Windows projects are in the `windows/` folder +* Linux projects are in the `linux/` folder +* Libraries (`TweetLib.*`) are in the `lib/` folder +* Tests (`TweetTest.*`) are also in the `lib/` folder Here are a few things to keep in mind: * Executable projects have their entry points in `Program.cs` @@ -130,7 +130,7 @@ Main Windows executable. It has a dependency on [CefSharp](https://github.com/ce #### TweetDuck.Browser -Windows executable that hosts various Chromium processes. It depends on two specific DLLs from the [CefSharp](https://github.com/cefsharp/CefSharp/) package. After updating [CefSharp](https://github.com/cefsharp/CefSharp/), run the `windows/TweetDuck/Resources/PostCefUpdate.ps1` PowerShell script to update these dependencies to the new version. +Windows executable that hosts various Chromium processes. It has a dependency on [CefSharp](https://github.com/cefsharp/CefSharp/). #### TweetDuck.Video diff --git a/bld/Redist/api-ms-win-core-console-l1-1-0.dll b/bld/Redist/api-ms-win-core-console-l1-1-0.dll deleted file mode 100644 index 5c746b6e..00000000 Binary files a/bld/Redist/api-ms-win-core-console-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-datetime-l1-1-0.dll b/bld/Redist/api-ms-win-core-datetime-l1-1-0.dll deleted file mode 100644 index 270130fd..00000000 Binary files a/bld/Redist/api-ms-win-core-datetime-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-debug-l1-1-0.dll b/bld/Redist/api-ms-win-core-debug-l1-1-0.dll deleted file mode 100644 index 5acef2ac..00000000 Binary files a/bld/Redist/api-ms-win-core-debug-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-errorhandling-l1-1-0.dll b/bld/Redist/api-ms-win-core-errorhandling-l1-1-0.dll deleted file mode 100644 index 1374800e..00000000 Binary files a/bld/Redist/api-ms-win-core-errorhandling-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-file-l1-1-0.dll b/bld/Redist/api-ms-win-core-file-l1-1-0.dll deleted file mode 100644 index 1300afa8..00000000 Binary files a/bld/Redist/api-ms-win-core-file-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-file-l1-2-0.dll b/bld/Redist/api-ms-win-core-file-l1-2-0.dll deleted file mode 100644 index dda8db74..00000000 Binary files a/bld/Redist/api-ms-win-core-file-l1-2-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-file-l2-1-0.dll b/bld/Redist/api-ms-win-core-file-l2-1-0.dll deleted file mode 100644 index 6e13fd38..00000000 Binary files a/bld/Redist/api-ms-win-core-file-l2-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-handle-l1-1-0.dll b/bld/Redist/api-ms-win-core-handle-l1-1-0.dll deleted file mode 100644 index 523d45f2..00000000 Binary files a/bld/Redist/api-ms-win-core-handle-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-heap-l1-1-0.dll b/bld/Redist/api-ms-win-core-heap-l1-1-0.dll deleted file mode 100644 index 8e04457c..00000000 Binary files a/bld/Redist/api-ms-win-core-heap-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-interlocked-l1-1-0.dll b/bld/Redist/api-ms-win-core-interlocked-l1-1-0.dll deleted file mode 100644 index cba3a82b..00000000 Binary files a/bld/Redist/api-ms-win-core-interlocked-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-libraryloader-l1-1-0.dll b/bld/Redist/api-ms-win-core-libraryloader-l1-1-0.dll deleted file mode 100644 index 0d0df2cc..00000000 Binary files a/bld/Redist/api-ms-win-core-libraryloader-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-localization-l1-2-0.dll b/bld/Redist/api-ms-win-core-localization-l1-2-0.dll deleted file mode 100644 index e2fbe159..00000000 Binary files a/bld/Redist/api-ms-win-core-localization-l1-2-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-memory-l1-1-0.dll b/bld/Redist/api-ms-win-core-memory-l1-1-0.dll deleted file mode 100644 index d5a464d3..00000000 Binary files a/bld/Redist/api-ms-win-core-memory-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-namedpipe-l1-1-0.dll b/bld/Redist/api-ms-win-core-namedpipe-l1-1-0.dll deleted file mode 100644 index 382a677b..00000000 Binary files a/bld/Redist/api-ms-win-core-namedpipe-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-processenvironment-l1-1-0.dll b/bld/Redist/api-ms-win-core-processenvironment-l1-1-0.dll deleted file mode 100644 index f846cd1b..00000000 Binary files a/bld/Redist/api-ms-win-core-processenvironment-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-processthreads-l1-1-0.dll b/bld/Redist/api-ms-win-core-processthreads-l1-1-0.dll deleted file mode 100644 index fb086be4..00000000 Binary files a/bld/Redist/api-ms-win-core-processthreads-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-processthreads-l1-1-1.dll b/bld/Redist/api-ms-win-core-processthreads-l1-1-1.dll deleted file mode 100644 index a5df5fb4..00000000 Binary files a/bld/Redist/api-ms-win-core-processthreads-l1-1-1.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-profile-l1-1-0.dll b/bld/Redist/api-ms-win-core-profile-l1-1-0.dll deleted file mode 100644 index f473bd3e..00000000 Binary files a/bld/Redist/api-ms-win-core-profile-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-rtlsupport-l1-1-0.dll b/bld/Redist/api-ms-win-core-rtlsupport-l1-1-0.dll deleted file mode 100644 index f05b0587..00000000 Binary files a/bld/Redist/api-ms-win-core-rtlsupport-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-string-l1-1-0.dll b/bld/Redist/api-ms-win-core-string-l1-1-0.dll deleted file mode 100644 index 7758ac42..00000000 Binary files a/bld/Redist/api-ms-win-core-string-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-synch-l1-1-0.dll b/bld/Redist/api-ms-win-core-synch-l1-1-0.dll deleted file mode 100644 index a9512053..00000000 Binary files a/bld/Redist/api-ms-win-core-synch-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-synch-l1-2-0.dll b/bld/Redist/api-ms-win-core-synch-l1-2-0.dll deleted file mode 100644 index 38fee872..00000000 Binary files a/bld/Redist/api-ms-win-core-synch-l1-2-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-sysinfo-l1-1-0.dll b/bld/Redist/api-ms-win-core-sysinfo-l1-1-0.dll deleted file mode 100644 index a299aff9..00000000 Binary files a/bld/Redist/api-ms-win-core-sysinfo-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-timezone-l1-1-0.dll b/bld/Redist/api-ms-win-core-timezone-l1-1-0.dll deleted file mode 100644 index 6f427d17..00000000 Binary files a/bld/Redist/api-ms-win-core-timezone-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-core-util-l1-1-0.dll b/bld/Redist/api-ms-win-core-util-l1-1-0.dll deleted file mode 100644 index d08b7d3d..00000000 Binary files a/bld/Redist/api-ms-win-core-util-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-conio-l1-1-0.dll b/bld/Redist/api-ms-win-crt-conio-l1-1-0.dll deleted file mode 100644 index 02a70617..00000000 Binary files a/bld/Redist/api-ms-win-crt-conio-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-convert-l1-1-0.dll b/bld/Redist/api-ms-win-crt-convert-l1-1-0.dll deleted file mode 100644 index af0a1ae5..00000000 Binary files a/bld/Redist/api-ms-win-crt-convert-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-environment-l1-1-0.dll b/bld/Redist/api-ms-win-crt-environment-l1-1-0.dll deleted file mode 100644 index 7d08ad05..00000000 Binary files a/bld/Redist/api-ms-win-crt-environment-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-filesystem-l1-1-0.dll b/bld/Redist/api-ms-win-crt-filesystem-l1-1-0.dll deleted file mode 100644 index 8e6306a9..00000000 Binary files a/bld/Redist/api-ms-win-crt-filesystem-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-heap-l1-1-0.dll b/bld/Redist/api-ms-win-crt-heap-l1-1-0.dll deleted file mode 100644 index b2c83625..00000000 Binary files a/bld/Redist/api-ms-win-crt-heap-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-locale-l1-1-0.dll b/bld/Redist/api-ms-win-crt-locale-l1-1-0.dll deleted file mode 100644 index fe4419f1..00000000 Binary files a/bld/Redist/api-ms-win-crt-locale-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-math-l1-1-0.dll b/bld/Redist/api-ms-win-crt-math-l1-1-0.dll deleted file mode 100644 index 8f1a078c..00000000 Binary files a/bld/Redist/api-ms-win-crt-math-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-multibyte-l1-1-0.dll b/bld/Redist/api-ms-win-crt-multibyte-l1-1-0.dll deleted file mode 100644 index 7325d34e..00000000 Binary files a/bld/Redist/api-ms-win-crt-multibyte-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-private-l1-1-0.dll b/bld/Redist/api-ms-win-crt-private-l1-1-0.dll deleted file mode 100644 index e5422f0f..00000000 Binary files a/bld/Redist/api-ms-win-crt-private-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-process-l1-1-0.dll b/bld/Redist/api-ms-win-crt-process-l1-1-0.dll deleted file mode 100644 index 6b729e63..00000000 Binary files a/bld/Redist/api-ms-win-crt-process-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-runtime-l1-1-0.dll b/bld/Redist/api-ms-win-crt-runtime-l1-1-0.dll deleted file mode 100644 index c8a92f0a..00000000 Binary files a/bld/Redist/api-ms-win-crt-runtime-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-stdio-l1-1-0.dll b/bld/Redist/api-ms-win-crt-stdio-l1-1-0.dll deleted file mode 100644 index 4c17e534..00000000 Binary files a/bld/Redist/api-ms-win-crt-stdio-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-string-l1-1-0.dll b/bld/Redist/api-ms-win-crt-string-l1-1-0.dll deleted file mode 100644 index 780ea39f..00000000 Binary files a/bld/Redist/api-ms-win-crt-string-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-time-l1-1-0.dll b/bld/Redist/api-ms-win-crt-time-l1-1-0.dll deleted file mode 100644 index fae1379f..00000000 Binary files a/bld/Redist/api-ms-win-crt-time-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/api-ms-win-crt-utility-l1-1-0.dll b/bld/Redist/api-ms-win-crt-utility-l1-1-0.dll deleted file mode 100644 index 5bf4200d..00000000 Binary files a/bld/Redist/api-ms-win-crt-utility-l1-1-0.dll and /dev/null differ diff --git a/bld/Redist/concrt140.dll b/bld/Redist/concrt140.dll deleted file mode 100644 index ae6d6f5a..00000000 Binary files a/bld/Redist/concrt140.dll and /dev/null differ diff --git a/bld/Redist/msvcp140.dll b/bld/Redist/msvcp140.dll deleted file mode 100644 index 3ebae12a..00000000 Binary files a/bld/Redist/msvcp140.dll and /dev/null differ diff --git a/bld/Redist/msvcp140_1.dll b/bld/Redist/msvcp140_1.dll deleted file mode 100644 index e874501b..00000000 Binary files a/bld/Redist/msvcp140_1.dll and /dev/null differ diff --git a/bld/Redist/msvcp140_2.dll b/bld/Redist/msvcp140_2.dll deleted file mode 100644 index b5212bde..00000000 Binary files a/bld/Redist/msvcp140_2.dll and /dev/null differ diff --git a/bld/Redist/msvcp140_atomic_wait.dll b/bld/Redist/msvcp140_atomic_wait.dll deleted file mode 100644 index 6a88b92d..00000000 Binary files a/bld/Redist/msvcp140_atomic_wait.dll and /dev/null differ diff --git a/bld/Redist/msvcp140_codecvt_ids.dll b/bld/Redist/msvcp140_codecvt_ids.dll deleted file mode 100644 index cd30c7ba..00000000 Binary files a/bld/Redist/msvcp140_codecvt_ids.dll and /dev/null differ diff --git a/bld/Redist/ucrtbase.dll b/bld/Redist/ucrtbase.dll deleted file mode 100644 index 98c744d4..00000000 Binary files a/bld/Redist/ucrtbase.dll and /dev/null differ diff --git a/bld/Redist/vccorlib140.dll b/bld/Redist/vccorlib140.dll deleted file mode 100644 index 256e08d0..00000000 Binary files a/bld/Redist/vccorlib140.dll and /dev/null differ diff --git a/bld/Redist/vcruntime140.dll b/bld/Redist/vcruntime140.dll deleted file mode 100644 index 9ab53348..00000000 Binary files a/bld/Redist/vcruntime140.dll and /dev/null differ diff --git a/global.json b/global.json new file mode 100644 index 00000000..13300bb9 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0.0", + "rollForward": "latestMinor", + "allowPrerelease": false + } +} diff --git a/lib/TweetLib.Browser.CEF/Logic/DialogHandlerLogic.cs b/lib/TweetLib.Browser.CEF/Logic/DialogHandlerLogic.cs index d85ab24b..10be585e 100644 --- a/lib/TweetLib.Browser.CEF/Logic/DialogHandlerLogic.cs +++ b/lib/TweetLib.Browser.CEF/Logic/DialogHandlerLogic.cs @@ -29,7 +29,7 @@ public bool OnFileDialog(FileDialogType type, IEnumerable<string> acceptFilters, }; fileDialogOpener.OpenFile("Open Files", multiple, filters, files => { - string ext = Path.GetExtension(files[0])!.ToLower(); + string ext = Path.GetExtension(files[0]).ToLower(); callbackAdapter.Continue(callback, Array.FindIndex(supportedExtensions, filter => ParseFileType(filter).Contains(ext)), files); callbackAdapter.Dispose(callback); }, () => { diff --git a/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj b/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj index 9fd3bb88..a531f33d 100644 --- a/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj +++ b/lib/TweetLib.Browser.CEF/TweetLib.Browser.CEF.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> <LangVersion>9</LangVersion> diff --git a/lib/TweetLib.Browser/TweetLib.Browser.csproj b/lib/TweetLib.Browser/TweetLib.Browser.csproj index dbaebe9a..953d39e1 100644 --- a/lib/TweetLib.Browser/TweetLib.Browser.csproj +++ b/lib/TweetLib.Browser/TweetLib.Browser.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> <LangVersion>9</LangVersion> diff --git a/lib/TweetLib.Communication/Pipe/DuplexPipe.cs b/lib/TweetLib.Communication/Pipe/DuplexPipe.cs index e597a7fa..aa9de305 100644 --- a/lib/TweetLib.Communication/Pipe/DuplexPipe.cs +++ b/lib/TweetLib.Communication/Pipe/DuplexPipe.cs @@ -38,10 +38,13 @@ private DuplexPipe(PipeStream pipeIn, PipeStream pipeOut) { private void ReaderThread() { using StreamReader read = new StreamReader(pipeIn); - string? data; - while ((data = read.ReadLine()) != null) { - DataIn?.Invoke(this, new PipeReadEventArgs(data)); + try { + while (read.ReadLine() is {} data) { + DataIn?.Invoke(this, new PipeReadEventArgs(data)); + } + } catch (ObjectDisposedException) { + // expected } } @@ -56,12 +59,6 @@ public void Write(string key, string data) { } public void Dispose() { - try { - readerThread.Abort(); - } catch { - // /shrug - } - pipeIn.Dispose(); writerStream.Dispose(); } diff --git a/lib/TweetLib.Communication/TweetLib.Communication.csproj b/lib/TweetLib.Communication/TweetLib.Communication.csproj index 7badffde..fbf6f275 100644 --- a/lib/TweetLib.Communication/TweetLib.Communication.csproj +++ b/lib/TweetLib.Communication/TweetLib.Communication.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Platforms>x86</Platforms> <LangVersion>9</LangVersion> <Nullable>enable</Nullable> diff --git a/lib/TweetLib.Core/TweetLib.Core.csproj b/lib/TweetLib.Core/TweetLib.Core.csproj index 6872f6ce..7850c59b 100644 --- a/lib/TweetLib.Core/TweetLib.Core.csproj +++ b/lib/TweetLib.Core/TweetLib.Core.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> <LangVersion>9</LangVersion> diff --git a/lib/TweetLib.Utils/TweetLib.Utils.csproj b/lib/TweetLib.Utils/TweetLib.Utils.csproj index dbaebe9a..953d39e1 100644 --- a/lib/TweetLib.Utils/TweetLib.Utils.csproj +++ b/lib/TweetLib.Utils/TweetLib.Utils.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x86;x64</Platforms> <LangVersion>9</LangVersion> diff --git a/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj b/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj index 6acfa281..89f17de4 100644 --- a/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj +++ b/lib/TweetTest.Browser.CEF/TweetTest.Browser.CEF.fsproj @@ -1,8 +1,9 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net472</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Platforms>x86</Platforms> + <RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers> </PropertyGroup> <ItemGroup> diff --git a/lib/TweetTest.Core/TweetTest.Core.fsproj b/lib/TweetTest.Core/TweetTest.Core.fsproj index 242aec01..8d56ac34 100644 --- a/lib/TweetTest.Core/TweetTest.Core.fsproj +++ b/lib/TweetTest.Core/TweetTest.Core.fsproj @@ -1,8 +1,9 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net472</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Platforms>x86</Platforms> + <RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers> </PropertyGroup> <ItemGroup> diff --git a/lib/TweetTest.Utils/TweetTest.Utils.fsproj b/lib/TweetTest.Utils/TweetTest.Utils.fsproj index 54f4a5ff..acd2a771 100644 --- a/lib/TweetTest.Utils/TweetTest.Utils.fsproj +++ b/lib/TweetTest.Utils/TweetTest.Utils.fsproj @@ -1,8 +1,9 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net472</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Platforms>x86</Platforms> + <RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers> </PropertyGroup> <ItemGroup> diff --git a/linux/TweetDuck/TweetDuck.csproj b/linux/TweetDuck/TweetDuck.csproj index bc437ee5..a6da16a9 100644 --- a/linux/TweetDuck/TweetDuck.csproj +++ b/linux/TweetDuck/TweetDuck.csproj @@ -1,9 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net5.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x64</Platforms> + <LangVersion>10</LangVersion> <OutputType>WinExe</OutputType> <Nullable>enable</Nullable> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> diff --git a/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj b/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj index 005ba0e0..c7f0bb7e 100644 --- a/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj +++ b/linux/TweetImpl.CefGlue/TweetImpl.CefGlue.csproj @@ -1,9 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net5.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <Configurations>Debug;Release</Configurations> <Platforms>x64</Platforms> + <LangVersion>10</LangVersion> <Nullable>enable</Nullable> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> diff --git a/linux/global.json b/linux/global.json old mode 100755 new mode 100644 index e5674e16..13300bb9 --- a/linux/global.json +++ b/linux/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "5.0.0", + "version": "6.0.0", "rollForward": "latestMinor", "allowPrerelease": false } -} \ No newline at end of file +} diff --git a/windows/TweetDuck.Browser/Program.cs b/windows/TweetDuck.Browser/Program.cs index ada0df55..df25e075 100644 --- a/windows/TweetDuck.Browser/Program.cs +++ b/windows/TweetDuck.Browser/Program.cs @@ -1,33 +1,25 @@ using System; using System.Diagnostics; using System.Threading.Tasks; -using CefSharp.BrowserSubprocess; +using CefSharp.Core; namespace TweetDuck.Browser { static class Program { + private const string ParentIdPrefix = "--host-process-id="; + private static int Main(string[] args) { - SubProcess.EnableHighDPISupport(); - - string FindArg(string key) { - return Array.Find(args, arg => arg.StartsWith(key, StringComparison.OrdinalIgnoreCase)).Substring(key.Length); - } - - const string typePrefix = "--type="; - const string parentIdPrefix = "--host-process-id="; - - if (!int.TryParse(FindArg(parentIdPrefix), out int parentId)) { + if (!int.TryParse(FindArg(args, ParentIdPrefix), out int parentId)) { return 0; } Task.Factory.StartNew(() => KillWhenHung(parentId), TaskCreationOptions.LongRunning); - if (FindArg(typePrefix) == "renderer") { - using SubProcess subProcess = new SubProcess(null, args); - return subProcess.Run(); - } - else { - return SubProcess.ExecuteProcess(args); - } + Cef.EnableHighDPISupport(); + return CefSharp.BrowserSubprocess.SelfHost.Main(args); + } + + private static string? FindArg(string[] args, string key) { + return Array.Find(args, arg => arg.StartsWith(key, StringComparison.OrdinalIgnoreCase))?[key.Length..]; } private static async void KillWhenHung(int parentId) { diff --git a/windows/TweetDuck.Browser/Properties/AssemblyInfo.cs b/windows/TweetDuck.Browser/Properties/AssemblyInfo.cs index ff3287a7..d12e46fa 100644 --- a/windows/TweetDuck.Browser/Properties/AssemblyInfo.cs +++ b/windows/TweetDuck.Browser/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Runtime.Versioning; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -20,3 +21,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b10b0017-819e-4f71-870f-8256b36a26aa")] + +[assembly: SupportedOSPlatform("windows")] diff --git a/windows/TweetDuck.Browser/TweetDuck.Browser.csproj b/windows/TweetDuck.Browser/TweetDuck.Browser.csproj index 41aa7c92..b73fdbba 100644 --- a/windows/TweetDuck.Browser/TweetDuck.Browser.csproj +++ b/windows/TweetDuck.Browser/TweetDuck.Browser.csproj @@ -1,62 +1,46 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0-windows</TargetFramework> + <Configurations>Debug;Release</Configurations> + <Platforms>x86</Platforms> + <RuntimeIdentifier>win7-x86</RuntimeIdentifier> + <LangVersion>8.0</LangVersion> + <Nullable>enable</Nullable> + </PropertyGroup> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">x86</Platform> - <ProjectGuid>{B10B0017-819E-4F71-870F-8256B36A26AA}</ProjectGuid> <OutputType>WinExe</OutputType> + <UseWindowsForms>true</UseWindowsForms> <RootNamespace>TweetDuck.Browser</RootNamespace> <AssemblyName>TweetDuck.Browser</AssemblyName> - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> - <LangVersion>8.0</LangVersion> - <FileAlignment>512</FileAlignment> - <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> - <NuGetPackageImportStamp> - </NuGetPackageImportStamp> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> - <PlatformTarget>x86</PlatformTarget> - <OutputPath>bin\x86\Debug\</OutputPath> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> - <PlatformTarget>x86</PlatformTarget> - <OutputPath>bin\x86\Release\</OutputPath> - </PropertyGroup> - <PropertyGroup> <StartupObject /> </PropertyGroup> - <ItemGroup> - <Reference Include="CefSharp, Version=98.0.260, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\packages\CefSharp.Common.98.1.210\lib\net452\CefSharp.dll</HintPath> - </Reference> - <Reference Include="CefSharp.BrowserSubprocess.Core, Version=98.0.260, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\packages\CefSharp.Common.98.1.210\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> - </Reference> - <Reference Include="System" /> - </ItemGroup> - <ItemGroup> - <Compile Include="..\..\Version.cs"> - <Link>Version.cs</Link> - </Compile> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> - <PostBuildEvent>call "$(DevEnvDir)\..\..\VC\Auxiliary\Build\vcvars32.bat" -editbin /largeaddressaware /TSAWARE "$(TargetPath)"</PostBuildEvent> + <SelfContained>true</SelfContained> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> + <SatelliteResourceLanguages>en</SatelliteResourceLanguages> </PropertyGroup> - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> - <PropertyGroup> - <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> - </PropertyGroup> - <Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props'))" /> + + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>none</DebugType> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="CefSharp.WinForms.NETCore" Version="102.0.90" /> + </ItemGroup> + + <ItemGroup> + <Compile Include="..\..\Version.cs" Link="Version.cs" /> + </ItemGroup> + + <Target Name="CopyResources" AfterTargets="Build"> + <Exec Command="call "$(DevEnvDir)\..\..\VC\Auxiliary\Build\vcvars32.bat" & editbin /largeaddressaware /TSAWARE "$(TargetDir)TweetDuck.Browser.exe"" ContinueOnError="false" /> </Target> + </Project> diff --git a/windows/TweetDuck.Browser/packages.config b/windows/TweetDuck.Browser/packages.config deleted file mode 100644 index ae425812..00000000 --- a/windows/TweetDuck.Browser/packages.config +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="Microsoft.Net.Compilers" version="3.0.0" targetFramework="net472" developmentDependency="true" /> -</packages> \ No newline at end of file diff --git a/windows/TweetDuck.Video/FormPlayer.cs b/windows/TweetDuck.Video/FormPlayer.cs index db950d9a..3882b482 100644 --- a/windows/TweetDuck.Video/FormPlayer.cs +++ b/windows/TweetDuck.Video/FormPlayer.cs @@ -2,7 +2,6 @@ using System; using System.Drawing; using System.Globalization; -using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Windows.Forms; using TweetDuck.Video.Controls; @@ -216,7 +215,6 @@ private void timerUI_Tick(object? sender, EventArgs e) { Marshal.ReleaseComObject(controls); } - [HandleProcessCorruptedStateExceptions] private void timerSync_Tick(object sender, EventArgs e) { if (NativeMethods.GetWindowRect(ownerHandle, out NativeMethods.RECT rect)) { IWMPMedia media = Player.currentMedia; diff --git a/windows/TweetDuck.Video/Properties/AssemblyInfo.cs b/windows/TweetDuck.Video/Properties/AssemblyInfo.cs index 52dca5da..85812c50 100644 --- a/windows/TweetDuck.Video/Properties/AssemblyInfo.cs +++ b/windows/TweetDuck.Video/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Runtime.Versioning; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -20,3 +21,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("278b2d11-402d-44b6-b6a1-8fa67db65565")] + +[assembly: SupportedOSPlatform("windows")] diff --git a/windows/TweetDuck.Video/TweetDuck.Video.csproj b/windows/TweetDuck.Video/TweetDuck.Video.csproj index e11ea5e9..247bd47e 100644 --- a/windows/TweetDuck.Video/TweetDuck.Video.csproj +++ b/windows/TweetDuck.Video/TweetDuck.Video.csproj @@ -1,80 +1,37 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0-windows</TargetFramework> + <Configurations>Debug;Release</Configurations> + <Platforms>x86</Platforms> + <RuntimeIdentifier>win7-x86</RuntimeIdentifier> + <LangVersion>8.0</LangVersion> + <Nullable>enable</Nullable> + </PropertyGroup> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">x86</Platform> - <ProjectGuid>{278B2D11-402D-44B6-B6A1-8FA67DB65565}</ProjectGuid> <OutputType>WinExe</OutputType> + <UseWindowsForms>true</UseWindowsForms> <RootNamespace>TweetDuck.Video</RootNamespace> <AssemblyName>TweetDuck.Video</AssemblyName> - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> - <LangVersion>8.0</LangVersion> - <FileAlignment>512</FileAlignment> - <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> - <ResolveComReferenceSilent>True</ResolveComReferenceSilent> - <NuGetPackageImportStamp> - </NuGetPackageImportStamp> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <Prefer32Bit>true</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> - <OutputPath>bin\x86\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <Optimize>true</Optimize> - <DebugType>none</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <Prefer32Bit>true</Prefer32Bit> - <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> - </PropertyGroup> - <PropertyGroup> <ApplicationIcon>Resources\icon.ico</ApplicationIcon> </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Windows.Forms" /> - </ItemGroup> - <ItemGroup> - <Compile Include="..\..\Version.cs"> - <Link>Version.cs</Link> - </Compile> - <Compile Include="Controls\ControlWMP.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Controls\LabelTooltip.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Controls\SeekBar.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="FormPlayer.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="FormPlayer.Designer.cs"> - <DependentUpon>FormPlayer.cs</DependentUpon> - </Compile> - <Compile Include="NativeMethods.cs" /> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - </ItemGroup> + + <PropertyGroup> + <SelfContained>true</SelfContained> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <ResolveComReferenceSilent>True</ResolveComReferenceSilent> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> + <SatelliteResourceLanguages>en</SatelliteResourceLanguages> + </PropertyGroup> + + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>none</DebugType> + </PropertyGroup> + <ItemGroup> <COMReference Include="WMPLib"> <Guid>{6BF52A50-394A-11D3-B153-00C04F79FAA6}</Guid> @@ -86,30 +43,20 @@ <EmbedInteropTypes>True</EmbedInteropTypes> </COMReference> </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\..\lib\TweetLib.Communication\TweetLib.Communication.csproj" /> + </ItemGroup> + + <ItemGroup> + <Compile Include="..\..\Version.cs" Link="Version.cs" /> + </ItemGroup> + <ItemGroup> - <None Include="packages.config" /> <None Include="Resources\btnResize.png" /> <None Include="Resources\btnDownload.png" /> <None Include="Resources\btnClose.png" /> <Content Include="Resources\icon.ico" /> </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\lib\TweetLib.Communication\TweetLib.Communication.csproj"> - <Project>{72473763-4b9d-4fb6-a923-9364b2680f06}</Project> - <Name>TweetLib.Communication</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> - <PropertyGroup> - <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> - </PropertyGroup> - <Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props'))" /> - </Target> + </Project> diff --git a/windows/TweetDuck.Video/packages.config b/windows/TweetDuck.Video/packages.config deleted file mode 100644 index ae425812..00000000 --- a/windows/TweetDuck.Video/packages.config +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="Microsoft.Net.Compilers" version="3.0.0" targetFramework="net472" developmentDependency="true" /> -</packages> \ No newline at end of file diff --git a/windows/TweetDuck/Application/SystemHandler.cs b/windows/TweetDuck/Application/SystemHandler.cs index d93ac253..fd5a870a 100644 --- a/windows/TweetDuck/Application/SystemHandler.cs +++ b/windows/TweetDuck/Application/SystemHandler.cs @@ -85,6 +85,7 @@ public void OpenFileExplorer(string path) { try { using (Process.Start(new ProcessStartInfo { FileName = path, + UseShellExecute = true, ErrorDialog = true })) {} } catch (Exception e) { diff --git a/windows/TweetDuck/Browser/Base/ContextMenuBrowser.cs b/windows/TweetDuck/Browser/Base/ContextMenuBrowser.cs index 5b516038..598e3bcb 100644 --- a/windows/TweetDuck/Browser/Base/ContextMenuBrowser.cs +++ b/windows/TweetDuck/Browser/Base/ContextMenuBrowser.cs @@ -99,18 +99,18 @@ public override void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser extraContext.Reset(); } - public static ContextMenu CreateMenu(FormBrowser form) { - ContextMenu menu = new ContextMenu(); + public static ContextMenuStrip CreateMenu(FormBrowser form) { + ContextMenuStrip menu = new ContextMenuStrip(); - menu.MenuItems.Add(TitleReloadBrowser, (sender, args) => form.ReloadToTweetDeck()); - menu.MenuItems.Add(TitleMuteNotifications, (sender, args) => ToggleMuteNotifications()); - menu.MenuItems.Add("-"); - menu.MenuItems.Add(TitleSettings, (sender, args) => form.OpenSettings()); - menu.MenuItems.Add(TitlePlugins, (sender, args) => form.OpenPlugins()); - menu.MenuItems.Add(TitleAboutProgram, (sender, args) => form.OpenAbout()); + menu.Items.Add(TitleReloadBrowser, null, (sender, args) => form.ReloadToTweetDeck()); + menu.Items.Add(TitleMuteNotifications, null, (sender, args) => ToggleMuteNotifications()); + menu.Items.Add("-"); + menu.Items.Add(TitleSettings, null, (sender, args) => form.OpenSettings()); + menu.Items.Add(TitlePlugins, null, (sender, args) => form.OpenPlugins()); + menu.Items.Add(TitleAboutProgram, null, (sender, args) => form.OpenAbout()); - menu.Popup += (sender, args) => { - menu.MenuItems[1].Checked = Config.MuteNotifications; + menu.Opening += (sender, args) => { + ((ToolStripMenuItem) menu.Items[1]).Checked = Config.MuteNotifications; }; return menu; diff --git a/windows/TweetDuck/Browser/FormBrowser.cs b/windows/TweetDuck/Browser/FormBrowser.cs index ab1dc9e9..d14674b9 100644 --- a/windows/TweetDuck/Browser/FormBrowser.cs +++ b/windows/TweetDuck/Browser/FormBrowser.cs @@ -57,7 +57,7 @@ public bool IsWaiting { private readonly FormNotificationTweet notification; private readonly PluginManager plugins; private readonly UpdateChecker updates; - private readonly ContextMenu contextMenu; + private readonly ContextMenuStrip contextMenu; private readonly uint windowRestoreMessage; private bool isLoaded; diff --git a/windows/TweetDuck/Browser/TrayIcon.cs b/windows/TweetDuck/Browser/TrayIcon.cs index 31463570..e0547393 100644 --- a/windows/TweetDuck/Browser/TrayIcon.cs +++ b/windows/TweetDuck/Browser/TrayIcon.cs @@ -45,19 +45,19 @@ public bool HasNotifications { } } - private readonly ContextMenu contextMenu; + private readonly ContextMenuStrip contextMenu; private bool hasNotifications; private TrayIcon() { InitializeComponent(); - this.contextMenu = new ContextMenu(); - this.contextMenu.MenuItems.Add("Restore", menuItemRestore_Click); - this.contextMenu.MenuItems.Add("Mute notifications", menuItemMuteNotifications_Click); - this.contextMenu.MenuItems.Add("Close", menuItemClose_Click); - this.contextMenu.Popup += contextMenu_Popup; + this.contextMenu = new ContextMenuStrip(); + this.contextMenu.Items.Add("Restore", null, menuItemRestore_Click); + this.contextMenu.Items.Add("Mute notifications", null, menuItemMuteNotifications_Click); + this.contextMenu.Items.Add("Close", null, menuItemClose_Click); + this.contextMenu.Opening += contextMenu_Popup; - this.notifyIcon.ContextMenu = contextMenu; + this.notifyIcon.ContextMenuStrip = contextMenu; this.notifyIcon.Text = Program.BrandName; Config.MuteToggled += Config_MuteToggled; @@ -96,7 +96,7 @@ private void trayIcon_MouseClick(object sender, MouseEventArgs e) { } private void contextMenu_Popup(object sender, EventArgs e) { - contextMenu.MenuItems[1].Checked = Config.MuteNotifications; + ((ToolStripMenuItem) contextMenu.Items[1]).Checked = Config.MuteNotifications; } private void menuItemRestore_Click(object sender, EventArgs e) { @@ -104,7 +104,7 @@ private void menuItemRestore_Click(object sender, EventArgs e) { } private void menuItemMuteNotifications_Click(object sender, EventArgs e) { - Config.MuteNotifications = !contextMenu.MenuItems[1].Checked; + Config.MuteNotifications = !((ToolStripMenuItem) contextMenu.Items[1]).Checked; Config.Save(); } diff --git a/windows/TweetDuck/Management/VideoPlayer.cs b/windows/TweetDuck/Management/VideoPlayer.cs index ad147aec..f4a2bfa0 100644 --- a/windows/TweetDuck/Management/VideoPlayer.cs +++ b/windows/TweetDuck/Management/VideoPlayer.cs @@ -41,7 +41,6 @@ public void Launch(string videoUrl, string tweetUrl, string username) { ProcessStartInfo startInfo = new ProcessStartInfo { FileName = Path.Combine(App.ProgramPath, "TweetDuck.Video.exe"), Arguments = $"{owner.Handle} {(int) Math.Floor(100F * owner.GetDPIScale())} {Config.VideoPlayerVolume} \"{videoUrl}\" \"{pipe.GenerateToken()}\"", - UseShellExecute = false, RedirectStandardOutput = true }; diff --git a/windows/TweetDuck/Program.cs b/windows/TweetDuck/Program.cs index 53ff420d..c1a3a4a2 100644 --- a/windows/TweetDuck/Program.cs +++ b/windows/TweetDuck/Program.cs @@ -114,7 +114,6 @@ public void Launch(ResourceCache resourceCache, PluginManager pluginManager) { BrowserCache.RefreshTimer(); - CefSharpSettings.WcfEnabled = false; CefSharpSettings.SubprocessExitIfParentProcessClosed = false; CefSettings settings = new CefSettings { diff --git a/windows/TweetDuck/Properties/AssemblyInfo.cs b/windows/TweetDuck/Properties/AssemblyInfo.cs index 72790758..ff4f0d74 100644 --- a/windows/TweetDuck/Properties/AssemblyInfo.cs +++ b/windows/TweetDuck/Properties/AssemblyInfo.cs @@ -2,6 +2,7 @@ using System.Reflection; using System.Resources; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using TweetDuck; // General Information about an assembly is controlled through the following @@ -24,6 +25,6 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7f09373d-8beb-416f-a48d-45d8aaeb8caf")] +[assembly: SupportedOSPlatform("windows")] [assembly: NeutralResourcesLanguage("en")] - [assembly: CLSCompliant(true)] diff --git a/windows/TweetDuck/Reporter.cs b/windows/TweetDuck/Reporter.cs index 8606b47b..d30d3364 100644 --- a/windows/TweetDuck/Reporter.cs +++ b/windows/TweetDuck/Reporter.cs @@ -63,7 +63,7 @@ public void HandleException(string caption, string message, bool canIgnore, Exce private static bool OpenLogFile() { try { - using (Process.Start(App.Logger.LogFilePath)) {} + using (Process.Start(new ProcessStartInfo(App.Logger.LogFilePath) { UseShellExecute = true })) {} } catch (Exception) { return false; } diff --git a/windows/TweetDuck/Resources/PostCefUpdate.ps1 b/windows/TweetDuck/Resources/PostCefUpdate.ps1 deleted file mode 100644 index ff2688ab..00000000 --- a/windows/TweetDuck/Resources/PostCefUpdate.ps1 +++ /dev/null @@ -1,45 +0,0 @@ -$ErrorActionPreference = "Stop" - -try{ - $mainProj = "..\TweetDuck.csproj" - $browserProj = "..\..\TweetDuck.Browser\TweetDuck.Browser.csproj" - - $cefMatch = Select-String -Path $mainProj '<Import Project="..\\..\\packages\\cef\.redist\.x86\.(.*?)\\' - $cefVersion = $cefMatch.Matches[0].Groups[1].Value - - $sharpMatch = Select-String -Path $mainProj '<Import Project="..\\..\\packages\\CefSharp\.Common\.(.*?)\\' - $sharpVersion = $sharpMatch.Matches[0].Groups[1].Value - - # Greetings - - $title = "CEF ${cefVersion}, CefSharp ${sharpVersion}" - - Write-Host ("-" * $title.Length) - Write-Host $title - Write-Host ("-" * $title.Length) - - # Perform update - - Write-Host "Updating browser subprocess reference..." - - $contents = [IO.File]::ReadAllText($browserProj) - $contents = $contents -Replace '(?<=<HintPath>\.\.\\\.\.\\packages\\CefSharp\.Common\.)(.*?)(?=\\)', $sharpVersion - $contents = $contents -Replace '(?<=<Reference Include="CefSharp, Version=)(\d+)', $sharpVersion.Split(".")[0] - $contents = $contents -Replace '(?<=<Reference Include="CefSharp\.BrowserSubprocess\.Core, Version=)(\d+)', $sharpVersion.Split(".")[0] - - [IO.File]::WriteAllText($browserProj, $contents) - - # Finished - - Write-Host "" - Write-Host "Finished. Exiting in 6 seconds..." - Start-Sleep -Seconds 6 - -}catch{ - Write-Host "" - Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber - Write-Host $_ - - $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") - Exit 1 -} diff --git a/windows/TweetDuck/TweetDuck.csproj b/windows/TweetDuck/TweetDuck.csproj index e30d45a5..2079a54b 100644 --- a/windows/TweetDuck/TweetDuck.csproj +++ b/windows/TweetDuck/TweetDuck.csproj @@ -1,338 +1,61 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props" Condition="Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props')" /> - <Import Project="..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props" Condition="Exists('..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props')" /> - <Import Project="..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props" Condition="Exists('..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props')" /> - <Import Project="..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props" Condition="Exists('..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props')" /> - <Import Project="..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0-windows</TargetFramework> + <Configurations>Debug;Release</Configurations> + <Platforms>x86</Platforms> + <RuntimeIdentifier>win7-x86</RuntimeIdentifier> + <LangVersion>8.0</LangVersion> + <Nullable>enable</Nullable> + </PropertyGroup> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">x86</Platform> - <ProjectGuid>{2389A7CD-E0D3-4706-8294-092929A33A2D}</ProjectGuid> <OutputType>WinExe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> + <UseWindowsForms>true</UseWindowsForms> <RootNamespace>TweetDuck</RootNamespace> <AssemblyName>TweetDuck</AssemblyName> - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> - <LangVersion>8.0</LangVersion> - <FileAlignment>512</FileAlignment> - <UseVSHostingProcess>false</UseVSHostingProcess> + <AppDesignerFolder>Properties</AppDesignerFolder> <ApplicationIcon>Resources\Images\icon.ico</ApplicationIcon> - <NuGetPackageImportStamp> - </NuGetPackageImportStamp> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)' == 'Debug'"> + + <PropertyGroup> + <SelfContained>true</SelfContained> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> + <SatelliteResourceLanguages>en</SatelliteResourceLanguages> + </PropertyGroup> + + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <StartArguments>-datafolder TweetDuckDebug</StartArguments> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> - <OutputPath>bin\x86\Release\</OutputPath> - <Optimize>true</Optimize> - <PlatformTarget>x86</PlatformTarget> - <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <Prefer32Bit>false</Prefer32Bit> + <DebugType>none</DebugType> </PropertyGroup> + <ItemGroup> - <Reference Include="CefSharp, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> - <HintPath>..\..\packages\CefSharp.Common.98.1.210\lib\net452\CefSharp.dll</HintPath> - </Reference> - <Reference Include="CefSharp.Core, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> - <HintPath>..\..\packages\CefSharp.Common.98.1.210\lib\net452\CefSharp.Core.dll</HintPath> - </Reference> - <Reference Include="CefSharp.WinForms, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> - <HintPath>..\..\packages\CefSharp.WinForms.98.1.210\lib\net462\CefSharp.WinForms.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Management" /> - <Reference Include="System.Web.Extensions" /> - <Reference Include="System.Windows.Forms" /> + <PackageReference Include="CefSharp.WinForms.NETCore" Version="102.0.90" /> </ItemGroup> + <ItemGroup> - <ProjectReference Include="..\TweetDuck.Browser\TweetDuck.Browser.csproj"> - <Project>{b10b0017-819e-4f71-870f-8256b36a26aa}</Project> - <Name>TweetDuck.Browser</Name> - </ProjectReference> - <ProjectReference Include="..\TweetDuck.Video\TweetDuck.Video.csproj"> - <Project>{278b2d11-402d-44b6-b6a1-8fa67db65565}</Project> - <Name>TweetDuck.Video</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Browser\TweetLib.Browser.csproj"> - <Project>{eefb1f37-7cad-46bd-8042-66e7b502ab02}</Project> - <Name>TweetLib.Browser</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj"> - <Project>{1b7793c6-9002-483e-9bd7-897fe6cd18fb}</Project> - <Name>TweetLib.Browser.CEF</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Core\TweetLib.Core.csproj"> - <Project>{93ba3cb4-a812-4949-b07d-8d393fb38937}</Project> - <Name>TweetLib.Core</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Utils\TweetLib.Utils.csproj"> - <Project>{476b1007-b12c-447f-b855-9886048201d6}</Project> - <Name>TweetLib.Utils</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Communication\TweetLib.Communication.csproj"> - <Project>{72473763-4b9d-4fb6-a923-9364b2680f06}</Project> - <Name>TweetLib.Communication</Name> - </ProjectReference> - <ProjectReference Include="..\TweetImpl.CefSharp\TweetImpl.CefSharp.csproj"> - <Project>{44df3e2e-f465-4a31-8b43-f40fffb018ba}</Project> - <Name>TweetImpl.CefSharp</Name> - </ProjectReference> + <ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj" /> + <ProjectReference Include="..\..\lib\TweetLib.Browser\TweetLib.Browser.csproj" /> + <ProjectReference Include="..\..\lib\TweetLib.Communication\TweetLib.Communication.csproj" /> + <ProjectReference Include="..\..\lib\TweetLib.Core\TweetLib.Core.csproj" /> + <ProjectReference Include="..\..\lib\TweetLib.Utils\TweetLib.Utils.csproj" /> + <ProjectReference Include="..\TweetDuck.Browser\TweetDuck.Browser.csproj" /> + <ProjectReference Include="..\TweetDuck.Video\TweetDuck.Video.csproj" /> + <ProjectReference Include="..\TweetImpl.CefSharp\TweetImpl.CefSharp.csproj" /> </ItemGroup> + <ItemGroup> - <Compile Include="Application\FileDialogs.cs" /> - <Compile Include="Application\MessageDialogs.cs" /> - <Compile Include="Application\SystemHandler.cs" /> - <Compile Include="Browser\Base\BrowserProcessHandler.cs" /> - <Compile Include="Browser\Base\CefBrowserComponent.cs" /> - <Compile Include="Browser\Base\ContextMenuBase.cs" /> - <Compile Include="Browser\Base\ContextMenuBrowser.cs" /> - <Compile Include="Browser\Base\ContextMenuNotification.cs" /> - <Compile Include="Browser\Base\CustomKeyboardHandler.cs" /> - <Compile Include="Browser\Base\JsDialogOpener.cs" /> - <Compile Include="Browser\Base\PopupHandler.cs" /> - <Compile Include="Browser\Notification\FormNotificationExample.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Browser\Notification\NotificationPauseReason.cs" /> - <Compile Include="Browser\Notification\Screenshot\ScreenshotBridge.cs" /> - <Compile Include="Browser\Notification\Screenshot\TweetScreenshotManager.cs" /> - <Compile Include="Browser\Notification\SoundNotification.cs" /> - <Compile Include="Browser\TweetDeckBrowser.cs" /> - <Compile Include="Configuration\Arguments.cs" /> - <Compile Include="Configuration\SystemConfig.cs" /> - <Compile Include="Configuration\UserConfig.cs" /> - <Compile Include="Controls\ControlExtensions.cs" /> - <Compile Include="Management\BrowserCache.cs" /> - <Compile Include="Management\ClipboardManager.cs" /> - <Compile Include="Management\FormManager.cs" /> - <Compile Include="Management\LockManager.cs" /> - <Compile Include="Management\ProfileManager.cs" /> - <Compile Include="Management\VideoPlayer.cs" /> - <Compile Include="Management\WindowsSessionManager.cs" /> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Reporter.cs" /> - <Compile Include="Updates\UpdateCheckClient.cs" /> - <Compile Include="Updates\UpdateInstaller.cs" /> - <Compile Include="Utils\BrowserUtils.cs" /> - <Compile Include="Utils\NativeMethods.cs" /> - <Compile Include="Utils\WindowsUtils.cs" /> - </ItemGroup> - <ItemGroup> - <Compile Include="..\..\Version.cs"> - <Link>Version.cs</Link> - </Compile> - <Compile Include="Controls\FlatButton.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Controls\FlatProgressBar.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Controls\LabelVertical.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Controls\NumericUpDownEx.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Browser\FormBrowser.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Browser\FormBrowser.Designer.cs"> - <DependentUpon>FormBrowser.cs</DependentUpon> - </Compile> - <Compile Include="Browser\Notification\FormNotificationMain.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Browser\Notification\FormNotificationMain.Designer.cs"> - <DependentUpon>FormNotificationMain.cs</DependentUpon> - </Compile> - <Compile Include="Browser\Notification\FormNotificationBase.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Browser\Notification\FormNotificationBase.Designer.cs"> - <DependentUpon>FormNotificationBase.cs</DependentUpon> - </Compile> - <Compile Include="Browser\Notification\FormNotificationTweet.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Browser\Notification\FormNotificationTweet.Designer.cs"> - <DependentUpon>FormNotificationTweet.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\FormAbout.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\FormAbout.Designer.cs"> - <DependentUpon>FormAbout.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\FormGuide.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\FormGuide.Designer.cs"> - <DependentUpon>FormGuide.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\FormMessage.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\FormMessage.Designer.cs"> - <DependentUpon>FormMessage.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\FormPlugins.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\FormPlugins.Designer.cs"> - <DependentUpon>FormPlugins.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsExternalProgram.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsExternalProgram.Designer.cs"> - <DependentUpon>DialogSettingsExternalProgram.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsSearchEngine.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsSearchEngine.Designer.cs"> - <DependentUpon>DialogSettingsSearchEngine.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsCSS.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsCSS.Designer.cs"> - <DependentUpon>DialogSettingsCSS.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsCefArgs.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsCefArgs.Designer.cs"> - <DependentUpon>DialogSettingsCefArgs.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsManage.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsManage.Designer.cs"> - <DependentUpon>DialogSettingsManage.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsRestart.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\Settings\DialogSettingsRestart.Designer.cs"> - <DependentUpon>DialogSettingsRestart.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsFeedback.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsFeedback.Designer.cs"> - <DependentUpon>TabSettingsFeedback.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsTray.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsTray.Designer.cs"> - <DependentUpon>TabSettingsTray.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsAdvanced.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsAdvanced.Designer.cs"> - <DependentUpon>TabSettingsAdvanced.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsGeneral.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsGeneral.Designer.cs"> - <DependentUpon>TabSettingsGeneral.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsSounds.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsSounds.Designer.cs"> - <DependentUpon>TabSettingsSounds.cs</DependentUpon> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsNotifications.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Dialogs\Settings\TabSettingsNotifications.Designer.cs"> - <DependentUpon>TabSettingsNotifications.cs</DependentUpon> - </Compile> - <Compile Include="Browser\Notification\Screenshot\FormNotificationScreenshotable.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\FormSettings.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Dialogs\FormSettings.Designer.cs"> - <DependentUpon>FormSettings.cs</DependentUpon> - </Compile> - <Compile Include="Plugins\PluginControl.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Plugins\PluginControl.Designer.cs"> - <DependentUpon>PluginControl.cs</DependentUpon> - </Compile> - <Compile Include="Controls\FlowLayoutPanelNoHScroll.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Include="Updates\FormUpdateDownload.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Updates\FormUpdateDownload.Designer.cs"> - <DependentUpon>FormUpdateDownload.cs</DependentUpon> - </Compile> - <Compile Include="Browser\TrayIcon.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="Browser\TrayIcon.Designer.cs"> - <DependentUpon>TrayIcon.cs</DependentUpon> - </Compile> - </ItemGroup> - <ItemGroup> - <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1</ProductName> - <Install>false</Install> - </BootstrapperPackage> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Browser\FormBrowser.resx"> - <DependentUpon>FormBrowser.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <SubType>Designer</SubType> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> + <Compile Include="..\..\Version.cs" Link="Version.cs" /> </ItemGroup> + <ItemGroup> <None Include="app.config" /> - <None Include="packages.config" /> <None Include="Resources\Images\icon-muted.ico" /> <None Include="Resources\Images\icon-small.ico" /> <None Include="Resources\Images\icon-tray-muted.ico" /> @@ -340,11 +63,13 @@ <None Include="Resources\Images\icon-tray.ico" /> <None Include="Resources\Images\icon.ico" /> <None Include="Resources\PostBuild.ps1" /> - <None Include="Resources\PostCefUpdate.ps1" /> <None Include="$(SolutionDir)README.md"> <Link>Resources\README.md</Link> </None> + <Compile Remove="Resources\Utilities\CompareStylesheets.cs" /> + <None Include="Resources\Utilities\CompareStylesheets.cs" /> </ItemGroup> + <ItemGroup> <ResourcesContent Include="$(SolutionDir)resources\Content\**\*.*" Visible="false" /> <ResourcesGuide Include="$(SolutionDir)resources\Guide\**\*.*" Visible="false" /> @@ -352,17 +77,40 @@ <ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\.debug\**\*.*" /> <ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\emoji-keyboard\emoji-instructions.txt" /> <ResourcesPluginsDebug Include="$(SolutionDir)resources\Plugins\.debug\**\*.*" Visible="false" /> - <Redist Include="$(SolutionDir)bld\Redist\*.*" Visible="false" /> </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> <PreBuildEvent>powershell -NoProfile -Command "$ErrorActionPreference = 'SilentlyContinue'; (Get-Process TweetDuck.Browser | Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'}).Kill(); Exit 0"</PreBuildEvent> </PropertyGroup> + <Target Name="CopyResources" AfterTargets="Build"> <ItemGroup> <LocalesToDelete Include="$(TargetDir)locales\*.pak" Exclude="$(TargetDir)locales\en-US.pak" Visible="false" /> </ItemGroup> + <ItemGroup> + <!-- WinForms --> + <DllsToDelete Include="$(TargetDir)System.Windows.Controls.Ribbon.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)System.Windows.Forms.Design.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)System.Windows.Forms.Design.Editors.dll" Visible="false" /> + <!-- WPF --> + <DllsToDelete Include="$(TargetDir)D3DCompiler_47_cor3.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)DirectWriteForwarder.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)PenImc_cor3.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)PresentationCore.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)PresentationFramework*.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)PresentationNative_cor3.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)PresentationUI.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)ReachFramework.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)System.Xaml.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)System.Windows.Input.Manipulations.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)UIAutomation*.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)vcruntime140_cor3.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)WindowsBase.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)WindowsFormsIntegration.dll" Visible="false" /> + <DllsToDelete Include="$(TargetDir)wpfgfx_cor3.dll" Visible="false" /> + </ItemGroup> <Delete Files="@(LocalesToDelete)" /> + <Delete Files="@(DllsToDelete)" /> <RemoveDir Directories="$(TargetDir)resources" /> <RemoveDir Directories="$(TargetDir)guide" /> <RemoveDir Directories="$(TargetDir)plugins" /> @@ -373,9 +121,11 @@ <Copy SourceFiles="@(ResourcesPlugins)" DestinationFiles="@(ResourcesPlugins->'$(TargetDir)\plugins\official\%(RecursiveDir)%(Filename)%(Extension)')" /> <Exec Command="powershell -NoProfile -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild.ps1" "$(TargetDir)\"" IgnoreExitCode="false" /> </Target> + <Target Name="FinalizeDebug" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Debug"> <Copy SourceFiles="@(ResourcesPluginsDebug)" DestinationFiles="@(ResourcesPluginsDebug->'$(TargetDir)\plugins\user\.debug\%(RecursiveDir)%(Filename)%(Extension)')" /> </Target> + <Target Name="FinalizeRelease" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Release"> <ItemGroup> <PdbFiles Include="$(TargetDir)*.pdb" Visible="false" /> @@ -387,19 +137,8 @@ <Delete Files="@(PdbFiles)" /> <Delete Files="@(XmlFiles)" /> <Delete Files="@(TxtFiles)" /> - <Copy SourceFiles="@(Redist)" DestinationFolder="$(TargetDir)" /> <Copy SourceFiles="$(SolutionDir)bld\Resources\LICENSES.txt" DestinationFolder="$(TargetDir)" /> <Exec Command="start "" /B "ISCC.exe" /Q "$(SolutionDir)bld\gen_upd.iss"" WorkingDirectory="$(SolutionDir)bld\" IgnoreExitCode="true" /> </Target> - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> - <PropertyGroup> - <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> - </PropertyGroup> - <Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props'))" /> - <Error Condition="!Exists('..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props'))" /> - <Error Condition="!Exists('..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props'))" /> - <Error Condition="!Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props'))" /> - <Error Condition="!Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets'))" /> - </Target> - <Import Project="..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets" Condition="Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets')" /> + </Project> diff --git a/windows/TweetDuck/Updates/UpdateCheckClient.cs b/windows/TweetDuck/Updates/UpdateCheckClient.cs index b590dedb..e6903a31 100644 --- a/windows/TweetDuck/Updates/UpdateCheckClient.cs +++ b/windows/TweetDuck/Updates/UpdateCheckClient.cs @@ -1,13 +1,13 @@ using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; +using System.Text.Json; using System.Threading.Tasks; -using System.Web.Script.Serialization; using TweetLib.Core.Systems.Updates; using TweetLib.Utils.Static; -using JsonObject = System.Collections.Generic.IDictionary<string, object>; namespace TweetDuck.Updates { sealed class UpdateCheckClient : IUpdateCheckClient { @@ -48,19 +48,19 @@ Task<UpdateInfo> IUpdateCheckClient.Check() { } private UpdateInfo ParseFromJson(string json) { - static bool IsUpdaterAsset(JsonObject obj) { - return UpdaterAssetName == (string) obj["name"]; + static bool IsUpdaterAsset(JsonElement obj) { + return UpdaterAssetName == obj.GetProperty("name").GetString(); } - static string AssetDownloadUrl(JsonObject obj) { - return (string) obj["browser_download_url"]; + static string AssetDownloadUrl(JsonElement obj) { + return obj.GetProperty("browser_download_url").GetString()!; } - var root = (JsonObject) new JavaScriptSerializer().DeserializeObject(json); + var root = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(json)!; - string versionTag = (string) root["tag_name"]; - string releaseNotes = (string) root["body"]; - string downloadUrl = ((Array) root["assets"]).Cast<JsonObject>().Where(IsUpdaterAsset).Select(AssetDownloadUrl).FirstOrDefault(); + string versionTag = root["tag_name"].GetString()!; + string releaseNotes = root["body"].GetString()!; + string? downloadUrl = root["assets"].EnumerateArray().Where(IsUpdaterAsset).Select(AssetDownloadUrl).FirstOrDefault(); return new UpdateInfo(versionTag, releaseNotes, downloadUrl, installerFolder); } diff --git a/windows/TweetDuck/packages.config b/windows/TweetDuck/packages.config deleted file mode 100644 index 7c30c6c9..00000000 --- a/windows/TweetDuck/packages.config +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="cef.redist.x64" version="98.1.21" targetFramework="net472" /> - <package id="cef.redist.x86" version="98.1.21" targetFramework="net472" /> - <package id="CefSharp.Common" version="98.1.210" targetFramework="net472" /> - <package id="CefSharp.WinForms" version="98.1.210" targetFramework="net472" /> - <package id="Microsoft.Net.Compilers" version="3.0.0" targetFramework="net472" developmentDependency="true" /> -</packages> \ No newline at end of file diff --git a/windows/TweetImpl.CefSharp/Adapters/CefFileDialogCallbackAdapter.cs b/windows/TweetImpl.CefSharp/Adapters/CefFileDialogCallbackAdapter.cs index 49833b41..e9b294cd 100644 --- a/windows/TweetImpl.CefSharp/Adapters/CefFileDialogCallbackAdapter.cs +++ b/windows/TweetImpl.CefSharp/Adapters/CefFileDialogCallbackAdapter.cs @@ -9,7 +9,7 @@ sealed class CefFileDialogCallbackAdapter : IFileDialogCallbackAdapter<IFileDial private CefFileDialogCallbackAdapter() {} public void Continue(IFileDialogCallback callback, int selectedAcceptFilter, string[] filePaths) { - callback.Continue(selectedAcceptFilter, filePaths.ToList()); + callback.Continue(filePaths.ToList()); } public void Cancel(IFileDialogCallback callback) { diff --git a/windows/TweetImpl.CefSharp/Component/BrowserComponentBase.cs b/windows/TweetImpl.CefSharp/Component/BrowserComponentBase.cs index fd4cb260..44ba67f2 100644 --- a/windows/TweetImpl.CefSharp/Component/BrowserComponentBase.cs +++ b/windows/TweetImpl.CefSharp/Component/BrowserComponentBase.cs @@ -47,7 +47,7 @@ public override void Setup(BrowserSetup setup) { public override void AttachBridgeObject(string name, object bridge) { browser.JavascriptObjectRepository.Settings.LegacyBindingEnabled = true; - browser.JavascriptObjectRepository.Register(name, bridge, isAsync: true, BindingOptions.DefaultBinder); + browser.JavascriptObjectRepository.Register(name, bridge); } private void OnLoadingStateChanged(object sender, LoadingStateChangedEventArgs e) { diff --git a/windows/TweetImpl.CefSharp/Handlers/CefFileDialogHandler.cs b/windows/TweetImpl.CefSharp/Handlers/CefFileDialogHandler.cs index fe2e5256..f496892c 100644 --- a/windows/TweetImpl.CefSharp/Handlers/CefFileDialogHandler.cs +++ b/windows/TweetImpl.CefSharp/Handlers/CefFileDialogHandler.cs @@ -14,7 +14,7 @@ public CefFileDialogHandler() { this.logic = new DialogHandlerLogic<IFileDialogCallback>(FileDialogOpener.Instance, CefFileDialogCallbackAdapter.Instance); } - public bool OnFileDialog(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback) { + public bool OnFileDialog(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback) { return logic.OnFileDialog(ConvertDialogType(mode), acceptFilters, callback); } diff --git a/windows/TweetImpl.CefSharp/Properties/AssemblyInfo.cs b/windows/TweetImpl.CefSharp/Properties/AssemblyInfo.cs index 3650aa74..35987134 100644 --- a/windows/TweetImpl.CefSharp/Properties/AssemblyInfo.cs +++ b/windows/TweetImpl.CefSharp/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Runtime.Versioning; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -20,3 +21,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c97d4cf0-0bf2-4ec2-b450-dacd6bea56d8")] + +[assembly: SupportedOSPlatform("windows")] diff --git a/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj b/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj index 11062418..b916b4c6 100644 --- a/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj +++ b/windows/TweetImpl.CefSharp/TweetImpl.CefSharp.csproj @@ -1,114 +1,44 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props" Condition="Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props')" /> - <Import Project="..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props" Condition="Exists('..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props')" /> - <Import Project="..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props" Condition="Exists('..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props')" /> - <Import Project="..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props" Condition="Exists('..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props')" /> - <Import Project="..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" /> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0-windows</TargetFramework> + <Configurations>Debug;Release</Configurations> + <Platforms>x86</Platforms> + <RuntimeIdentifier>win7-x86</RuntimeIdentifier> + <LangVersion>8.0</LangVersion> + <Nullable>enable</Nullable> + </PropertyGroup> + <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">x86</Platform> - <ProjectGuid>{44DF3E2E-F465-4A31-8B43-F40FFFB018BA}</ProjectGuid> <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> + <UseWindowsForms>true</UseWindowsForms> <RootNamespace>TweetImpl.CefSharp</RootNamespace> <AssemblyName>TweetImpl.CefSharp</AssemblyName> - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> - <LangVersion>8.0</LangVersion> - <FileAlignment>512</FileAlignment> - <UseVSHostingProcess>false</UseVSHostingProcess> - <NuGetPackageImportStamp> - </NuGetPackageImportStamp> </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> + + <PropertyGroup> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> + <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> + </PropertyGroup> + + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>x86</PlatformTarget> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> - <OutputPath>bin\x86\Release\</OutputPath> - <Optimize>true</Optimize> - <PlatformTarget>x86</PlatformTarget> - <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> - <Prefer32Bit>false</Prefer32Bit> + <DebugType>none</DebugType> </PropertyGroup> + <ItemGroup> - <Reference Include="CefSharp, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> - <HintPath>..\..\packages\CefSharp.Common.98.1.210\lib\net452\CefSharp.dll</HintPath> - </Reference> - <Reference Include="CefSharp.Core, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> - <HintPath>..\..\packages\CefSharp.Common.98.1.210\lib\net452\CefSharp.Core.dll</HintPath> - </Reference> - <Reference Include="CefSharp.WinForms, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> - <HintPath>..\..\packages\CefSharp.WinForms.98.1.210\lib\net462\CefSharp.WinForms.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Windows.Forms" /> + <PackageReference Include="CefSharp.WinForms.NETCore" Version="102.0.90" /> </ItemGroup> + <ItemGroup> - <ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj"> - <Project>{1b7793c6-9002-483e-9bd7-897fe6cd18fb}</Project> - <Name>TweetLib.Browser.CEF</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Browser\TweetLib.Browser.csproj"> - <Project>{eefb1f37-7cad-46bd-8042-66e7b502ab02}</Project> - <Name>TweetLib.Browser</Name> - </ProjectReference> - <ProjectReference Include="..\..\lib\TweetLib.Utils\TweetLib.Utils.csproj"> - <Project>{476b1007-b12c-447f-b855-9886048201d6}</Project> - <Name>TweetLib.Utils</Name> - </ProjectReference> + <ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj" /> + <ProjectReference Include="..\..\lib\TweetLib.Browser\TweetLib.Browser.csproj" /> + <ProjectReference Include="..\..\lib\TweetLib.Utils\TweetLib.Utils.csproj" /> </ItemGroup> + <ItemGroup> <Compile Include="..\..\Version.cs" Link="Version.cs" /> - <Compile Include="Adapters\CefAdapter.cs" /> - <Compile Include="Adapters\CefBrowserAdapter.cs" /> - <Compile Include="Adapters\CefDragDataAdapter.cs" /> - <Compile Include="Adapters\CefErrorCodeAdapter.cs" /> - <Compile Include="Adapters\CefFileDialogCallbackAdapter.cs" /> - <Compile Include="Adapters\CefFrameAdapter.cs" /> - <Compile Include="Adapters\CefJsDialogCallbackAdapter.cs" /> - <Compile Include="Adapters\CefMenuModelAdapter.cs" /> - <Compile Include="Adapters\CefRequestAdapter.cs" /> - <Compile Include="Adapters\CefResponseAdapter.cs" /> - <Compile Include="Component\BrowserComponentBase.cs" /> - <Compile Include="Dialogs\FileDialogOpener.cs" /> - <Compile Include="Handlers\CefByteArrayResourceHandler.cs" /> - <Compile Include="Handlers\CefContextMenuHandler.cs" /> - <Compile Include="Handlers\CefDownloadRequestClient.cs" /> - <Compile Include="Handlers\CefDragHandler.cs" /> - <Compile Include="Handlers\CefFileDialogHandler.cs" /> - <Compile Include="Handlers\CefJsDialogHandler.cs" /> - <Compile Include="Handlers\CefLifeSpanHandler.cs" /> - <Compile Include="Handlers\CefRequestHandler.cs" /> - <Compile Include="Handlers\CefResourceHandlerFactory.cs" /> - <Compile Include="Handlers\CefResourceRequestHandler.cs" /> - <Compile Include="Handlers\CefResourceRequestHandlerFactory.cs" /> - <Compile Include="Handlers\CefResponseFilter.cs" /> - <Compile Include="Handlers\CefSchemeHandlerFactory.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> - <PropertyGroup> - <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> - </PropertyGroup> - <Error Condition="!Exists('..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Net.Compilers.3.0.0\build\Microsoft.Net.Compilers.props'))" /> - <Error Condition="!Exists('..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x64.98.1.21\build\cef.redist.x64.props'))" /> - <Error Condition="!Exists('..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x86.98.1.21\build\cef.redist.x86.props'))" /> - <Error Condition="!Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.props'))" /> - <Error Condition="!Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets'))" /> - </Target> - <Import Project="..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets" Condition="Exists('..\..\packages\CefSharp.Common.98.1.210\build\CefSharp.Common.targets')" /> + </Project> diff --git a/windows/TweetImpl.CefSharp/packages.config b/windows/TweetImpl.CefSharp/packages.config deleted file mode 100644 index 7c30c6c9..00000000 --- a/windows/TweetImpl.CefSharp/packages.config +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="cef.redist.x64" version="98.1.21" targetFramework="net472" /> - <package id="cef.redist.x86" version="98.1.21" targetFramework="net472" /> - <package id="CefSharp.Common" version="98.1.210" targetFramework="net472" /> - <package id="CefSharp.WinForms" version="98.1.210" targetFramework="net472" /> - <package id="Microsoft.Net.Compilers" version="3.0.0" targetFramework="net472" developmentDependency="true" /> -</packages> \ No newline at end of file