UI: Implement JavaScript getOS function Windows platform architecture detection #104136
No reviewers
Labels
No Label
legacy module
Rendering & Cycles
legacy module
User Interface
legacy project
Cycles
legacy project
Documentation
legacy project
Infrastructure: blender.org
legacy project
Infrastructure: Blender Web Assets
legacy project
Infrastructure: Websites
legacy project
User Interface
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/blender-org#104136
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "get-os-win-arm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request implements x86 and Arm architectures detection for the Windows platform, following Microsoft's recommendations.
As the
navigator.userAgentData.getHighEntropyValues
built-in browser method is supported by Chromium browsers but not by Gecko browsers (e.g. Firefox), its effect is limited and doesn't resolve architecture detection in all browsers. In browsers that don't support it, Windows is detected and all available downloads are displayed for the platform.The
navigator.userAgentData.getHighEntropyValues
is an asynchronous browser method by design and needs to be handled accordingly. ThegetOS
function has been rewritten to handle its promise chain asynchronously. Additionally, the calling method of thegetOS
function has been updated to an async IIFE, awaiting its response.The PR has been manually tested on a physical Windows Arm machine running Chromium-based browser. The
OS
variable returnswindows-arm
. ✅As of Blender 4.2.3 LTS, Windows Arm display the blender.org Download page like this, after the PR:
WIP: Implement JavaScript getOS function Windows platform architecture detectionto UI: Implement JavaScript getOS function Windows platform architecture detection@pablovazquez the Download button's conditional display logic has also been added. This is how it should look like if the Windows Arm platform is present within platforms, on a Windows Arm machine:
It has been tested on a physical Windows Arm laptop in Chromium browsers using the private
/download-arm
test page.Important:
The Arm download markup was manually added to the temporary
page-download-arm.php
template. Both the WP test page, and the temporarypage-download-arm.php
file should be removed after the PR has been merged. (The latter will happen automatically on the next 'live' deployment.) For now, I made the test page private – if you want to test, it should just work.Alright! Let's get this in production. This is as good as it gets in terms of testing for now until 4.3 comes out, but I think it will just work™ . It's similar to when Apple Silicon was added some time ago. And we will have to go through it again once Linux Arm builds are available.
Thanks!
Thank you for your approval and feedback. The pull request was merged to
main
. The temporary test page was cleaned up and removed. The changes will get deployed soon.Adding other architecture-based conditions later should be straightforward now that the
navigator.userAgentData.getHighEntropyValues
method's handling is present.