Skip to content

Commit eb377b1

Browse files
[CP-stable]Check that the windows architecture is 64-bit and not the process architecture (#174063)
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter/flutter#174017 ### Changelog Description: Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples Fixes an issue when running a 32-bit process on a 64-bit Windows system ### Impact Description: What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch) Cannot run ### Workaround: Is there a workaround for this issue? No ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: What are the steps to validate that this fix works? Trust the force.
1 parent 03e97fb commit eb377b1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bin/internal/shared.bat

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@ REM --------------------------------------------------------------------------
1313

1414
SETLOCAL
1515

16-
REM Ensure we are runnng on 64-bit windows (32-bit is not supported)
16+
REM Ensure we are running on 64-bit Windows (32-bit is not supported).
17+
REM If this is a 32-bit process emulated by WOW64,
18+
REM PROCESSOR_ARCHITECTURE is the process architecture and
19+
REM PROCESSOR_ARCHITEW6432 is the processor architecture.
1720
IF "%PROCESSOR_ARCHITECTURE%"=="x86" (
18-
ECHO Flutter requires 64-bit versions of Windows
19-
EXIT 1
21+
IF "%PROCESSOR_ARCHITEW6432%"=="" (
22+
ECHO Flutter requires 64-bit versions of Windows
23+
EXIT 1
24+
)
2025
)
2126

2227
SET flutter_tools_dir=%FLUTTER_ROOT%\packages\flutter_tools

0 commit comments

Comments
 (0)