Closed raphipod closed 2 years ago
@raphipod I've just realized that I forget to call the compile_cef() :( in the script. I have fixed it and I have extended the script by removing the usage of the argv[1] holding the path to godot-cpp. Now I clone it and compile godot-cpp automatically in the folder gdcef/thirdparty/, therefore you have nothing to pass to the script. Hope this will fix your issue. In summary:
./build.py
is enough :)
Hmm. Still getting stuck at line 250, saying STIGMEE_INSTALL_PATH is not defined.
Traceback (most recent call last):
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 385, in <module>
compile_cef()
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 250, in compile_cef
shutil.copyfile(os.path.join(STIGMEE_INSTALL_PATH, "patch", "CEF", "win", "libcef_dll_wrapper_cmake"),
NameError: name 'STIGMEE_INSTALL_PATH' is not defined
All other actions before that work as expected now, thanks a bunch for fixing the script!
Edit: Just commenting out line 249 - 251 seems to make it work again. Those seem to be related to CMake, which is deprecated in CEF.
@raphipod ok I know, what it this: missing copying patches for Windows. I'll commit.
@raphipod since I do not have Windows now I cannot really check. Ping me if something is still odd !
Yes, I'll test it now!
Traceback (most recent call last):
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 386, in <module>
compile_cef()
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 251, in compile_cef
shutil.copyfile(os.path.join(PATCHES_PATH, "CEF", "win", "libcef_dll_wrapper_cmake"),
File "C:\Users\raphi\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\raphi\\Documents\\DEV\\GDCef\\gdcef\\patches\\CEF\\win\\libcef_dll_wrapper_cmake'
I think it expects .\patches\CEF\win in .\gdcef\, not in project root folder. I am testing further.
@raphipod ok lol Can you git pull --rebase origin master
now. Hope to be fixed :)
Now it stops when compiling GDNative_CEF. Something also seems odd in the SConstruct file.
scons: *** [src\browser_io.obj] Error 1
scons: *** [src\gdbrowser.obj] Error 1
scons: *** [src\gdcef.obj] Error 1
scons: *** [src\gdlibrary.obj] Error 1
Der Befehl "cl" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
scons: *** [src\helper.obj] Error 1
scons: building terminated because of errors.
Traceback (most recent call last):
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 388, in <module>
compile_gdnative_cef(GDCEF_PATH)
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 371, in compile_gdnative_cef
gdnative_scons_cmd("windows")
File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 356, in gdnative_scons_cmd
run(["scons", "api_path=" + GODOT_CPP_API_PATH,
File "C:\Users\raphi\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['scons', 'api_path=C:\\Users\\raphi\\Documents\\DEV\\GDCef\\thirdparty\\godot-3.4\\cpp', 'build_path=C:\\Users\\raphi\\Documents\\DEV\\GDCef\\example\\build', 'target=release', '--jobs=12', 'platform=windows']' returned non-zero exit status 2.
It really doesn't like being compiled it seems ;)
@raphipod this means "The "cl" command is either misspelled or could not be found." This is your Windows g++ missing.
Alright. My bad lol. That should be installed with Mingw, correct?
@raphipod nope with https://visualstudio.microsoft.com/fr/vs/ as described in the doc. More info https://github.com/stigmee/install#compile-stigmee-for-windows
To compile Stigmee for Windows:
Ensure VS2022 is installed
Open an x64 Native Tools Command Prompt for VS 2022, with Administrator privilege (this should be available in the start menu under Visual Studio 2022). This ensures the environment is correctly set to use the VS tools.
I did not pick this function in this repo See: https://github.com/stigmee/install/blob/master/build.py#L554 and https://github.com/stigmee/install/blob/master/helper.py#L203
Ah, I see. Thanks for your help until here!
@raphipod courage ! On the initial project, Windows user did not get trouble: my script works well :) but on this current repo I quickly copied and adapt the script since I stopped maintaining both projects. I'll commit the cl checker function.
@raphipod courage ! On the initial project, Windows user did not get trouble: my script works well :) but on this current repo I quickly copied and adapt the script since I stopped maintaining both projects. I'll commit the cl checker function.
Ok. I'm installing cl right now, let's see what happens.
@raphipod I added functions for checking CMake and cl.exe
Awesome!
[INFO] Compilation done with success. You can run your Godot editor and import the project at 'gdcef/example'
That seemed to have worked. Can't say it a thousand times, thanks!
@raphipod Is this running before thanking me ?
Haha. You got me there :) I'll test it with Godot
If this is working for you, I'll update the version to 0.3.1. I'll let you free to open pull requests for updating the unclear part of the documentation (my English is not good), upgrade the example (for example add missing key binding or applying CEF page on rotating cube). I'm a total noob in Godot :)
I'll definitely update the documentation, CEF version in build.py - I also have to learn a little bit more about Godot and how it handles modules, but I'll get it working.
@raphipod Cool ! Is the hello world example working for you ? Just open Godot 3.4 and import the godot.project in the example/ folder.
Yep, that's it. It works.
@raphipod Finally :)
Ok I'm closing this ticket. I updated the changelog to 0.3.1. I'll make a 0.3.2 if doc or example evolves.
Upon downloading the newest Cef build, extracting it, the build.py script wants to compile "Godot CEF module", but it fails:
Scons is installed, I installed it with the requirements.txt via pip.
File structure is my personal fork of gdcef.
My wild guess is it that I need the special environment variables from Stigmee, am I wrong?
I really want to get this to compile completely because a web browser in Godot is just awesome!