Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    mattkol
    @mattkol
    @pragmar one way to do it .. chromelyapps/Chromely#276
    pragmar
    @pragmar
    @mattkol I've successfully pulled the functionality into my project. It works seamlessly. I've been working through a list of xplat options (Electron.Net, Chromely, Xamarin Mobile Bindings) for a Blazor app in an attempt to assess the best option. Chromely really seems like the best of the bunch, at least for desktop oriented apps. Thanks so much for the assistance and the project itself.
    mattkol
    @mattkol
    @pragmar happy to be of help. Thank you.
    Robert Bouillon
    @RobertBouillon
    Any documentation / guidance on deployment? I notice a 130MB libcef.dll in the debug folder, but I don't see a .so for linux. Will nuget grab me the right one if I build on Linux? Is the 130MB file my only option, or can I download / use other distributions from the libcef team?
    Also, any guidance on bi-directional communication with the host window? I know I can request something from Chromely via generic request, but what if I want code in Chromely to notify my app? Do I just set it up as a long-poll?
    mattkol
    @mattkol
    @RobertBouillon
    No, deployment is not covered. Nuget CEF binary download is only provided for Windows. For Linux, Mac you can manually package the CEF or let it auto download during first time use - https://github.com/chromelyapps/Chromely/blob/master/Documents/cef_binaries_download.md
    On bi-directional communication this may help - chromelyapps/Chromely#138
    Stefan Zima
    @zimast
    Hi guys, I'm trying to find the best way how to distribute Chromely application for users to install it on Windows. I was wondering if it is possible to create installer, which will have packed CEF. User will download installer (from web site), install to any location he want and it will automatically creates desktop shortcut for him. Is it possible or is there better/simpler way? Could you point me to the right direction (source) please ? Thank you very much.
    Robert Bouillon
    @RobertBouillon
    @mattkol Awesome. Thanks! I set up a basic IPC protocol leveraging that method and Blazor's JS Interop, so I essentially send JSON messages back and forth between two C# classes. It works well. Links, in case anyone needs it -
    https://gist.github.com/RobertBouillon/c36069ad59775bef54dc114526a3bcf2
    https://gist.github.com/RobertBouillon/de2aca0fd6bd7d05f97abccd460ad377
    https://gist.github.com/RobertBouillon/8cf121c329620cc2e396b3b772041bfe
    I plan to set up an installer using Wix. I'll report back if I hit any issues.
    @zimast If you don't need to access local machine resources, you could use a PWA instead of Chromely - it's all the rage right now. I need access to local resources (printers and files), hence I need Chromely. I have experience deploying installers with Wix for .NET, but I presume any installer will work (there are a few for .NET). If you use the Publish feature of VS / .NET, that should produce all of the files you need to run Chromely on Windows. At that point, I presume you just need any plain old installer to get it going. I haven't tried it yet, but I have the same requirement, so I'll let you know how it goes for me :)
    Stefan Zima
    @zimast
    @RobertBouillon thank you sir. I need access to local machine resources as well. My app will be controlling some sort of HW device across network and keeping cached data at local file system. I wanted to release prototype to test set of already implemented features in production environment so I was looking for best way how to do it with simplicity of starting and testing the App by someone else.
    Stefan Zima
    @zimast
    Is there a way to handle URL parameters like "/users/:id" ? As I understand, we can define controller route like "/users" and handle query parameters after ? for id="" but I haven't seen any example using parameters inside URL. Thanks.
    Stefan Zima
    @zimast
    Ok for my route parameters I found chromelyapps/Chromely#19
    zygon.sisyphus
    @zygon.sisyphus:matrix.org
    [m]
    HI
    chromely has support for PWA ?
    mattkol
    @mattkol

    @zygon.sisyphus:matrix.org there is no formal support for any third-party frameworks. We just create demos to show that they are doable. If you can run it in Chrome you should be able to run it in Chromely, the only requirement is you need an entry html file - (index.html, default.html or whatever one choses to call it).

    Please see readme page ...

    With Chromely you can build Single Page Application (SPA) HTML5 desktop apps with or without Node/npm. Building SPA apps using Blazor or javascript frameworks like Angular, React, Vue or similar is easy. You can use Visual Studio Code or any IDE you are familiar with as long as Chromely knows the entry html file from the compiled/bundled files.

    Rhett Thompson
    @sourcerycode_gitlab
    Is there a way to detect drag and drop file events from the .net side?
    mattkol
    @mattkol
    @sourcerycode_gitlab you can try registering a custom draghandler -
    https://github.com/chromelyapps/Chromely/blob/master/src/Chromely/Browser/Handlers/DefaultDragHandler.cs
    You can see how to register a custom handler here - https://github.com/chromelyapps/Chromely/blob/master/Documents/registering_custom_handlers.md
    There is a sample checking for file here - cefsharp/CefSharp#1593
    Rhett Thompson
    @sourcerycode_gitlab
    @mattkol awesome, that's perfect. thanks for the incredible project.
    Alex Maitland
    @amaitland

    @mattkol Have you though about integrating Asp.Net Core Mvc with Chromely? By this I mean a direct integration using OWIN. Having a scheme handler factory make requests into the Asp Net Core pipeline to fulfil responses. Basically in memory requests, without the use of any sort of network connection.

    I have a fairly basic prototype of integrating Asp.Net Core Mvc with CefSharp using a scheme handler factory.
    The plumbing is fairly generic, there are only two lines in the current IServer implementation that are CefSharp specific, it could fairly easily be refactored out so other implementations could take advantage.

    Thoughts? I have a private GitHub repo that I can grant you access to if you are interested in checking it out.

    mattkol
    @mattkol

    @amaitland that is a great idea.

    Yes, I did look at OWIN in the past but decided against it as it will require bringing in Asp.Net framework itself (so I thought at the time). But if we can use a part of it like the controller actions without needing the server/hosting part of Asp.net MVC that will be a good way forward.

    If its heavy for the framework we can create a demo/extension for developers who will find it useful.

    Please I will like a look. Thanks.

    Alex Maitland
    @amaitland
    @mattkol You should now have access to https://github.com/amaitland/CefSharp.AspNetCore.Mvc
    Feel free to create an issue if you'd like to discuss anything.
    Alex Maitland
    @amaitland
    It should also be possible to provide a cut down version of the pipeline for those that want a leaner implementation.
    mattkol
    @mattkol
    @amaitland thank you.
    Alex Maitland
    @amaitland
    @mattkol I ported one of the asp net core chromely examples, very basics are working.
    Omer
    @omerfarukz
    Hi, I have 2 newbie questions and sorry for these :) It is posible to deploy chromely with it is dependencies(with chromium) separately.
    And the other is, console app being visible in my demo on Windows. Is there an option to hide console on runtime?
    Thanks
    Omer
    @omerfarukz
    Is it possible to resolve chromium binaries with the different directory?
    mattkol
    @mattkol

    @omerfarukz

    It is posible to deploy chromely with it is dependencies(with chromium) separately.

    Yes. Chromely does not support installation/packing so you can deploy how you want. We do allow download of Cef binaries during run but you can block that too. https://github.com/chromelyapps/Chromely/blob/1f95b7d1475cd56bd9a50b1d8df7140e42810e22/src/Chromely.Core/Configuration/ICefDownloadOptions.cs#L8

    And the other is, console app being visible in my demo on Windows. Is there an option to hide console on runtime?

    Yes. On Windows you use Windows option instead of Console. Or editbin.exe. On Linux, Mac, I am sure there are similar approaches.

    Is it possible to resolve chromium binaries with the different directory?

    CefGlue provides that for Windows, but Chromely does not provide that out of the box, you need to do some work to make that change.
    https://github.com/chromelyapps/Chromely/blob/1f95b7d1475cd56bd9a50b1d8df7140e42810e22/src/Chromely/CefGlue/CefRuntime.cs#L95

    Omer
    @omerfarukz
    Thanks, It is almost done.
    Currently I have another problem with probing paths
    So, I pass my own probing path to my app,
    The main window is loading but browser subprocess is not
    Is there an option to pass args to browsersubpeocess activation?
    mattkol
    @mattkol

    @omerfarukz

    Is there an option to pass args to browsersubpeocess activation?

    I am assuming you are passing it as a command line argument.

    1. You can register a custom CefBrowserProcessHandler and do it here; https://github.com/chromelyapps/Chromely/blob/1f95b7d1475cd56bd9a50b1d8df7140e42810e22/src/Chromely/Browser/Handlers/DefaultBrowserProcessHandler.cs#L28

    2. Alternatively you can use the configuration property - ExtensionData
      https://github.com/chromelyapps/Chromely/blob/1f95b7d1475cd56bd9a50b1d8df7140e42810e22/src/Chromely.Core/Configuration/IChromelyConfiguration.cs#L22

    zavalnav
    @zavalnav
    Maybe someone could help me here.. I think I'm hitting a wall at this point..
    I have js bridge that I need to inject when I load a url in an iframe.
    Before I was launching an external url and injecting js into the main frame in
    OnBeforeResourceLoad and it was working ok.
    Now I need to inject js into an iframe where I'm loading this url, it's no longer in
    the main frame, but when I inspect with dev tools I see that js I've injected is not
    defined. Is there a good way to do this in general? Is OnBeforeResourceLoad the right place to ExecuteJavaScript?
    mattkol
    @mattkol
    @zavalnav if you give the frame a name, are you able to do same as was done for the main frame?
    hqmlz
    @hqmlz
    Error creating project from template.Resource loading error: file size is zero. What's the reason?
    mattkol
    @mattkol
    @hqmlz the reason could be in the message. I am not sure what template you are using, if it is still an issue, I will suggest you create an issue and attach a skeletal project.
    hqmlz
    @hqmlz
    @mattkol OK, I'll try. thank you.
    hqmlz
    @hqmlz
    @mattkol Hello, I want to run the version of crossplatdemo on galaxy Kirin v10. There is no problem under windows. However, when I run the packaged program on galaxy Qilin V10, it prompts an error occurred while loading required library libhostpolicy.so.
    mattkol
    @mattkol
    @hqmlz not commonly used Linux distros may missed some dependencies. It is likely what you are seeing. I will suggest you check the distro for the libcef dependency and install what may be missing. https://github.com/chromelyapps/Chromely.Legacy/wiki/Getting-Started-CefGlue-Gtk-(Linux)#on-linux-ubuntu-with-published-self-contained-net-core is an old link, but may help with some guide.
    Laz
    @Lazrius_gitlab
    Hello. Is this chat still used?
    mattkol
    @mattkol
    @Lazrius_gitlab yes.
    Laz
    @Lazrius_gitlab
    Sorry for the schemtism. Has been a while. I was oringally going to ask about custom resource management, but I mangaed to solve it
    mattkol
    @mattkol
    @Lazrius_gitlab np.
    Laz
    @Lazrius_gitlab
    If you have some time to spare, I would maybe suggest expanding the section on embedded resources. Personal expierence suggests it's a tad confusing on how to implment
    mattkol
    @mattkol
    @Lazrius_gitlab sure. The demos and wiki are basic and expected to get the developer starting, but there is always room for improvement even for basic stuff. Thanks.