fix(installer): update vigembus (#1670)

This commit is contained in:
ReenigneArcher 2023-10-02 22:10:56 -04:00 committed by GitHub
commit e716e56199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 22 deletions

2
.gitmodules vendored
View file

@ -8,7 +8,7 @@
branch = master branch = master
[submodule "third-party/ViGEmClient"] [submodule "third-party/ViGEmClient"]
path = third-party/ViGEmClient path = third-party/ViGEmClient
url = https://github.com/ViGEm/ViGEmClient url = https://github.com/nefarius/ViGEmClient
branch = master branch = master
[submodule "third-party/miniupnp"] [submodule "third-party/miniupnp"]
path = third-party/miniupnp path = third-party/miniupnp

View file

@ -31,9 +31,9 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/autostart/"
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/" install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/"
DESTINATION "scripts" DESTINATION "scripts"
COMPONENT firewall) COMPONENT firewall)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vigembus/" install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
DESTINATION "scripts" DESTINATION "scripts"
COMPONENT vigembus) COMPONENT gamepad)
# Sunshine assets # Sunshine assets
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/" install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
@ -61,7 +61,7 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-vigembus.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-gamepad.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"'
NoController: NoController:
") ")
@ -74,10 +74,10 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo' nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo'
MessageBox MB_YESNO|MB_ICONQUESTION \ MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove ViGEmBus)?' \ 'Do you want to remove Virtual Gamepad)?' \
/SD IDNO IDNO NoVigem /SD IDNO IDNO NoGamepad
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-vigembus.bat\\\"'; skipped if no nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.bat\\\"'; skipped if no
NoVigem: NoGamepad:
MessageBox MB_YESNO|MB_ICONQUESTION \ MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \ 'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \
/SD IDNO IDNO NoDelete /SD IDNO IDNO NoDelete
@ -149,7 +149,7 @@ set(CPACK_COMPONENT_FIREWALL_DISPLAY_NAME "Add Firewall Exclusions")
set(CPACK_COMPONENT_FIREWALL_DESCRIPTION "Scripts to enable or disable firewall rules.") set(CPACK_COMPONENT_FIREWALL_DESCRIPTION "Scripts to enable or disable firewall rules.")
set(CPACK_COMPONENT_FIREWALL_GROUP "Scripts") set(CPACK_COMPONENT_FIREWALL_GROUP "Scripts")
# vigembus scripts # gamepad scripts
set(CPACK_COMPONENT_VIGEMBUS_DISPLAY_NAME "Virtual Gamepad Support") set(CPACK_COMPONENT_GAMEPAD_DISPLAY_NAME "Virtual Gamepad")
set(CPACK_COMPONENT_VIGEMBUS_DESCRIPTION "Scripts to install and uninstall ViGEmBus for virtual gamepad support.") set(CPACK_COMPONENT_GAMEPAD_DESCRIPTION "Scripts to install and uninstall Virtual Gamepad.")
set(CPACK_COMPONENT_VIGEMBUS_GROUP "Scripts") set(CPACK_COMPONENT_GAMEPAD_GROUP "Scripts")

View file

@ -179,7 +179,7 @@ Configure autostart service
Windows Windows
^^^^^^^ ^^^^^^^
For gamepad support, install `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releases/latest>`__ For gamepad support, install `Nefarius Virtual Gamepad <https://github.com/nefarius/ViGEmBus/releases/latest>`__
Sunshine firewall Sunshine firewall
**Add rule** **Add rule**

View file

@ -3,4 +3,4 @@ Windows
No gamepad detected No gamepad detected
------------------- -------------------
#. Verify that you've installed `ViGEmBus <https://github.com/ViGEm/ViGEmBus/releases/latest>`__. #. Verify that you've installed `Nefarius Virtual Gamepad <https://github.com/nefarius/ViGEmBus/releases/latest>`__.

View file

@ -15,7 +15,7 @@ for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVer
if !ProxyEnable! equ 0x1 ( if !ProxyEnable! equ 0x1 (
for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^| find /i "ProxyServer"') do ( for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^| find /i "ProxyServer"') do (
set proxy=%%a set proxy=%%a
echo Using system proxy !proxy! to download ViGEmBus echo Using system proxy !proxy! to download Virtual Gamepad
set proxy=-x !proxy! set proxy=-x !proxy!
) )
) else ( ) else (
@ -23,8 +23,8 @@ for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVer
) )
) )
rem get browser_download_url from asset 0 of https://api.github.com/repos/vigem/vigembus/releases/latest rem get browser_download_url from asset 0 of https://api.github.com/repos/nefarius/vigembus/releases/latest
set latest_release_url=https://api.github.com/repos/vigem/vigembus/releases/latest set latest_release_url=https://api.github.com/repos/nefarius/vigembus/releases/latest
rem Use curl to get the api response, and find the browser_download_url rem Use curl to get the api response, and find the browser_download_url
for /F "tokens=* USEBACKQ" %%F in (`curl -s !proxy! -L %latest_release_url% ^| findstr browser_download_url`) do ( for /F "tokens=* USEBACKQ" %%F in (`curl -s !proxy! -L %latest_release_url% ^| findstr browser_download_url`) do (
@ -40,10 +40,10 @@ set browser_download_url=%browser_download_url:browser_download_url: =%
echo %browser_download_url% echo %browser_download_url%
rem Download the exe rem Download the exe
curl -s -L !proxy! -o "%temp_dir%\vigembus.exe" %browser_download_url% curl -s -L !proxy! -o "%temp_dir%\virtual_gamepad.exe" %browser_download_url%
rem Install vigembus rem Install Virtual Gamepad
%temp_dir%\vigembus.exe /passive /promptrestart %temp_dir%\virtual_gamepad.exe /passive /promptrestart
rem Delete temp directory rem Delete temp directory
rmdir /S /Q "%temp_dir%" rmdir /S /Q "%temp_dir%"

View file

@ -1,4 +1,4 @@
@echo off @echo off
rem Use wmic to get the uninstall ViGEmBus rem Use wmic to get the uninstall Virtual Gamepad
wmic product where name="ViGEm Bus Driver" call uninstall wmic product where name="ViGEm Bus Driver" call uninstall

@ -1 +1 @@
Subproject commit 9e842ba1c3a6efbb90d9b7e9346a55b1a3d10494 Subproject commit b66d02d57e32cc8595369c53418b843e958649b4