Skip to content

Commit

Permalink
windows appveyor success
Browse files Browse the repository at this point in the history
  • Loading branch information
sbd021 committed Mar 26, 2020
1 parent b91a725 commit 78d9354
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 9 deletions.
60 changes: 60 additions & 0 deletions Group-Video/OpenVideoCall-Windows/build_appveyor_release.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@echo off

title qmake and nmake build prompt
set SDKVersion=%~1
set SDKFolderVersion=%~2
set Machine=%~3
set ProjName=%~4
echo SDKVersion: %SDKVersion%
echo SDKFolderVersion: %SDKFolderVersion%
echo ProjName:%ProjName%
curl -fsSL -o AgoraSDK.zip https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows(%Machine%)_v%SDKVersion%_FULL.zip
if exist AgoraSDK.zip (
7z x AgoraSDK.zip -oAgoraSDK
) else (
echo "download sdk failed"
echo "https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows(%Machine%)_v%SDKVersion%_FULL.zip"
exit
)

if not exist sdk (mkdir sdk)
xcopy /S /I AgoraSDK\Agora_Native_SDK_for_Windows_v%SDKFolderVersion%_FULL\sdk sdk /y

if exist AgoraSDK (rmdir /S /Q AgoraSDK)

del AgoraSDK.zip

if %Machine% == x86 (
set QTDIR=C:\Qt\5.13.2\msvc2017
) else (
set QTDIR=C:\Qt\5.13.2\msvc2017_64
)

set VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build

call "%VCINSTALLDIR%\vcvarsall.bat" %Machine%
%QTDIR%\bin\qmake.exe %ProjName%.pro "CONFIG+=release" "CONFIG+=qml_release"
nmake

if not exist release (
echo "no release"
exit
)

cd release
del *.h
del *.cpp
del *.obj
%QTDIR%\bin\windeployqt %ProjName%.exe
cd ..

set PackageDIR=%ProjName%_Win_v%SDKFolderVersion%
if not exist %PackageDIR% (
mkdir %PackageDIR%
)
cd %PackageDIR%
mkdir %Machine%
xcopy /S /I ..\Release\*.* %Machine% /y
xcopy /S /I ..\sdk\dll\*.* %Machine% /y
cd ..
rmdir /S /Q Release
29 changes: 20 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
version: 1.0.{build}
skip_branch_with_pr: true
build: off

environment:
WindowsAgoraRTCSDK: https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows(x86)_v3_0_0_FULL.zip
branches:
only:
- master
skip_tags: true
image: Visual Studio 2017
install:
- ps: (new-object net.webclient).DownloadFile($emv:WindowsAgoraRTCSDK, 'AgoraSDK.zip')
- 7z x AgoraSDK.zip -oAgoraSDK
- set QTDIR32=C:\Qt\5.14.1\msvc2017
- set QTDIR64=C:\Qt\5.14.1\msvc2017_64
- cmd: >-
cd Group-Video\OpenVideoCall-Windows
set SDKVersion=3_0_0
set SDKFolderVersion=3.0.0
set ProjName=OpenVideoCall
build_script:
- cmd: >-
call build_appveyor_release.bat %SDKVersion% %SDKFolderVersion% x86 %ProjName%
call build_appveyor_release.bat %SDKVersion% %SDKFolderVersion% x64 %ProjName%
7z a -tzip -r OpenVideoCall_Win_v%SDKFolderVersion%.zip %ProjName%_Win_v%SDKFolderVersion%
artifacts:
- path: Group-Video\OpenVideoCall-Windows\OpenVideoCall_Win_v*.zip
name: OpenVideoCall-Windows

0 comments on commit 78d9354

Please sign in to comment.