File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
flutter-idea/src/io/flutter/utils Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 6
6
package io .flutter .utils ;
7
7
8
8
import com .intellij .openapi .util .SystemInfo ;
9
+ import com .intellij .util .system .CpuArch ;
9
10
import io .flutter .settings .FlutterSettings ;
10
11
import org .jetbrains .annotations .NotNull ;
11
- // import com.intellij.util.system.CpuArch;
12
12
13
13
import java .io .FileNotFoundException ;
14
14
import java .io .IOException ;
15
+ import java .util .Objects ;
15
16
import java .util .Properties ;
16
17
17
18
public class JxBrowserUtils {
@@ -22,19 +23,20 @@ public class JxBrowserUtils {
22
23
23
24
public String getPlatformFileName () throws FileNotFoundException {
24
25
String name = "" ;
26
+ final boolean is64Bit = Objects .requireNonNull (CpuArch .CURRENT ).width == 64 ;
25
27
if (SystemInfo .isMac ) {
26
- if (SystemInfo .OS_ARCH . equals ( "aarch64" )) {
28
+ if (SystemInfo .isAarch64 ) {
27
29
name = "mac-arm" ;
28
30
} else {
29
31
name = "mac" ;
30
32
}
31
33
} else if (SystemInfo .isWindows ) {
32
- if (SystemInfo .is32Bit ) {
34
+ if (CpuArch .is32Bit () ) {
33
35
name = "win32" ;
34
- } else if (SystemInfo . is64Bit ) {
36
+ } else if (is64Bit ) {
35
37
name = "win64" ;
36
38
}
37
- } else if (SystemInfo .isLinux && SystemInfo . is64Bit ) {
39
+ } else if (SystemInfo .isLinux && is64Bit ) {
38
40
name = "linux64" ;
39
41
}
40
42
You can’t perform that action at this time.
0 commit comments