开发者

Recompiling a part of Google Chrome

Wanting to take advantage (for the first time) of the open-source nature of open-source software, I want to edit part of Google Chrome. I know exactly which source file to edit, and it's a very small change. However, the entire compressed source dist开发者_JS百科ribution tarball is about a gigabyte, and I can't even imagine how painful the recompiling process would be, not to mention how much disk space it would use.

So, the question is: Is there any better way to modify the program than to recompile the entire thing? It seems to be quite a painful thing to do for small changes.


No, there is no other way recompiling Chromium. I recommend you to use the Google Chrome Extensions API if you can. If you want to recompile Google Chrome, the steps are pretty easy, everything is explained in http://dev.chromium.org/developers Some tips (since I am a Chromium contributor)

  1. For a quick start guide: https://docs.google.com/present/view?id=dd9mrt45_0dmtd49c6
  2. Read documentation: http://dev.chromium.org/developers
  3. Make sure you have 10GB of space.
  4. Make sure you have a fast computer (64bit), the more cores/mem the better.
  5. The source code is "not" just 1GB, it is more, after you checkout the sources, you would need to sync your DEPS (thirdparty) via gclient sync That will add another couple of GB.

It will take a lot of time to compile (~1 hour) on modern PCs. If you have a very fast computer, the time of compilation would decrease exponentially.

According to you comments above, you would need to checkout the source at least once, we use Git or SVN for that (read the documentations, we have explained as much as we can on the site). Once you finished compilation, you can always update your source (the same way you update your repository (git pull, gclient sync) Then incremental buildings will be around 5-10 minutes depending what you have changed.

Please follow the documentation (http://dev.chromium.org), I am saying that again because the Chromium community worked hard to make these documentations up-to date, they help new comers get familiar with the project.

Chromium is big, but fun to work with, have fun hacking :)


The open sourced Chromium is not the same thing as Google Chrome. Some specific features (like H264 support) are available in Chrome, but not Chromium. You cannot "build" Chrome; you can build Chromium.

A more feasible approach to make your modification might be to write it as an Extension.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜