docs: update build docs,support Powershell on Windows (#41883)
* docs: update build docs,support Powershell on Windows Co-authored-by: nashaofu <diaocheng@outlook.com> * chore: fix capitalization Co-authored-by: nashaofu <diaocheng@outlook.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: nashaofu <diaocheng@outlook.com>
This commit is contained in:
		
					parent
					
						
							
								6256d43f06
							
						
					
				
			
			
				commit
				
					
						162a8e7199
					
				
			
		
					 1 changed files with 29 additions and 0 deletions
				
			
		|  | @ -110,22 +110,51 @@ $ export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools | |||
| On Windows: | ||||
| 
 | ||||
| ```sh | ||||
| # cmd | ||||
| $ cd src | ||||
| $ set CHROMIUM_BUILDTOOLS_PATH=%cd%\buildtools | ||||
| 
 | ||||
| # PowerShell | ||||
| $ cd src | ||||
| $ $env:CHROMIUM_BUILDTOOLS_PATH = "$(Get-Location)\buildtools" | ||||
| ``` | ||||
| 
 | ||||
| **To generate Testing build config of Electron:** | ||||
| 
 | ||||
| On Linux & MacOS | ||||
| 
 | ||||
| ```sh | ||||
| $ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")" | ||||
| ``` | ||||
| 
 | ||||
| On Windows: | ||||
| 
 | ||||
| ```sh | ||||
| # cmd | ||||
| $ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")" | ||||
| 
 | ||||
| # PowerShell | ||||
| gn gen out/Testing --args="import(\`"//electron/build/args/testing.gn\`")" | ||||
| ``` | ||||
| 
 | ||||
| **To generate Release build config of Electron:** | ||||
| 
 | ||||
| On Linux & MacOS | ||||
| 
 | ||||
| ```sh | ||||
| $ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")" | ||||
| ``` | ||||
| 
 | ||||
| On Windows: | ||||
| 
 | ||||
| ```sh | ||||
| # cmd | ||||
| $ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")" | ||||
| 
 | ||||
| # PowerShell | ||||
| $ gn gen out/Release --args="import(\`"//electron/build/args/release.gn\`")" | ||||
| ``` | ||||
| 
 | ||||
| **Note:** This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`. | ||||
| 
 | ||||
| Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	![37223003+trop[bot]@users.noreply.github.com](/assets/img/avatar_default.png) trop[bot]
				trop[bot]