How to build your own Web Browser using Chromium

First of all you need this things :

  1. Prerequisite software:
    • Windows 7 or later.
      • A 64 bit OS is highly recommended as building on 32 bit OS is constantly becoming harder, is a lot slower and is not actively maintained.
      • At least 60 GB of free space in an NTFS volume. Tip: having the chromium source in a SSD drive greatly speeds build times.
    • Visual Studio 2010 Professional or Standard.
    • Windows 8 SDK.
    • June 2010 DirectX SDK.
    • (Optional) Cygwin
  2. Install Visual Studio 2010
    1. Make sure “X64 Compilers and Tools” are installed.
    2. Install VS2010 SP1.

  3. Install the Windows 8 SDK.

    Note: If you install the SDK in a path different than C:Program Files (x86)Windows Kits8.0 you need to set the following following environment variable:

    GYP_DEFINES=windows_sdk_path=”path to sdk”

  4. Install the June 2010 DirectX SDK
    Note: If your install fails with the “Error Code: S1023” you may need to uninstall “Microsoft Visual C++ 2010 x64 Redistributable”. See this tip from stackoverflow: http://stackoverflow.com/questions/4102259/directx-sdk-june-2010-installation-problems-error-code-s1023

Next you’ll need to patch Windows 8 SDK

    1. Parts of Chromium build using the winrt headers included with the Windows 8 SDK. All the headers we use, including the WRL, can be compiled with Visual C++ 2010 with the exception of one file, asyncinfo.h. This file uses a strongly typed enum which the VS2010 compiler doesn’t understand. To workaround this for the time being, a small patch needs to be applied to the Windows 8 SDK to build with the winrt headers in VS2010:

      Patch for Includewinrtasyncinfo.h

      Index: asyncinfo.h
      ===================================================================
      — asyncinfo.h
      +++ asyncinfo.h
      @@ -63,7 +63,7 @@
       #pragma once
       #ifdef __cplusplus
       namespace ABI { namespace Windows { namespace Foundation {
      -enum class AsyncStatus {
      +enum /*class*/ AsyncStatus {
         Started = 0,
         Completed, 
         Canceled, 
      This patch should be applied to the file “Includewinrtasyncinfo.h” located in your Windows 8 SDK directory. If this patch is not applied, the parts of Chromium that use the Winrt headers will not compile.
      Note: By default the Windows 8 SDK will install to C:Program Files (x86)Windows Kits8.0. This directory will require admin privileges to write to. Easiest way to do apply this patch is tostart an administrative command prompt, cd to C:Program Files (x86)Windows Kits8.0Includewinrt, run notepad.exe asyncinfo.h and comment out or delete the word “class” on line 66.
      Note: For Googlers, this patch has already been applied to your SDK, everything should Just Work.
  1. (Optional) Install cygwin

Next Build Chromium.

First of all you need to download the depot_tools from here . or the installer ( the installer is not from The Chromium Authors but I creatd it for you to easily extract it without have to waiting for a long time

After you have download it extract it to C: . Next you will need to :

  1. Check out the source code using a direct svn or git checkout. Do not use a tarball since it is not compatible with Windows’ svn client.
  2. Set up the component build (or else creating chrome_dll.pdb may fail laterl) and then regenerate the build files by running “gclient runhooks –force” in a cygwin/cmd window.
  3. Install API keys.
  4. Open the chrome/chrome.sln solution file in Visual Studio and build the solution. This can take from 10 minutes to 2 hours. More likely 1 hour.
  5. If you just want the Chromium browser, and none of the tests, you can speed up your build by right-clicking the chrome project in the solution explorer and selecting Build. You may want to make sure this project is the Startup project (which will display as bold) by right-clicking it and selecting Set as Startup Project. This will make Chromium (as opposed to some random test) build and run when you press F5.

[alert style=”yellow”] This Step was originally taken from Chromium Project Page. [/alert]

 

myhyazid

Im a Johannian,part-time blogging on Windows Phone updates.Waiting for Windows Phone 8.1..Nokia Fan..hehe

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.