Skip to content

Conversation

@rbqvq
Copy link
Contributor

@rbqvq rbqvq commented Apr 27, 2025

Description

Since GitHub add Windows 11 Arm64 runners, we can prepare Sunshine for ARM64

Let's add windows arm64 builds

Screenshot

None

Issues Fixed or Closed

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Status

  • Local build: Passed
  • CI build: Passed

Changes

TL;DR. See commits


Do not need approve workflows, it will failed before known issues resolved
After this ready, we can back to LizardByte/Sunshine#3369

@CLAassistant
Copy link

CLAassistant commented Apr 27, 2025

CLA assistant check
All committers have signed the CLA.

@ReenigneArcher

This comment was marked as resolved.

@rbqvq

This comment was marked as resolved.

@rbqvq
Copy link
Contributor Author

rbqvq commented May 11, 2025

A Good news for everyone who care this.

All Works is Done!!!

  • Local build: Passed
  • CI build: Passed

Today progress

  • Fixed x264 build fails
  • Fixed FFmpeg build fails
  • Add document for Windows Arm64 build guide

See commits for details

In addition, I pinned the CMake version of CI to 3.31.2, which can temporarily solve the problem of Windows CI build failure.

Thanks to everyone who reads here, have a nice day!

@rbqvq rbqvq marked this pull request as ready for review May 11, 2025 16:16
@rbqvq rbqvq changed the title ci(build): add windows arm64 build build: add windows arm64 build May 11, 2025
@rbqvq
Copy link
Contributor Author

rbqvq commented May 11, 2025

Here is CI artifacts
We can try build Sunshine for Windows Arm64 now

https://github.com/rbqvq/build-deps/actions/runs/14957436940/artifacts/3101752802

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the PR!

It looks pretty good but I do have a few comments and questions.

@ReenigneArcher

This comment was marked as resolved.

@rbqvq

This comment was marked as resolved.

rbqvq and others added 14 commits May 12, 2025 18:15
Windows 11 Arm64 runners don't like x86_64 runners have two disk, they're only one disk C:
Replace hardcoded path `/d/a/_temp/` to `${{ runner.temp }}` and use `MSYS2_ROOT` environment variables

Signed-off-by: Coia Prant <[email protected]>
Add initial clangarm64 support for Windows Arm64 builds

Signed-off-by: Coia Prant <[email protected]>
MSYS2 CLANGARM64 is native arm64 binary, can not run on non-arm64 hosts.

Signed-off-by: Coia Prant <[email protected]>
Apple should be reported as darwin
Win32 should be reported as mingw64

Signed-off-by: Coia Prant <[email protected]>
This is a temporary solution to fix the issue with Windows Arm64 not being recognized correctly in x264

`uname -m` is currently reported as `x86_64` instead of `aarch64` in MSYS2
Link: msys2/msys2-runtime#171

x264 `config.guess` uses `uname -m` to detect architecture
Link: https://code.videolan.org/videolan/x264/-/tree/1ecc51ee971e0056a53bd6cf9c6f6af18b167e4b/config.guess#L809

Signed-off-by: Coia Prant <[email protected]>
This is a temporary solution to fix the issue with Windows Arm64 not being recognized correctly in FFmpeg

`uname -m` is currently reported as `x86_64` instead of `aarch64` in MSYS2
Link: msys2/msys2-runtime#171

FFmpeg `configure` uses `uname -m` to detect architecture
Link: https://github.com/FFmpeg/FFmpeg/blob/4e5523c98597a417eb43555933b1075d18ec5f8b/configure#L4161

Signed-off-by: Coia Prant <[email protected]>
FFmpeg `configure` will disable ffnvcodec on Windows Arm64
Link: https://github.com/FFmpeg/FFmpeg/blob/4e5523c98597a417eb43555933b1075d18ec5f8b/configure#L7443

This problem may be solved in 2026 (NVIDIA and MediaTek release Windows Arm computers)
Until FFmpeg fixes this, disable them first

Signed-off-by: Coia Prant <[email protected]>
Add CI build for Windows ARM64 target

Signed-off-by: Coia Prant <[email protected]>
Add windows arm64 build guide with notes

Signed-off-by: Coia Prant <[email protected]>
Some packages are not compatible with the latest MSYS2 version, because it bundles CMake 4.0
Pinned the MSYS2 version and disabled updates back to CMake 3.31.2 until the following issues are resolved
Link: #414

Signed-off-by: Coia Prant <[email protected]>
# Conflicts:
#	.github/workflows/ci.yml
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) May 23, 2025 23:11
@ReenigneArcher ReenigneArcher disabled auto-merge May 23, 2025 23:31
@ReenigneArcher ReenigneArcher changed the title build: add windows arm64 build build(windows): add arm64 build May 23, 2025
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) May 23, 2025 23:31
@ReenigneArcher ReenigneArcher merged commit f12d913 into LizardByte:master May 23, 2025
14 checks passed
@rbqvq
Copy link
Contributor Author

rbqvq commented May 24, 2025

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants