From 2db7176f73e8a6b0eb3fcb6696e28234beb56db9 Mon Sep 17 00:00:00 2001 From: David Lane <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 19 May 2026 21:01:45 -0400 Subject: [PATCH] fix(Windows-installer): move ViGEmBus to ThirdParty group (#5157) --- cmake/packaging/windows.cmake | 12 ++++++++---- src/confighttp.cpp | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cmake/packaging/windows.cmake b/cmake/packaging/windows.cmake index 9d75f7a69..69830da6b 100644 --- a/cmake/packaging/windows.cmake +++ b/cmake/packaging/windows.cmake @@ -10,9 +10,11 @@ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64" AND DEFINED _MINHOOK_DLL) endif() # ViGEmBus installer -set(VIGEMBUS_INSTALLER "${CMAKE_BINARY_DIR}/scripts/vigembus_installer.exe") +set(SUNSHINE_THIRD_PARTY_DIR "third-party") +set(VIGEMBUS_INSTALLER "${CMAKE_BINARY_DIR}/${SUNSHINE_THIRD_PARTY_DIR}/vigembus_installer.exe") set(VIGEMBUS_DOWNLOAD_URL_1 "https://github.com/nefarius/ViGEmBus/releases/download") set(VIGEMBUS_DOWNLOAD_URL_2 "v${VIGEMBUS_PACKAGED_V_2}/ViGEmBus_${VIGEMBUS_PACKAGED_V}_x64_x86_arm64.exe") +file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${SUNSHINE_THIRD_PARTY_DIR}") file(DOWNLOAD "${VIGEMBUS_DOWNLOAD_URL_1}/${VIGEMBUS_DOWNLOAD_URL_2}" ${VIGEMBUS_INSTALLER} @@ -21,7 +23,7 @@ file(DOWNLOAD TIMEOUT 60 ) install(FILES ${VIGEMBUS_INSTALLER} - DESTINATION "scripts" + DESTINATION "${SUNSHINE_THIRD_PARTY_DIR}" RENAME "vigembus_installer.exe" COMPONENT gamepad) @@ -78,6 +80,8 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") # Setting components groups and dependencies set(CPACK_COMPONENT_GROUP_CORE_EXPANDED true) +set(CPACK_COMPONENT_GROUP_THIRDPARTY_DISPLAY_NAME "Third Party") +set(CPACK_COMPONENT_GROUP_THIRDPARTY_DESCRIPTION "Bundled third-party installers and optional components.") # sunshine binary set(CPACK_COMPONENT_APPLICATION_DISPLAY_NAME "${CMAKE_PROJECT_NAME}") @@ -112,10 +116,10 @@ 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") -# gamepad scripts +# gamepad third-party installer set(CPACK_COMPONENT_GAMEPAD_DISPLAY_NAME "Virtual Gamepad") set(CPACK_COMPONENT_GAMEPAD_DESCRIPTION "ViGEmBus installer for virtual gamepad support.") -set(CPACK_COMPONENT_GAMEPAD_GROUP "Scripts") +set(CPACK_COMPONENT_GAMEPAD_GROUP "ThirdParty") # include specific packaging include(${CMAKE_MODULE_PATH}/packaging/windows_nsis.cmake) diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 13c993fad..5fd6a19d8 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -1486,8 +1486,8 @@ namespace confighttp { nlohmann::json output_tree; #ifdef _WIN32 - // Get the path to the vigembus installer - const std::filesystem::path installer_path = platf::appdata().parent_path() / "scripts" / "vigembus_installer.exe"; + // Get the path to the packaged ViGEmBus installer. + const std::filesystem::path installer_path = platf::appdata().parent_path() / "third-party" / "vigembus_installer.exe"; if (!std::filesystem::exists(installer_path)) { output_tree["status"] = false;