https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md
64ビット Intelマシン
16GBメモリ
100GBディスク空き容量
Windows10以降
1.Visual Studio のインストーラをダウンロードする。バージョン2022として解説する。
2.インストーラに対して以下のコマンドでインストールを行う。
$ PATH_TO_INSTALLER.EXE ^
--add Microsoft.VisualStudio.Workload.NativeDesktop ^
--add Microsoft.VisualStudio.Component.VC.ATLMFC ^
--includeRecommended
3.SDK Debugging Toolsをインストールしなければならない。
Control Panel → Programs → Programs and Features → Select the “Windows Software Development Kit” → Change → Change → Check “Debugging Tools For Windows” → Change.
1.depot_tool bundle をダウンロードし、解凍する。(C:\src\depot_toolsに解凍したものとする)
2.depot_toolのパスを追加する。Pythonのパスより先にする。
Control Panel → System and Security → System → Advanced system settings に C:\src\depot_tools を追加。
3.さらに環境変数を追加する。
変数:DEPOT_TOOLS_WIN_TOOLCHAIN、値:0
変数:vs2022_install、値:C:\Program Files\Microsoft Visual Studio\2022\Professional
4.コマンドプロンプトで gclient を実行する。
5.where python コマンドを実行し、python.bat が python.exe の前に来ることを確認する。
コマンドプロンプトでカレントディレクトリを depot_tool に移動し、コマンドを実行していく。
1.設定を行う。
$ git config --global user.name "My Name"
$ git config --global user.email "my-name@chromium.org"
$ git config --global core.autocrlf false
$ git config --global core.filemode false
$ git config --global branch.autosetuprebase always
2.ディレクトリを作成し、移動するコマンドを実行する。
$ mkdir chromium && cd chromium
3.フェッチコマンドを実行する。時間短縮のため --no-history オプションを追加する。高速接続で30分かかる。
$ fetch chromium --no-history
4.cd src コマンドでソースディレクトリへ移動する。
ビルドの設定
新しいビルドディレクトリごとに1回だけ実行する。
$ gn gen out/Default