Compiled under Windows Chromium, time: 20170619,
Official address:https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
I. System requirements:
1.64-bit machine, at least 8GB of memory, recommended 16GB or more. (I use the WIN10 64-bit virtual machine, memory according to 8G);
2. At least 100GB of hard disk storage space, formatted as NTFS. FAT32 does not support files larger than 4GB, while git downloads may have 20gb+ files;
3. Visual Studio Update 3;
4. win7+ (I compile with the Win10, there may be a hole here, described below);
Two. System configuration:
1. Install Visual Studio Update3 and install window SDK 14393, vs. three options to install Visual C + + including Mfc,universal Windows Apps Development tools > Tools (1.4.1) and Windows SDK (10.0.14393);
2.14393 of the SDK installation to install debugging Tools for Windows, I started the installation, I do not know why did not install this, fixed the next, only;
Three. Install Depot_tools:
1. Download depot_tools Bundle, then unzip, address: Https://storage.googleapis.com/chrome-infra/depot_tools.zip;
2. Place the Depot_tools at the beginning of the PATH environment variable, at least in front of your installed Python and git , because depot_tools will download python, if it's behind the python you installed, Some unexpected problems may occur;
3. Add the environment variable depot_tools_win_toolchainand set it to 0;
4. Open Cmd.exe, run Gclient, in the first run, Gclient will install the necessary components such as python/msysgit;
Four. Get the source code:
1. Open cmd, in the location where you want to place the source code, create the Chromium folder and enter,mkdir chromium && CD chromium;
2. fetch chromium;
PS: Here is a question, I use the WIN10 with the default Windows Defender is open, at this time after downloading the source code will appear:
- Traceback (most recent):
- File "D:\git\google\depot_tools\gclient_scm.py", line 965, in _clone
- Os.path.join (Self.checkout_path, '. Git '))
- File "D:\git\google\depot_tools\gclient_utils.py", line 158, in Safe_rename
- Os.rename (old, new)
- Windowserror: [Error 5]
- [0:22:25] _____ removing non-empty tmp dir D:\google\_gclient_src_byzfvs
- ----------------------------------------
- Traceback (most recent):
- File "D:\git\google\depot_tools\gclient.py", line 2378, in <module>
- Sys.exit (Main (sys.argv[1:]))
- File "D:\git\google\depot_tools\gclient.py", line 2364, in main
- Return Dispatcher.execute (Optionparser (), argv)
- File "D:\git\google\depot_tools\subcommand.py", line 252, in Execute
- Return command (parser, args[1:])
- File "D:\git\google\depot_tools\gclient.py", line 2117, in Cmdsync
- RET = client. Runondeps (' Update ', args)
- File "D:\git\google\depot_tools\gclient.py", line 1568, in Runondeps
- Work_queue.flush (revision_overrides, command, args, options=self._options)
- File "D:\git\google\depot_tools\gclient_utils.py", line 1112, in run
- Self.item.run (*self.args, **self.kwargs)
- File "D:\git\google\depot_tools\gclient.py", line 867, in run
- File_list)
- File "D:\git\google\depot_tools\gclient_scm.py", line 166, in RunCommand
- Return getattr (Self, command) (options, args, file_list)
- File "D:\git\google\depot_tools\gclient_scm.py", line +, in update
- Self._clone (revision, URL, options)
- File "D:\git\google\depot_tools\gclient_scm.py", line 965, in _clone
- Os.path.join (Self.checkout_path, '. Git '))
- File "D:\git\google\depot_tools\gclient_utils.py", line 158, in Safe_rename
- Os.rename (old, new)
- Windowserror: [Error 5]
- Traceback (most recent):
- File "D:\git\google\depot_tools\\fetch.py", line 353, in <module>
- Sys.exit (Main ())
- File "D:\git\google\depot_tools\\fetch.py", line 348, in main
- Return run (options, spec, root)
- File "D:\git\google\depot_tools\\fetch.py", line 342, in run
- Return Checkout.init ()
- File "D:\git\google\depot_tools\\fetch.py", line 142, in Init
- Self.run_gclient (*sync_cmd)
- File "D:\git\google\depot_tools\\fetch.py", line +, in Run_gclient
- Return Self.run (Cmd_prefix + cmd, **kwargs)
- File "D:\git\google\depot_tools\\fetch.py", line +, in run
- Return Subprocess.check_output (cmd, **kwargs)
- File "D:\git\google\depot_tools\python276_bin\lib\subprocess.py", line 573, in Check_output
- Raise Calledprocesserror (Retcode, cmd, output=output)
- Subprocess. Calledprocesserror:command ' (' D:\\git\\google\\depot_tools\\python276_bin\\python.exe ', ' D:\\git\\google\\depot_ tools\\gclient.py ', ' sync ', '--no-history ') ' returned Non-zero exit status 1
Such a problem, mainly to kill soft intercept caused by the deletion of files directory failure, disable the Windefender is good, other killing soft may have similar situation, please note that the reference https://bugs.chromium.org/p/chromium/ issues/detail?id=464132)
3. After the source code download succeeds, CD src, enter the SRC directory;
Five. Compile (the most anticipated time is up):
1. First Use the default compilation method, using the GN Gen Out/default, will create the Out/default directory in the SRC directory, and configure the files required for compiling;
2. Compile chrome with the ninja-c out\default Chrome command line, and you'll need to wait a long time;
PS: At the time of compiling with ninja, I showed up here.
ninja:entering directory ' Out/default '
Ninja:error: '. /.. /native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-objcopy ', needed by ' irt_x64/obj/ppapi/native_ Client/nacl_irt_debuglink.inputdeps.stamp ', missing and no known rule to make it
This similar error, in the SRC directory using cmd to perform gclient sync, successfully resolved, refer to Https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/tQGuR7Ur0i8;
3. Compile and run the Chrome.exe under Default.
Log compilation chromium under Windows, Memo