diff options
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/build_commands.py | 29 | ||||
-rw-r--r-- | python/servo/packages.py | 1 |
2 files changed, 30 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 206d00250e6..76d75a0673b 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -696,6 +696,12 @@ class MachCommands(CommandBase): if not package_gstreamer_dlls(env, servo_exe_dir, target_triple, uwp): status = 1 + if uwp: + # copy needed openxr DLLs in to servo.exe dir + print("Packaging openxr DLLs") + if not self.package_openxr_dlls(env, servo_exe_dir, target_triple): + status = 1 + # UWP app packaging already bundles all required DLLs for us. print("Packaging MSVC DLLs") if not package_msvc_dlls(servo_exe_dir, target_triple, vcinstalldir, vs_version): @@ -746,6 +752,29 @@ class MachCommands(CommandBase): opts += params return check_call(["cargo", "clean"] + opts, env=self.build_env(), verbose=verbose) + def package_openxr_dlls(self, env, servo_exe_dir, target): + target_arch = target.split('-')[0] + if target_arch == "aarch64": + arch = "arm64" + elif target_arch == "x64": + arch = "x64" + else: + print("ERROR: We do not have openxr_loader DLLs for %s" % target_arch) + return False + + # The package on S3 contains both debug and release DLLs, but + # by default we only use release DLLs. If you need to debug OpenXR itself, + # change this to Debug. + dll_path = os.path.join(self.msvc_package_dir("openxr-loader-uwp"), arch, "Release", "openxr_loader.dll") + + try: + shutil.copy(dll_path, servo_exe_dir) + except: + print("ERROR: Could not find %s" % dll_path) + return False + + return True + def gstreamer_root(target, env): arch = { diff --git a/python/servo/packages.py b/python/servo/packages.py index 3fa2f036fb8..1da0d49b13d 100644 --- a/python/servo/packages.py +++ b/python/servo/packages.py @@ -9,4 +9,5 @@ WINDOWS_MSVC = { "ninja": "1.7.1", "openssl": "111.3.0+1.1.1c-vs2017", "gstreamer-uwp": "1.16.0.3", + "openxr-loader-uwp": "1.0", } |