Closed PiCode9560 closed 8 months ago
@PiCode9560 sorry for the long delay GitHub did not notice me about your ticket ;(
To be sure: by module do you mean: forking Godot and adding code inside the module folder, right ?
Yes you can do that, but I do not recommend you to go this way. I initially tried what you said before switching development with a second CEF process. I wrote a note concerning this https://github.com/stigmee/doc-internal/blob/master/doc/tuto_modif_godot_fr.md (in French sorry). It worked for Linux but I do not recommend it because:
main(argc, argv)
) is both used by Godot and CEF (CEF passes information to forked CEF process). Fortunately, this does not make collisions (since you have made a Godot-CEF hybride process).Other than adding it directly into godot. User need to compile the add-on to use it. Is it possible for you to give the compiled version, so that anyone it without installing external programs?
@PiCode9560 do you mean artefacts (the build folder ?). With the CI I can, I guess, but artefacts size are ~1 GB
But if the user build it themself, the total project size are 1GB anyway.
I'm not an expert on gdnative/c++/cef, but is it necessary for the user to build it themself?
Yes the build.py will compile and create some artifacts that are needed. My CI is already testing the compilation so I have to extend the script to store them somewhere
Sorry but I don't really understand what you are saying.
Yes the build.py will compile and create some artifacts that are needed.
So it is necessary for the user to build it themself?
My CI is already testing the compilation so I have to extend the script to store them somewhere
Are you doing something right now?
@PiCode9560 do not worry I'll create what you want, just give me a couple of days
@PiCode9560 yesterday I made what you wanted. I've not tested on demo yet
I tested the Windows version on the 2d demo. Just drop the build folder into the project folder and run the project, it worked well as expected.
Thanks!
Hmm, the cef didn't load on Windows exported version. I export it like you would normally do with other Godot project.
@PiCode9560 I'm not sure to understand your two messages that seem to contradict themselves.
Well, it only worked in the editor, but when I exported it to Windows executable file the cef didn't load. Any idea why?
Ah ok I understand now! It used to work when I worked for the main project using CEF ~1 year ago. So it should work normally (expect if merge requests made it no longer working). The Windows portage was made by my coworker. I'm not a Windows user, but I'll give a try
@PiCode9560 where have you exported your application binary ? For Linux you have to place it in the same folder holding CEF artifacts. I do not remember why I have made like this.
Remembering now: paths are configurable. See in .gd files comments in func _ready():
:
resource_path := {"artifacts", CEF_ARTIFACTS_FOLDER}
resource_path := {"exported_artifacts", application_real_path()}
When running, you have logs. In my case:
[GDCEF][GDCEF::initialize] Launching CEF from your executable
[GDCEF][GDCEF::initialize] Path where your application files shall be located:"/home/Lecrapouille/gdcef/addons/gdcef/demos/2D"
In case artifacts are not in the correct folder, you'll see:
[GDCEF] [are_valid_files] File "/home/Lecrapouille/gdcef/addons/gdcef/demos/2D/gdcefSubProcess" does not exist and is needed for CEF
@Lecrapouille I drop all the things from the build folder into the folder that contain the exported executable file. Now it worked! That's all I need to do, right?
@PiCode9560 cool! You can update the gd script to indicate the path you want.
I'll release the godot-4 you'll have the assets too. I'll create a ticket for Godot assets lib
Is it possible if you compile this add-on with Godot as a module, so that I can use it without installing external programs?