4

So I'm attempting my first Chrome build just for fun and I've gotten all the files I want through gclient config and sync. However, there are no project files that VS can open, just a bunch of .gyp files that are useless to me.

The command 'gclient runhooks --force' is supposed to generate the sln files for me, but when I run it I get nothing. Not even an error.

What's up?

Thanks.

joelg
  • 317
  • 2
  • 11

2 Answers2

4

Yes, this info still seems to be missing from the Chromium documentation at the moment. The way to generate your Visual Studio Solution files is:

export GYP_GENERATORS=msvs-ninja
gclient runhooks --force

You won't need the --force if it's your first time calling gclient runhooks. The generator should be good for your ninja build and it should generate your .sln files.

Pierre-Antoine LaFayette
  • 23,202
  • 8
  • 49
  • 57
1

Yes, really annoying problem... I did all kinds of stuff to make it work, and this is how I made it work in the end, believe it or not:

  1. Restart PC
  2. In terminal cd to the dir containing .gclient file
  3. checkout Important note below if you never used GYP before
  4. gclient runhooks --force
  5. profit

Important: You must also set environment variable named GYP_GENERATORS to a value listing build project types. For example, to generate NINJA build files and Microsoft Visual Studio (your case) do this if in linux terminal export GYP_GENERATORS=ninja,msvs or if Windows cmd setx GYP_GENERATORS ninja,msvs /M before step 4. This way you control what project types will be generated on runhooks.

Cipi
  • 10,430
  • 9
  • 43
  • 59