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

Installation

[email protected] edited this page Nov 29, 2019 · 1 revision

Requirements

To build a Chromely application, the following are required:

  • Visual Studio 2017 is preferred. (Recent older versions like 2015 should work too but not supported.)
  • Chromely.Core
  • For CefGlue applications
    • Chromely.CefGlue
    • On Windows
      • Chromely.CefGlue.Winapi or Chromely.CefGlue.Gtk (x86)
    • On Linux
      • Chromely.CefGlue.Gtk (x64)
  • For CefSharp applications:
    • Chromely.CefSharp.Winapi
    • CefSharp.Common (Chromely targets native GUI APIs, so CefSharp.Common should be sufficient)

CefGlue vs. CefSharp

Both CefGlue and CefSharp are implementation of the Chromium Embedded Framework (CEF) for .NET

Each has its own advantages and disadvantages. Chromely leans towards the CefGlue implementation due to its support for .NET Core and Mono while CefSharp is Windows only (.NET Framework).

Install from Nuget

Package Version Install
Chromely.Core Nuget nuget install Chromely.Core
Chromely.CefSharp.Winapi Nuget nuget install Chromely.CefSharp.Winapi
Chromely.CefGlue.Winapi Nuget nuget install Chromely.CefGlue.Winapi
Chromely.CefGlue.Gtk Nuget nuget install Chromely.CefGlue.Gtk

Install from Source Code

Get the source from GitHub or get the binaries.

Setting up CEF binaries

Since Chromely v4, CEF binaries are automatically downloaded and will become visible/included in your solution.

Note: If you are working with an older Chromium version (below 66) or if you aren't using the nuget packages then you will need to download the appropriate CEF binaries manually. Or if for some reasons download is still required then appropriate CEF binaries - either Windows or Linux, x32 or x64 can be found here. More info on CEF binaries download - see 1 and see 2.

Setting up your project

Next, add the code below to Program.cs to bootstrap Chromely.

class Program
{
   static int Main(string[] args)
   {
      string startUrl = "https://google.com";

      ChromelyConfiguration config = ChromelyConfiguration
                                    .Create()
                                    .WithHostMode(WindowState.Normal, true)
                                    .WithHostTitle("chromely")
                                    .WithHostIconFile("chromely.ico")
                                    .WithAppArgs(args)
                                    .WithHostSize(1000, 600)
                                    .WithStartUrl(startUrl);

      using (var window = ChromelyWindow.Create(config))
      {
         return window.Run(args);
      }
  }
}
// Creates Chromely window of size 1000 x 600 pixels.
// Sets the window title to "chromely"
// Sets start url to "https://google.com"
// Centers the window 

Chromely's packages

An overview of the different Chromely packages.

Project Framework Comment
Chromely.Core .NET Standard The core library required to build either a Chromely CefSharp or Chromely CefGlue apps.
Chromely.CefGlue .NET Standard Chromely CefGlue implementation library - this is in .NET Standard as it can be used in both .NET (Win) and .NET Core (Win, Linux). Dependency for Chromely.CefGlue.Winapi and Chromely.CefGlue.Gtk
Chromely.CefSharp.Winapi .NET Framework Chromely CefSharp implementation is only for .NET Framwork
Chromely.CefGlue.Winapi .NET Standard Chromely CefGlue implementation library - this is in .NET Standard as it can also be used for .NET Core. Used only on Windows
Chromely.CefGlue.Gtk .NET Standard Chromely CefGlue implementation library - this is in .NET Standard as it can be used in both .NET (Win) and .NET Core (Win, Linux)
Chromely.Unofficial.CefGlue.NetStd .NET Standard *** Unofficial port of Xilium.CefGlue. Available on Nuget, Github Repo.
Clone this wiki locally