chromelyapps / chromely Goto Github PK
View Code? Open in Web Editor NEWBuild Cross Platform HTML Desktop Apps on .NET using native GUI, HTML5, JavaScript, CSS, Owin, AspNetCore (MVC, RazorPages, Blazor)
License: MIT License
Build Cross Platform HTML Desktop Apps on .NET using native GUI, HTML5, JavaScript, CSS, Owin, AspNetCore (MVC, RazorPages, Blazor)
License: MIT License
Currently the Chromely.Cef.Redist does not work for dotnet core correctly.
To do so we need to adjust the targets to respect the RuntimeIdentifiers correctly.
See Microsoft.NETCore.Platforms
See cross-platform-net-core-apps
See rid-catalog
I had no luck getting Runtimes working. But my knowledge in packing native dependencies cross-platform is limited.
Do you know the Neutronium project?
https://github.com/NeutroniumCore/Neutronium
It seems you guys are doing pretty much the same?
https://stackoverflow.com/questions/45200378/how-to-hide-kestrel-console
editbin.exe /subsystem:windows cefglue_winapi_netcoredemo.exe
Can you add it to wiki? I think some people may need this.
Currently I'm working on a project to bring blazor to desktop: blaster
Good to see a lightweight alternative to electron in c# 👍
But I've troubles where to catch up to serve the blazor files. Basically I need just a hint where to handle the mime types chromium serves for the example IIS config.
Thats the output of the blazor publish:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".dll" />
<remove fileExtension=".json" />
<remove fileExtension=".wasm" />
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".dll" mimeType="application/octet-stream" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
</staticContent>
<httpCompression>
<dynamicTypes>
<add mimeType="application/octet-stream" enabled="true" />
<add mimeType="application/wasm" enabled="true" />
</dynamicTypes>
</httpCompression>
<rewrite>
<rules>
<rule name="Serve subdir">
<match url=".*" />
<action type="Rewrite" url="Blaster.Blazor\dist\{R:0}" />
</rule>
<rule name="SPA fallback routing" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="Blaster.Blazor\dist\" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Awesome project :)
When I click on the installation. The error message is i use the wrong .net version (4.6.1)!
Hello,
Thanks for Chromely
I got the following erreor with angular demo
(xcopy failed)
c:\EXP\Chromely\angular\ChromelyAngularCefGlue\ChromelyAngularCefGlue.csproj(66,7): error MSB3073: La commande "xcopy "c:\EXP\Chromely\angular\ChromelyAngularCefGlue\dist" "c:\EXP\Chromely\angular\ChromelyAngularCefGlue\bin\x64\Debug\net461\dist" /i /s /r /y /c" s'est arrêtée avec le code 4.
1>Génération du projet "ChromelyAngularCefGlue.csproj" terminée -- ÉCHEC.
Regards
I am not a .NET developer and I do not have .NET SDK, but I am searching for a lightweight alternative to Electron/NW.js and I want to try out Chromely. However, I cannot find any demo chromely.exe
binaries for Windows. Can you provide a demo app, running a local HTML file in a subfolder, similar to NW.js?
Thanks!
I want hole & transparent background (specific color. like wpf+cefsharp )
how can I?
thanks.
Related with the mac os compatibility, have you seen these .Net Core bindings for libui?
As we need only a main window, maybe it is easier to integrate it?
Another related question. Do you know if the mac os (last version) allows the application to listen in local port for calls/events from the UI? I don't want to depend only in the internal message loop for the communication. In Windows, I don't know about the UWP, but desktop bridge applications can listen in localhost.
I'm playing around with chromely, pretty impressed so far, but one thing bothered me. Here we are working with an expandobject: https://github.com/mattkol/Chromely/blob/master/angular-react-vue/ChromelyVueCefSharp/Controllers/DemoController.cs#L96-L116
Having my backend in .NET I very much prefer to use typed objects. In case anyone else wants to do the same
public MovieInfo()
{
}
var javaScriptSerializer = new JavaScriptSerializer();
List<MovieInfo> movies = javaScriptSerializer.ConvertToType<List<MovieInfo>>(request.PostData);
You can now work with movies
in a nice way.
window... request url ("www.google.com")?
thanks.
Is there a way to achieve a route like the following...
this.RegisterGetRequest("/conversations/id:", this.GetConversation);
where the route will match id
any value placed after /conversations
part of the route. For example:
/conversations/ce20e093-9726-4607-85ac-a8eba25533c1
Thanks.
First i'd like to say 👏 good job on Chromely, Second i like to know whether i can deploy to Mac Os and what is/are the requirements needed.
Whenever i try run myapp.exe it starts a window but its just blank. debug.log
has the following error
[0614/010709.822:WARNING:resource_bundle.cc(563)] locale resources are not loaded
and in dev tools the console has this error
Not allowed to load local resource: file:///{path to project}\bin\Debug\index.html
Tried >dotnet restore => works well.
C:\Works\Work-Chromely>dotnet run
2018-05-31 20:48:05.258 [ERROR] Oops! Something went wrong. Unable to load DLL 'libcef':
.
(Exception from HRESULT: 0x8007007E) at Xilium.CefGlue.Interop.libcef.api_hash(Int32 entry)
at Xilium.CefGlue.CefRuntime.CheckVersionByApiHash()
at Xilium.CefGlue.CefRuntime.Load(String path)
at Chromely.CefGlue.Winapi.ChromeHost.CefGlueBrowserHost.OnCreate(CreateWindowPacket& packet)
at WinApi.Windows.Packetizer.ProcessCreate(WindowMessage& msg, EventedWindowCore window)
at WinApi.Windows.WindowCore.WindowProc(IntPtr hwnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
..
Missing some pre-conditions ??
Nice work!
Does this also work on MacOS?
Thanks,
Peter
Can Visual Studio 2015 be developed?
用Visual Studio 2015可以开发吗?
In the use case where we want to deliver a ASP.NET Core Web Application locally, Electron works and I have delivered several of these.
The Demo project for Chromely looks great but does not use Razor pages to deliver content.
I am wondering how to make Chromely work with an ASP.NET Core Web Application -> Web Application (i.e. using Razor pages).
It would be great to use Chromely instead of electron.
Do you have any examples of this yet?
Thank you.
In your demo on "Getting Started CefGlue Gtk (Linux)" you write:
var factory = WinapiHostFactory.Init();
using (var app = new CefGlueBrowserHost(config))
this class seems to be from CefGlue.WinApi
.
Is WinApi
and CefGlue.WinApi
required to run on linux? the wiki page doesn't mention them.
Even with those 2 packages, it won't run on windows, because Cef is missing.
So I added cef like written further down on the wiki page.
I then installed the gtk+ 64bit runtime in v2.24 from
https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer
(installing the 32bit version will throw BadImageFormatException)
With this installed, I got this exception:
Exception thrown: 'System.DllNotFoundException' in Chromely.CefGlue.Gtk.dll:
'gtksharpglue-2'
After googling I found, that I need Gtk# to be installed from http://www.mono-project.com/download/stable/
Now I get BadImageFormatException agai, presumably, because Gtk# doesn't ship a 64bit version.
at Chromely.CefGlue.Gtk.ChromeHost.NativeMethods.Win.gtksharp_gtk_widget_get_window(IntPtr widget)
Is 64bit required for Chromely or would it run in32bit mode, too?
Hello
I am in need of some help using chromely
I want to give chromely an array of args when calling dotnet run,
and then use those args in the controller.
using the demo,
where would i need to put args in Program.cs,
and how do i call args from within DemoController?
Your assistance would be greatly appreciated
Is there a way to open multiple chromely windows? Say for instance I want to open a new link in another chromely window. I have tried using window.open() or links with target _blank but nothing appears to happen.
If register as externalurl it opens in separate browser but I want it to open in another chromely window.
Additionally I was thinking of creating a loading screen where I have one window open and then when it closes I open a second main one. Is that possible with chromely?
Please delete it. something wrong with Github
Please delete it. something wrong with Github
Hi,
I am curious if Chromely does support Android Platform ?
If no, what is the reason ?
Thanks
It would be cool to get a Gitter channel running for discussions :)
Is it possible to open chrome dev tools for debugging?
cef is cef_binary_3.3282.1741.gcd94615_windows64
When Debug Chromely.CefGlue.Winapi.netCoreDemo ,
Console Print this :
[0409/160109.796:ERROR:icu_util.cc(174)] Invalid file descriptor to ICU data received.
Please delete it. something wrong with Github
Please add a mechanism to easily bind the internal CEF host's size to the parent window's size such that the CEF host resizes with the parent.
I rebuild the cefsharp to enable the html5. Then I copy the dll into the project.But it does not work.
Hi does this have duplex Communication between c# layer and JavaScript layer?
from what I’ve seen its more of a one way Restful client / server setup from JavaScript at the moment....
how do i also communicate with JavaScript layer from c# layer....
I’m really just looking to shoot messages both ways asynchronously
Im Using CefSharp version but if CefGlue is easyier please let me know....
Regards
How would I go about setting a minimum size for the window?
Thanks!
.Net Core 2.0
Chromely.Core
WinAPI
Chromely.CefGlue.Winapi
Program.cs:
using Chromely.CefGlue.Winapi;
using Chromely.CefGlue.Winapi.ChromeHost;
using Chromely.Core;
using Chromely.Core.Helpers;
using WinApi.Windows;
namespace CoreTest
{
class Program
{
static int Main(string[] args)
{
string startUrl = "https://www.google.com/";
ChromelyConfiguration config = ChromelyConfiguration
.Create()
.WithAppArgs(args)
.WithHostSize(1000, 600)
// The single process should only be used for debugging purpose.
// For production, this should not be needed when the app is published
// Alternate approach for multi-process, is to add a subprocess application
//.WithCustomSetting(CefSettingKeys.BrowserSubprocessPath, path_to_sunprocess)
.WithCustomSetting(CefSettingKeys.SingleProcess, true)
.WithStartUrl(startUrl);
var factory = WinapiHostFactory.Init();
using (var window = factory.CreateWindow(() => new CefGlueBrowserHost(config),
"SNIPR Test", constructionParams: new FrameWindowConstructionParams())) {
window.SetSize(config.HostWidth, config.HostHeight);
window.CenterToScreen();
window.Show();
return new EventLoop().Run(window);
}
}
}
}
I'm sorta a noob but I have no idea how to make the window frameless... I've heard of WM_NCHITTEST
but can't find it in the window flags... thanx
Hi,
It's not a issue, maybe it's feature reqiure, how to hide the right click menu? is there any option to do that? I don't want user click the right menu the "Show DevTools" and "Close DevTools" to review source code.
Thanks,
Jack
How can I change the IJsonMapper with DI (with other JSON library or even other protocol)?
The same for the Logger.
Thanks!
I have used CoreRT, (NET Core runtime optimized for AOT ) to build my Chromely sample app. It successfully generated native binaries. But when the executable generated following error. Unable to load DLL 'libcef': specified module is not available.
is it mp4 supported ?
First of all Thanks for creating this beautiful library 👏 and Thanks for understanding .net people inner thoughts 👍
Unfortunately from Doc look like Chormely does not work on mac.
May I suggest you a solution.
Avalonia Most popular .net core UI it build successfully on mac as well, It has a Chromium Embedded Framework (CEF) By using It there should be no issue with builds.
I think Its most stable way for chromely.
Please share your thoughts on it.
I have been developing against the "old" dll's provided in issue #48 and wanted to ask about the ability to close the window and open a new one after one is already opened; however, before making a new post I wanted to make sure I had the newest code. I updated to CefGlue Version 68 and tried testing the code and it appears that the full-screen functionality no longer works. Using the following code does not create a full-screen window.
string startUrl = "http://www.google.com";
ChromelyConfiguration config = ChromelyConfiguration
.Create()
.WithHostTitle("chromely")
.WithAppArgs(args)
.WithStartUrl(startUrl)
.WithHostMode(Chromely.Core.Host.WindowState.Fullscreen, false)
.WithHostSize(1280, 1024)
//Set multi-threaded_message_loop false
//only supported on windows
.WithCustomSetting(CefSettingKeys.MultiThreadedMessageLoop, false)
.WithCommandLineArg("disable-gpu", "1")
.WithCommandLineArg("disable-gpu-compositing", "1")
.WithCommandLineArg("disable-smooth-scrolling", "1")
.WithCommandLineArg("no-sandbox", "1");
using (app = new CefGlueBrowserWindow(config))
{
return app.Run(args);
}
When run, this creates a non-full-screen window in which the browser never loads.
2018-12-17 12:36:01.688 [INFO] CefRuntime.ExecuteProcess() returns -1
[1217/123602.755251:ERROR:gpu_process_transport_factory.cc(1026)] Lost UI shared context.
DevTools listening on ws://127.0.0.1:20480/devtools/browser/4f0f3d7c-c08b-4571-9806-f4f781b27f9b
[1217/123603.015621:ERROR:backend_impl.cc(1423)] Unable to map Index file
[1217/123603.038694:ERROR:backend_impl.cc(1423)] Unable to map Index file
[1217/123603.043017:ERROR:disk_cache.cc(169)] Unable to create cache
[1217/123603.044592:ERROR:shader_disk_cache.cc(600)] Shader Cache Creation failed: -2
[1217/123603.591586:ERROR:service_manager_context.cc(250)] Attempting to run unsupported native service: /home/wesley/Shared/Chromely - Copy/publish/content_renderer.service
[1217/123604.266971:ERROR:sandbox_linux.cc(378)] InitializeSandbox() called with multiple threads in process gpu-process.
The output appears to be the same problem occurring with the original update.
Hello, Thank you for this beautiful project!
I followed these steps: https://github.com/mattkol/Chromely/wiki/dotnet-cli-Starter-Template
And it works well.
But when I open the project in vs2017 and run the debug.
I have an empty window an the dotnet console open with this message
2018-07-04 19:29:25.726 [ERROR] Oops! Something went wrong. Unable to load DLL 'libcef' or one of its dependencies: Le module spécifié est introuvable. (Exception from HRESULT: 0x8007007E) at Xilium.CefGlue.Interop.libcef.api_hash(Int32 entry)
at Xilium.CefGlue.CefRuntime.CheckVersionByApiHash()
at Xilium.CefGlue.CefRuntime.Load(String path)
at Chromely.CefGlue.Winapi.ChromeHost.CefGlueBrowserHost.OnCreate(CreateWindowPacket& packet)
at WinApi.Windows.Packetizer.ProcessCreate(WindowMessage& msg, EventedWindowCore window)
at WinApi.Windows.WindowCore.WindowProc(IntPtr hwnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
2018-07-04 19:29:25.756 [ERROR] Oops! Something went wrong. Object reference not set to an instance of an object.
at Chromely.CefGlue.Winapi.ChromeHost.CefGlueBrowserHost.OnSize(SizePacket& packet)
at WinApi.Windows.Packetizer.ProcessSize(WindowMessage& msg, EventedWindowCore window)
at WinApi.Windows.WindowCore.WindowProc(IntPtr hwnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
2018-07-04 19:29:25.779 [ERROR] Oops! Something went wrong. Object reference not set to an instance of an object.
at Chromely.CefGlue.Winapi.ChromeHost.CefGlueBrowserHost.OnSize(SizePacket& packet)
at WinApi.Windows.Packetizer.ProcessSize(WindowMessage& msg, EventedWindowCore window)
at WinApi.Windows.WindowCore.WindowProc(IntPtr hwnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
(I'am on windows 64 and with the last Chromely)
I tested these steps : https://github.com/mattkol/Chromely/wiki/CefGlue-Application-Layout, but with no sucess.
Do you understand more me ?
Thank you !
I guess that the text "Visual Source Code" in README.md should be replaced with "VIsual Studio Code".
I noticed that the default JS handler for CefSharp only implements the get
and post
methods. I started to create my own JS handler but after looking at the source code, if I understand correctly, the method kinds to get kinda lost and bundled only with an identification on route
string instead.
Am I right in thinking this? If so, are there plans to fully support PUT
AND DELETE
for CefSharp? If I'm confused, how would I get puts and deletes working?
Thanks.
Please delete it. something wrong with Github
Hi, nice and interesting open source project, thank you!
I did run the demos and compiled my .Net Core application following the instructions in the Getting-Started-CefGlue-Winapi-(.NET-Core)
I noticed that in all precompiled demos and in my new project, the CPU's consumption is 30-35% continuously.
What provokes such high consumption?
another question. In case of "multi-process", I don't understand what path to give
.WithCustomSetting(CefSettingKeys.BrowserSubprocessPath, path_to_sunprocess)
Thanks!
This may not exactly be a Chromely issue, but I'm trying to figure out how to create a full screen window.
I've discovered the
WS_MAXIMIZE
flag, but that seems to only maximize the window within the constraints set by the ChromelyConfiguration. Is there a built in way to do this? Thanks.
Is support for macOS planned?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.