From 4337b9bffaa1869af20157a8a3dbeaef404ac432 Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Sat, 15 Jul 2023 18:39:44 -0500 Subject: [PATCH] Copy .lib files on Windows --- scripts/build_runtime.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/build_runtime.py b/scripts/build_runtime.py index 8a676bd..754e03e 100644 --- a/scripts/build_runtime.py +++ b/scripts/build_runtime.py @@ -211,7 +211,9 @@ def ensure_angle(): if platform.system() == "Windows": checkfiles = [ "milepost/lib/libEGL.dll", + "milepost/lib/libEGL.dll.lib", "milepost/lib/libGLESv2.dll", + "milepost/lib/libGLESv2.dll.lib", ] elif platform.system() == "Darwin": if platform.machine() == "arm64": @@ -245,11 +247,11 @@ def download_angle(): print("Downloading ANGLE...") if platform.system() == "Windows": build = "windows-2019" - extension = "dll" + extensions = ["dll", "lib"] elif platform.system() == "Darwin": # TODO(ben): make universal dylibs build = "macos-12" - extension = "dylib" + extensions = ["dylib"] else: log_error(f"could not automatically download ANGLE for unknown platform {platform.system()}") return @@ -270,9 +272,11 @@ def download_angle(): with ZipFile(filepath, "r") as anglezip: anglezip.extractall(path="scripts/files") - for filepath in glob.glob(f"scripts/files/angle/bin/*.{extension}"): - os.makedirs("milepost/lib", exist_ok=True) - shutil.copy(filepath, "milepost/lib") + os.makedirs("milepost/lib", exist_ok=True) + for angleDir in ["bin", "lib"]: + for ext in extensions: + for filepath in glob.glob(f"scripts/files/angle/{angleDir}/*.{ext}"): + shutil.copy(filepath, "milepost/lib") def embed_text_glsl(outputpath, prefix, shaders):