2011-10-06

自己弄個 Chromium

今天閒來無事,想自己編譯一下Chromium,就整理一下步驟

下載 VS2008 SP1
安裝 KB967631KB960075, and KB957912..
安裝  Windows 7.1 SDK(文件跟範例都可以不用裝)
將 SDK 整合進 VS2008 SP1
Start > All Programs > Microsoft Windows SDK > Visual Studio Registration > Windows SDK Configuration Tool.選擇7.0A
安裝 DirectX SDK
安裝 WDK 後,確認MSVC|Tools|Options|Projects and Solutions|VC++ Directories有包裝[WDK]include\atl71 與 Lib: [WDK]lib\Atl\i386, [WDK] 是WDK安裝路徑.
安裝 depot_tools


安裝好之後,要輸入
gclient config http://src.chromium.org/svn/trunk/src(下載最新版本)
gclient config http://src.chromium.org/svn/releases/16.0.912.5/ (下載特定版本)
這樣會產生.gclient文件,你可以適度修剪不必要的部份,譬如:
solutions = [
  { "name"        : "16.0.912.5",
    "url"         : "http://src.chromium.org/svn/releases/16.0.912.5",
    "deps_file"   : "DEPS",
    "managed"     : True,
    "custom_deps" : { 
        "src/chrome/tools/test/reference_build/chrome_linux":None, 
        "src/third_party/WebKit/LayoutTests":None, 
        "src/chrome_frame/tools/test/reference_build/chrome":None, 
        "src/chrome/tools/test/reference_build/chrome":None, 
        "src/chrome/tools/test/reference_build/chrome_mac":None, 
        "src/third_party/hunspell_dictionaries":None, 
        "src/third_party/cros":None, 
    }, 
    "safesync_url": "",
  },
]
gclient sync (開始下載)
gclient sync --force(如果之前有中斷過,可以用這樣強迫再度開始)

這樣就會把原始碼下載在當前目錄下,所以要注意這點。


Updated:
2011/10/10 PS:沒8G跟x64 OS, 真的不要輕易嘗試……
2011/11/12 PS:減少同時編譯的數量: Go into MSVC's Tools\Options\Projects and Solutions\Build and Run and reduce "maximum number of parallel project builds". By default it is equal to number of virtual processors (e. g. it will be 16 on the two I7s because of the hyper-threading). Recommended number for 12 GB of RAM is lower than 8
2011/11/13 Tricks:啟動 precompiled headers 功能, ~\.gyp\include.gypi裡面加入
{
  'variables': {
    'chromium_win_pch': 1,
  }
}

沒有留言: