forked from AgoraIO/API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.ps1
More file actions
40 lines (33 loc) · 1.55 KB
/
install.ps1
File metadata and controls
40 lines (33 loc) · 1.55 KB
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
$ThirdPartysrc = 'https://agora-adc-artifacts.oss-cn-beijing.aliyuncs.com/libs/ThirdParty.zip'
$ThirdPartydes = 'ThirdParty.zip'
$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v3_1_0_FULL.zip?_ga=2.112897604.1543767373.1598420161-359641476.1551176445'
$agora_des = 'Agora_Native_SDK_for_Windows_v3_1_0_FULL.zip'
$MediaPlayerSDK = 'https://download.agora.io/sdk/release/Agora_Media_Player_for_Windows_x86_rel.v1.1.0.16486_20200507_1537.zip'
$MediaPlayerDes = 'MediaPlayerPartSave.zip'
if (-not (Test-Path ThirdParty)){
echo "download $ThirdPartydes"
mkdir ThirdParty
Invoke-WebRequest -uri $ThirdPartySrc -OutFile $ThirdPartyDes -TimeoutSec 10;
Unblock-File $ThirdPartyDes
tar -zxvf $ThirdPartyDes -C ThirdParty
Remove-Item $ThirdPartyDes -Recurse
}
if (-not (Test-Path libs)){
echo "download $agora_des"
Invoke-WebRequest -uri $agora_sdk -OutFile $agora_des -TimeoutSec 10;
Unblock-File $agora_des
tar -zxvf $agora_des -C .
Move-Item Agora_Native_SDK_for_Windows_FULL\libs libs
Remove-Item $agora_des -Recurse
Remove-Item Agora_Native_SDK_for_Windows_FULL -Recurse
}
if (-not (Test-Path MediaPlayerPart)){
echo "download $MediaPlayerSDK"
mkdir MediaPlayerPart
Invoke-WebRequest -uri $MediaPlayerSDK -OutFile $MediaPlayerDes -TimeoutSec 10;
Unblock-File $MediaPlayerDes
tar -zxvf $MediaPlayerDes -C .
Move-Item Agora_Media_Player_for_Windows_x86_rel.v1.1.0.16486_20200507_1537\sdk\* MediaPlayerPart
Remove-Item $MediaPlayerDes -Recurse
Remove-Item Agora_Media_Player_for_Windows_x86_rel.v1.1.0.16486_20200507_1537 -Recurse
}