Skip to content

Commit 42c2ff2

Browse files
crazyhappygameminggo
authored andcommitted
Simlpify appveyor script, remove unused functions (cocos2d#18568)
1 parent 457de1c commit 42c2ff2

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

tools/appveyor-scripts/before-build.ps1

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,9 @@
11
$python = "C:\\Python27\\python.exe"
22

3-
function Download-Url
4-
{
5-
param([string]$url, [string]$output)
6-
7-
(New-Object Net.WebClient).DownloadFile($url, $output)
8-
}
9-
10-
function LS
11-
{
12-
param([string]$path)
13-
14-
Get-ChildItem $path | get-acl
15-
}
16-
173
function Download-Deps
184
{
19-
$json = Get-Content -Raw -Path "$env:APPVEYOR_BUILD_FOLDER/external/config.json" | ConvertFrom-Json
20-
$version = $json.version
21-
$url = "https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/$version.zip"
22-
$output = "$env:APPVEYOR_BUILD_FOLDER/$version.zip"
23-
Write-Host "downloading $url"
24-
Download-Url $url $output
25-
Write-Host "finish downloading $url"
26-
27-
Write-Host "unzip $url"
28-
$zipfile = $output
29-
$output = $env:APPVEYOR_BUILD_FOLDER
30-
Add-Type -AssemblyName System.IO.Compression.FileSystem
31-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $output)
32-
$file_subffix = $version.Substring(1)
33-
Copy-Item -Path "$output/cocos2d-x-3rd-party-libs-bin-$file_subffix/*" -Destination "$env:APPVEYOR_BUILD_FOLDER/external" -Recurse
34-
Write-Host "finish unziping $url"
5+
Write-Host "Download-Deps"
6+
& $python $env:APPVEYOR_BUILD_FOLDER\download-deps.py --remove-download=False
357
}
368

379
function Download-NDK

0 commit comments

Comments
 (0)