From c9a78916c7f426595d706ac073b07901df7aa81d Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 1 Dec 2025 08:45:27 -0500 Subject: [PATCH] fix(windows-installer): Add user prompt for Virtual Gamepad The NSIS installer now prompts users to confirm installation of the Virtual Gamepad, providing a link to relevant documentation. The getting started guide adds warnings about potential issues and risks with virtual input devices. --- cmake/packaging/windows_nsis.cmake | 15 +++++++++++++-- docs/getting_started.md | 3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cmake/packaging/windows_nsis.cmake b/cmake/packaging/windows_nsis.cmake index 8ac1ce955a3..72860a51294 100644 --- a/cmake/packaging/windows_nsis.cmake +++ b/cmake/packaging/windows_nsis.cmake @@ -15,8 +15,18 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\update-path.bat\\\" add' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\migrate-config.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\add-firewall-rule.bat\\\"' - nsExec::ExecToLog \ - 'powershell.exe -NoProfile -ExecutionPolicy Bypass -File \\\"$INSTDIR\\\\scripts\\\\install-gamepad.ps1\\\"' + IfFileExists \\\"$INSTDIR\\\\scripts\\\\install-gamepad.ps1\\\" 0 NoGamepad + MessageBox MB_YESNO|MB_ICONQUESTION \ + 'Do you want to install Virtual Gamepad?$\\r$\\n\ +This is required for gamepad input from Moonlight.$\\r$\\n$\\r$\\n\ +Note: See considerations at$\\r$\\n\ +https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#considerations' \ + /SD IDNO IDNO NoGamepad + nsExec::ExecToLog \ + 'powershell.exe -NoProfile -ExecutionPolicy Bypass -File \ + \\\"$INSTDIR\\\\scripts\\\\install-gamepad.ps1\\\"'; \ + skipped if no + NoGamepad: nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\install-service.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\autostart-service.bat\\\"' NoController: @@ -29,6 +39,7 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\delete-firewall-rule.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\scripts\\\\uninstall-service.bat\\\"' nsExec::ExecToLog '\\\"$INSTDIR\\\\${CMAKE_PROJECT_NAME}.exe\\\" --restore-nvprefs-undo' + IfFileExists \\\"$INSTDIR\\\\scripts\\\\uninstall-gamepad.ps1\\\" 0 NoGamepad MessageBox MB_YESNO|MB_ICONQUESTION \ 'Do you want to remove Virtual Gamepad?' \ /SD IDNO IDNO NoGamepad diff --git a/docs/getting_started.md b/docs/getting_started.md index c0d40752c65..f1e4d5e0307 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -564,6 +564,9 @@ All shortcuts start with `Ctrl+Alt+Shift`, just like Moonlight. This can only be changed by modifying the `apps.json` file directly. ### Considerations +* Using virtual input devices may not work in all games. + Some games may also ban you for using virtual input. + Use at your own risk. * On Windows, Sunshine uses the Desktop Duplication API which only supports capturing from the GPU used for display. If you want to capture and encode on the eGPU, connect a display or HDMI dummy display dongle to it and run the games on that display.