Closed XenonSheng closed 1 year ago
@XenonSheng hi ! Has scons been installed correctly (or path to scons correctly set) ? If you redo manualy theses commands (defines here https://github.com/Lecrapouille/gdcef/blob/master/addons/gdcef/build.py#L364-L366), what they return ?
cd <GODOT_CPP_API_PATH>
scons platform=windows target=<GODOT_CPP_TARGET>
Pathes are defined here https://github.com/Lecrapouille/gdcef/blob/fd14a146fab47fea901a6350d5c0d6b34177b5a9/addons/gdcef/build.py#L55
@Lecrapouille I'm not sure where the scons.exe or scons.bat file is located... I tried to google up where is this file but unfortunately cannot find the answer. The only way to use Scons, is by using this command python -m SCons
where SCons is case-sensitive. And try run python -m SCons platform=windows target=<GODOT_CPP_TARGET>
where GODOT_CPP_TARGET = release
and Build Success with bin\libgodot-cpp.windows.release.64.lib
.
but after that, i tried to rerun the build.py again... still getting the same error.
FYI, I also downloaded the latest (4.5.2) SCons zip file from https://scons.org/pages/download.html. There is no scons.bat or scons.exe file inside the folder. From SCons README said, it should be in C:\Users\me\AppData\Roaming\Python\Python310\Scripts
. But don't have....
After I changed to run(["python","-m", "SCons", "platform=windows", "target=" + GODOT_CPP_TARGET,"--jobs=" + NPROC], check=True)
for my own case, i got another error.
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_message_router.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_message_router.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_resource_manager.cc) [C:\Users\XXX\Downloads\gdcef-master\
gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_scoped_temp_dir.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_resource_manager.cc) [C:\Users\XXX\Downloads\gdcef-master\
gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_stream_resource_handler.cc) [C:\Users\XXX\Downloads\gdcef-
master\gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_scoped_temp_dir.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_xml_object.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef-
master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_stream_resource_handler.cc) [C:\Users\XXX\Downloads\gdcef-
master\gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_xml_object.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef-
master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_zip_archive.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef
-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_zip_archive.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef
-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper2.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper2.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
Traceback (most recent call last):
File "C:\Users\xxx\Downloads\gdcef-master\gdcef-master\addons\gdcef\build.py", line 481, in <module>
compile_cef()
File "C:\Users\xxx\Downloads\gdcef-master\gdcef-master\addons\gdcef\build.py", line 278, in compile_cef
run(["cmake", "--build", ".", "--config", CEF_TARGET], check=True)
File "C:\Python311\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 1.
I'm able to build GDCEF successfully. For previous error, it is required to install Windows SDK (10.0.20348.0) in Visual Studio.
For SCons path issue, so far still cannot set env path for it since still cannot find the exe/bat file... Alternatively for my case, I update these two lines with python -m SCons
https://github.com/Lecrapouille/gdcef/blob/fd14a146fab47fea901a6350d5c0d6b34177b5a9/addons/gdcef/build.py#L365-L366 https://github.com/Lecrapouille/gdcef/blob/fd14a146fab47fea901a6350d5c0d6b34177b5a9/addons/gdcef/build.py#L382-L386
And @Lecrapouille, Thanks for assist XD
@XenonSheng thank you for your feedback. I'll update the README indicating the win SDK and in 1st time move "scons" as variable: it will be easier to rename it.
@Lecrapouille Sorry for asking a question which is not related to this issue. May I know is there a way to have a webview for HTML5 export? like how GDCEF works for Windows and Linux. But how about HTML5? I tried to export to HTML5 but got an error said no lib found for this platform as I know it is an expected result.
@XenonSheng sorry I'm not sure to understand you! Are you looking for a way to download the current page your are watching ? Currently my Godot API does not allow exporting pages but I'm pretty sure the CEF has an API for this. Something like https://magpcss.org/ceforum/viewtopic.php?f=6&t=10500 ? Let open a new ticket I'll see if I can add it.
@Lecrapouille Sorry for any misunderstanding. What I mean here for HTML5 export is this
Usually in web, we use
@XenonSheng ah ok, you meant Godot export to reach something like this http://chreage.befuse.com/content/WEBGL/ChreageAlpha0-3/index.html (try to reach a river to open a webpage) ? For HTML5, while I have not tested, the answer is: no you cannot! You can try on Unity side: https://developer.vuplex.com/webview/overview
This is because how CEF is made internally and compiled. CEF starts many fork of itself as independent processes that communicate together (ie rendering process ...). I'm not sure if this is managed correctly with the web virtual machine. To start these processes, CEF uses command lines main(argc, argv)
. In the case of my project, I could not modify Godot guts to start CEF inside the Godot main function because 1/ Godot also uses command line, so they may be conflicting (while I have tried in practice without problem) and 2/ I cannot offer pull requests to Godot team with a Godot hybrid with CEF, the dev teams will laugh at me :D As consequence I followed what CEF doc says: start a second minor CEF application that will manage the command line. Therefore, this is possible with HTML5 export.
In addition, CEF seems using LGPL third part libraries, CEF cannot be compiled other than shared library, else these licenses will contaminate your application. So you have to modify CEF to be compiled for your case, which can take > 4 hours and +60 GB of hard disk (I tried this is too much effort) so I do not recommend you. That is why I'm downloading prebuild CEF.
By the way CEF is not working for ios, Android.
@XenonSheng On Linux /usr/bin/scons is a python script calling scons but I did not understand what this script does. I made anyway a variable for more flexibility.
I close this ticket but feel free to continue the talk. @raphipod I have made some updates in the case you are interested.
Hi, I'm using Godot 3.5.2. I'm now trying to run the demos to test around how it works for this WebView. Currently having build error. May I know what's the problem? I do follow the installation guideline, but not sure why getting this error...
Platform: Windows 10 Python version: 3.11.4 CMake version: 3.27.0 x64 Native Tools Command Prompt for VS 2022 (Run as Admin)
Error said it cannot find the file specified.
Appreciate if anyone can assist XD