diff --git a/.gitignore b/.gitignore index d7aae7e42..31577e7c2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,9 @@ # Maven output dir target/ - +.project +.classpath +.settings .DS_Store *.swp .vscode 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 880b25d40..29c21fa13 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 @@ -53,7 +53,7 @@ public class DriverJar extends Driver { private static String platformDir() { String name = System.getProperty("os.name").toLowerCase(); if (name.contains("windows")) { - return "win32_x64"; + return System.getProperty("os.arch").equals("amd64") ? "win32_x64" : "win32"; } if (name.contains("linux")) { return "linux"; @@ -69,7 +69,8 @@ private static Path extractResource(Path from, Path toDir) throws IOException { Files.copy(from, path); path.toFile().setExecutable(true); path.toFile().deleteOnExit(); -// System.out.println("extracting: " + from.toString() + " to " + path.toString()); + // System.out.println("extracting: " + from.toString() + " to " + + // path.toString()); return path; } diff --git a/scripts/download_driver_for_all_platforms.sh b/scripts/download_driver_for_all_platforms.sh index 8b5cf82b3..39cdeada8 100755 --- a/scripts/download_driver_for_all_platforms.sh +++ b/scripts/download_driver_for_all_platforms.sh @@ -19,7 +19,7 @@ fi mkdir -p driver cd driver -for PLATFORM in mac linux win32_x64 +for PLATFORM in mac linux win32 win32_x64 do FILE_NAME=$FILE_PREFIX-$PLATFORM.zip if [[ -d $PLATFORM ]]; then diff --git a/scripts/install_local_driver.sh b/scripts/install_local_driver.sh index de6f95463..beafd2906 100755 --- a/scripts/install_local_driver.sh +++ b/scripts/install_local_driver.sh @@ -29,10 +29,13 @@ Linux) FILE_NAME=${FILE_PREFIX}-linux.zip echo "Downloading driver for Linux" ;; -MINGW*) - FILE_NAME=${FILE_PREFIX}-win32_x64.zip +MINGW32*) + FILE_NAME=${FILE_PREFIX}-win32.zip echo "Downloading driver for Windows" ;; +MINGW64*) + FILE_NAME=${FILE_PREFIX}-win32_x64.zip + echo "Downloading driver for Windows" *) echo "Unknown platform '$(uname)'" exit 1;