2018-01-30 09:20:44 +08:00
|
|
|
Set-PSDebug -Trace 1
|
2017-07-17 15:52:44 +08:00
|
|
|
$python = "C:\\Python27\\python.exe"
|
|
|
|
|
|
|
|
function Download-Deps
|
|
|
|
{
|
2018-01-05 09:10:31 +08:00
|
|
|
Write-Host "Download-Deps"
|
|
|
|
& $python $env:APPVEYOR_BUILD_FOLDER\download-deps.py --remove-download=False
|
2017-07-17 15:52:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function Generate-Binding-Codes
|
|
|
|
{
|
2018-03-15 09:36:27 +08:00
|
|
|
$env:NDK_ROOT=$env:APPVEYOR_BUILD_FOLDER + "\..\android-ndk-r16b"
|
2017-07-17 15:52:44 +08:00
|
|
|
|
|
|
|
# install python module
|
|
|
|
& pip install PyYAML Cheetah
|
2018-01-15 14:38:09 +08:00
|
|
|
Write-Host "generating binding codes"
|
2017-07-17 15:52:44 +08:00
|
|
|
|
2018-01-15 14:38:09 +08:00
|
|
|
Push-Location $env:APPVEYOR_BUILD_FOLDER\tools\tolua
|
|
|
|
& $python $env:APPVEYOR_BUILD_FOLDER\tools\tolua\genbindings.py
|
|
|
|
Pop-Location
|
2017-07-17 15:52:44 +08:00
|
|
|
|
|
|
|
Push-Location $env:APPVEYOR_BUILD_FOLDER\tools\tojs
|
2018-01-15 14:38:09 +08:00
|
|
|
& $python $env:APPVEYOR_BUILD_FOLDER\tools\tojs\genbindings.py
|
|
|
|
Pop-Location
|
2017-07-17 15:52:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function Update-SubModule
|
|
|
|
{
|
2018-01-15 14:38:09 +08:00
|
|
|
Push-Location $env:APPVEYOR_BUILD_FOLDER
|
|
|
|
& git submodule init
|
2018-01-30 09:20:44 +08:00
|
|
|
& git submodule update --recursive --depth=1
|
2018-01-15 14:38:09 +08:00
|
|
|
Pop-Location
|
2017-07-17 15:52:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
Update-SubModule
|
2018-01-15 14:38:09 +08:00
|
|
|
|
2018-03-19 09:21:51 +08:00
|
|
|
Download-Deps
|
2018-01-15 14:38:09 +08:00
|
|
|
|
|
|
|
If ($env:build_type -eq "windows32") {
|
2018-03-15 09:36:27 +08:00
|
|
|
& $python -u .\tools\appveyor-scripts\setup_android.py --ndk_only
|
2018-01-15 14:38:09 +08:00
|
|
|
Generate-Binding-Codes
|
2018-01-30 09:20:44 +08:00
|
|
|
} elseif ($env:build_type -like "android*") {
|
2018-01-15 14:38:09 +08:00
|
|
|
& $python -u .\tools\appveyor-scripts\setup_android.py
|
|
|
|
if ($lastexitcode -ne 0) {throw}
|
2018-03-19 09:21:51 +08:00
|
|
|
}
|