Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(installer): update vigembus #1670

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
branch = master
[submodule "third-party/ViGEmClient"]
path = third-party/ViGEmClient
url = https://github.com/ViGEm/ViGEmClient
url = https://github.com/nefarius/ViGEmClient
branch = master
[submodule "third-party/miniupnp"]
path = third-party/miniupnp
Expand Down
22 changes: 11 additions & 11 deletions cmake/packaging/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/autostart/"
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/firewall/"
DESTINATION "scripts"
COMPONENT firewall)
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/vigembus/"
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
DESTINATION "scripts"
COMPONENT vigembus)
COMPONENT gamepad)

# Sunshine assets
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/"
Expand Down Expand Up @@ -61,7 +61,7 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.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\\\"'
NoController:
")
Expand All @@ -74,10 +74,10 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"'
nsExec::ExecToLog '\\\"$INSTDIR\\\\sunshine.exe\\\" --restore-nvprefs-undo'
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove ViGEmBus)?' \
/SD IDNO IDNO NoVigem
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-vigembus.bat\\\"'; skipped if no
NoVigem:
'Do you want to remove Virtual Gamepad)?' \
/SD IDNO IDNO NoGamepad
nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.bat\\\"'; skipped if no
NoGamepad:
MessageBox MB_YESNO|MB_ICONQUESTION \
'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \
/SD IDNO IDNO NoDelete
Expand Down Expand Up @@ -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_GROUP "Scripts")

# vigembus scripts
set(CPACK_COMPONENT_VIGEMBUS_DISPLAY_NAME "Virtual Gamepad Support")
set(CPACK_COMPONENT_VIGEMBUS_DESCRIPTION "Scripts to install and uninstall ViGEmBus for virtual gamepad support.")
set(CPACK_COMPONENT_VIGEMBUS_GROUP "Scripts")
# gamepad scripts
set(CPACK_COMPONENT_GAMEPAD_DISPLAY_NAME "Virtual Gamepad")
set(CPACK_COMPONENT_GAMEPAD_DESCRIPTION "Scripts to install and uninstall Virtual Gamepad.")
set(CPACK_COMPONENT_GAMEPAD_GROUP "Scripts")
2 changes: 1 addition & 1 deletion docs/source/about/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Configure autostart service

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
**Add rule**
Expand Down
2 changes: 1 addition & 1 deletion docs/source/troubleshooting/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Windows

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>`__.
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVer
if !ProxyEnable! equ 0x1 (
for /f "tokens=3" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^| find /i "ProxyServer"') do (
set proxy=%%a
echo Using system proxy !proxy! to download ViGEmBus
echo Using system proxy !proxy! to download Virtual Gamepad
set proxy=-x !proxy!
)
) else (
rem Proxy is not enabled.
)
)

rem get browser_download_url from asset 0 of https://api.github.com/repos/vigem/vigembus/releases/latest
set latest_release_url=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/nefarius/vigembus/releases/latest

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 (
Expand All @@ -40,10 +40,10 @@ set browser_download_url=%browser_download_url:browser_download_url: =%
echo %browser_download_url%

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
%temp_dir%\vigembus.exe /passive /promptrestart
rem Install Virtual Gamepad
%temp_dir%\virtual_gamepad.exe /passive /promptrestart

rem Delete temp directory
rmdir /S /Q "%temp_dir%"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@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