Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

v5.0.0

Compare
Choose a tag to compare
@Fiahblade Fiahblade released this 23 Feb 13:59
· 217 commits to master since this release

Chromely v5: A true cross-platform solution.

Chromely has been migrated to .NET Core 3 and now natively supports Windows, Linux and MacOS.

Please see our new and improved Wiki for additional information about Chromely.

Overview

Projects Structure

All projects are now .NET Standard 2.0

  • Chromely.Core - no dependencies.
  • Chromely.CefGlue - depends on Chromely.Core and embeds CefGlue source code and CefGlue default handlers.
  • Chromely - primary - depends on Chromely.CefGlue and includes native gui implementation for Win, Linux and MacOS. All other non-CefGlue customization will be done here.

New Features

Fixes

  • Fixed WinAPIHost not respecting WindowTitle (Windows)
  • ToolTips (html-title) working and positioned correctly. (Linux)

Deprecation & Discontinued

  • Winapi was removed in favour of .NET Core 3. Win32 pinvoke functionalities will be sourced in pinvoke.net, shintadono's Win32 and other MIT licensed projects.
  • CefSharp is no longer supported.
  • Default Sup-process was removed for Windows. Sub-process is configurable and developers who need it can include sub-process fullpath in configuration.
  • Real-time with Websocket server was removed.

Quick migration Guide

This guide provides an introduction to Chromely 5 and a set of guidelines to migrate from v4.x to v5.x.

Important upgrade information

  • Chromely removed the support for CefSharp, existing CefSharp projects will need to be migrated to CefGlue.
  • A Chromely project now requires either .NET Core 3.0 or .NET Framework 4.6.1 and above.

Please see our new and improved Wiki and Demo Projects for additional information on how to create a new project.

Setting up a Chromely application

Chromely v4 (before)

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")
                      .WitAppArgs(args)
                      .WithHostSize(1000, 600)
                      .WithStartUrl(startUrl);

      using (var window = ChromelyWindow.Create(config))
      {
         return window.Run(args);
      }
  }
}

Chromely v5 (now)

class Program
{
   static int Main(string[] args)
   {
            AppBuilder
                .Create()
                .UseApp<DemoChromelyApp>()
                .Build()
                .Run(args);
  }
}

Configuring a Chromely application

By default Chromely comes with its own default configuration. There are a few ways how you can configure Chromely. The example below overwrites the Default Configuration, this is the easiest way to configure Chromely.

Please see the wiki article about Configuration for other solutions on how to configure Chromely.

using Chromely.Core;
using Chromely.Core.Configuration;

namespace My_Chromely_App
{
    class Program
    {
        static void Main(string[] args)
        {
            // create a configuration with OS-specific defaults
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            // your configuration
            config.StartUrl = "https://chromely.net/";
            config.WindowOptions.Title = "My Awesome Chromely App!";
            //..

            // application builder
            AppBuilder
            .Create()
            .UseApp<DemoChromelyApp>()
            .UseConfiguration<IChromelyConfiguration>(config)
            .Build()
            .Run(args);
        }
    }
}

As you can see from the example above, some settings have been regrouped. This makes it easier to find specific settings. E.g. WindowsSettings or CefDownloadOptions.