KCEF icon indicating copy to clipboard operation
KCEF copied to clipboard

If I use jbr_jcef as the runtime, can I avoid re-downloading the runtime during startup?

Open bulletjet786 opened this issue 1 year ago • 7 comments

If I use jbr_jcef as the runtime, can I avoid re-downloading the runtime during startup? And if so, what steps should I take to ensure this?

bulletjet786 avatar Mar 10 '24 15:03 bulletjet786

Never tested it but may work if all required binaries are included. It's a bit tricky as the files are platform dependend.

However KCEF does not support this in any form currently.

You could try initializing CEF yourself https://github.com/DatL4g/KCEF/blob/master/kcef/src/main/kotlin/dev/datlag/kcef/step/init/CefInitializer.kt and report back, maybe we can implement such a feature then.

The CEF library can be loaded using implementation("dev.datlag:jcef:2024.01.07.1")

DatL4g avatar Mar 10 '24 15:03 DatL4g

Thank you.I will check it.

bulletjet786 avatar Mar 10 '24 15:03 bulletjet786

Excuse me, is there a plan for KCEF to support directly running the JBR_JCEF Runtime as mentioned above?

bulletjet786 avatar Mar 11 '24 14:03 bulletjet786

I would like to adjust the constructor of KCEFClient and KCEFBrowser to be public, thereby enabling the initialization of kcef objects using existing jcef examples. If you don't have the time to do this, I can take care of it. Would that be alright?

bulletjet786 avatar Apr 18 '24 08:04 bulletjet786

Sure go ahead, I think making the KCEFClient constructor public is enough as the KCEFBrowser can be created by calling client.createBrowser(CefBrowser)

DatL4g avatar Apr 18 '24 09:04 DatL4g

#11 I have already submitted code; please check it.

bulletjet786 avatar Apr 20 '24 02:04 bulletjet786

New release available:

// KCEF
implementation("dev.datlag:kcef:2024.04.20")

// jcef
implementation("dev.datlag:jcef:2024.04.20")

with updated jcef core

DatL4g avatar Apr 20 '24 14:04 DatL4g

Please tell me, is there an example of initializing KCEF with pre-installed JCEF to work with lib KevinnZou/compose-webview-multiplatform? Is it possible? @DatL4g I tried this:

val cefApp = CefApp.getInstance()
KCEF.init(cefApp)

MrMilkot avatar Oct 29 '24 10:10 MrMilkot

@MrMilkot you're on the right track, you just need to load the binaries first.

Something like this:

https://github.com/DatL4g/KCEF/blob/master/kcef%2Fsrc%2Fmain%2Fkotlin%2Fdev%2Fdatlag%2Fkcef%2FKCEFBuilder.kt#L295-L322

Or wait till compose-webview bumps to the new KCEF version, since it's a new inbuilt feature

DatL4g avatar Oct 29 '24 10:10 DatL4g