1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-03 05:34:07 +02:00

Migrate to .NET 6 & update CefSharp to 102

This commit is contained in:
chylex 2022-05-16 19:42:31 +02:00
parent b58c8f65fe
commit 96d2e7cc7c
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
91 changed files with 272 additions and 733 deletions
.idea/.idea.TweetDuck/.idea/runConfigurations
README.md
bld/Redist
api-ms-win-core-console-l1-1-0.dllapi-ms-win-core-datetime-l1-1-0.dllapi-ms-win-core-debug-l1-1-0.dllapi-ms-win-core-errorhandling-l1-1-0.dllapi-ms-win-core-file-l1-1-0.dllapi-ms-win-core-file-l1-2-0.dllapi-ms-win-core-file-l2-1-0.dllapi-ms-win-core-handle-l1-1-0.dllapi-ms-win-core-heap-l1-1-0.dllapi-ms-win-core-interlocked-l1-1-0.dllapi-ms-win-core-libraryloader-l1-1-0.dllapi-ms-win-core-localization-l1-2-0.dllapi-ms-win-core-memory-l1-1-0.dllapi-ms-win-core-namedpipe-l1-1-0.dllapi-ms-win-core-processenvironment-l1-1-0.dllapi-ms-win-core-processthreads-l1-1-0.dllapi-ms-win-core-processthreads-l1-1-1.dllapi-ms-win-core-profile-l1-1-0.dllapi-ms-win-core-rtlsupport-l1-1-0.dllapi-ms-win-core-string-l1-1-0.dllapi-ms-win-core-synch-l1-1-0.dllapi-ms-win-core-synch-l1-2-0.dllapi-ms-win-core-sysinfo-l1-1-0.dllapi-ms-win-core-timezone-l1-1-0.dllapi-ms-win-core-util-l1-1-0.dllapi-ms-win-crt-conio-l1-1-0.dllapi-ms-win-crt-convert-l1-1-0.dllapi-ms-win-crt-environment-l1-1-0.dllapi-ms-win-crt-filesystem-l1-1-0.dllapi-ms-win-crt-heap-l1-1-0.dllapi-ms-win-crt-locale-l1-1-0.dllapi-ms-win-crt-math-l1-1-0.dllapi-ms-win-crt-multibyte-l1-1-0.dllapi-ms-win-crt-private-l1-1-0.dllapi-ms-win-crt-process-l1-1-0.dllapi-ms-win-crt-runtime-l1-1-0.dllapi-ms-win-crt-stdio-l1-1-0.dllapi-ms-win-crt-string-l1-1-0.dllapi-ms-win-crt-time-l1-1-0.dllapi-ms-win-crt-utility-l1-1-0.dllconcrt140.dllmsvcp140.dllmsvcp140_1.dllmsvcp140_2.dllmsvcp140_atomic_wait.dllmsvcp140_codecvt_ids.dllucrtbase.dllvccorlib140.dllvcruntime140.dll
global.json
lib
linux
windows

View File

@ -11,8 +11,8 @@
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> <option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> <option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> <option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="Console" /> <option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value=".NETFramework,Version=v4.7.2" /> <option name="PROJECT_TFM" value="net6.0-windows7.0" />
<method v="2"> <method v="2">
<option name="Build" /> <option name="Build" />
</method> </method>

View File

@ -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: 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 desktop development**
* .NET Framework 4.7.2 targeting pack * .NET SDK
* F# desktop language support * F# desktop language support
* **Desktop development with C++** * **Desktop development with C++**
* MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.20 / Latest) * 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 ### 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. 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: Projects are organized into folders:
* Windows projects are in the `windows/` folder, and target `.NET Framework 4.7.2` + `C# 8.0` * Windows projects are in the `windows/` folder
* Linux projects are in the `linux/` folder, and target `.NET 5` + `C#` * Linux projects are in the `linux/` folder
* Libraries (`TweetLib.*`) are in the `lib/` folder, and target `.NET Standard 2.0` + `C# 9.0` * Libraries (`TweetLib.*`) are in the `lib/` folder
* Tests (`TweetTest.*`) are also in the `lib/` folder, and target `.NET Framework 4.7.2` + `F#` * Tests (`TweetTest.*`) are also in the `lib/` folder
Here are a few things to keep in mind: Here are a few things to keep in mind:
* Executable projects have their entry points in `Program.cs` * 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 #### 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 #### TweetDuck.Video

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
global.json Normal file
View File

@ -0,0 +1,7 @@
{
"sdk": {
"version": "6.0.0",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}

View File

@ -29,7 +29,7 @@ public bool OnFileDialog(FileDialogType type, IEnumerable<string> acceptFilters,
}; };
fileDialogOpener.OpenFile("Open Files", multiple, filters, files => { 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.Continue(callback, Array.FindIndex(supportedExtensions, filter => ParseFileType(filter).Contains(ext)), files);
callbackAdapter.Dispose(callback); callbackAdapter.Dispose(callback);
}, () => { }, () => {

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Platforms>x86;x64</Platforms> <Platforms>x86;x64</Platforms>
<LangVersion>9</LangVersion> <LangVersion>9</LangVersion>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Platforms>x86;x64</Platforms> <Platforms>x86;x64</Platforms>
<LangVersion>9</LangVersion> <LangVersion>9</LangVersion>

View File

@ -38,10 +38,13 @@ private DuplexPipe(PipeStream pipeIn, PipeStream pipeOut) {
private void ReaderThread() { private void ReaderThread() {
using StreamReader read = new StreamReader(pipeIn); using StreamReader read = new StreamReader(pipeIn);
string? data;
while ((data = read.ReadLine()) != null) { try {
DataIn?.Invoke(this, new PipeReadEventArgs(data)); 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() { public void Dispose() {
try {
readerThread.Abort();
} catch {
// /shrug
}
pipeIn.Dispose(); pipeIn.Dispose();
writerStream.Dispose(); writerStream.Dispose();
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms> <Platforms>x86</Platforms>
<LangVersion>9</LangVersion> <LangVersion>9</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Platforms>x86;x64</Platforms> <Platforms>x86;x64</Platforms>
<LangVersion>9</LangVersion> <LangVersion>9</LangVersion>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Platforms>x86;x64</Platforms> <Platforms>x86;x64</Platforms>
<LangVersion>9</LangVersion> <LangVersion>9</LangVersion>

View File

@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms> <Platforms>x86</Platforms>
<RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms> <Platforms>x86</Platforms>
<RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net472</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms> <Platforms>x86</Platforms>
<RuntimeIdentifiers>win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<LangVersion>10</LangVersion>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>

View File

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Configurations>Debug;Release</Configurations> <Configurations>Debug;Release</Configurations>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup> </PropertyGroup>

4
linux/global.json Executable file → Normal file
View File

@ -1,7 +1,7 @@
{ {
"sdk": { "sdk": {
"version": "5.0.0", "version": "6.0.0",
"rollForward": "latestMinor", "rollForward": "latestMinor",
"allowPrerelease": false "allowPrerelease": false
} }
} }

View File

@ -1,33 +1,25 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.Threading.Tasks; using System.Threading.Tasks;
using CefSharp.BrowserSubprocess; using CefSharp.Core;
namespace TweetDuck.Browser { namespace TweetDuck.Browser {
static class Program { static class Program {
private const string ParentIdPrefix = "--host-process-id=";
private static int Main(string[] args) { private static int Main(string[] args) {
SubProcess.EnableHighDPISupport(); if (!int.TryParse(FindArg(args, ParentIdPrefix), out int parentId)) {
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)) {
return 0; return 0;
} }
Task.Factory.StartNew(() => KillWhenHung(parentId), TaskCreationOptions.LongRunning); Task.Factory.StartNew(() => KillWhenHung(parentId), TaskCreationOptions.LongRunning);
if (FindArg(typePrefix) == "renderer") { Cef.EnableHighDPISupport();
using SubProcess subProcess = new SubProcess(null, args); return CefSharp.BrowserSubprocess.SelfHost.Main(args);
return subProcess.Run(); }
}
else { private static string? FindArg(string[] args, string key) {
return SubProcess.ExecuteProcess(args); return Array.Find(args, arg => arg.StartsWith(key, StringComparison.OrdinalIgnoreCase))?[key.Length..];
}
} }
private static async void KillWhenHung(int parentId) { private static async void KillWhenHung(int parentId) {

View File

@ -1,5 +1,6 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.Versioning;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // 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 // 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: Guid("b10b0017-819e-4f71-870f-8256b36a26aa")]
[assembly: SupportedOSPlatform("windows")]

View File

@ -1,62 +1,46 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<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')" /> <PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <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> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{B10B0017-819E-4F71-870F-8256B36A26AA}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>TweetDuck.Browser</RootNamespace> <RootNamespace>TweetDuck.Browser</RootNamespace>
<AssemblyName>TweetDuck.Browser</AssemblyName> <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 /> <StartupObject />
</PropertyGroup> </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> <PropertyGroup>
<PostBuildEvent>call "$(DevEnvDir)\..\..\VC\Auxiliary\Build\vcvars32.bat" <SelfContained>true</SelfContained>
editbin /largeaddressaware /TSAWARE "$(TargetPath)"</PostBuildEvent> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup> </PropertyGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<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> <DebugSymbols>true</DebugSymbols>
</PropertyGroup> <DebugType>none</DebugType>
<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>
<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 &quot;$(DevEnvDir)\..\..\VC\Auxiliary\Build\vcvars32.bat&quot; &amp; editbin /largeaddressaware /TSAWARE &quot;$(TargetDir)TweetDuck.Browser.exe&quot;" ContinueOnError="false" />
</Target> </Target>
</Project> </Project>

View File

@ -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>

View File

@ -2,7 +2,6 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Globalization; using System.Globalization;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
using TweetDuck.Video.Controls; using TweetDuck.Video.Controls;
@ -216,7 +215,6 @@ private void timerUI_Tick(object? sender, EventArgs e) {
Marshal.ReleaseComObject(controls); Marshal.ReleaseComObject(controls);
} }
[HandleProcessCorruptedStateExceptions]
private void timerSync_Tick(object sender, EventArgs e) { private void timerSync_Tick(object sender, EventArgs e) {
if (NativeMethods.GetWindowRect(ownerHandle, out NativeMethods.RECT rect)) { if (NativeMethods.GetWindowRect(ownerHandle, out NativeMethods.RECT rect)) {
IWMPMedia media = Player.currentMedia; IWMPMedia media = Player.currentMedia;

View File

@ -1,5 +1,6 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.Versioning;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // 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 // 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: Guid("278b2d11-402d-44b6-b6a1-8fa67db65565")]
[assembly: SupportedOSPlatform("windows")]

View File

@ -1,80 +1,37 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<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')" /> <PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <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> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{278B2D11-402D-44B6-B6A1-8FA67DB65565}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>TweetDuck.Video</RootNamespace> <RootNamespace>TweetDuck.Video</RootNamespace>
<AssemblyName>TweetDuck.Video</AssemblyName> <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> <ApplicationIcon>Resources\icon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Reference Include="System" /> <PropertyGroup>
<Reference Include="System.Core" /> <SelfContained>true</SelfContained>
<Reference Include="System.Drawing" /> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Reference Include="System.Windows.Forms" /> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</ItemGroup> <ResolveComReferenceSilent>True</ResolveComReferenceSilent>
<ItemGroup> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Compile Include="..\..\Version.cs"> <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<Link>Version.cs</Link> <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</Compile> </PropertyGroup>
<Compile Include="Controls\ControlWMP.cs">
<SubType>Component</SubType> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
</Compile> <DebugSymbols>true</DebugSymbols>
<Compile Include="Controls\LabelTooltip.cs"> <DebugType>none</DebugType>
<SubType>Component</SubType> </PropertyGroup>
</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>
<ItemGroup> <ItemGroup>
<COMReference Include="WMPLib"> <COMReference Include="WMPLib">
<Guid>{6BF52A50-394A-11D3-B153-00C04F79FAA6}</Guid> <Guid>{6BF52A50-394A-11D3-B153-00C04F79FAA6}</Guid>
@ -86,30 +43,20 @@
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\lib\TweetLib.Communication\TweetLib.Communication.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\Version.cs" Link="Version.cs" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" />
<None Include="Resources\btnResize.png" /> <None Include="Resources\btnResize.png" />
<None Include="Resources\btnDownload.png" /> <None Include="Resources\btnDownload.png" />
<None Include="Resources\btnClose.png" /> <None Include="Resources\btnClose.png" />
<Content Include="Resources\icon.ico" /> <Content Include="Resources\icon.ico" />
</ItemGroup> </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> </Project>

View File

@ -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>

View File

@ -85,6 +85,7 @@ public void OpenFileExplorer(string path) {
try { try {
using (Process.Start(new ProcessStartInfo { using (Process.Start(new ProcessStartInfo {
FileName = path, FileName = path,
UseShellExecute = true,
ErrorDialog = true ErrorDialog = true
})) {} })) {}
} catch (Exception e) { } catch (Exception e) {

View File

@ -99,18 +99,18 @@ public override void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser
extraContext.Reset(); extraContext.Reset();
} }
public static ContextMenu CreateMenu(FormBrowser form) { public static ContextMenuStrip CreateMenu(FormBrowser form) {
ContextMenu menu = new ContextMenu(); ContextMenuStrip menu = new ContextMenuStrip();
menu.MenuItems.Add(TitleReloadBrowser, (sender, args) => form.ReloadToTweetDeck()); menu.Items.Add(TitleReloadBrowser, null, (sender, args) => form.ReloadToTweetDeck());
menu.MenuItems.Add(TitleMuteNotifications, (sender, args) => ToggleMuteNotifications()); menu.Items.Add(TitleMuteNotifications, null, (sender, args) => ToggleMuteNotifications());
menu.MenuItems.Add("-"); menu.Items.Add("-");
menu.MenuItems.Add(TitleSettings, (sender, args) => form.OpenSettings()); menu.Items.Add(TitleSettings, null, (sender, args) => form.OpenSettings());
menu.MenuItems.Add(TitlePlugins, (sender, args) => form.OpenPlugins()); menu.Items.Add(TitlePlugins, null, (sender, args) => form.OpenPlugins());
menu.MenuItems.Add(TitleAboutProgram, (sender, args) => form.OpenAbout()); menu.Items.Add(TitleAboutProgram, null, (sender, args) => form.OpenAbout());
menu.Popup += (sender, args) => { menu.Opening += (sender, args) => {
menu.MenuItems[1].Checked = Config.MuteNotifications; ((ToolStripMenuItem) menu.Items[1]).Checked = Config.MuteNotifications;
}; };
return menu; return menu;

View File

@ -57,7 +57,7 @@ public bool IsWaiting {
private readonly FormNotificationTweet notification; private readonly FormNotificationTweet notification;
private readonly PluginManager plugins; private readonly PluginManager plugins;
private readonly UpdateChecker updates; private readonly UpdateChecker updates;
private readonly ContextMenu contextMenu; private readonly ContextMenuStrip contextMenu;
private readonly uint windowRestoreMessage; private readonly uint windowRestoreMessage;
private bool isLoaded; private bool isLoaded;

View File

@ -45,19 +45,19 @@ public bool HasNotifications {
} }
} }
private readonly ContextMenu contextMenu; private readonly ContextMenuStrip contextMenu;
private bool hasNotifications; private bool hasNotifications;
private TrayIcon() { private TrayIcon() {
InitializeComponent(); InitializeComponent();
this.contextMenu = new ContextMenu(); this.contextMenu = new ContextMenuStrip();
this.contextMenu.MenuItems.Add("Restore", menuItemRestore_Click); this.contextMenu.Items.Add("Restore", null, menuItemRestore_Click);
this.contextMenu.MenuItems.Add("Mute notifications", menuItemMuteNotifications_Click); this.contextMenu.Items.Add("Mute notifications", null, menuItemMuteNotifications_Click);
this.contextMenu.MenuItems.Add("Close", menuItemClose_Click); this.contextMenu.Items.Add("Close", null, menuItemClose_Click);
this.contextMenu.Popup += contextMenu_Popup; this.contextMenu.Opening += contextMenu_Popup;
this.notifyIcon.ContextMenu = contextMenu; this.notifyIcon.ContextMenuStrip = contextMenu;
this.notifyIcon.Text = Program.BrandName; this.notifyIcon.Text = Program.BrandName;
Config.MuteToggled += Config_MuteToggled; Config.MuteToggled += Config_MuteToggled;
@ -96,7 +96,7 @@ private void trayIcon_MouseClick(object sender, MouseEventArgs e) {
} }
private void contextMenu_Popup(object sender, EventArgs 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) { 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) { private void menuItemMuteNotifications_Click(object sender, EventArgs e) {
Config.MuteNotifications = !contextMenu.MenuItems[1].Checked; Config.MuteNotifications = !((ToolStripMenuItem) contextMenu.Items[1]).Checked;
Config.Save(); Config.Save();
} }

View File

@ -41,7 +41,6 @@ public void Launch(string videoUrl, string tweetUrl, string username) {
ProcessStartInfo startInfo = new ProcessStartInfo { ProcessStartInfo startInfo = new ProcessStartInfo {
FileName = Path.Combine(App.ProgramPath, "TweetDuck.Video.exe"), FileName = Path.Combine(App.ProgramPath, "TweetDuck.Video.exe"),
Arguments = $"{owner.Handle} {(int) Math.Floor(100F * owner.GetDPIScale())} {Config.VideoPlayerVolume} \"{videoUrl}\" \"{pipe.GenerateToken()}\"", Arguments = $"{owner.Handle} {(int) Math.Floor(100F * owner.GetDPIScale())} {Config.VideoPlayerVolume} \"{videoUrl}\" \"{pipe.GenerateToken()}\"",
UseShellExecute = false,
RedirectStandardOutput = true RedirectStandardOutput = true
}; };

View File

@ -114,7 +114,6 @@ public void Launch(ResourceCache resourceCache, PluginManager pluginManager) {
BrowserCache.RefreshTimer(); BrowserCache.RefreshTimer();
CefSharpSettings.WcfEnabled = false;
CefSharpSettings.SubprocessExitIfParentProcessClosed = false; CefSharpSettings.SubprocessExitIfParentProcessClosed = false;
CefSettings settings = new CefSettings { CefSettings settings = new CefSettings {

View File

@ -2,6 +2,7 @@
using System.Reflection; using System.Reflection;
using System.Resources; using System.Resources;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using TweetDuck; using TweetDuck;
// General Information about an assembly is controlled through the following // 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 // 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: Guid("7f09373d-8beb-416f-a48d-45d8aaeb8caf")]
[assembly: SupportedOSPlatform("windows")]
[assembly: NeutralResourcesLanguage("en")] [assembly: NeutralResourcesLanguage("en")]
[assembly: CLSCompliant(true)] [assembly: CLSCompliant(true)]

View File

@ -63,7 +63,7 @@ public void HandleException(string caption, string message, bool canIgnore, Exce
private static bool OpenLogFile() { private static bool OpenLogFile() {
try { try {
using (Process.Start(App.Logger.LogFilePath)) {} using (Process.Start(new ProcessStartInfo(App.Logger.LogFilePath) { UseShellExecute = true })) {}
} catch (Exception) { } catch (Exception) {
return false; return false;
} }

View File

@ -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
}

View File

@ -1,338 +1,61 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<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')" /> <PropertyGroup>
<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')" /> <TargetFramework>net6.0-windows</TargetFramework>
<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')" /> <Configurations>Debug;Release</Configurations>
<Import Project="..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props" Condition="Exists('..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props')" /> <Platforms>x86</Platforms>
<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')" /> <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{2389A7CD-E0D3-4706-8294-092929A33A2D}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <UseWindowsForms>true</UseWindowsForms>
<RootNamespace>TweetDuck</RootNamespace> <RootNamespace>TweetDuck</RootNamespace>
<AssemblyName>TweetDuck</AssemblyName> <AssemblyName>TweetDuck</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <AppDesignerFolder>Properties</AppDesignerFolder>
<LangVersion>8.0</LangVersion>
<FileAlignment>512</FileAlignment>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ApplicationIcon>Resources\Images\icon.ico</ApplicationIcon> <ApplicationIcon>Resources\Images\icon.ico</ApplicationIcon>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </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> <StartArguments>-datafolder TweetDuckDebug</StartArguments>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath> <DebugType>none</DebugType>
<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>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CefSharp, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> <PackageReference Include="CefSharp.WinForms.NETCore" Version="102.0.90" />
<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" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\TweetDuck.Browser\TweetDuck.Browser.csproj"> <ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj" />
<Project>{b10b0017-819e-4f71-870f-8256b36a26aa}</Project> <ProjectReference Include="..\..\lib\TweetLib.Browser\TweetLib.Browser.csproj" />
<Name>TweetDuck.Browser</Name> <ProjectReference Include="..\..\lib\TweetLib.Communication\TweetLib.Communication.csproj" />
</ProjectReference> <ProjectReference Include="..\..\lib\TweetLib.Core\TweetLib.Core.csproj" />
<ProjectReference Include="..\TweetDuck.Video\TweetDuck.Video.csproj"> <ProjectReference Include="..\..\lib\TweetLib.Utils\TweetLib.Utils.csproj" />
<Project>{278b2d11-402d-44b6-b6a1-8fa67db65565}</Project> <ProjectReference Include="..\TweetDuck.Browser\TweetDuck.Browser.csproj" />
<Name>TweetDuck.Video</Name> <ProjectReference Include="..\TweetDuck.Video\TweetDuck.Video.csproj" />
</ProjectReference> <ProjectReference Include="..\TweetImpl.CefSharp\TweetImpl.CefSharp.csproj" />
<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>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Application\FileDialogs.cs" /> <Compile Include="..\..\Version.cs" Link="Version.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>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" /> <None Include="app.config" />
<None Include="packages.config" />
<None Include="Resources\Images\icon-muted.ico" /> <None Include="Resources\Images\icon-muted.ico" />
<None Include="Resources\Images\icon-small.ico" /> <None Include="Resources\Images\icon-small.ico" />
<None Include="Resources\Images\icon-tray-muted.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-tray.ico" />
<None Include="Resources\Images\icon.ico" /> <None Include="Resources\Images\icon.ico" />
<None Include="Resources\PostBuild.ps1" /> <None Include="Resources\PostBuild.ps1" />
<None Include="Resources\PostCefUpdate.ps1" />
<None Include="$(SolutionDir)README.md"> <None Include="$(SolutionDir)README.md">
<Link>Resources\README.md</Link> <Link>Resources\README.md</Link>
</None> </None>
<Compile Remove="Resources\Utilities\CompareStylesheets.cs" />
<None Include="Resources\Utilities\CompareStylesheets.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourcesContent Include="$(SolutionDir)resources\Content\**\*.*" Visible="false" /> <ResourcesContent Include="$(SolutionDir)resources\Content\**\*.*" Visible="false" />
<ResourcesGuide Include="$(SolutionDir)resources\Guide\**\*.*" Visible="false" /> <ResourcesGuide Include="$(SolutionDir)resources\Guide\**\*.*" Visible="false" />
@ -352,17 +77,40 @@
<ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\.debug\**\*.*" /> <ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\.debug\**\*.*" />
<ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\emoji-keyboard\emoji-instructions.txt" /> <ResourcesPlugins Remove="$(SolutionDir)resources\Plugins\emoji-keyboard\emoji-instructions.txt" />
<ResourcesPluginsDebug Include="$(SolutionDir)resources\Plugins\.debug\**\*.*" Visible="false" /> <ResourcesPluginsDebug Include="$(SolutionDir)resources\Plugins\.debug\**\*.*" Visible="false" />
<Redist Include="$(SolutionDir)bld\Redist\*.*" Visible="false" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>powershell -NoProfile -Command "$ErrorActionPreference = 'SilentlyContinue'; (Get-Process TweetDuck.Browser | Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'}).Kill(); Exit 0"</PreBuildEvent> <PreBuildEvent>powershell -NoProfile -Command "$ErrorActionPreference = 'SilentlyContinue'; (Get-Process TweetDuck.Browser | Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'}).Kill(); Exit 0"</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
<Target Name="CopyResources" AfterTargets="Build"> <Target Name="CopyResources" AfterTargets="Build">
<ItemGroup> <ItemGroup>
<LocalesToDelete Include="$(TargetDir)locales\*.pak" Exclude="$(TargetDir)locales\en-US.pak" Visible="false" /> <LocalesToDelete Include="$(TargetDir)locales\*.pak" Exclude="$(TargetDir)locales\en-US.pak" Visible="false" />
</ItemGroup> </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="@(LocalesToDelete)" />
<Delete Files="@(DllsToDelete)" />
<RemoveDir Directories="$(TargetDir)resources" /> <RemoveDir Directories="$(TargetDir)resources" />
<RemoveDir Directories="$(TargetDir)guide" /> <RemoveDir Directories="$(TargetDir)guide" />
<RemoveDir Directories="$(TargetDir)plugins" /> <RemoveDir Directories="$(TargetDir)plugins" />
@ -373,9 +121,11 @@
<Copy SourceFiles="@(ResourcesPlugins)" DestinationFiles="@(ResourcesPlugins->'$(TargetDir)\plugins\official\%(RecursiveDir)%(Filename)%(Extension)')" /> <Copy SourceFiles="@(ResourcesPlugins)" DestinationFiles="@(ResourcesPlugins->'$(TargetDir)\plugins\official\%(RecursiveDir)%(Filename)%(Extension)')" />
<Exec Command="powershell -NoProfile -ExecutionPolicy Unrestricted -File &quot;$(ProjectDir)Resources\PostBuild.ps1&quot; &quot;$(TargetDir)\&quot;" IgnoreExitCode="false" /> <Exec Command="powershell -NoProfile -ExecutionPolicy Unrestricted -File &quot;$(ProjectDir)Resources\PostBuild.ps1&quot; &quot;$(TargetDir)\&quot;" IgnoreExitCode="false" />
</Target> </Target>
<Target Name="FinalizeDebug" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Debug"> <Target Name="FinalizeDebug" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Debug">
<Copy SourceFiles="@(ResourcesPluginsDebug)" DestinationFiles="@(ResourcesPluginsDebug->'$(TargetDir)\plugins\user\.debug\%(RecursiveDir)%(Filename)%(Extension)')" /> <Copy SourceFiles="@(ResourcesPluginsDebug)" DestinationFiles="@(ResourcesPluginsDebug->'$(TargetDir)\plugins\user\.debug\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target> </Target>
<Target Name="FinalizeRelease" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Release"> <Target Name="FinalizeRelease" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Release">
<ItemGroup> <ItemGroup>
<PdbFiles Include="$(TargetDir)*.pdb" Visible="false" /> <PdbFiles Include="$(TargetDir)*.pdb" Visible="false" />
@ -387,19 +137,8 @@
<Delete Files="@(PdbFiles)" /> <Delete Files="@(PdbFiles)" />
<Delete Files="@(XmlFiles)" /> <Delete Files="@(XmlFiles)" />
<Delete Files="@(TxtFiles)" /> <Delete Files="@(TxtFiles)" />
<Copy SourceFiles="@(Redist)" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(SolutionDir)bld\Resources\LICENSES.txt" DestinationFolder="$(TargetDir)" /> <Copy SourceFiles="$(SolutionDir)bld\Resources\LICENSES.txt" DestinationFolder="$(TargetDir)" />
<Exec Command="start &quot;&quot; /B &quot;ISCC.exe&quot; /Q &quot;$(SolutionDir)bld\gen_upd.iss&quot;" WorkingDirectory="$(SolutionDir)bld\" IgnoreExitCode="true" /> <Exec Command="start &quot;&quot; /B &quot;ISCC.exe&quot; /Q &quot;$(SolutionDir)bld\gen_upd.iss&quot;" WorkingDirectory="$(SolutionDir)bld\" IgnoreExitCode="true" />
</Target> </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> </Project>

View File

@ -1,13 +1,13 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text; using System.Text;
using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.Script.Serialization;
using TweetLib.Core.Systems.Updates; using TweetLib.Core.Systems.Updates;
using TweetLib.Utils.Static; using TweetLib.Utils.Static;
using JsonObject = System.Collections.Generic.IDictionary<string, object>;
namespace TweetDuck.Updates { namespace TweetDuck.Updates {
sealed class UpdateCheckClient : IUpdateCheckClient { sealed class UpdateCheckClient : IUpdateCheckClient {
@ -48,19 +48,19 @@ Task<UpdateInfo> IUpdateCheckClient.Check() {
} }
private UpdateInfo ParseFromJson(string json) { private UpdateInfo ParseFromJson(string json) {
static bool IsUpdaterAsset(JsonObject obj) { static bool IsUpdaterAsset(JsonElement obj) {
return UpdaterAssetName == (string) obj["name"]; return UpdaterAssetName == obj.GetProperty("name").GetString();
} }
static string AssetDownloadUrl(JsonObject obj) { static string AssetDownloadUrl(JsonElement obj) {
return (string) obj["browser_download_url"]; 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 versionTag = root["tag_name"].GetString()!;
string releaseNotes = (string) root["body"]; string releaseNotes = root["body"].GetString()!;
string downloadUrl = ((Array) root["assets"]).Cast<JsonObject>().Where(IsUpdaterAsset).Select(AssetDownloadUrl).FirstOrDefault(); string? downloadUrl = root["assets"].EnumerateArray().Where(IsUpdaterAsset).Select(AssetDownloadUrl).FirstOrDefault();
return new UpdateInfo(versionTag, releaseNotes, downloadUrl, installerFolder); return new UpdateInfo(versionTag, releaseNotes, downloadUrl, installerFolder);
} }

View File

@ -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>

View File

@ -9,7 +9,7 @@ sealed class CefFileDialogCallbackAdapter : IFileDialogCallbackAdapter<IFileDial
private CefFileDialogCallbackAdapter() {} private CefFileDialogCallbackAdapter() {}
public void Continue(IFileDialogCallback callback, int selectedAcceptFilter, string[] filePaths) { public void Continue(IFileDialogCallback callback, int selectedAcceptFilter, string[] filePaths) {
callback.Continue(selectedAcceptFilter, filePaths.ToList()); callback.Continue(filePaths.ToList());
} }
public void Cancel(IFileDialogCallback callback) { public void Cancel(IFileDialogCallback callback) {

View File

@ -47,7 +47,7 @@ public override void Setup(BrowserSetup setup) {
public override void AttachBridgeObject(string name, object bridge) { public override void AttachBridgeObject(string name, object bridge) {
browser.JavascriptObjectRepository.Settings.LegacyBindingEnabled = true; 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) { private void OnLoadingStateChanged(object sender, LoadingStateChangedEventArgs e) {

View File

@ -14,7 +14,7 @@ public CefFileDialogHandler() {
this.logic = new DialogHandlerLogic<IFileDialogCallback>(FileDialogOpener.Instance, CefFileDialogCallbackAdapter.Instance); 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); return logic.OnFileDialog(ConvertDialogType(mode), acceptFilters, callback);
} }

View File

@ -1,5 +1,6 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.Versioning;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // 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 // 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: Guid("c97d4cf0-0bf2-4ec2-b450-dacd6bea56d8")]
[assembly: SupportedOSPlatform("windows")]

View File

@ -1,114 +1,44 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<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')" /> <PropertyGroup>
<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')" /> <TargetFramework>net6.0-windows</TargetFramework>
<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')" /> <Configurations>Debug;Release</Configurations>
<Import Project="..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props" Condition="Exists('..\..\packages\CefSharp.WinForms.98.1.210\build\CefSharp.WinForms.props')" /> <Platforms>x86</Platforms>
<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')" /> <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{44DF3E2E-F465-4A31-8B43-F40FFFB018BA}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <UseWindowsForms>true</UseWindowsForms>
<RootNamespace>TweetImpl.CefSharp</RootNamespace> <RootNamespace>TweetImpl.CefSharp</RootNamespace>
<AssemblyName>TweetImpl.CefSharp</AssemblyName> <AssemblyName>TweetImpl.CefSharp</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<LangVersion>8.0</LangVersion>
<FileAlignment>512</FileAlignment>
<UseVSHostingProcess>false</UseVSHostingProcess>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </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> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath> <DebugType>none</DebugType>
<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>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CefSharp, Version=98.1.210.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"> <PackageReference Include="CefSharp.WinForms.NETCore" Version="102.0.90" />
<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" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj"> <ProjectReference Include="..\..\lib\TweetLib.Browser.CEF\TweetLib.Browser.CEF.csproj" />
<Project>{1b7793c6-9002-483e-9bd7-897fe6cd18fb}</Project> <ProjectReference Include="..\..\lib\TweetLib.Browser\TweetLib.Browser.csproj" />
<Name>TweetLib.Browser.CEF</Name> <ProjectReference Include="..\..\lib\TweetLib.Utils\TweetLib.Utils.csproj" />
</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>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\Version.cs" Link="Version.cs" /> <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>
<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> </Project>

View File

@ -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>