Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bca3365
fix(build): Enable minhook only on x86_64
rbqvq May 25, 2025
4595bee
fix(build): add check for Steam Audio Driver
rbqvq May 25, 2025
7ac2bbe
fix(build): clang namespace resolution
rbqvq Jun 2, 2025
6bb52ea
fix(build): disable googletest for windows arm64
rbqvq May 25, 2025
fca5215
docs(windows): add documents for arm64
rbqvq May 25, 2025
fe0f022
ci(build/windows): add support for arm64
rbqvq May 25, 2025
9fafb76
fix: clang llvm parse error
rbqvq Jul 22, 2025
9072088
feat: add Qualcomm Adreno GPU detection
faratech Dec 19, 2025
d2074c6
feat: add Media Foundation encoder for Windows ARM64
faratech Dec 19, 2025
4bffd13
fix(build): resolve `parseAsync` error on ClangARM64 by using WASM Ro…
rbqvq Feb 3, 2026
68bcc60
feat(installer/windows): add wix installer
ReenigneArcher Jul 4, 2025
72cca84
Refactor WiX packaging resources and update installer
ReenigneArcher Jan 24, 2026
79f9060
Remove gamepad custom actions from installer
ReenigneArcher Feb 1, 2026
e117752
Detect ARM64 for WiX CPACK_WIX_ARCHITECTURE
ReenigneArcher Feb 3, 2026
abec682
Merge branch 'pr/3905' into test/windows/arm64-with-wix
ReenigneArcher Feb 3, 2026
a24ffcf
Disable warnings for Windows ARM64
ReenigneArcher Feb 4, 2026
b08d41e
Use std::vector instead of VLAs on Windows
ReenigneArcher Feb 4, 2026
a670d0f
Remove architecture warning in audio.cpp
ReenigneArcher Feb 4, 2026
e64a113
Remove unused HMODULE member from nvenc header
ReenigneArcher Feb 4, 2026
113e159
Add -Wno-unknown-warning-option for ARM64
ReenigneArcher Feb 4, 2026
f1680bd
Add NSIS packaging and produce Windows artifacts
ReenigneArcher Feb 4, 2026
304fb58
Add CI npm debug, pin rollup wasm, enable nvm_node
ReenigneArcher Feb 4, 2026
7d2aa63
build(windows): add minhook-detours for arm64
ReenigneArcher Feb 6, 2026
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
4 changes: 4 additions & 0 deletions .github/workflows/ci-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
- name: Install npm dependencies
run: npm install --ignore-scripts

- name: Debug install
if: always()
run: cat "${HOME}/.npm/_logs/*-debug-0.log" || true

- name: Build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
43 changes: 36 additions & 7 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
arch: x86_64
msystem: ucrt64
toolchain: ucrt-x86_64
- name: Windows-ARM64
os: windows-11-arm
arch: aarch64
msystem: clangarm64
toolchain: clang-aarch64
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Expand Down Expand Up @@ -62,17 +67,22 @@ jobs:
"mingw-w64-${TOOLCHAIN}-curl-winssl"
"mingw-w64-${TOOLCHAIN}-gcc"
"mingw-w64-${TOOLCHAIN}-graphviz"
"mingw-w64-${TOOLCHAIN}-MinHook"
"mingw-w64-${TOOLCHAIN}-miniupnpc"
"mingw-w64-${TOOLCHAIN}-nlohmann-json"
"mingw-w64-${TOOLCHAIN}-nodejs"
"mingw-w64-${TOOLCHAIN}-nsis"
"mingw-w64-${TOOLCHAIN}-onevpl"
"mingw-w64-${TOOLCHAIN}-openssl"
"mingw-w64-${TOOLCHAIN}-opus"
"mingw-w64-${TOOLCHAIN}-toolchain"
)

if [[ "${MSYSTEM}" == "ucrt64" ]]; then
dependencies+=(
"mingw-w64-${TOOLCHAIN}-MinHook"
"mingw-w64-${TOOLCHAIN}-nsis"
)
fi

# do not modify below this line

ignore_packages=()
Expand Down Expand Up @@ -129,6 +139,11 @@ jobs:
# Clean up
Remove-Item -Path doxygen-setup.exe

- name: Setup dotnet # needed for wix
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'

- name: Setup python
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down Expand Up @@ -169,19 +184,33 @@ jobs:
echo "::remove-matcher owner=gcc::"

- name: Package Windows
env:
# if MSYSTEM is used, it interferes with environment and cpack cannot be found
MATRIX_MSYSTEM: ${{ matrix.msystem }}
shell: msys2 {0}
run: |
mkdir -p artifacts
cd build

# package
cpack -G NSIS
cpack -G ZIP
# nsis installer
if [[ "${MATRIX_MSYSTEM}" == "ucrt64" ]]; then
cpack -G NSIS
mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.name }}-installer.exe
fi

# wix installer
cpack -G WIX
mv ./cpack_artifacts/Sunshine.msi ../artifacts/Sunshine-${{ matrix.name }}-installer.msi

# move
mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.name }}-installer.exe
# portable version
cpack -G ZIP
mv ./cpack_artifacts/Sunshine.zip ../artifacts/Sunshine-${{ matrix.name }}-portable.zip

- name: Debug wix
if: always()
shell: msys2 {0}
run: cat ./build/cpack_artifacts/_CPack_Packages/win64/WIX/wix.log || true

- name: Run tests
id: test
shell: msys2 {0}
Expand Down
7 changes: 7 additions & 0 deletions cmake/compile_definitions/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
# gcc complains about misleading indentation in some mingw includes
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-misleading-indentation)

# Disable warnings for Windows ARM64
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-dll-attribute-on-redeclaration) # Boost
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-unknown-warning-option) # ViGEmClient
list(APPEND SUNSHINE_COMPILE_OPTIONS -Wno-unused-variable) # Boost
endif()

# see gcc bug 98723
add_definitions(-DUSE_BOOST_REGEX)

Expand Down
38 changes: 32 additions & 6 deletions cmake/dependencies/windows.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
# windows specific dependencies

# Make sure MinHook is installed
find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)
# MinHook setup - use installed minhook for AMD64, otherwise download minhook-detours for ARM64
if(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64")
# Make sure MinHook is installed for x86/x64
find_library(MINHOOK_LIBRARY libMinHook.a REQUIRED)
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)

add_library(minhook::minhook STATIC IMPORTED)
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
add_library(minhook::minhook STATIC IMPORTED)
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
else()
# Download pre-built minhook-detours for ARM64
message(STATUS "Downloading minhook-detours pre-built binaries for ARM64")
include(FetchContent)

FetchContent_Declare(
minhook-detours
URL https://github.com/m417z/minhook-detours/releases/download/v1.0.6/minhook-detours-1.0.6.zip
URL_HASH SHA256=E719959D824511E27395A82AEDA994CAAD53A67EE5894BA5FC2F4BF1FA41E38E
)
FetchContent_MakeAvailable(minhook-detours)

# Create imported library for the pre-built DLL
set(_MINHOOK_DLL
"${minhook-detours_SOURCE_DIR}/Release/minhook-detours.ARM64.Release.dll"
CACHE INTERNAL "Path to minhook-detours DLL")
add_library(minhook::minhook SHARED IMPORTED GLOBAL)
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION "${_MINHOOK_DLL}")
set_property(TARGET minhook::minhook PROPERTY IMPORTED_IMPLIB
"${minhook-detours_SOURCE_DIR}/Release/minhook-detours.ARM64.Release.lib")
set_target_properties(minhook::minhook PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${minhook-detours_SOURCE_DIR}/src"
)
endif()
5 changes: 5 additions & 0 deletions cmake/packaging/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ install(TARGETS sunshine RUNTIME DESTINATION "." COMPONENT application)
# Hardening: include zlib1.dll (loaded via LoadLibrary() in openssl's libcrypto.a)
install(FILES "${ZLIB}" DESTINATION "." COMPONENT application)

# ARM64: include minhook-detours DLL (shared library for ARM64)
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64" AND DEFINED _MINHOOK_DLL)
install(FILES "${_MINHOOK_DLL}" DESTINATION "." COMPONENT application)
endif()

# ViGEmBus installer
set(VIGEMBUS_INSTALLER "${CMAKE_BINARY_DIR}/scripts/vigembus_installer.exe")
set(VIGEMBUS_DOWNLOAD_URL_1 "https://github.com/nefarius/ViGEmBus/releases/download")
Expand Down
90 changes: 89 additions & 1 deletion cmake/packaging/windows_wix.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,92 @@
# WIX Packaging
# see options at: https://cmake.org/cmake/help/latest/cpack_gen/wix.html

# TODO: Replace nsis with wix
set(CPACK_WIX_VERSION 4)
set(WIX_VERSION 4.0.4)
set(WIX_UI_VERSION 4.0.4) # extension versioning is independent of the WiX version
set(WIX_BUILD_PARENT_DIRECTORY "${CMAKE_BINARY_DIR}/wix_packaging")
set(WIX_BUILD_DIRECTORY "${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages/win64/WIX")

# Download and install WiX tools locally in the build directory
set(WIX_TOOL_PATH "${CMAKE_BINARY_DIR}/.wix")
file(MAKE_DIRECTORY ${WIX_TOOL_PATH})

# find dotnet
find_program(DOTNET_EXECUTABLE dotnet REQUIRED HINTS "C:/Program Files/dotnet")

# Install WiX locally using dotnet
execute_process(
COMMAND ${DOTNET_EXECUTABLE} tool install --tool-path ${WIX_TOOL_PATH} wix --version ${WIX_VERSION}
ERROR_VARIABLE WIX_INSTALL_OUTPUT
RESULT_VARIABLE WIX_INSTALL_RESULT
)

if(NOT WIX_INSTALL_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to install WiX tools locally.
WiX packaging may not work correctly, error: ${WIX_INSTALL_OUTPUT}")
endif()

# Install WiX UI Extension
execute_process(
COMMAND "${WIX_TOOL_PATH}/wix" extension add WixToolset.UI.wixext/${WIX_UI_VERSION}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ERROR_VARIABLE WIX_UI_INSTALL_OUTPUT
RESULT_VARIABLE WIX_UI_INSTALL_RESULT
)

if(NOT WIX_UI_INSTALL_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to install WiX UI extension, error: ${WIX_UI_INSTALL_OUTPUT}")
endif()

# Install WiX Util Extension
execute_process(
COMMAND "${WIX_TOOL_PATH}/wix" extension add WixToolset.Util.wixext/${WIX_UI_VERSION}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
ERROR_VARIABLE WIX_UTIL_INSTALL_OUTPUT
RESULT_VARIABLE WIX_UTIL_INSTALL_RESULT
)

if(NOT WIX_UTIL_INSTALL_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to install WiX Util extension, error: ${WIX_UTIL_INSTALL_OUTPUT}")
endif()

# Set WiX-specific variables
set(CPACK_WIX_ROOT "${WIX_TOOL_PATH}")
set(CPACK_WIX_UPGRADE_GUID "512A3D1B-BE16-401B-A0D1-59BBA3942FB8")

# Installer metadata
set(CPACK_WIX_HELP_LINK "https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html")
set(CPACK_WIX_PRODUCT_ICON "${SUNSHINE_ICON_PATH}")
set(CPACK_WIX_PRODUCT_URL "${CMAKE_PROJECT_HOMEPAGE_URL}")
set(CPACK_WIX_PROGRAM_MENU_FOLDER "LizardByte")

set(CPACK_WIX_EXTENSIONS
"WixToolset.UI.wixext"
"WixToolset.Util.wixext"
)

message(STATUS "cpack package directory: ${CPACK_PACKAGE_DIRECTORY}")

# copy custom wxs files to the build directory
file(COPY "${CMAKE_CURRENT_LIST_DIR}/wix_resources/"
DESTINATION "${WIX_BUILD_PARENT_DIRECTORY}/")

set(CPACK_WIX_EXTRA_SOURCES
"${WIX_BUILD_PARENT_DIRECTORY}/sunshine-installer.wxs"
)
set(CPACK_WIX_PATCH_FILE
"${WIX_BUILD_PARENT_DIRECTORY}/patch.xml"
)

# Copy root LICENSE and rename to have .txt extension
file(COPY "${CMAKE_SOURCE_DIR}/LICENSE"
DESTINATION "${CMAKE_BINARY_DIR}")
file(RENAME "${CMAKE_BINARY_DIR}/LICENSE" "${CMAKE_BINARY_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/LICENSE.txt") # cpack will covert this to an RTF if it is txt

# https://cmake.org/cmake/help/latest/cpack_gen/wix.html#variable:CPACK_WIX_ARCHITECTURE
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
set(CPACK_WIX_ARCHITECTURE "arm64")
else()
set(CPACK_WIX_ARCHITECTURE "x64")
endif()
5 changes: 5 additions & 0 deletions cmake/packaging/wix_resources/patch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<CPackWiXPatch>
<CPackWiXFragment Id="CM_G_Core">
<FeatureRef Id="RunSunshineInstallScripts"/>
</CPackWiXFragment>
</CPackWiXPatch>
48 changes: 48 additions & 0 deletions cmake/packaging/wix_resources/sunshine-installer.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuSubfolder" Name="LizardByte">
<Component Id="ApplicationShortcut" Guid="*">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Sunshine"
Description="Sunshine Game Stream Host"
Target="[INSTALL_ROOT]sunshine.exe"
Arguments="--shortcut"
WorkingDirectory="INSTALL_ROOT"/>
<RemoveFolder Id="CleanUpShortCut" Directory="ProgramMenuSubfolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\LizardByte\Sunshine" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</StandardDirectory>

<CustomAction Id="CA_ResetPermissions" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]icacls.exe&quot; &quot;.&quot; /reset" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_UpdatePathAdd" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\update-path.bat&quot; add" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_UpdatePathRemove" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\update-path.bat&quot; remove" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_MigrateConfig" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\migrate-config.bat&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_FirewallAdd" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\add-firewall-rule.bat&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_FirewallRemove" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\delete-firewall-rule.bat&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_ServiceInstall" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\install-service.bat&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_ServiceAutostart" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\autostart-service.bat&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_ServiceUninstall" Directory="INSTALL_ROOT" ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /c &quot;[INSTALL_ROOT]scripts\uninstall-service.bat&quot;" Execute="deferred" Return="ignore" Impersonate="no" />
<CustomAction Id="CA_RestoreNvPrefs" Directory="INSTALL_ROOT" ExeCommand="&quot;[INSTALL_ROOT]sunshine.exe&quot; --restore-nvprefs-undo" Execute="deferred" Return="ignore" Impersonate="no" />

<InstallExecuteSequence>
<Custom Action="CA_ResetPermissions" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="CA_UpdatePathAdd" After="CA_ResetPermissions" Condition="NOT Installed" />
<Custom Action="CA_MigrateConfig" After="CA_UpdatePathAdd" Condition="NOT Installed" />
<Custom Action="CA_FirewallAdd" After="CA_MigrateConfig" Condition="NOT Installed" />
<Custom Action="CA_ServiceInstall" After="CA_FirewallAdd" Condition="NOT Installed" />
<Custom Action="CA_ServiceAutostart" After="CA_ServiceInstall" Condition="NOT Installed" />

<Custom Action="CA_FirewallRemove" Before="RemoveFiles" Condition="REMOVE=&quot;ALL&quot;" />
<Custom Action="CA_ServiceUninstall" Before="CA_FirewallRemove" Condition="REMOVE=&quot;ALL&quot;" />
<Custom Action="CA_RestoreNvPrefs" After="CA_ServiceUninstall" Condition="REMOVE=&quot;ALL&quot;" />
<Custom Action="CA_UpdatePathRemove" After="CA_RestoreNvPrefs" Condition="REMOVE=&quot;ALL&quot;" />
</InstallExecuteSequence>

<!-- We need this in order to actually run our custom actions, but let's hide it -->
<Feature Id="RunSunshineInstallScripts" Title="Run Sunshine Installation Scripts" Level="1" Display="hidden">
<ComponentRef Id="ApplicationShortcut" />
</Feature>
</Fragment>
</Wix>
4 changes: 2 additions & 2 deletions cmake/prep/build_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ else()
if(NOT GIT_DESCRIBE_ERROR_CODE)
MESSAGE("Sunshine Branch: ${GIT_DESCRIBE_BRANCH}")
if(NOT GIT_DESCRIBE_BRANCH STREQUAL "master")
set(PROJECT_VERSION ${PROJECT_VERSION}.${GIT_DESCRIBE_VERSION})
set(PROJECT_VERSION ${PROJECT_VERSION}-${GIT_DESCRIBE_VERSION})
MESSAGE("Sunshine Version: ${GIT_DESCRIBE_VERSION}")
endif()
if(GIT_IS_DIRTY)
set(PROJECT_VERSION ${PROJECT_VERSION}.dirty)
set(PROJECT_VERSION ${PROJECT_VERSION}-dirty)
MESSAGE("Git tree is dirty!")
endif()
else()
Expand Down
1 change: 1 addition & 0 deletions cmake/prep/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(SUNSHINE_PUBLISHER_ISSUE_URL "https://app.lizardbyte.dev/support"

option(BUILD_DOCS "Build documentation" ON)
option(BUILD_TESTS "Build tests" ON)

option(NPM_OFFLINE "Use offline npm packages. You must ensure packages are in your npm cache." OFF)

option(BUILD_WERROR "Enable -Werror flag." OFF)
Expand Down
Loading
Loading