Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build chromium in visual studio 2015

I'm following The Chromium Projects to build chromium browser on Windows. When I go to Run post-sync hooks step and run

gclient runhooks

The following errors show,

________ running     'D:\Chromium\depot_tools\depot_tools\python276_bin\python.exe src/build/landmines.py' in 'D:\Chromium\chromium'
Traceback (most recent call last):
  File "src/build/landmines.py", line 147, in <module>
sys.exit(main())
  File "src/build/landmines.py", line 134, in main
gyp_environment.SetEnvironment()
  File "D:\Chromium\chromium\src\build\gyp_environment.py", line 33, in SetEnvironment
vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
  File "D:\Chromium\chromium\src\build\vs_toolchain.py", line 73, in SetEnvironmentAndGetRuntimeDllDirs
os.environ['GYP_MSVS_OVERRIDE_PATH'] = DetectVisualStudioPath()
  File "D:\Chromium\chromium\src\build\vs_toolchain.py", line 139, in DetectVisualStudioPath
' not found.') % (version_as_year))
Exception: Visual Studio Version 2013 (from GYP_MSVS_VERSION) not found.
Error: Command 'D:\\Chromium\\depot_tools\\depot_tools\\python276_bin\\python.exe src/build/landmines.py' returned non-zero exit status 1 in D:\Chromium\chromium

My visual studio version is 2015 and from the errors above, it seems vs 2013 is not found. Does anyone know how can I build with vs 2015? Thanks!

like image 901
Haibara Ai Avatar asked Jan 27 '16 08:01

Haibara Ai


2 Answers

Updated (12/13/2016):

As it states in chromium instruction, the previous answer may not work any more. Please take care!

As of December 8, 2016 Chromium requires Visual Studio 2015, with the 14393 Windows SDK to build.

Previous:

Solved this problem by the following command

set GYP_MSVS_VERSION=2015

More details can be tracked in the chromium discuss

like image 179
Haibara Ai Avatar answered Nov 10 '22 03:11

Haibara Ai


WebRTC (v62) doesn't works with Visual Studio 2017 Enterprise.

Be careful and look at vs_toolchain.py from row 149

if version_as_year == '2017':
    # The VC++ 2017 install location needs to be located using COM instead of
    # the registry. For details see:
    # https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/
    # For now we use a hardcoded default with an environment variable override.
    for path in (
        os.environ.get('vs2017_install'),
        r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional',
        r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'):
      if path and os.path.exists(path):
        return path
like image 1
bekish Avatar answered Nov 10 '22 03:11

bekish