-
Notifications
You must be signed in to change notification settings - Fork 37
/
localbuild.ps1
53 lines (42 loc) · 1.46 KB
/
localbuild.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
param(
[System.IO.DirectoryInfo]$SourcesPath = $PSScriptRoot,
[System.IO.DirectoryInfo]$OutputPath = "$PSScriptRoot\out",
[ValidateSet('x64', 'x86', 'arm64')]
[String[]]$Platform = @('x64'),
[ValidateSet('Debug', 'Release')]
[String[]]$Configuration = @('Debug'),
[ValidateSet('win32', 'android', 'linux', 'mac')]
[String[]]$AppPlatform = @('win32'),
[switch]$NoSetup
)
if (! $NoSetup.IsPresent) {
Write-Host "Downloading environment..."
& ".\scripts\download_depottools.ps1" -SourcesPath $SourcesPath -NoADO
if (!$?) {
Write-Host "Failed to download depot-tools"
exit 1
}
Write-Host "Fetching code..."
& ".\scripts\fetch_code.ps1" -SourcesPath $SourcesPath -AppPlatform $AppPlatform[0]
if (!$?) {
Write-Host "Failed to retrieve the v8 code"
exit 1
}
} else {
& ".\scripts\download_depottools.ps1" -SourcesPath $SourcesPath -NoSetup -NoADO
}
foreach ($Plat in $Platform) {
foreach ($Config in $Configuration) {
foreach ($AppPlat in $AppPlatform) {
Write-Host "Building $AppPlat $Plat $Config..."
& ".\scripts\build.ps1" -SourcesPath $SourcesPath -OutputPath $OutputPath -Platform $Plat -Configuration $Config -AppPlatform $AppPlat
}
}
}
if (!$?) {
Write-Host "Build failure"
Pop-Location
exit 1
}