Skip to content

Commit 4a85190

Browse files
committed
win-dshow: Add support for installing virtualcam on WoA
Add a new function in `virtualcam-install.bat.in` and `virtualcam-uninstall.bat.in` to support Windows on ARM install. on x64 platform: Install 32bit and 64bit DLL. on ARM64 platform: Install 32bit and ARM64 DLL.
1 parent c025f21 commit 4a85190

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

plugins/win-dshow/virtualcam-module/virtualcam-install.bat.in

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,25 @@ goto checkAdmin
1717
if %errorLevel% == 0 (
1818
echo 32-bit Virtual Cam found, skipping install...
1919
echo.
20+
goto CheckDLLContinue
2021
) else (
2122
echo 32-bit Virtual Cam not found, installing...
2223
goto install32DLL
2324
)
2425

2526
:CheckDLLContinue
27+
if /i "%PROCESSOR_ARCHITECTURE%"=="ARM64" (
28+
echo Checking for ARM64 Virtual Cam registration...
29+
reg query "HKLM\SOFTWARE\Classes\CLSID\{@VIRTUALCAM_GUID@}" >nul 2>&1
30+
if %errorLevel% == 0 (
31+
echo ARM64 Virtual Cam found, skipping install...
32+
echo.
33+
goto endSuccess
34+
) else (
35+
echo ARM64 Virtual Cam not found, installing...
36+
goto installARM64DLL
37+
)
38+
)
2639
echo Checking for 64-bit Virtual Cam registration...
2740
reg query "HKLM\SOFTWARE\Classes\CLSID\{@VIRTUALCAM_GUID@}" >nul 2>&1
2841
if %errorLevel% == 0 (
@@ -45,12 +58,12 @@ goto checkAdmin
4558
if %errorLevel% == 0 (
4659
echo 32-bit Virtual Cam successfully installed
4760
echo.
61+
goto checkDLLContinue
4862
) else (
4963
echo 32-bit Virtual Cam installation failed
5064
echo.
5165
goto end
5266
)
53-
goto checkDLLContinue
5467

5568
:install64DLL
5669
echo Installing 64-bit Virtual Cam...
@@ -70,6 +83,24 @@ goto checkAdmin
7083
goto end
7184
)
7285

86+
:installARM64DLL
87+
echo Installing ARM64 Virtual Cam...
88+
if exist "%~dp0\data\obs-plugins\win-dshow\obs-virtualcam-module-arm64.dll" (
89+
"%SystemRoot%\System32\regsvr32.exe" /i /s "%~dp0\data\obs-plugins\win-dshow\obs-virtualcam-module-arm64.dll"
90+
) else (
91+
"%SystemRoot%\System32\regsvr32.exe" /i /s obs-virtualcam-module-arm64.dll
92+
)
93+
reg query "HKLM\SOFTWARE\Classes\CLSID\{@VIRTUALCAM_GUID@}" >nul 2>&1
94+
if %errorLevel% == 0 (
95+
echo ARM64 Virtual Cam successfully installed
96+
echo.
97+
goto endSuccess
98+
) else (
99+
echo ARM64 Virtual Cam installation failed
100+
echo.
101+
goto end
102+
)
103+
73104
:endSuccess
74105
echo Virtual Cam installed!
75106
echo.

plugins/win-dshow/virtualcam-module/virtualcam-uninstall.bat.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ goto checkAdmin
2222
) else (
2323
regsvr32.exe /u /s obs-virtualcam-module64.dll
2424
)
25+
if exist "%~dp0\data\obs-plugins\win-dshow\obs-virtualcam-module-arm64.dll" (
26+
"%SystemRoot%\System32\regsvr32.exe" /u /s "%~dp0\data\obs-plugins\win-dshow\obs-virtualcam-module-arm64.dll"
27+
) else (
28+
"%SystemRoot%\System32\regsvr32.exe" /u /s obs-virtualcam-module-arm64.dll
29+
)
2530

2631
:endSuccess
2732
echo Virtual Cam uninstalled!

0 commit comments

Comments
 (0)