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

Getting Started CefGlue Gtk (Win)

softoille@gmail.com edited this page Nov 29, 2019 · 1 revision

Creating .NET CefGlue Gtk Applications (32-bit)

Note: Visual Studio 2017 is preferred. Recent older versions like 2015 should work too but not supported.

  1. Create .NET Console Application
  2. Ensure that the build platform target is x86.
  3. From project property, change "Console Application"" to "Windows Application" [Project -> Properties -> Application -> Output type: "Windows Application"].
  4. Add Chromely.CefGlue.Gtk.dll from Nuget or Binaries Folder.
  5. If nuget package is not used in 4, add Chromely.Core.dll from Binaries Folder.
  6. Add the following code snippet to the Main function in Program.cs.

Notes on Upgrade to CefGlue version 70 and CefSharp version 71 (Chromely v4) - Please see.

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

      var 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 
  1. Build the project.

  2. Get Cef binaries from download page. Base Chromium version 59 or above (32-bit) with version matching Chromely.Unofficial.CefGlue.NetStd installed.

    • Copy all files and folders from /Release to the appropriate bin folder - where the project exe file is located.
    • Copy all files and folders from /Resources to appropriate bin folder - where the project exe file is located.

    For more info on cef binaries files/folders layout, please check - CefGlue Application Layout.

  3. Get required gtk binaries or Download Mono 32-bit gtk binaries from Mono Project and copy necessary files to the bin folder.

  4. Run the built exe file.

  5. If successful the following will be shown:

Clone this wiki locally