win7 64位在vs2010 professional下 編譯 chromium

準備條件 
安裝好vs2010 professional。


2:環境

安裝vs2010 sp1補丁,下載地址

https://www.microsoft.com/en-us/download/details.aspx?id=23691 

安裝widows 8 sdk,(此時可能需要安裝.net framework 4.5)下載地址

http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx 

安裝DirectX sdk,下載地址

http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=6812 

安裝補丁

KB articles: KB957912KB958842KB960075KB967631KB971092, and KB2519277.


然後我們需要讓vs知道DirectX sdk的頭文件及lib庫的路徑,這個在安裝後不用設置。

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ExecutablePath>$(ExecutablePath)</ExecutablePath>
    <IncludePath>$(DXSDK_DIR)\include;$(IncludePath)</IncludePath>
    <ReferencePath>$(ReferencePath)</ReferencePath>
    <LibraryPath>$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
    <SourcePath>$(SourcePath)</SourcePath>
    <ExcludePath>$(ExcludePath)</ExcludePath>
  </PropertyGroup>
</Project>




下載代碼

下載 depot_tools並解壓到你想要的目錄。然後將這個目錄加到系統環境變量PATH

https://src.chromium.org/svn/trunk/tools/depot_tools.zip


下載源碼的tar包

http://chromium-browser-source.commondatastorage.googleapis.com/chromium_tarball.html

並解壓,可以用7zip。此時可以安裝好python,subversion。

運行cmd,進入源碼的chromium\src目錄,執行gclient runhooks --force 生成源碼。更新完成後就能看到chromium\src\chrome\chrome.sln了



3:編譯

打開第一步裏面的chrome.sln,找到chrome項目並把它設爲啓動項目,選擇build chrome。然後開始編譯吧。等待相當長一段時間。得到src\build\Debug\chrome.exe。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章