-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
build(windows): add arm64 initial support #3905
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
Open
rbqvq
wants to merge
12
commits into
LizardByte:master
Choose a base branch
from
rbqvq:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+234
−54
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
68d329c
fix(build): using minhook-detours for arm64
rbqvq 26389a6
fix(build): disable Steam Audio Driver for Windows ARM64
rbqvq 92f0e9f
fix(build): clang namespace resolution
rbqvq 22ba1fe
fix(build): clang/llvm icon path error
rbqvq 62a2032
feat: add Qualcomm Adreno GPU detection
faratech bd52f31
feat: add Media Foundation encoder for Windows ARM64
faratech edc0ba8
fix(build): using @rollup/wasm-node
rbqvq 7f02621
chores(build): disable warnings for Windows ARM64
ReenigneArcher 7daeab3
chores: use std::vector instead of VLAs on Windows
ReenigneArcher 26455b8
fix(build): drop unused HMODULE member from nvenc header
ReenigneArcher b49e7a1
ci(build/windows): add support for arm64
rbqvq a5885ed
docs(windows): add documents for arm64
rbqvq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
@@ -46,7 +51,9 @@ jobs: | |
|
|
||
| - name: Update Windows dependencies | ||
| env: | ||
| MSYSTEM: ${{ matrix.msystem }} | ||
| # MSYSTEM is a built-in environment variable of MSYS2. | ||
| # Do not use this environment variable name. | ||
| MATRIX_MSYSTEM: ${{ matrix.msystem }} | ||
| TOOLCHAIN: ${{ matrix.toolchain }} | ||
| shell: msys2 {0} | ||
| run: | | ||
|
|
@@ -62,17 +69,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 [[ "${MATRIX_MSYSTEM}" == "ucrt64" ]]; then | ||
| dependencies+=( | ||
| "mingw-w64-${TOOLCHAIN}-MinHook" | ||
| "mingw-w64-${TOOLCHAIN}-nsis" | ||
| ) | ||
| fi | ||
|
|
||
| # do not modify below this line | ||
|
|
||
| ignore_packages=() | ||
|
|
@@ -83,7 +95,7 @@ jobs: | |
| tarball="${pkg}-${version}-any.pkg.tar.zst" | ||
|
|
||
| # download working version | ||
| wget "https://repo.msys2.org/mingw/${MSYSTEM}/${tarball}" | ||
| wget "https://repo.msys2.org/mingw/${MATRIX_MSYSTEM}/${tarball}" | ||
|
|
||
| tarballs="${tarballs} ${tarball}" | ||
| done | ||
|
|
@@ -169,17 +181,22 @@ jobs: | |
| echo "::remove-matcher owner=gcc::" | ||
|
|
||
| - name: Package Windows | ||
| env: | ||
| # MSYSTEM is a built-in environment variable of MSYS2. | ||
| # Do not use this environment variable name. | ||
| # 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 | ||
| # nsis installer | ||
| cpack -G NSIS | ||
| cpack -G ZIP | ||
|
|
||
| # move | ||
| mv ./cpack_artifacts/Sunshine.exe ../artifacts/Sunshine-${{ matrix.name }}-installer.exe | ||
|
|
||
| # portable version | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: add wix after #3916 is merged |
||
| cpack -G ZIP | ||
| mv ./cpack_artifacts/Sunshine.zip ../artifacts/Sunshine-${{ matrix.name }}-portable.zip | ||
|
|
||
| - name: Run tests | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.