Skip to content

Commit a1782cf

Browse files
committed
Update to obs 28, Qt6, 64-bit only, FFMPEG 5
1 parent 136725a commit a1782cf

36 files changed

+309
-504
lines changed

.github/workflows/main.yml

Lines changed: 38 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,136 @@
1-
name: 'CI Windows On-Push'
1+
name: "CI Windows On-Push"
22

33
on:
4+
workflow_dispatch: # Allows manual builds
45
push:
56
branches:
67
- master
78

89
jobs:
910
windows:
10-
name: 'Windows 32+64bit'
11-
runs-on: [windows-latest]
11+
name: "Windows 64bit"
12+
runs-on: windows-latest
1213
env:
13-
QT_VERSION: '5.10.1'
14-
WINDOWS_DEPS_VERSION: '2017'
15-
CMAKE_GENERATOR: "Visual Studio 16 2019"
14+
OBS_DEPS: "2022-08-02"
15+
CMAKE_GENERATOR: "Visual Studio 17 2022"
1616
CMAKE_SYSTEM_VERSION: "10.0"
17+
# TODO: Don't ACTIONS_ALLOW_UNSECURE_COMMANDS
18+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1719
steps:
18-
- name: 'Add msbuild to PATH'
20+
- name: "Add msbuild to PATH"
1921
uses: microsoft/[email protected]
20-
- name: 'Checkout'
22+
- name: "Checkout"
2123
uses: actions/checkout@v2
2224
with:
2325
path: ${{ github.workspace }}/obs-virtual-cam
24-
submodules: 'recursive'
25-
- name: 'Checkout OBS'
26+
submodules: "recursive"
27+
- name: "Checkout OBS"
2628
uses: actions/checkout@v2
2729
with:
2830
repository: obsproject/obs-studio
2931
path: ${{ github.workspace }}/obs-studio
30-
submodules: 'recursive'
31-
- name: 'Get OBS-Studio git info'
32+
submodules: "recursive"
33+
- name: "Get OBS-Studio git info"
3234
shell: bash
3335
working-directory: ${{ github.workspace }}/obs-studio
3436
run: |
3537
git fetch --prune --unshallow
3638
echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD)
3739
echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD)
3840
echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0)
39-
- name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})'
41+
- name: "Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})"
4042
shell: bash
4143
working-directory: ${{ github.workspace }}/obs-studio
4244
run: |
4345
git checkout ${{ env.OBS_GIT_TAG }}
4446
git submodule update
45-
- name: 'Get obs-virtual-cam git info'
47+
- name: "Get obs-virtual-cam git info"
4648
shell: bash
4749
working-directory: ${{ github.workspace }}/obs-virtual-cam
4850
run: |
4951
git fetch --prune --unshallow
5052
echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }}
5153
echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD)
5254
echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0)
53-
- name: 'Install prerequisite: QT'
55+
- name: "Install prerequisite: QT"
5456
run: |
55-
curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C -
56-
7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT"
57-
- name: 'Install prerequisite: Pre-built OBS dependencies'
57+
curl -kLO https://github.com/obsproject/obs-deps/releases/download/${{ env.OBS_DEPS }}/windows-deps-qt6-${{ env.OBS_DEPS }}-x64.zip -f --retry 5 -C -
58+
7z x windows-deps-qt6-${{ env.OBS_DEPS }}-x64.zip -o"${{ github.workspace }}\cmbuild\QT"
59+
- name: "Install prerequisite: Pre-built OBS dependencies"
5860
run: |
59-
curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C -
60-
7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps"
61-
- name: 'Restore OBS 32-bit build v${{ env.OBS_GIT_TAG }} from cache'
62-
id: build-cache-obs-32
63-
uses: actions/cache@v1
64-
env:
65-
CACHE_NAME: 'build-cache-obs-32'
66-
with:
67-
path: ${{ github.workspace }}/obs-studio/build32
68-
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
69-
restore-keys: |
70-
${{ runner.os }}-${{ env.CACHE_NAME }}-
71-
- name: 'Configure OBS 32-bit'
72-
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
73-
working-directory: ${{ github.workspace }}/obs-studio
74-
run: |
75-
mkdir .\build32
76-
cd .\build32
77-
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
78-
- name: 'Build OBS-Studio 32-bit'
79-
if: steps.build-cache-obs-32.outputs.cache-hit != 'true'
80-
working-directory: ${{ github.workspace }}/obs-studio
81-
run: |
82-
msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj
83-
msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj
84-
- name: 'Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache'
61+
curl -kLO https://github.com/obsproject/obs-deps/releases/download/${{ env.OBS_DEPS }}/windows-deps-${{ env.OBS_DEPS }}-x64.zip -f --retry 5 -C -
62+
7z x windows-deps-${{ env.OBS_DEPS }}-x64.zip -o"${{ github.workspace }}\cmbuild\deps"
63+
- name: "Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache"
8564
id: build-cache-obs-64
8665
uses: actions/cache@v1
8766
env:
88-
CACHE_NAME: 'build-cache-obs-64'
67+
CACHE_NAME: "build-cache-obs-64"
8968
with:
9069
path: ${{ github.workspace }}/obs-studio/build64
9170
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }}
9271
restore-keys: |
9372
${{ runner.os }}-${{ env.CACHE_NAME }}-
94-
- name: 'Configure OBS 64-bit'
73+
- name: "Configure OBS 64-bit"
9574
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
9675
working-directory: ${{ github.workspace }}/obs-studio
9776
run: |
9877
mkdir .\build64
9978
cd .\build64
100-
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
101-
- name: 'Build OBS-Studio 64-bit'
79+
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT" -DDepsPath="${{ github.workspace }}\cmbuild\deps" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES ..
80+
- name: "Build OBS-Studio 64-bit"
10281
if: steps.build-cache-obs-64.outputs.cache-hit != 'true'
10382
working-directory: ${{ github.workspace }}/obs-studio
10483
run: |
10584
msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj
10685
msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj
107-
- name: 'Configure obs-virtual-cam 64-bit'
86+
- name: "Configure obs-virtual-cam 64-bit"
10887
working-directory: ${{ github.workspace }}/obs-virtual-cam
10988
run: |
11089
mkdir .\build64
11190
cd .\build64
112-
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" -DPTHREAD_LIB="${{ github.workspace }}\obs-studio\build64\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" ..
113-
- name: 'Configure obs-virtual-cam 32-bit'
114-
working-directory: ${{ github.workspace }}/obs-virtual-cam
115-
run: |
116-
mkdir .\build32
117-
cd .\build32
118-
cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" -DPTHREAD_LIB="${{ github.workspace }}\obs-studio\build32\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" ..
119-
- name: 'Build obs-virtual-cam 64-bit'
91+
cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT" -DDepsPath="${{ github.workspace }}\cmbuild\deps" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" -DPTHREAD_LIB="${{ github.workspace }}\obs-studio\build64\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" ..
92+
- name: "Build obs-virtual-cam 64-bit"
12093
working-directory: ${{ github.workspace }}/obs-virtual-cam
12194
run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-virtualcam.sln
122-
- name: 'Build obs-virtual-cam 32-bit'
123-
working-directory: ${{ github.workspace }}/obs-virtual-cam
124-
run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-virtualcam.sln
125-
- name: 'Set release filename'
95+
96+
- name: "Set release filename"
12697
shell: bash
12798
run: |
12899
FILENAME="OBS-Virtualcam-${{ env.GIT_TAG }}-Windows"
129100
echo "::set-env name=WIN_FILENAME::$FILENAME"
130-
- name: 'Package obs-virtual-cam'
101+
- name: "Package obs-virtual-cam"
131102
working-directory: ${{ github.workspace }}/obs-virtual-cam
132103
run: |
133104
mkdir build-package\obs-plugins\64bit
134-
mkdir build-package\obs-plugins\32bit
135105
mkdir build-package\data\obs-plugins\obs-virtualoutput\locale\
136106
mkdir build-package\bin\64bit
137-
mkdir build-package\bin\32bit
138-
robocopy ${{ github.workspace }}\cmbuild\deps\win32\bin\ .\build-package\bin\32bit\ avutil-56.dll swscale-5.dll
139107
robocopy .\build64\src\virtual-output\RelWithDebInfo .\build-package\obs-plugins\64bit\ obs-virtualoutput.dll obs-virtualoutput.stripped.pdb
140108
robocopy .\build64\src\virtual-source\RelWithDebInfo .\build-package\bin\64bit\ obs-virtualsource.dll obs-virtualsource.stripped.pdb
141-
robocopy .\build32\src\virtual-output\RelWithDebInfo .\build-package\obs-plugins\32bit\ obs-virtualoutput.dll obs-virtualoutput.stripped.pdb
142-
robocopy .\build32\src\virtual-source\RelWithDebInfo .\build-package\bin\32bit\ obs-virtualsource.dll obs-virtualsource.stripped.pdb
143109
robocopy .\locale\ .\build-package\data\obs-plugins\obs-virtualoutput\locale\ *.ini
144110
ren .\build-package\obs-plugins\64bit\obs-virtualoutput.stripped.pdb obs-virtualoutput.pdb
145-
ren .\build-package\obs-plugins\32bit\obs-virtualoutput.stripped.pdb obs-virtualoutput.pdb
146111
ren .\build-package\bin\64bit\obs-virtualsource.stripped.pdb obs-virtualsource.pdb
147-
ren .\build-package\bin\32bit\obs-virtualsource.stripped.pdb obs-virtualsource.pdb
148112
mkdir release
149113
7z a ".\release\${{ env.WIN_FILENAME }}.zip" ".\build-package\*"
150114
- name: Install NSIS
151115
working-directory: ${{ github.workspace }}/obs-virtual-cam
152116
run: |
153-
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
117+
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
154118
scoop bucket add extras
155119
scoop install nsis
156120
- name: Build obs-virtualcam installer
157121
working-directory: ${{ github.workspace }}/obs-virtual-cam
158122
run: |
159123
cd installer
160124
makensis /DVERSION=${{ env.GIT_TAG }} installer.nsi
161-
- name: 'Publish ${{ env.WIN_FILENAME }}.zip'
125+
- name: "Publish ${{ env.WIN_FILENAME }}.zip"
162126
if: success()
163127
uses: actions/upload-artifact@v2-preview
164128
with:
165-
name: '${{ env.GIT_TAG }}-Windows'
129+
name: "${{ env.GIT_TAG }}-Windows"
166130
path: ${{ github.workspace }}\obs-virtual-cam\release\*.zip
167-
- name: 'Publish ${{ env.WIN_FILENAME }}-Windows-Installer.exe'
131+
- name: "Publish ${{ env.WIN_FILENAME }}-Windows-Installer.exe"
168132
if: success()
169133
uses: actions/upload-artifact@v2-preview
170134
with:
171-
name: '${{ env.GIT_TAG }}-Windows-Installer'
135+
name: "${{ env.GIT_TAG }}-Windows-Installer"
172136
path: ${{ github.workspace }}\obs-virtual-cam\build-package\*.exe

0 commit comments

Comments
 (0)