My overall goal is to get CefGlue working in Unity3D. I am aware of the Embedded Browser plugin, but it does not satisfy my requirements, so I am trying to build my own (albeit, a lot simpler).
I was successful in getting the appropriate Cef binaries, building CefGlue from Visual Studio project, and getting some basic functionality running. However, Cef constantly crashes Unity giving a cryptic error message. I decided that I want to be able to debug this, so I need to be able to compile and build Cef.
In a Virtual Machine I setup from scratch, I was able to build the specific branch Electron uses of Chromium. However, I am not as successful with Cef.
Here is what I was able to do so far:
The CefGlue version I'm working on is v3029 which is tied to Cef 3029 branch.
So, I downloaded the latest 'automate-git.py', as per instructed, and ran with '--branch=3029'.
It seems that it correctly checks out everything, but crashes when it is about to build with the error:
Creating C:\chromium\src\chromium\src\out\Debug_GN_x86 directory.
________ running 'gn gen out\Debug_GN_x86' in 'C:\chromium\src\chromium\src'
gn.py: Could not find gn executable at: C:\chromium\src\chromium\src\buildtools\win\gn.exe
Traceback (most recent call last):
File "tools\gclient_hook.py", line 135, in <module>
RunAction(src_dir, cmd)
File "C:\chromium\src\chromium\src\cef\tools\gclient_util.py", line 39, in RunAction
command, cwd=dir, always=True)
File "C:\chromium\src\depot_tools\gclient_utils.py", line 314, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "C:\chromium\src\depot_tools\gclient_utils.py", line 560, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out\\Debug_GN_x86' returned non-zero exit status 2 in C:\chromium\src\chromium\src
Traceback (most recent call last):
File ".\automate-git.py", line 1048, in <module>
run(path, cef_src_dir, depot_tools_dir)
File ".\automate-git.py", line 55, in run
args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
File "C:\Python27\lib\subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\chromium\\src\\chromium\\src\\cef\\cef_create_projects.bat']' returned non-zero exit status 1
Indeed, looking into the buildtools\win folder, there is no gn.exe. Only the sh1 hashes.
Luckily I have a copy of the executable in one of the chromium source I was able to successfully build, so I copied it and ran the build again.
This time I get a different error:
Creating C:\chromium\src\chromium\src\out\Debug_GN_x86 directory.
________ running 'gn gen out\Debug_GN_x86' in 'C:\chromium\src\chromium\src'
ERROR at //v8/gni/v8.gni:5:1: Can't load input file.
import("//build/config/jumbo.gni")
^--------------------------------
Unable to load:
C:/chromium/src/chromium/src/build/config/jumbo.gni
I also checked in the secondary tree for:
C:/chromium/src/chromium/src/build/secondary/build/config/jumbo.gni
See //BUILD.gn:21:1: whence it was imported.
import("//v8/gni/v8.gni")
^-----------------------
Traceback (most recent call last):
File "tools\gclient_hook.py", line 135, in <module>
RunAction(src_dir, cmd)
File "C:\chromium\src\chromium\src\cef\tools\gclient_util.py", line 39, in RunAction
command, cwd=dir, always=True)
File "C:\chromium\src\depot_tools\gclient_utils.py", line 314, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "C:\chromium\src\depot_tools\gclient_utils.py", line 560, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out\\Debug_GN_x86' returned non-zero exit status 1 in C:\chromium\src\chromium\src
Traceback (most recent call last):
File ".\automate-git.py", line 1048, in <module>
run(path, cef_src_dir, depot_tools_dir)
File ".\automate-git.py", line 55, in run
args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
File "C:\Python27\lib\subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\chromium\\src\\chromium\\src\\cef\\cef_create_projects.bat']' returned non-zero exit status 1
At this point, I am thinking that something was not setup correctly during the automate script, so instead of hacking this together, I would like to get some help.
Or maybe automate-git.py is not even meant to be used this way?
I'm not sure. Your help would be immensely appreciated as I have spent more than a week trying to get this project running correctly.
Thank you.