diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94474a83..c089dfea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Install git, Java JDK (version >= 8), Maven (tested with version 3.6.3), on Ubun just run the following command: ```sh -sudo apt-get install git openjdk-11-jdk maven +sudo apt-get install git openjdk-11-jdk maven unzip ``` ### Getting the Code diff --git a/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java b/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java index 56944780..202a0871 100644 --- a/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java +++ b/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java @@ -139,11 +139,17 @@ public class DriverJar extends Driver { private static String platformDir() { String name = System.getProperty("os.name").toLowerCase(); + String arch = System.getProperty("os.arch").toLowerCase(); + if (name.contains("windows")) { return "win32_x64"; } if (name.contains("linux")) { - return "linux"; + if (arch.equals("aarch64")) { + return "linux-arm64"; + } else { + return "linux"; + } } if (name.contains("mac os x")) { return "mac"; diff --git a/scripts/download_driver_for_all_platforms.sh b/scripts/download_driver_for_all_platforms.sh index f5249e85..525e81fb 100755 --- a/scripts/download_driver_for_all_platforms.sh +++ b/scripts/download_driver_for_all_platforms.sh @@ -33,7 +33,7 @@ fi mkdir -p driver cd driver -for PLATFORM in mac linux win32_x64 +for PLATFORM in mac linux linux-arm64 win32_x64 do FILE_NAME=$FILE_PREFIX-$PLATFORM.zip if [[ -d $PLATFORM ]]; then