Skip to content

Migration from SystemInfo.isXXBit #7689

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 1 commit into from
Oct 10, 2024
Merged
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
12 changes: 7 additions & 5 deletions flutter-idea/src/io/flutter/utils/JxBrowserUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
package io.flutter.utils;

import com.intellij.openapi.util.SystemInfo;
import com.intellij.util.system.CpuArch;
import io.flutter.settings.FlutterSettings;
import org.jetbrains.annotations.NotNull;
// import com.intellij.util.system.CpuArch;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Objects;
import java.util.Properties;

public class JxBrowserUtils {
Expand All @@ -22,19 +23,20 @@ public class JxBrowserUtils {

public String getPlatformFileName() throws FileNotFoundException {
String name = "";
final boolean is64Bit = Objects.requireNonNull(CpuArch.CURRENT).width == 64;
if (SystemInfo.isMac) {
if (SystemInfo.OS_ARCH.equals("aarch64")) {
if (SystemInfo.isAarch64){
name = "mac-arm";
} else {
name = "mac";
}
} else if (SystemInfo.isWindows) {
if (SystemInfo.is32Bit) {
if (CpuArch.is32Bit()) {
name = "win32";
} else if (SystemInfo.is64Bit) {
} else if (is64Bit) {
name = "win64";
}
} else if (SystemInfo.isLinux && SystemInfo.is64Bit) {
} else if (SystemInfo.isLinux && is64Bit) {
name = "linux64";
}

Expand Down