Skip to content

refactor: replace WMIC with PowerShell for CPU architecture detection #40

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

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1-dev
2.4.0-dev
2 changes: 1 addition & 1 deletion bin/phpsdk_setshell.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if NOT "%3"=="" SET TOOLSET=%3

rem check OS arch
rem todo: allow user choose host sdk arch (i.e. x64 target can be compiled at x64(native) or x86(cross))
for /f "usebackq tokens=1*" %%i in (`wmic cpu get Architecture /value /format:table ^| findstr /r "[1234567890][1234567890]*"`) do (
for /f "usebackq tokens=*" %%i in (`powershell -NoProfile -Command "Get-CimInstance -ClassName Win32_Processor | Select-Object -ExpandProperty Architecture"`) do (
set PHP_SDK_OS_ARCH_NUM=%%i
)

Expand Down