64-bit Winforms CEF?
Hi all, I've seen some conflicting comments, but is there a 64-bit version of the winforms control? We're dependent on it... is there a chance support will continue or are we at the end of the line?
Sorry for the confusion. It's a bit messy right now ... I sort of stopped in the middle of it here with NuGets: https://github.com/cefsharp/CefSharp/issues/137#issuecomment-39587059 ... so the plan is to resolve it in the near future.
Right now your best option is building it yourself from master using https://github.com/cefsharp/CefSharp/wiki/Building-CefSharp#building-cefsharp as guide. Because the cef.sdk and cef.redist which it currently relies on actually has x64 in them (they just miss some other files) <--- hey I told you it was a mess. If you look closely you will see that the source build still actually pulls in another NuGet currently only available on http://staging.nuget.org
So short version: No I don't think you are at the end if the line ... I guess the world is going towards x64 longer term ... :smile: and we plan to support it as well.
A note though: The upstream CEF project still has x64 marked as "early" for Windows x64 on http://cefbuilds.com - so I think we actually should apply that same warning - maybe wit a -Pre on the NuGet'? OTOH if you need it and it works for your use case, well great!
@penderi Finally, out of ½ curiousity and ½ ignorance; why are you dependent on having pure x64 CEF/CefSharp? Could you get by with a mixed project? What does it do to the end user of your application?
@perlun: You see x64 is the one reason for still having #137 open the other being your own comment from November https://github.com/cefsharp/CefSharp/issues/137#issuecomment-28436767 (WinForms)
A note though: The upstream CEF project still has x64 marked as "early" for Windows x64 on http://cefbuilds.com - so I think we actually should apply that same warning - maybe wit a -Pre on the NuGet'? OTOH if you need it and it works for your use case, well great!
The idea with -Pre will unfortunately not cut it since the x64 and x86 lives in the same package, which I believe is the only way to do it in a reasonable way. (feel free to disagree and let me know how I'm wrong if I am)
@perlun: You see x64 is the one reason for still having #137 open the other being your own comment from November #137 (comment) (WinForms)
Right. Good you're pointing out stuff I said half a year ago. :stuck_out_tongue_winking_eye:
Is there a version for WinForms x64 that has the Text Search (CTRL+F) available? It would be awesome to publish the binaries for this :)
@ionut-rosoiu No, not yet, we are working to get there. For now https://github.com/cefsharp/CefSharp/wiki/Building-CefSharp#building-cefsharp is your best option.
Of curiosity what does having x64 CEF/CefSharp do for your end user?
master branch is based on CEF3. right? if we need 64bit winforms based on cef1, what should we do?
@microwishing yes right master is based on CEF3!
Don't know if CEF1 based will be possible without a lot of work on your own! See:
- https://github.com/cefsharp/CefSharp/wiki/Versions and
- http://www.magpcss.org/ceforum/viewtopic.php?f=10&t=10647#p18742 (CEF1 has been retired - I don't know if there ever were x64 builds for it ... )
@microwishing Is there a reason you need to stay with CefSharp1?
Thanks @jornh, I'll give it a try. Larger project, x64 is a must :)
I built CefSharp.Winforms according to https://github.com/cefsharp/CefSharp/wiki/Building-CefSharp#building-cefsharp and try to transform code based on CEF1.winforms to the current master version.
Problems occurs as follows(the code is based on CEF1):
this->webBrowser->PropertyChanged += gcnew PropertyChangedEventHandler(this, &MainAppForm::webView_PropertyChanged);
webBrowser is of type ChromiumWebBrowser. The issue is that I cannot find a replacement for PropertyChanged as I cannot find similar things in ChromiumWebBrowser from CEF3.Winforms.
In addition, I find IsBrowserInitializedChanged from ChromiumWebBrowser.cs in CefSharp.Wpf which can help me. Is the same thing not implemented yet in CefSharp.Winforms?
I came to the same problem :(
@amaitland, previously I was using cefsharp-winforms based on cef1 and implemented some 32bit app. now we want to support 64bit version app. If we have 64bit cefsharp-winforms based on cef1, it will be transparent to support 64bit without any code change. Now with 64bit-winforms based on cef3, we have to modify codes and find replacements as jessicasco, which is a disaster. :(
@jessicasco There is no equivalent PropertyChanged in CefSharp3.WinForms version, there are however individual event handlers for most properties see https://github.com/cefsharp/CefSharp/blob/master/CefSharp.WinForms/ChromiumWebBrowser.cs#L113
What property are you looking to subscribe to? Is it just IsBrowserInitialized? Currently there is no event handler that gets fired when IsBrowserInitialized is set. What is your current usage scenario? If you'd like to submit a PR then we can look at adding one.
modify codes and find replacements as jessicasco, which is a disaster. :(
@microwishing Calling migrating to CefSharp3 a disaster seems a little over the top IMHO! lol You are more than welcome to get involved and start contributing to CefSharp.WinForms if you feel that the project is of value to you and you'd like to have some input regarding it's direction.
If you post some code examples that your having trouble mapping over and also the rational behind them e.g. exactly what it is your trying to achieve. We can look at helping you out. We do have plans on writing up a CefSharp1 -> CefSharp3 migration guide, so any problems you experience are potentially common ones and will benefit from being posted publicly.
If there are some features missing from the WinForms implementation then feel free to make them known (in a polite and respectful manner of course :wink:)
As it stands currently I don't believe anyone on the CefSharp team is using the WinForms version in a real world sense (I personally am using WPF), so real world feedback from those using the project is essential!
@jessicasco If you have any insights from starting the migration to CefSharp3 then anything you can write down would be greatly appreciated. Even if it's just a set of dot points of changes that were required that would be hugely beneficial :smile:
What property are you looking to subscribe to? Is it just IsBrowserInitialized? Currently there is no event handler that gets fired when IsBrowserInitialized is set. What is your current usage scenario? If you'd like to submit a PR then we can look at adding one.
@amaitland Currently I want to get the event when the browser loads a html and the status of the browser is ready.
In my old codes, I subscribed to the property IsBrowserInitialized and IsLoading. And IsLoading is more important to me. So, adding a event handler when IsLoading is set will help me a lot! :smile:
@amaitland, sorry. I don't mean to offend anyone here and no doubt cefsharp has been a great project for me :). one question from me is is there any event handler triggered when the html page finishes loading to the webview and is ready for any javascript call?
The FrameLoadEnd event handler should do the trick, this is also relevant to @jessicasco also as it's called when loading of a frame is complete.
private void OnBrowserFrameLoadEnd(object sender, FrameLoadEndEventArgs args)
{
if (args.IsMainFrame)
{
DisplayOutput("Main Frame Load Complete - " + args.Url);
}
}
The other option is NavStateChanged, the page has technically finished loading when CanReload == true, so that will also work.
You'll note in the WinForms.Example we're using NavStateChanged to update some UI features based on CanRealod https://github.com/cefsharp/CefSharp/blob/master/CefSharp.WinForms.Example/BrowserForm.cs#L53
Let me know how you both go :smile:
@amaitland Thank you for your kind suggestion. I am trying it out now. Using the FrameLoadEnd event handler my program compiles now(under 32bit), but it crashes when it starts to run. The reason is that
public void RegisterJsObject(string name, object objectToBind)
{
throw new NotImplementedException();
}
So, I am trying to implement it according to CefSharp.Wpf, but sorry to see that it is not implemented either. I am really looking forword to your progress on this. Also, thank you for your great work and CefSharp is really a fantastic project.
@jessicasco JS binding is still a work in progress for CefSharp 3, I can confirm it will be in the first stable release. The relevant issue is #159
The issue is under active development. To keep an eye on the actual development progress you can look at the following branch https://github.com/cefsharp/CefSharp/tree/JsBinding_WIP if your interested.
@amaitland Thank you for your reply. I see JsBinding_WIP branch has a lot improvement due to your hard work. So I am really interested in your schedule for the first stable release. what is the roughly release time?