support packaging arthas-vmtool in 32-bit windows. (#2316)

pull/2322/head
pandaapo 2 years ago committed by GitHub
parent 1c17f9fd39
commit 7637761fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,6 +46,30 @@
</profile>
<!-- windows -->
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<os_name>windows</os_name>
</properties>
</profile>
<profile>
<id>windows-32</id>
<activation>
<os>
<family>windows</family>
<arch>x86</arch>
</os>
</activation>
<properties>
<os_arch_option>-m32</os_arch_option>
<lib_name>libArthasJniLibrary-x86.dll</lib_name>
</properties>
</profile>
<profile>
<id>windows-amd64</id>
<activation>
@ -55,7 +79,6 @@
</os>
</activation>
<properties>
<os_name>windows</os_name>
<os_arch_option>-m64</os_arch_option>
<lib_name>libArthasJniLibrary-x64.dll</lib_name>
</properties>

@ -67,6 +67,10 @@ public class OSUtils {
return "aarch_64".equals(arch);
}
public static boolean isX86() {
return "x86_32".equals(arch);
}
private static String normalizeArch(String value) {
value = normalize(value);
if (value.matches("^(x8664|amd64|ia32e|em64t|x64)$")) {

@ -21,6 +21,9 @@ public class VmToolUtils {
}
if (OSUtils.isWindows()) {
libName = "libArthasJniLibrary-x64.dll";
if (OSUtils.isX86()) {
libName = "libArthasJniLibrary-x86.dll";
}
}
}

Loading…
Cancel
Save