mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-30 03:32:43 +00:00
fix(installer): update vigembus (#1670)
This commit is contained in:
parent
366c5ab675
commit
e716e56199
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -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
|
||||
|
@ -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/"
|
||||
@ -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:
|
||||
")
|
||||
@ -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
|
||||
@ -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")
|
||||
|
@ -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**
|
||||
|
@ -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>`__.
|
||||
|
@ -15,7 +15,7 @@ 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 (
|
||||
@ -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
|
||||
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 (
|
||||
@ -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%"
|
@ -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
|
2
third-party/ViGEmClient
vendored
2
third-party/ViGEmClient
vendored
@ -1 +1 @@
|
||||
Subproject commit 9e842ba1c3a6efbb90d9b7e9346a55b1a3d10494
|
||||
Subproject commit b66d02d57e32cc8595369c53418b843e958649b4
|
Loading…
x
Reference in New Issue
Block a user