forked from obsproject/obs-browser
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
241 lines (125 loc) · 8.51 KB
/
appveyor.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
version: '{build}'
branches:
only:
- master
image: Visual Studio 2019
configuration: RelWithDebInfo
clone_folder: c:\local\source
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
environment:
BUGSPLAT_USERNAME: [email protected]
BUGSPLAT_PASSWORD:
secure: 9c6LeJtXAXvISt7o1o5lnw==
install:
- cmd: >-
set PREBUILT_CEF_VERSION_64=cef_binary_4638_windows_x64
set PREBUILT_CEF_VERSION_32=cef_binary_4638_windows_x86
set PREBUILT_CEF_URL_64=s3://obs-builds/cef/cef_binary_4638_windows_x64.zip
set PREBUILT_CEF_URL_32=s3://obs-builds/cef/cef_binary_4638_windows_x86.zip
if not exist c:\local md c:\local
aws s3 cp %PREBUILT_CEF_URL_64% c:\local\cef64.zip
aws s3 cp %PREBUILT_CEF_URL_32% c:\local\cef32.zip
cinst -y git
cinst -y cmake
cinst -y curl
git clone https://github.com/KhronosGroup/Vulkan-Hpp.git c:\local\Vulkan-Hpp
git clone --recursive https://github.com/jp9000/obs-studio.git c:\local\obs-studio
cd /d c:\local\obs-studio
git submodule update --init --recursive
git checkout 27.2.3
rd /s /q c:\local\obs-studio\plugins\obs-browser
cd /d c:\local
xcopy c:\local\source\*.* c:\local\obs-studio\plugins\obs-browser /S /E /I /Y
echo add_subdirectory(obs-browser) >c:\local\obs-studio\plugins\CMakeLists.txt
if exist angelscript.zip (curl -kL -o angelscript.zip https://cdn.streamelements.com/obs/dist/third-party/angelscript/angelscript_2.34.0_mt.zip -f --retry 5 -z angelscript.zip) else (curl -kL -o angelscript.zip https://cdn.streamelements.com/obs/dist/third-party/angelscript/angelscript_2.34.0_mt.zip -f --retry 5 -C -) 2>&1 >nul:
if exist BugSplat.zip (curl -kL -o BugSplat.zip https://cdn.streamelements.com/obs/dist/third-party/bugsplat/BugSplatNative.zip -f --retry 5 -z BugSplat.zip) else (curl -kL -o BugSplat.zip https://cdn.streamelements.com/obs/dist/third-party/bugsplat/BugSplatNative.zip -f --retry 5 -C -) 2>&1 >nul:
if exist dependencies2019.zip (curl -kLO https://obsproject.com/downloads/dependencies2019.zip -f --retry 5 -z dependencies2019.zip) else (curl -kLO https://obsproject.com/downloads/dependencies2019.zip -f --retry 5 -C -) 2>&1 >nul:
if exist vlc.zip (curl -kLO https://obsproject.com/downloads/vlc.zip -f --retry 5 -z vlc.zip) else (curl -kLO https://obsproject.com/downloads/vlc.zip -f --retry 5 -C -) 2>&1 >nul:
7z x -y dependencies2019.zip -odependencies2019
7z x -y vlc.zip -ovlc
7z x -y c:\local\angelscript.zip -oc:\local\angelscript
7z x -y c:\local\BugSplat.zip
7z x -y c:\local\cef32.zip
7z x -y c:\local\cef64.zip
set DepsPath32=c:\local\dependencies2019\win32
set DepsPath64=c:\local\dependencies2019\win64
set VLCPath=c:\local\vlc
set QTDIR32=c:\Qt\5.15.2\msvc2019
set QTDIR64=c:\Qt\5.15.2\msvc2019_64
set build_config=RelWithDebInfo
cache:
- c:\local\BugSplat.zip
- c:\local\dependencies2019.zip
- c:\local\vlc.zip
build_script:
- cmd: >-
echo ("#define STREAMELEMENTS_PLUGIN_VERSION " + (Get-Date).ToUniversalTime().ToString("yyyyMMdd") + "${Env:APPVEYOR_BUILD_NUMBER}".PadLeft(6, '0')) >c:\local\generate_version.ps1
echo ("set STREAMELEMENTS_PLUGIN_VERSION=" + (Get-Date).ToUniversalTime().ToString("y.M.d") + "." + "${Env:APPVEYOR_BUILD_NUMBER}".PadLeft(1, '0')) >c:\local\generate_version_cmd.ps1
powershell -File c:\local\generate_version.ps1 >c:\local\obs-studio\plugins\obs-browser\streamelements\Version.generated.hpp
powershell -File c:\local\generate_version_cmd.ps1 >c:\local\generate_version_cmd.bat
c:\local\generate_version_cmd.bat
echo %STREAMELEMENTS_PLUGIN_VERSION%
cd /d c:\local\obs-studio
mkdir build build32 build64
echo.===================== PATCH =====================
copy /y c:\local\obs-studio\plugins\obs-browser\streamelements\patch\qt\qalgorithms.h %QTDIR32%\include\qtcore\qalgorithms.h
echo.===================== BUILD 64 BIT - ANGELSCRIPT - OBS-STUDIO =====================
cd /d c:\local\angelscript\sdk\angelscript\lib
md 64bit
cd 64bit
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DCMAKE_C_FLAGS="/MP /MT" -DCMAKE_CXX_FLAGS="/MP /MT" ..\..\projects\cmake
msbuild angelscript.sln /p:Configuration=RelWithDebInfo;OutDir=.
echo.===================== BUILD 64 BIT - OBS-STUDIO =====================
cd /d c:\local\obs-studio\build64
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A x64 -DSHARED_TEXTURE_SUPPORT_ENABLED=true -DBROWSER_PANEL_SUPPORT_ENABLED=true -DENABLE_SCRIPTING=false -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true -DBUILD_CAPTIONS=true -DCOMPILE_D3D12_HOOK=true -DCEF_ROOT_DIR=c:\local\%PREBUILT_CEF_VERSION_64% -DBUGSPLAT_ROOT_DIR=c:\local\BugSplat -DANGELSCRIPT_ROOT_DIR=c:\local\angelscript -DQTDIR=%QTDIR64% -DQt5Widgets_DIR=%QTDIR64%\lib\cmake\Qt5Widgets -DQt5Xml_DIR=%QTDIR64%\lib\cmake\Qt5Xml -DQt5Svg_DIR=%QTDIR64%\lib\cmake\Qt5Svg -DENABLE_UI=true -DVULKAN_INCLUDE_DIR=C:\local\Vulkan-Hpp -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0.22000.0 -DCMAKE_SYSTEM_VERSION=10.0.22000.0 ..
cd /d c:\local\obs-studio\build64
msbuild obs-studio.sln /p:Configuration=%build_config% /t:Build
echo.Upload 64bit PDBs to BugSplat in case this is a commit to master branch.
if "%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%"=="" c:\local\BugSplat\bin\SendPdbs.exe /u "%BUGSPLAT_USERNAME%" /p "%BUGSPLAT_PASSWORD%" /a obs-browser /v "%STREAMELEMENTS_PLUGIN_VERSION%" /b OBS_Live /d "c:\local\obs-studio\build64\rundir\%build_config%\obs-plugins\64bit" /f obs-browser.pdb;cef-bootstrap.pdb
echo.===================== BUILD 32 BIT - ANGELSCRIPT - OBS-STUDIO =====================
cd /d c:\local\angelscript\sdk\angelscript\lib
md 32bit
cd 32bit
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_C_FLAGS="/MP /MT" -DCMAKE_CXX_FLAGS="/MP /MT" ..\..\projects\cmake
msbuild angelscript.sln /p:Configuration=RelWithDebInfo;OutDir=.
echo.===================== BUILD 32 BIT - OBS-STUDIO =====================
cd /d c:\local\obs-studio\build32
"C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DSHARED_TEXTURE_SUPPORT_ENABLED=true -DBROWSER_PANEL_SUPPORT_ENABLED=true -DENABLE_SCRIPTING=false -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true -DBUILD_CAPTIONS=true -DCOMPILE_D3D12_HOOK=true -DCEF_ROOT_DIR=c:\local\%PREBUILT_CEF_VERSION_32% -DBUGSPLAT_ROOT_DIR=c:\local\BugSplat -DANGELSCRIPT_ROOT_DIR=c:\local\angelscript -DQTDIR=%QTDIR32% -DQt5Widgets_DIR=%QTDIR32%\lib\cmake\Qt5Widgets -DQt5Xml_DIR=%QTDIR32%\lib\cmake\Qt5Xml -DQt5Svg_DIR=%QTDIR32%\lib\cmake\Qt5Svg -DENABLE_UI=true -DVULKAN_INCLUDE_DIR=C:\local\Vulkan-Hpp -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0.22000.0 -DCMAKE_SYSTEM_VERSION=10.0.22000.0 ..
cd /d c:\local\obs-studio\build32
msbuild obs-studio.sln /p:Configuration=%build_config% /t:Build
echo.Upload 32bit PDBs to BugSplat in case this is a commit to master branch.
if "%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%"=="" c:\local\BugSplat\bin\SendPdbs.exe /u "%BUGSPLAT_USERNAME%" /p "%BUGSPLAT_PASSWORD%" /a obs-browser /v "%STREAMELEMENTS_PLUGIN_VERSION%" /b OBS_Live /d "c:\local\obs-studio\build32\rundir\%build_config%\obs-plugins\32bit" /f obs-browser.pdb;cef-bootstrap.pdb
echo.===================== PACK ARTIFACTS =====================
cd /d c:\local\source
del /f /q c:\local\source\appveyor.yml
7z a c:\local\obs-browser-master.zip .
move /Y c:\local\obs-browser-master.zip c:\local\source\obs-browser-master.zip
cd /d c:\local\obs-studio\build64\rundir\%build_config%
7z a c:\local\source\build64.zip .
cd /d c:\local\obs-studio\build32\rundir\%build_config%
7z a c:\local\source\build32.zip .
copy /Y c:\local\obs-studio\plugins\obs-browser\streamelements\Version.generated.hpp c:\local\source\streamelements\Version.generated.hpp
test: off
artifacts:
- path: build32.zip
name: build32
- path: build64.zip
name: build64
- path: streamelements\Version.generated.hpp
name: version.generated.hpp
- path: obs-browser-master.zip
name: obs-browser-master
deploy:
- provider: S3
access_key_id: AKIAJESHQW2DGHPN57KQ
secret_access_key:
secure: lhOyqT4/E0Oqv8BOQR81rx/SweOIbDELTYW7iJTqRz5shmkZ8eXMCgFzcIuXyvpB
bucket: obs-builds
folder: obs-browser/latest/windows
artifact: build32,build64,obs-browser-master,version.generated.hpp
max_error_retry: 5
on:
branch: master
on_success:
- cmd: echo.All done.