Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

build(windows): add arm64 initial support

Open rbqvq opened this issue 6 months ago • 10 comments

Description

This PR adds an arm64 build for Windows.

Todo:

  • [x] Cross compile build-deps for arm

  • [ ] Some dependencies not available in clang-aarch64 environment

Screenshot

Issues Fixed or Closed

  • Fixes https://github.com/LizardByte/Sunshine/issues/4102

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] 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)
  • [x] Repository update (changes to repository files, e.g. .github/...)

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] 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

Question

Should we need disable all x86 hardware accel (nvenc, intel quicksync and amdvce) on windows arm64 build?

rbqvq avatar May 25 '25 08:05 rbqvq

Known Issues

It crashed after moonlight connect

[2025-05-25 12:58:21.029]: Info: [libx264 @ 0000024346e9af20] kb/s:629.76
[2025-05-25 12:58:21.059]: Info:
Device Description : Qualcomm(R) Adreno(TM) 8cx Gen 3
Device Vendor ID   : 0x4D4F4351
Device Device ID   : 0x36333630
Device Video Mem   : 0 MiB
Device Sys Mem     : 1 MiB
Share Sys Mem      : 16081 MiB
Feature Level      : 0x0000B100
Capture size       : 2560x1440
Offset             : 0x0
Virtual Desktop    : 2560x1440
[2025-05-25 12:58:21.059]: Info: Active GPU has HAGS disabled
[2025-05-25 12:58:21.059]: Info: Using realtime GPU priority
[2025-05-25 12:58:21.059]: Info:
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.673828,0.317383]
Green Primary      : [0.280273,0.660156]
Blue Primary       : [0.142578,0.0449219]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.0745 nits
Max Luminance      : 445.761 nits
Max Full Luminance : 445.761 nits
[2025-05-25 12:58:21.059]: Info: Desktop resolution [2560x1440]
[2025-05-25 12:58:21.060]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-05-25 12:58:21.060]: Info: Display refresh rate [119.987Hz]
[2025-05-25 12:58:21.060]: Info: Requested frame rate [60fps]
[2025-05-25 12:58:21.065]: Info:
[2025-05-25 12:58:21.065]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-05-25 12:58:21.065]: Info:
[2025-05-25 12:58:21.065]: Info: Found H.264 encoder: libx264 [software]
[2025-05-25 12:58:21.065]: Info: Executing [Desktop]
[2025-05-25 12:58:21.182]: Info: New streaming session started [active sessions: 1]
libc++abi: terminating due to uncaught exception of type boost::wrapexcept<std::out_of_range>: config out of range

rbqvq avatar May 25 '25 08:05 rbqvq

Can we use this hardware encode? 🤔 https://github.com/obsproject/obs-studio/pull/11993

rbqvq avatar Jun 02 '25 08:06 rbqvq

I think MF encoder is already included with the FFmpeg build, so why not?

ReenigneArcher avatar Jun 02 '25 12:06 ReenigneArcher

I think MF encoder is already included with the FFmpeg build, so why not?

Well, I didn't read the source code of sunshine. This part is up to you. 🤪

rbqvq avatar Jun 02 '25 15:06 rbqvq

Build failed on Windows AMD64 until https://github.com/LizardByte/Sunshine/issues/3936 resolved

rbqvq avatar Jun 02 '25 17:06 rbqvq

ci has been refactored a bit, the windows build is now in a separate workflow. It's already setup for a matrix build so should be easy to adapt your changes.

ReenigneArcher avatar Jul 02 '25 01:07 ReenigneArcher

It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!

LizardByte-bot avatar Oct 21 '25 10:10 LizardByte-bot

:(

rbqvq avatar Oct 21 '25 12:10 rbqvq

Boost issues

Likely fixed by https://github.com/LizardByte/Sunshine/pull/4253 but waiting on https://gitlab.com/eidheim/Simple-Web-Server/-/merge_requests/283

OR https://github.com/LizardByte/Sunshine/pull/4132 but isn't working yet

NSIS not available for ARM64... How to create installer?

https://github.com/LizardByte/Sunshine/pull/3916 in process, but needs some adjustments. The scripts don't actually run during install.

ReenigneArcher avatar Oct 21 '25 13:10 ReenigneArcher