Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Updated browser engine to version 85.3.13 and added new parameter to …
Browse files Browse the repository at this point in the history
…store browser cache on disk.
  • Loading branch information
dbuechel committed Nov 6, 2020
1 parent b574f65 commit 44d130a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Chrominimum/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ internal class AppSettings
[Option("start-url", HelpText = "The initial URL to be loaded on startup.")]
public string StartUrl { get; set; }

[Option("store-cache", HelpText = "Stores the browser cache on disk.")]
public bool StoreCache { get; set; }

[Option("user-agent-suffix", HelpText = "A suffix to be appended to the user agent of the browser.")]
public string UserAgentSuffix { get; set; }

Expand Down
28 changes: 15 additions & 13 deletions Chrominimum/Chrominimum.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props" Condition="Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props')" />
<Import Project="..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props')" />
<Import Project="..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.props" Condition="Exists('..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.props')" />
<Import Project="..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.85.3.13\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.85.3.13\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.85.3.13\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.85.3.13\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -105,7 +105,9 @@
<EmbeddedResource Include="VersionWindow.resx">
<DependentUpon>VersionWindow.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="app.manifest">
<SubType>Designer</SubType>
</None>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
Expand All @@ -124,13 +126,13 @@
<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.84.4.1\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.84.4.1\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.84.4.1\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets'))" />
<Error Condition="!Exists('..\packages\cef.redist.x64.85.3.13\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.85.3.13\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('..\packages\cef.redist.x86.85.3.13\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.85.3.13\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.targets'))" />
</Target>
<Import Project="..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.84.4.10\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets" Condition="Exists('..\packages\CefSharp.WinForms.84.4.10\build\CefSharp.WinForms.targets')" />
<Import Project="..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.85.3.130\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.targets" Condition="Exists('..\packages\CefSharp.WinForms.85.3.130\build\CefSharp.WinForms.targets')" />
</Project>
7 changes: 7 additions & 0 deletions Chrominimum/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

using System;
using System.IO;
using System.Windows.Forms;
using CefSharp;
using CefSharp.WinForms;
Expand All @@ -27,7 +28,13 @@ public static void Main(string[] args)

appSettings.Initialize();

if (appSettings.StoreCache)
{
cefSettings.CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), nameof(Chrominimum), "Cache");
}

cefSettings.CefCommandLineArgs.Add("enable-media-stream");
cefSettings.PersistSessionCookies = false;
cefSettings.UserAgent = $"Mozilla/5.0 (Windows NT {osVersion}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/{Cef.ChromiumVersion} {appSettings.UserAgentSuffix}";

var success = Cef.Initialize(cefSettings, true, default(IApp));
Expand Down
8 changes: 4 additions & 4 deletions Chrominimum/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="84.4.1" targetFramework="net472" />
<package id="cef.redist.x86" version="84.4.1" targetFramework="net472" />
<package id="CefSharp.Common" version="84.4.10" targetFramework="net472" />
<package id="CefSharp.WinForms" version="84.4.10" targetFramework="net472" />
<package id="cef.redist.x64" version="85.3.13" targetFramework="net472" />
<package id="cef.redist.x86" version="85.3.13" targetFramework="net472" />
<package id="CefSharp.Common" version="85.3.130" targetFramework="net472" />
<package id="CefSharp.WinForms" version="85.3.130" targetFramework="net472" />
<package id="CommandLineParser" version="2.8.0" targetFramework="net472" />
</packages>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ Chrominimum.exe --start-url=duckduckgo.com [other optional parameters]
| --show-maximized | Opens the browser window maximized. |
| --show-menu | Shows the application menu. |
| --start-url="..." | The URL to be loaded initially. |
| --store-cache | Stores the browser cache on disk. |
| --user-agent-suffix="..." | A suffix for the user agent of the browser. |
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '1.1.0.{build}'
version: '1.1.1.{build}'
image: Windows
configuration: Release
platform:
Expand All @@ -12,7 +12,7 @@ assembly_info:
file: AssemblyInfo.*
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '1.1.0 ($(platform))'
assembly_informational_version: '1.1.1 ($(platform))'
install:
- appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
build_script:
Expand Down

0 comments on commit 44d130a

Please sign in to comment.