From 103ad727886fdc9e57003e67ccf9dfb2cfb7d515 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 7 Dec 2017 19:50:43 +0100 Subject: [PATCH 1/6] Update CefSharp to 62 (early build) --- TweetDuck.csproj | 20 ++++++++++---------- packages.config | 6 +++--- subprocess/Program.cs | 2 +- subprocess/TweetDuck.Browser.csproj | 3 +-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/TweetDuck.csproj b/TweetDuck.csproj index 1e2d05b3..88f2936d 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props')" /> - <Import Project="packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props')" /> + <Import Project="packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props')" /> + <Import Project="packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -425,16 +425,13 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild <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\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets'))" /> - <Error Condition="!Exists('packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets'))" /> - <Error Condition="!Exists('packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.57.0.0\build\CefSharp.Common.props'))" /> - <Error Condition="!Exists('packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets'))" /> - <Error Condition="!Exists('packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.props'))" /> - <Error Condition="!Exists('packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets'))" /> + <Error Condition="!Exists('packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets'))" /> + <Error Condition="!Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props'))" /> + <Error Condition="!Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets'))" /> + <Error Condition="!Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props'))" /> + <Error Condition="!Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets'))" /> </Target> <Import Project="packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets')" /> - <Import Project="packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.2987.1601\build\cef.redist.x86.targets')" /> - <Import Project="packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.57.0.0\build\CefSharp.Common.targets')" /> - <Import Project="packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.57.0.0\build\CefSharp.WinForms.targets')" /> <Target Name="AfterBuild" Condition="$(ConfigurationName) == Release"> <Exec Command="del "$(TargetDir)*.pdb"" /> <Exec Command="del "$(TargetDir)*.xml"" /> @@ -445,4 +442,7 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild <PropertyGroup> <PreBuildEvent>powershell Get-Process TweetDuck.Browser -ErrorAction SilentlyContinue ^| Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'} ^| Stop-Process; Exit 0</PreBuildEvent> </PropertyGroup> + <Import Project="packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets')" /> + <Import Project="packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets')" /> + <Import Project="packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets')" /> </Project> \ No newline at end of file diff --git a/packages.config b/packages.config index 0839842c..c04a80cf 100644 --- a/packages.config +++ b/packages.config @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="cef.redist.x64" version="3.2987.1601" targetFramework="net452" xmlns="" /> - <package id="cef.redist.x86" version="3.2987.1601" targetFramework="net452" xmlns="" /> - <package id="CefSharp.Common" version="57.0.0" targetFramework="net452" xmlns="" /> - <package id="CefSharp.WinForms" version="57.0.0" targetFramework="net452" xmlns="" /> + <package id="cef.redist.x86" version="3.3202.1690-proprietary-codecs" targetFramework="net452" xmlns="" /> + <package id="CefSharp.Common" version="62.0.0-CI2368" targetFramework="net452" xmlns="" /> + <package id="CefSharp.WinForms" version="62.0.0-CI2368" targetFramework="net452" xmlns="" /> <package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" xmlns="" /> </packages> \ No newline at end of file diff --git a/subprocess/Program.cs b/subprocess/Program.cs index 86bdcda1..0f127c80 100644 --- a/subprocess/Program.cs +++ b/subprocess/Program.cs @@ -6,7 +6,7 @@ namespace TweetDuck.Browser{ static class Program{ - internal const string Version = "1.2.1.0"; + internal const string Version = "1.3.0.0"; private static int Main(string[] args){ SubProcess.EnableHighDPISupport(); diff --git a/subprocess/TweetDuck.Browser.csproj b/subprocess/TweetDuck.Browser.csproj index 1d1d36f9..c92c24a2 100644 --- a/subprocess/TweetDuck.Browser.csproj +++ b/subprocess/TweetDuck.Browser.csproj @@ -24,9 +24,8 @@ <StartupObject /> </PropertyGroup> <ItemGroup> - <Reference Include="CefSharp, Version=57.0.0.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138" /> <Reference Include="CefSharp.BrowserSubprocess.Core"> - <HintPath>..\packages\CefSharp.Common.57.0.0\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> + <HintPath>..\packages\CefSharp.Common.62.0.0-CI2368\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> </Reference> <Reference Include="System" /> </ItemGroup> From 45b6f49a080c2c4704c801c60885b918fc80b534 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 7 Dec 2017 20:07:15 +0100 Subject: [PATCH 2/6] Fix middle-click and ctrl-click handling in CEF 62 --- ...RequestHandlerBase.cs => AbstractRequestHandler.cs} | 2 +- Core/Handling/General/LifeSpanHandler.cs | 9 ++++++--- Core/Handling/RequestHandlerBase.cs | 10 ++++++++++ Core/Handling/RequestHandlerBrowser.cs | 1 - Core/Notification/FormNotificationBase.cs | 3 ++- TweetDuck.csproj | 3 ++- 6 files changed, 21 insertions(+), 7 deletions(-) rename Core/Handling/General/{RequestHandlerBase.cs => AbstractRequestHandler.cs} (98%) create mode 100644 Core/Handling/RequestHandlerBase.cs diff --git a/Core/Handling/General/RequestHandlerBase.cs b/Core/Handling/General/AbstractRequestHandler.cs similarity index 98% rename from Core/Handling/General/RequestHandlerBase.cs rename to Core/Handling/General/AbstractRequestHandler.cs index 95f66d3b..c79994e0 100644 --- a/Core/Handling/General/RequestHandlerBase.cs +++ b/Core/Handling/General/AbstractRequestHandler.cs @@ -2,7 +2,7 @@ using CefSharp; namespace TweetDuck.Core.Handling.General{ - abstract class RequestHandlerBase : IRequestHandler{ + abstract class AbstractRequestHandler : IRequestHandler{ // Browser public virtual void OnRenderViewReady(IWebBrowser browserControl, IBrowser browser){} diff --git a/Core/Handling/General/LifeSpanHandler.cs b/Core/Handling/General/LifeSpanHandler.cs index dcc8dd57..295e84ec 100644 --- a/Core/Handling/General/LifeSpanHandler.cs +++ b/Core/Handling/General/LifeSpanHandler.cs @@ -4,9 +4,7 @@ namespace TweetDuck.Core.Handling.General{ sealed class LifeSpanHandler : ILifeSpanHandler{ - public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser){ - newBrowser = null; - + public static bool HandleLinkClick(IWebBrowser browserControl, WindowOpenDisposition targetDisposition, string targetUrl){ switch(targetDisposition){ case WindowOpenDisposition.NewBackgroundTab: case WindowOpenDisposition.NewForegroundTab: @@ -20,6 +18,11 @@ public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame f } } + public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser){ + newBrowser = null; + return HandleLinkClick(browserControl, targetDisposition, targetUrl); + } + public void OnAfterCreated(IWebBrowser browserControl, IBrowser browser){} public bool DoClose(IWebBrowser browserControl, IBrowser browser){ diff --git a/Core/Handling/RequestHandlerBase.cs b/Core/Handling/RequestHandlerBase.cs new file mode 100644 index 00000000..e83c3ff7 --- /dev/null +++ b/Core/Handling/RequestHandlerBase.cs @@ -0,0 +1,10 @@ +using CefSharp; +using TweetDuck.Core.Handling.General; + +namespace TweetDuck.Core.Handling{ + class RequestHandlerBase : AbstractRequestHandler{ + public override bool OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture){ + return LifeSpanHandler.HandleLinkClick(browserControl, targetDisposition, targetUrl); + } + } +} diff --git a/Core/Handling/RequestHandlerBrowser.cs b/Core/Handling/RequestHandlerBrowser.cs index ad8d8a5d..f4eb9b16 100644 --- a/Core/Handling/RequestHandlerBrowser.cs +++ b/Core/Handling/RequestHandlerBrowser.cs @@ -1,5 +1,4 @@ using CefSharp; -using TweetDuck.Core.Handling.General; namespace TweetDuck.Core.Handling{ sealed class RequestHandlerBrowser : RequestHandlerBase{ diff --git a/Core/Notification/FormNotificationBase.cs b/Core/Notification/FormNotificationBase.cs index 67e48d39..9d459976 100644 --- a/Core/Notification/FormNotificationBase.cs +++ b/Core/Notification/FormNotificationBase.cs @@ -126,7 +126,8 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){ this.browser = new ChromiumWebBrowser("about:blank"){ MenuHandler = new ContextMenuNotification(this, enableContextMenu), JsDialogHandler = new JavaScriptDialogHandler(), - LifeSpanHandler = new LifeSpanHandler() + LifeSpanHandler = new LifeSpanHandler(), + RequestHandler = new RequestHandlerBase() }; this.browser.Dock = DockStyle.None; diff --git a/TweetDuck.csproj b/TweetDuck.csproj index 88f2936d..c3573f60 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -102,8 +102,9 @@ <Compile Include="Core\Handling\General\FileDialogHandler.cs" /> <Compile Include="Core\Handling\KeyboardHandlerBrowser.cs" /> <Compile Include="Core\Handling\KeyboardHandlerNotification.cs" /> + <Compile Include="Core\Handling\RequestHandlerBase.cs" /> <Compile Include="Core\Handling\RequestHandlerBrowser.cs" /> - <Compile Include="Core\Handling\General\RequestHandlerBase.cs" /> + <Compile Include="Core\Handling\General\AbstractRequestHandler.cs" /> <Compile Include="Core\Handling\ResourceHandlerNotification.cs" /> <Compile Include="Core\Notification\Example\FormNotificationExample.cs"> <SubType>Form</SubType> From 51a9bb6d3cfa7481f6e92ac58a3b240d3f7f1e3e Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 21 Dec 2017 20:25:36 +0100 Subject: [PATCH 3/6] Update CefSharp to 63 pre-release --- TweetDuck.csproj | 34 ++++++++++++++--------------- packages.config | 8 +++---- subprocess/TweetDuck.Browser.csproj | 7 +++--- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/TweetDuck.csproj b/TweetDuck.csproj index c3573f60..dbbdd7de 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props')" /> - <Import Project="packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props')" /> + <Import Project="packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props')" /> + <Import Project="packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -421,18 +421,6 @@ if $(ConfigurationName) == Debug ( powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild.ps1" "$(TargetDir)\"</PostBuildEvent> </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\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets'))" /> - <Error Condition="!Exists('packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets'))" /> - <Error Condition="!Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.props'))" /> - <Error Condition="!Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets'))" /> - <Error Condition="!Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.props'))" /> - <Error Condition="!Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets'))" /> - </Target> - <Import Project="packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.2987.1601\build\cef.redist.x64.targets')" /> <Target Name="AfterBuild" Condition="$(ConfigurationName) == Release"> <Exec Command="del "$(TargetDir)*.pdb"" /> <Exec Command="del "$(TargetDir)*.xml"" /> @@ -443,7 +431,19 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild <PropertyGroup> <PreBuildEvent>powershell Get-Process TweetDuck.Browser -ErrorAction SilentlyContinue ^| Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'} ^| Stop-Process; Exit 0</PreBuildEvent> </PropertyGroup> - <Import Project="packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.3202.1690-proprietary-codecs\build\cef.redist.x86.targets')" /> - <Import Project="packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.62.0.0-CI2368\build\CefSharp.Common.targets')" /> - <Import Project="packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.62.0.0-CI2368\build\CefSharp.WinForms.targets')" /> + <Import Project="packages\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.3239.1705\build\cef.redist.x64.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\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets'))" /> + <Error Condition="!Exists('packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets'))" /> + <Error Condition="!Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props'))" /> + <Error Condition="!Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets'))" /> + <Error Condition="!Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props'))" /> + <Error Condition="!Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets'))" /> + </Target> + <Import Project="packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets')" /> + <Import Project="packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets')" /> + <Import Project="packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets')" /> </Project> \ No newline at end of file diff --git a/packages.config b/packages.config index c04a80cf..549dbea4 100644 --- a/packages.config +++ b/packages.config @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="cef.redist.x64" version="3.2987.1601" targetFramework="net452" xmlns="" /> - <package id="cef.redist.x86" version="3.3202.1690-proprietary-codecs" targetFramework="net452" xmlns="" /> - <package id="CefSharp.Common" version="62.0.0-CI2368" targetFramework="net452" xmlns="" /> - <package id="CefSharp.WinForms" version="62.0.0-CI2368" targetFramework="net452" xmlns="" /> + <package id="cef.redist.x64" version="3.3239.1705" targetFramework="net452" xmlns="" /> + <package id="cef.redist.x86" version="3.3239.1705" targetFramework="net452" xmlns="" /> + <package id="CefSharp.Common" version="63.0.0-CI2398" targetFramework="net452" xmlns="" /> + <package id="CefSharp.WinForms" version="63.0.0-CI2398" targetFramework="net452" xmlns="" /> <package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" xmlns="" /> </packages> \ No newline at end of file diff --git a/subprocess/TweetDuck.Browser.csproj b/subprocess/TweetDuck.Browser.csproj index c92c24a2..9dbe717b 100644 --- a/subprocess/TweetDuck.Browser.csproj +++ b/subprocess/TweetDuck.Browser.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> @@ -24,8 +24,9 @@ <StartupObject /> </PropertyGroup> <ItemGroup> - <Reference Include="CefSharp.BrowserSubprocess.Core"> - <HintPath>..\packages\CefSharp.Common.62.0.0-CI2368\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> + <Reference Include="CefSharp.BrowserSubprocess.Core, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\packages\CefSharp.Common.63.0.0-CI2398\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> </Reference> <Reference Include="System" /> </ItemGroup> From f66ff1000a7b9f76d0dfcbfd5f84a2cf06478d10 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 21 Dec 2017 22:45:29 +0100 Subject: [PATCH 4/6] Replace AbstractRequestHandler with CefSharp's implementation --- .../General/AbstractRequestHandler.cs | 68 ------------------- Core/Handling/RequestHandlerBase.cs | 3 +- TweetDuck.csproj | 1 - 3 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 Core/Handling/General/AbstractRequestHandler.cs diff --git a/Core/Handling/General/AbstractRequestHandler.cs b/Core/Handling/General/AbstractRequestHandler.cs deleted file mode 100644 index c79994e0..00000000 --- a/Core/Handling/General/AbstractRequestHandler.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Security.Cryptography.X509Certificates; -using CefSharp; - -namespace TweetDuck.Core.Handling.General{ - abstract class AbstractRequestHandler : IRequestHandler{ - // Browser - - public virtual void OnRenderViewReady(IWebBrowser browserControl, IBrowser browser){} - - public virtual void OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status){} - - public virtual bool OnBeforeBrowse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, bool isRedirect){ - return false; - } - - public virtual bool OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture){ - return false; - } - - public virtual bool OnProtocolExecution(IWebBrowser browserControl, IBrowser browser, string url){ - return false; - } - - // Resources - - public virtual CefReturnValue OnBeforeResourceLoad(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback){ - return CefReturnValue.Continue; - } - - public virtual void OnResourceRedirect(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, ref string newUrl){} - - public virtual bool OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response){ - return false; - } - - public virtual IResponseFilter GetResourceResponseFilter(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response){ - return null; - } - - public virtual void OnResourceLoadComplete(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength){} - - // JavaScript & Plugins - - public virtual bool OnQuotaRequest(IWebBrowser browserControl, IBrowser browser, string originUrl, long newSize, IRequestCallback callback){ - callback.Dispose(); - return false; - } - - public virtual void OnPluginCrashed(IWebBrowser browserControl, IBrowser browser, string pluginPath){} - - // Auth - - public virtual bool GetAuthCredentials(IWebBrowser browserControl, IBrowser browser, IFrame frame, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback){ - callback.Dispose(); - return false; - } - - public virtual bool OnSelectClientCertificate(IWebBrowser browserControl, IBrowser browser, bool isProxy, string host, int port, X509Certificate2Collection certificates, ISelectClientCertificateCallback callback){ - callback.Dispose(); - return false; - } - - public virtual bool OnCertificateError(IWebBrowser browserControl, IBrowser browser, CefErrorCode errorCode, string requestUrl, ISslInfo sslInfo, IRequestCallback callback){ - callback.Dispose(); - return false; - } - } -} diff --git a/Core/Handling/RequestHandlerBase.cs b/Core/Handling/RequestHandlerBase.cs index e83c3ff7..3621ab70 100644 --- a/Core/Handling/RequestHandlerBase.cs +++ b/Core/Handling/RequestHandlerBase.cs @@ -1,8 +1,9 @@ using CefSharp; +using CefSharp.Handler; using TweetDuck.Core.Handling.General; namespace TweetDuck.Core.Handling{ - class RequestHandlerBase : AbstractRequestHandler{ + class RequestHandlerBase : DefaultRequestHandler{ public override bool OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture){ return LifeSpanHandler.HandleLinkClick(browserControl, targetDisposition, targetUrl); } diff --git a/TweetDuck.csproj b/TweetDuck.csproj index dbbdd7de..97b8b05a 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -104,7 +104,6 @@ <Compile Include="Core\Handling\KeyboardHandlerNotification.cs" /> <Compile Include="Core\Handling\RequestHandlerBase.cs" /> <Compile Include="Core\Handling\RequestHandlerBrowser.cs" /> - <Compile Include="Core\Handling\General\AbstractRequestHandler.cs" /> <Compile Include="Core\Handling\ResourceHandlerNotification.cs" /> <Compile Include="Core\Notification\Example\FormNotificationExample.cs"> <SubType>Form</SubType> From a0cc4109df1e7d1249b79f587f67125d6640a768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ch=C3=BDlek?= <info@chylex.com> Date: Thu, 28 Dec 2017 00:03:24 +0100 Subject: [PATCH 5/6] Delete GC reload in CEF 63 (#186) --- Configuration/SystemConfig.cs | 7 +- Core/FormBrowser.cs | 21 +---- Core/Notification/FormNotificationBase.cs | 4 - Core/Other/Analytics/AnalyticsFile.cs | 8 +- .../Analytics/AnalyticsReportGenerator.cs | 5 +- Core/Other/Management/BrowserProcesses.cs | 27 ------ Core/Other/Management/MemoryUsageTracker.cs | 93 ------------------- .../Settings/TabSettingsAdvanced.Designer.cs | 58 +----------- Core/Other/Settings/TabSettingsAdvanced.cs | 20 +--- Core/TweetDeckBrowser.cs | 24 +---- Core/Utils/WindowsUtils.cs | 15 --- Data/Serialization/FileSerializer.cs | 8 ++ Program.cs | 2 - Resources/Scripts/code.js | 31 +------ TweetDuck.csproj | 2 - subprocess/Program.cs | 30 +----- 16 files changed, 33 insertions(+), 322 deletions(-) delete mode 100644 Core/Other/Management/BrowserProcesses.cs delete mode 100644 Core/Other/Management/MemoryUsageTracker.cs diff --git a/Configuration/SystemConfig.cs b/Configuration/SystemConfig.cs index a959c410..811b2856 100644 --- a/Configuration/SystemConfig.cs +++ b/Configuration/SystemConfig.cs @@ -4,7 +4,9 @@ namespace TweetDuck.Configuration{ sealed class SystemConfig{ - private static readonly FileSerializer<SystemConfig> Serializer = new FileSerializer<SystemConfig>(); + private static readonly FileSerializer<SystemConfig> Serializer = new FileSerializer<SystemConfig>{ + HandleUnknownProperties = FileSerializer<SystemConfig>.IgnoreProperties("EnableBrowserGCReload", "BrowserMemoryThreshold") + }; public static readonly bool IsHardwareAccelerationSupported = File.Exists(Path.Combine(Program.ProgramPath, "libEGL.dll")) && File.Exists(Path.Combine(Program.ProgramPath, "libGLESv2.dll")); @@ -13,9 +15,6 @@ sealed class SystemConfig{ private bool _hardwareAcceleration = true; - public bool EnableBrowserGCReload { get; set; } = true; - public int BrowserMemoryThreshold { get; set; } = 400; - // SPECIAL PROPERTIES public bool HardwareAcceleration{ diff --git a/Core/FormBrowser.cs b/Core/FormBrowser.cs index 94547daa..44fb6500 100644 --- a/Core/FormBrowser.cs +++ b/Core/FormBrowser.cs @@ -308,23 +308,12 @@ private void soundNotification_PlaybackError(object sender, PlaybackErrorEventAr } protected override void WndProc(ref Message m){ - if (isLoaded){ - if (m.Msg == Program.WindowRestoreMessage){ - if (WindowsUtils.CurrentProcessID == m.WParam.ToInt32()){ - trayIcon_ClickRestore(trayIcon, EventArgs.Empty); - } - - return; + if (isLoaded && m.Msg == Program.WindowRestoreMessage){ + if (WindowsUtils.CurrentProcessID == m.WParam.ToInt32()){ + trayIcon_ClickRestore(trayIcon, EventArgs.Empty); } - else if (m.Msg == Program.SubProcessMessage){ - int processId = m.WParam.ToInt32(); - if (WindowsUtils.IsChildProcess(processId)){ // child process is checked in two places for safety - BrowserProcesses.Link(m.LParam.ToInt32(), processId); - } - - return; - } + return; } if (browser.Ready && m.Msg == NativeMethods.WM_PARENTNOTIFY && (m.WParam.ToInt32() & 0xFFFF) == NativeMethods.WM_XBUTTONDOWN){ @@ -421,8 +410,6 @@ public void OpenSettings(Type startTab){ trayIcon.HasNotifications = false; } - browser.RefreshMemoryTracker(); - if (Config.AllowDataCollection){ if (analytics == null){ analytics = new AnalyticsManager(this, plugins, Program.AnalyticsFilePath); diff --git a/Core/Notification/FormNotificationBase.cs b/Core/Notification/FormNotificationBase.cs index 9d459976..428be6db 100644 --- a/Core/Notification/FormNotificationBase.cs +++ b/Core/Notification/FormNotificationBase.cs @@ -9,7 +9,6 @@ using TweetDuck.Core.Handling; using TweetDuck.Core.Handling.General; using TweetDuck.Core.Other.Analytics; -using TweetDuck.Core.Other.Management; using TweetDuck.Core.Utils; namespace TweetDuck.Core.Notification{ @@ -175,9 +174,6 @@ private void owner_FormClosed(object sender, FormClosedEventArgs e){ private void browser_IsBrowserInitializedChanged(object sender, IsBrowserInitializedChangedEventArgs e){ if (e.IsBrowserInitialized){ Initialized?.Invoke(this, EventArgs.Empty); - - int identifier = browser.GetBrowser().Identifier; - Disposed += (sender2, args2) => BrowserProcesses.Forget(identifier); } } diff --git a/Core/Other/Analytics/AnalyticsFile.cs b/Core/Other/Analytics/AnalyticsFile.cs index 71b3528e..7fca222b 100644 --- a/Core/Other/Analytics/AnalyticsFile.cs +++ b/Core/Other/Analytics/AnalyticsFile.cs @@ -3,7 +3,9 @@ namespace TweetDuck.Core.Other.Analytics{ sealed class AnalyticsFile{ - private static readonly FileSerializer<AnalyticsFile> Serializer = new FileSerializer<AnalyticsFile>(); + private static readonly FileSerializer<AnalyticsFile> Serializer = new FileSerializer<AnalyticsFile>{ + HandleUnknownProperties = FileSerializer<AnalyticsFile>.IgnoreProperties("CountGCReloads") + }; static AnalyticsFile(){ Serializer.RegisterTypeConverter(typeof(DateTime), new SingleTypeConverter<DateTime>{ @@ -17,7 +19,7 @@ public enum Event{ DesktopNotification, SoundNotification, MuteNotification, BrowserContextMenu, BrowserExtraMouseButton, NotificationContextMenu, NotificationExtraMouseButton, NotificationKeyboardShortcut, - TweetScreenshot, TweetDetail, VideoPlay, GCReload + TweetScreenshot, TweetDetail, VideoPlay } // STATE PROPERTIES @@ -46,7 +48,6 @@ public enum Event{ public int CountTweetScreenshots { get; private set; } = 0; public int CountTweetDetails { get; private set; } = 0; public int CountVideoPlays { get; private set; } = 0; - public int CountGCReloads { get; private set; } = 0; // END OF DATA @@ -76,7 +77,6 @@ public void TriggerEvent(Event e){ case Event.TweetScreenshot: ++CountTweetScreenshots; break; case Event.TweetDetail: ++CountTweetDetails; break; case Event.VideoPlay: ++CountVideoPlays; break; - case Event.GCReload: ++CountGCReloads; break; } } diff --git a/Core/Other/Analytics/AnalyticsReportGenerator.cs b/Core/Other/Analytics/AnalyticsReportGenerator.cs index 5af30399..06400ce0 100644 --- a/Core/Other/Analytics/AnalyticsReportGenerator.cs +++ b/Core/Other/Analytics/AnalyticsReportGenerator.cs @@ -37,8 +37,6 @@ public static AnalyticsReport Create(AnalyticsFile file, ExternalInfo info, Plug { "Screen DPI" , info.DPI != null ? Exact(info.DPI.Value) : "(unknown)" }, 0, { "Hardware Acceleration" , Bool(SysConfig.HardwareAcceleration) }, - { "Browser GC Reload" , Bool(SysConfig.EnableBrowserGCReload) }, - { "Browser GC Threshold" , Exact(SysConfig.BrowserMemoryThreshold) }, 0, { "Expand Links" , Bool(UserConfig.ExpandLinksOnHover) }, { "Switch Account Selectors" , Bool(UserConfig.SwitchAccountSelectors) }, @@ -102,8 +100,7 @@ public static AnalyticsReport Create(AnalyticsFile file, ExternalInfo info, Plug { "Notification Keyboard Shortcuts" , LogRound(file.CountNotificationKeyboardShortcuts, 2) }, { "Tweet Screenshots" , LogRound(file.CountTweetScreenshots, 2) }, { "Tweet Details" , LogRound(file.CountTweetDetails, 2) }, - { "Video Plays" , LogRound(file.CountVideoPlays, 4) }, - { "GC Reloads" , LogRound(file.CountGCReloads, 4) } + { "Video Plays" , LogRound(file.CountVideoPlays, 4) } }.FinalizeReport(); } diff --git a/Core/Other/Management/BrowserProcesses.cs b/Core/Other/Management/BrowserProcesses.cs deleted file mode 100644 index 51cbe85e..00000000 --- a/Core/Other/Management/BrowserProcesses.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics; -using CefSharp; -using TweetDuck.Core.Utils; - -namespace TweetDuck.Core.Other.Management{ - static class BrowserProcesses{ - private static readonly Dictionary<int, int> PIDs = new Dictionary<int, int>(); - - public static void Link(int identifier, int pid){ - PIDs[identifier] = pid; - } - - public static void Forget(int identifier){ - PIDs.Remove(identifier); - } - - public static Process FindProcess(IBrowser browser){ - if (PIDs.TryGetValue(browser.Identifier, out int pid) && WindowsUtils.IsChildProcess(pid)){ // child process is checked in two places for safety - return Process.GetProcessById(pid); - } - else{ - return null; - } - } - } -} diff --git a/Core/Other/Management/MemoryUsageTracker.cs b/Core/Other/Management/MemoryUsageTracker.cs deleted file mode 100644 index 24ba4d86..00000000 --- a/Core/Other/Management/MemoryUsageTracker.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Diagnostics; -using System.Timers; -using CefSharp; -using CefSharp.WinForms; -using TweetDuck.Core.Controls; -using Timer = System.Timers.Timer; - -namespace TweetDuck.Core.Other.Management{ - sealed class MemoryUsageTracker : IDisposable{ - private const int IntervalMemoryCheck = 60000*30; // 30 minutes - private const int IntervalCleanupAttempt = 60000*5; // 5 minutes - - private readonly string script; - private readonly Timer timer; - private FormBrowser owner; - private IBrowser browser; - - private long threshold; - private bool needsCleanup; - - public MemoryUsageTracker(string cleanupFunctionName){ - this.script = $"window.{cleanupFunctionName} && window.{cleanupFunctionName}()"; - - this.timer = new Timer{ Interval = IntervalMemoryCheck }; - this.timer.Elapsed += timer_Elapsed; - } - - public void Start(ChromiumWebBrowser control, int thresholdMB){ - Stop(); - - this.owner = (FormBrowser)control.Parent; // TODO ugly - this.browser = control.GetBrowser(); - this.threshold = thresholdMB*1024L*1024L; - this.timer.SynchronizingObject = owner; - this.timer.Start(); - } - - public void Stop(){ - timer.Stop(); - timer.SynchronizingObject = null; - owner = null; - browser = null; - SetNeedsCleanup(false); - } - - public void Dispose(){ - timer.SynchronizingObject = null; - timer.Dispose(); - owner = null; - browser = null; - } - - private void SetNeedsCleanup(bool value){ - if (needsCleanup != value){ - needsCleanup = value; - timer.Interval = value ? IntervalCleanupAttempt : IntervalMemoryCheck; // restarts timer - } - } - - private void timer_Elapsed(object sender, ElapsedEventArgs e){ - if (owner == null || browser == null){ - return; - } - - if (needsCleanup){ - if (!owner.ContainsFocus){ - using(IFrame frame = browser.MainFrame){ - frame.EvaluateScriptAsync(script).ContinueWith(task => { - JavascriptResponse response = task.Result; - - if (response.Success && (response.Result as bool? ?? false)){ - SetNeedsCleanup(false); - owner.InvokeAsyncSafe(() => owner.TriggerAnalyticsEvent(Analytics.AnalyticsFile.Event.GCReload)); - } - }); - } - } - } - else{ - try{ - using(Process process = BrowserProcesses.FindProcess(browser)){ - if (process?.PrivateMemorySize64 > threshold){ - SetNeedsCleanup(true); - } - } - }catch{ - // ignore I guess? - } - } - } - } -} diff --git a/Core/Other/Settings/TabSettingsAdvanced.Designer.cs b/Core/Other/Settings/TabSettingsAdvanced.Designer.cs index 5de6ea18..c3d45f32 100644 --- a/Core/Other/Settings/TabSettingsAdvanced.Designer.cs +++ b/Core/Other/Settings/TabSettingsAdvanced.Designer.cs @@ -33,16 +33,12 @@ private void InitializeComponent() { this.btnRestart = new System.Windows.Forms.Button(); this.btnOpenAppFolder = new System.Windows.Forms.Button(); this.btnOpenDataFolder = new System.Windows.Forms.Button(); - this.numMemoryThreshold = new TweetDuck.Core.Controls.NumericUpDownEx(); - this.checkBrowserGCReload = new System.Windows.Forms.CheckBox(); this.labelApp = new System.Windows.Forms.Label(); this.panelApp = new System.Windows.Forms.Panel(); this.labelPerformance = new System.Windows.Forms.Label(); this.panelPerformance = new System.Windows.Forms.Panel(); - this.labelMemoryUsage = new System.Windows.Forms.Label(); this.panelConfiguration = new System.Windows.Forms.Panel(); this.labelConfiguration = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.numMemoryThreshold)).BeginInit(); this.panelApp.SuspendLayout(); this.panelPerformance.SuspendLayout(); this.panelConfiguration.SuspendLayout(); @@ -134,35 +130,6 @@ private void InitializeComponent() { this.toolTip.SetToolTip(this.btnOpenDataFolder, "Opens the folder where your profile data is located."); this.btnOpenDataFolder.UseVisualStyleBackColor = true; // - // numMemoryThreshold - // - this.numMemoryThreshold.Increment = new decimal(new int[] { - 50, - 0, - 0, - 0}); - this.numMemoryThreshold.Location = new System.Drawing.Point(202, 82); - this.numMemoryThreshold.Maximum = 2000; - this.numMemoryThreshold.Minimum = 200; - this.numMemoryThreshold.Name = "numMemoryThreshold"; - this.numMemoryThreshold.Size = new System.Drawing.Size(97, 20); - this.numMemoryThreshold.TabIndex = 4; - this.numMemoryThreshold.TextSuffix = " MB"; - this.toolTip.SetToolTip(this.numMemoryThreshold, "Minimum amount of memory usage by the browser process to trigger the cleanup.\r\nThis is not a limit, the usage is allowed to exceed this value."); - this.numMemoryThreshold.Value = 400; - // - // checkBrowserGCReload - // - this.checkBrowserGCReload.AutoSize = true; - this.checkBrowserGCReload.Location = new System.Drawing.Point(6, 84); - this.checkBrowserGCReload.Margin = new System.Windows.Forms.Padding(6, 5, 3, 3); - this.checkBrowserGCReload.Name = "checkBrowserGCReload"; - this.checkBrowserGCReload.Size = new System.Drawing.Size(190, 17); - this.checkBrowserGCReload.TabIndex = 3; - this.checkBrowserGCReload.Text = "Enable Browser Memory Threshold"; - this.toolTip.SetToolTip(this.checkBrowserGCReload, "Automatically reloads TweetDeck to save memory. This option only works if\r\nthe browser is in a \'default state\', i.e. all modals and drawers are closed, and\r\nall columns are scrolled to top. This option will not be exported in a profile."); - this.checkBrowserGCReload.UseVisualStyleBackColor = true; - // // labelApp // this.labelApp.AutoSize = true; @@ -202,33 +169,20 @@ private void InitializeComponent() { // this.panelPerformance.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.panelPerformance.Controls.Add(this.checkBrowserGCReload); - this.panelPerformance.Controls.Add(this.numMemoryThreshold); - this.panelPerformance.Controls.Add(this.labelMemoryUsage); this.panelPerformance.Controls.Add(this.checkHardwareAcceleration); this.panelPerformance.Controls.Add(this.btnClearCache); this.panelPerformance.Location = new System.Drawing.Point(9, 137); this.panelPerformance.Name = "panelPerformance"; - this.panelPerformance.Size = new System.Drawing.Size(322, 105); + this.panelPerformance.Size = new System.Drawing.Size(322, 58); this.panelPerformance.TabIndex = 3; // - // labelMemoryUsage - // - this.labelMemoryUsage.AutoSize = true; - this.labelMemoryUsage.Location = new System.Drawing.Point(3, 66); - this.labelMemoryUsage.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0); - this.labelMemoryUsage.Name = "labelMemoryUsage"; - this.labelMemoryUsage.Size = new System.Drawing.Size(78, 13); - this.labelMemoryUsage.TabIndex = 2; - this.labelMemoryUsage.Text = "Memory Usage"; - // // panelConfiguration // this.panelConfiguration.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panelConfiguration.Controls.Add(this.btnEditCSS); this.panelConfiguration.Controls.Add(this.btnEditCefArgs); - this.panelConfiguration.Location = new System.Drawing.Point(9, 289); + this.panelConfiguration.Location = new System.Drawing.Point(9, 242); this.panelConfiguration.Name = "panelConfiguration"; this.panelConfiguration.Size = new System.Drawing.Size(322, 29); this.panelConfiguration.TabIndex = 5; @@ -237,7 +191,7 @@ private void InitializeComponent() { // this.labelConfiguration.AutoSize = true; this.labelConfiguration.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.labelConfiguration.Location = new System.Drawing.Point(6, 266); + this.labelConfiguration.Location = new System.Drawing.Point(6, 219); this.labelConfiguration.Margin = new System.Windows.Forms.Padding(0, 21, 0, 0); this.labelConfiguration.Name = "labelConfiguration"; this.labelConfiguration.Size = new System.Drawing.Size(104, 20); @@ -255,8 +209,7 @@ private void InitializeComponent() { this.Controls.Add(this.panelApp); this.Controls.Add(this.labelApp); this.Name = "TabSettingsAdvanced"; - this.Size = new System.Drawing.Size(340, 328); - ((System.ComponentModel.ISupportInitialize)(this.numMemoryThreshold)).EndInit(); + this.Size = new System.Drawing.Size(340, 282); this.panelApp.ResumeLayout(false); this.panelPerformance.ResumeLayout(false); this.panelPerformance.PerformLayout(); @@ -283,8 +236,5 @@ private void InitializeComponent() { private System.Windows.Forms.Panel panelPerformance; private System.Windows.Forms.Panel panelConfiguration; private System.Windows.Forms.Label labelConfiguration; - private System.Windows.Forms.Label labelMemoryUsage; - private Controls.NumericUpDownEx numMemoryThreshold; - private System.Windows.Forms.CheckBox checkBrowserGCReload; } } diff --git a/Core/Other/Settings/TabSettingsAdvanced.cs b/Core/Other/Settings/TabSettingsAdvanced.cs index cb13f19a..6728292a 100644 --- a/Core/Other/Settings/TabSettingsAdvanced.cs +++ b/Core/Other/Settings/TabSettingsAdvanced.cs @@ -24,11 +24,7 @@ public TabSettingsAdvanced(Action<string> reinjectBrowserCSS){ checkHardwareAcceleration.Enabled = false; checkHardwareAcceleration.Checked = false; } - - checkBrowserGCReload.Checked = SysConfig.EnableBrowserGCReload; - numMemoryThreshold.Enabled = checkBrowserGCReload.Checked; - numMemoryThreshold.SetValueSafe(SysConfig.BrowserMemoryThreshold); - + BrowserCache.CalculateCacheSize(task => { string text = task.IsCompleted ? (int)Math.Ceiling(task.Result/(1024.0*1024.0))+" MB" : "(unknown size)"; this.InvokeSafe(() => btnClearCache.Text = $"Clear Cache ({text})"); @@ -38,10 +34,7 @@ public TabSettingsAdvanced(Action<string> reinjectBrowserCSS){ public override void OnReady(){ btnClearCache.Click += btnClearCache_Click; checkHardwareAcceleration.CheckedChanged += checkHardwareAcceleration_CheckedChanged; - - checkBrowserGCReload.CheckedChanged += checkBrowserGCReload_CheckedChanged; - numMemoryThreshold.ValueChanged += numMemoryThreshold_ValueChanged; - + btnEditCefArgs.Click += btnEditCefArgs_Click; btnEditCSS.Click += btnEditCSS_Click; @@ -66,15 +59,6 @@ private void checkHardwareAcceleration_CheckedChanged(object sender, EventArgs e PromptRestart(); // calls OnClosing } - private void checkBrowserGCReload_CheckedChanged(object sender, EventArgs e){ - SysConfig.EnableBrowserGCReload = checkBrowserGCReload.Checked; - numMemoryThreshold.Enabled = checkBrowserGCReload.Checked; - } - - private void numMemoryThreshold_ValueChanged(object sender, EventArgs e){ - SysConfig.BrowserMemoryThreshold = (int)numMemoryThreshold.Value; - } - private void btnEditCefArgs_Click(object sender, EventArgs e){ DialogSettingsCefArgs form = new DialogSettingsCefArgs(); diff --git a/Core/TweetDeckBrowser.cs b/Core/TweetDeckBrowser.cs index 919d7bdc..0b0623a4 100644 --- a/Core/TweetDeckBrowser.cs +++ b/Core/TweetDeckBrowser.cs @@ -7,7 +7,6 @@ using TweetDuck.Core.Controls; using TweetDuck.Core.Handling; using TweetDuck.Core.Handling.General; -using TweetDuck.Core.Other.Management; using TweetDuck.Core.Utils; using TweetDuck.Plugins; using TweetDuck.Plugins.Enums; @@ -36,7 +35,6 @@ public bool IsTweetDeckWebsite{ private readonly ChromiumWebBrowser browser; private readonly PluginManager plugins; - private readonly MemoryUsageTracker memoryUsageTracker; public TweetDeckBrowser(FormBrowser owner, PluginManager plugins, TweetDeckBridge bridge){ this.browser = new ChromiumWebBrowser(TwitterUtils.TweetDeckURL){ @@ -69,9 +67,7 @@ public TweetDeckBrowser(FormBrowser owner, PluginManager plugins, TweetDeckBridg this.plugins = plugins; this.plugins.PluginChangedState += plugins_PluginChangedState; - - this.memoryUsageTracker = new MemoryUsageTracker("TDGF_tryRunCleanup"); - + Program.UserConfig.MuteToggled += UserConfig_MuteToggled; Program.UserConfig.ZoomLevelChanged += UserConfig_ZoomLevelChanged; } @@ -95,8 +91,7 @@ public void Dispose(){ Program.UserConfig.MuteToggled -= UserConfig_MuteToggled; Program.UserConfig.ZoomLevelChanged -= UserConfig_ZoomLevelChanged; - - memoryUsageTracker.Dispose(); + browser.Dispose(); } @@ -115,8 +110,6 @@ private void browser_LoadingStateChanged(object sender, LoadingStateChangedEvent private void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e){ if (e.Frame.IsMain){ - memoryUsageTracker.Stop(); - if (Program.UserConfig.ZoomLevel != 100){ BrowserUtils.SetZoomLevel(browser.GetBrowser(), Program.UserConfig.ZoomLevel); } @@ -140,10 +133,6 @@ private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){ TweetDeckBridge.ResetStaticProperties(); - if (Program.SystemConfig.EnableBrowserGCReload){ - memoryUsageTracker.Start(browser, Program.SystemConfig.BrowserMemoryThreshold); - } - if (Program.UserConfig.FirstRun){ ScriptLoader.ExecuteFile(e.Frame, "introduction.js"); } @@ -184,15 +173,6 @@ public UpdateHandler CreateUpdateHandler(UpdaterSettings settings){ return new UpdateHandler(browser, settings); } - public void RefreshMemoryTracker(){ - if (Program.SystemConfig.EnableBrowserGCReload){ - memoryUsageTracker.Start(browser, Program.SystemConfig.BrowserMemoryThreshold); - } - else{ - memoryUsageTracker.Stop(); - } - } - public void HideVideoOverlay(bool focus){ if (focus){ browser.GetBrowser().GetHost().SendFocusEvent(true); diff --git a/Core/Utils/WindowsUtils.cs b/Core/Utils/WindowsUtils.cs index dcfbbb7e..299ec227 100644 --- a/Core/Utils/WindowsUtils.cs +++ b/Core/Utils/WindowsUtils.cs @@ -2,7 +2,6 @@ using System.ComponentModel; using System.Diagnostics; using System.IO; -using System.Management; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading; @@ -95,20 +94,6 @@ public static void TryDeleteFolderWhenAble(string path, int timeout){ }).Start(); } - public static bool IsChildProcess(int pid){ - try{ - using(ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT ParentProcessId FROM Win32_Process WHERE ProcessId = "+pid)){ - foreach(ManagementBaseObject obj in searcher.Get()){ - return (uint)obj["ParentProcessId"] == CurrentProcessID; - } - } - - return false; - }catch{ - return false; - } - } - public static void ClipboardStripHtmlStyles(){ if (!Clipboard.ContainsText(TextDataFormat.Html) || !Clipboard.ContainsText(TextDataFormat.UnicodeText)){ return; diff --git a/Data/Serialization/FileSerializer.cs b/Data/Serialization/FileSerializer.cs index ee1dd560..ecf94c72 100644 --- a/Data/Serialization/FileSerializer.cs +++ b/Data/Serialization/FileSerializer.cs @@ -109,6 +109,14 @@ public void ReadIfExists(string file, T obj){ }catch(DirectoryNotFoundException){} } + public static HandleUnknownPropertiesHandler IgnoreProperties(params string[] properties){ + return (obj, data) => { + foreach(string property in properties){ + data.Remove(property); + } + }; + } + private sealed class BasicTypeConverter : ITypeConverter{ bool ITypeConverter.TryWriteType(Type type, object value, out string converted){ switch(Type.GetTypeCode(type)){ diff --git a/Program.cs b/Program.cs index 7aa11ddb..47f5e6c8 100644 --- a/Program.cs +++ b/Program.cs @@ -42,7 +42,6 @@ static class Program{ private static string ConsoleLogFilePath => Path.Combine(StoragePath, "TD_Console.txt"); public static uint WindowRestoreMessage; - public static uint SubProcessMessage; private static readonly LockManager LockManager = new LockManager(Path.Combine(StoragePath, ".lock")); private static bool HasCleanedUp; @@ -72,7 +71,6 @@ private static void Main(){ Cef.EnableHighDPISupport(); WindowRestoreMessage = NativeMethods.RegisterWindowMessage("TweetDuckRestore"); - SubProcessMessage = NativeMethods.RegisterWindowMessage("TweetDuckSubProcess"); if (!WindowsUtils.CheckFolderWritePermission(StoragePath)){ FormMessage.Warning("Permission Error", "TweetDuck does not have write permissions to the storage folder: "+StoragePath, FormMessage.OK); diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index aab4f819..9674c12c 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -1219,35 +1219,6 @@ }); }; - (function(){ - var lastActivity = Date.now(); - - $(document).click(function(e){ - lastActivity = Date.now(); - }); - - window.TDGF_tryRunCleanup = function(){ - // no recent activity - return false if Date.now()-lastActivity < 15e3; - - // no modals are visible - return false if $(".js-modal").is(":visible") || !$(".js-modals-container").is(":empty"); - - // all columns are in a default state - return false if $("section.js-column").is(".is-shifted-1,.is-shifted-2"); - - // all textareas are empty - return false if Array.prototype.some.call(document.getElementsByTagName("textarea"), ele => ele.value.length > 0); - - // all columns are scrolled to top - return false if Array.prototype.some.call(document.getElementsByClassName("js-column-scroller"), ele => ele.scrollTop > 0); - - // cleanup - window.TDGF_reload(); - return true; - }; - })(); - if (window.TD_SESSION && window.TD_SESSION.gc){ var state; @@ -1301,7 +1272,7 @@ } // - // Block: Disable default TweetDeck update notification, as the app usually reloads automatically every so often. + // Block: Disable default TweetDeck update notification. // onAppReady.push(function(){ let events = $._data(document, "events"); diff --git a/TweetDuck.csproj b/TweetDuck.csproj index 97b8b05a..195c321a 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -190,7 +190,6 @@ <Compile Include="Core\Other\Settings\Dialogs\DialogSettingsRestart.Designer.cs"> <DependentUpon>DialogSettingsRestart.cs</DependentUpon> </Compile> - <Compile Include="Core\Other\Management\BrowserProcesses.cs" /> <Compile Include="Core\Other\Settings\TabSettingsFeedback.cs"> <SubType>UserControl</SubType> </Compile> @@ -248,7 +247,6 @@ <Compile Include="Data\Serialization\SingleTypeConverter.cs" /> <Compile Include="Data\TwoKeyDictionary.cs" /> <Compile Include="Data\WindowState.cs" /> - <Compile Include="Core\Other\Management\MemoryUsageTracker.cs" /> <Compile Include="Core\Utils\WindowsUtils.cs" /> <Compile Include="Core\Bridge\TweetDeckBridge.cs" /> <Compile Include="Core\Other\FormSettings.cs"> diff --git a/subprocess/Program.cs b/subprocess/Program.cs index 0f127c80..fb430228 100644 --- a/subprocess/Program.cs +++ b/subprocess/Program.cs @@ -1,12 +1,9 @@ using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using CefSharp; using CefSharp.BrowserSubprocess; namespace TweetDuck.Browser{ static class Program{ - internal const string Version = "1.3.0.0"; + internal const string Version = "1.4.0.0"; private static int Main(string[] args){ SubProcess.EnableHighDPISupport(); @@ -15,32 +12,13 @@ private static int Main(string[] args){ string type = Array.Find(args, arg => arg.StartsWith(typePrefix, StringComparison.OrdinalIgnoreCase)).Substring(typePrefix.Length); if (type == "renderer"){ - using(RendererProcess subProcess = new RendererProcess(args)){ + using(SubProcess subProcess = new SubProcess(args)){ return subProcess.Run(); } } - else return SubProcess.ExecuteProcess(); - } - - private sealed class RendererProcess : SubProcess{ - // ReSharper disable once ParameterTypeCanBeEnumerable.Local - public RendererProcess(string[] args) : base(args){} - - public override void OnBrowserCreated(CefBrowserWrapper wrapper){ - base.OnBrowserCreated(wrapper); - - using(Process me = Process.GetCurrentProcess()){ - PostMessage(HWND_BROADCAST, RegisterWindowMessage("TweetDuckSubProcess"), new UIntPtr((uint)me.Id), new IntPtr(wrapper.BrowserId)); - } + else{ + return SubProcess.ExecuteProcess(); } } - - private static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF); - - [DllImport("user32.dll")] - private static extern bool PostMessage(IntPtr hWnd, uint msg, UIntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll")] - private static extern uint RegisterWindowMessage(string messageName); } } From c15ea97a36ae998b828f79e554d5c752e3e5fa02 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Thu, 28 Dec 2017 00:32:26 +0100 Subject: [PATCH 6/6] Update CEF again --- TweetDuck.csproj | 24 ++++++++++++------------ packages.config | 8 ++++---- subprocess/TweetDuck.Browser.csproj | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/TweetDuck.csproj b/TweetDuck.csproj index 195c321a..a1803fba 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props')" /> - <Import Project="packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props')" /> + <Import Project="packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.props')" /> + <Import Project="packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -428,19 +428,19 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild <PropertyGroup> <PreBuildEvent>powershell Get-Process TweetDuck.Browser -ErrorAction SilentlyContinue ^| Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'} ^| Stop-Process; Exit 0</PreBuildEvent> </PropertyGroup> - <Import Project="packages\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets')" /> + <Import Project="packages\cef.redist.x64.3.3239.1709\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.3239.1709\build\cef.redist.x64.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\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.3239.1705\build\cef.redist.x64.targets'))" /> - <Error Condition="!Exists('packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets'))" /> - <Error Condition="!Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.props'))" /> - <Error Condition="!Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets'))" /> - <Error Condition="!Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.props'))" /> - <Error Condition="!Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets'))" /> + <Error Condition="!Exists('packages\cef.redist.x64.3.3239.1709\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.3239.1709\build\cef.redist.x64.targets'))" /> + <Error Condition="!Exists('packages\cef.redist.x86.3.3239.1709\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3239.1709\build\cef.redist.x86.targets'))" /> + <Error Condition="!Exists('packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.props'))" /> + <Error Condition="!Exists('packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.targets'))" /> + <Error Condition="!Exists('packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.props'))" /> + <Error Condition="!Exists('packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.targets'))" /> </Target> - <Import Project="packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.3239.1705\build\cef.redist.x86.targets')" /> - <Import Project="packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.63.0.0-CI2398\build\CefSharp.Common.targets')" /> - <Import Project="packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.63.0.0-CI2398\build\CefSharp.WinForms.targets')" /> + <Import Project="packages\cef.redist.x86.3.3239.1709\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.3239.1709\build\cef.redist.x86.targets')" /> + <Import Project="packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.63.0.0-CI2399\build\CefSharp.Common.targets')" /> + <Import Project="packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.63.0.0-CI2399\build\CefSharp.WinForms.targets')" /> </Project> \ No newline at end of file diff --git a/packages.config b/packages.config index 549dbea4..82ad4b88 100644 --- a/packages.config +++ b/packages.config @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="cef.redist.x64" version="3.3239.1705" targetFramework="net452" xmlns="" /> - <package id="cef.redist.x86" version="3.3239.1705" targetFramework="net452" xmlns="" /> - <package id="CefSharp.Common" version="63.0.0-CI2398" targetFramework="net452" xmlns="" /> - <package id="CefSharp.WinForms" version="63.0.0-CI2398" targetFramework="net452" xmlns="" /> + <package id="cef.redist.x64" version="3.3239.1709" targetFramework="net452" xmlns="" /> + <package id="cef.redist.x86" version="3.3239.1709" targetFramework="net452" xmlns="" /> + <package id="CefSharp.Common" version="63.0.0-CI2399" targetFramework="net452" xmlns="" /> + <package id="CefSharp.WinForms" version="63.0.0-CI2399" targetFramework="net452" xmlns="" /> <package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" xmlns="" /> </packages> \ No newline at end of file diff --git a/subprocess/TweetDuck.Browser.csproj b/subprocess/TweetDuck.Browser.csproj index 9dbe717b..3f2fc1f8 100644 --- a/subprocess/TweetDuck.Browser.csproj +++ b/subprocess/TweetDuck.Browser.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> @@ -26,7 +26,7 @@ <ItemGroup> <Reference Include="CefSharp.BrowserSubprocess.Core, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\packages\CefSharp.Common.63.0.0-CI2398\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> + <HintPath>..\packages\CefSharp.Common.63.0.0-CI2399\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath> </Reference> <Reference Include="System" /> </ItemGroup>