From 5d3d766204fb24e44dee04fdf5f24e8c12047912 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 25 Jul 2019 12:02:32 -0400 Subject: [PATCH 1/6] Vendor UWP GStreamer binaries. --- python/servo/build_commands.py | 77 +++++++++++++------ python/servo/command_base.py | 24 +++--- python/servo/packages.py | 1 + support/hololens/ServoApp/ServoApp.vcxproj | 64 +-------------- .../ServoApp/ServoApp.vcxproj.filters | 32 +------- 5 files changed, 68 insertions(+), 130 deletions(-) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index f434ea4222e..591a2fc4b20 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -268,26 +268,54 @@ class MachCommands(CommandBase): print("Can't find Visual Studio 2017 installation at %s." % base_vs_path) sys.exit(1) - if 'windows' in target_triple: - gst_root = gstreamer_root(target_triple) - if gst_root: - append_to_path_env(os.path.join(gst_root, "lib"), env, "LIB") - if uwp: # Don't try and build a desktop port. libsimpleservo = True + arches = { + "aarch64": { + "angle": "arm64", + "gst": "ARM64", + "gst_root": "arm64", + }, + "x86_64": { + "angle": "x64", + "gst": "X86_64", + "gst_root": "x64", + }, + } + arch = arches.get(target_triple.split('-')[0]) + if not arch: + print("Unsupported UWP target.") + sys.exit(1) + # Ensure that the NuGet ANGLE package containing libEGL is accessible # to the Rust linker. append_to_path_env( path.join( os.getcwd(), "support", "hololens", "packages", - "ANGLE.WindowsStore.Servo.2.1.13", "bin", "UAP", "x64" + "ANGLE.WindowsStore.Servo.2.1.13", "bin", "UAP", arch['angle'] ), env, "LIB" ) + # Don't want to mix non-UWP libraries with vendored UWP libraries. + if "gstreamer" in env['LIB']: + print("Found existing GStreamer library path in LIB. Please remove it.") + sys.exit(1) + + # Override any existing GStreamer installation with the vendored libraries. + env["GSTREAMER_1_0_ROOT_" + arch['gst']] = path.join( + self.msvc_package_dir("gstreamer-uwp"), arch['gst_root'] + ) + + # Ensure that GStreamer libraries are accessible when linking. + if 'windows' in target_triple: + gst_root = gstreamer_root(target_triple, env) + if gst_root: + append_to_path_env(os.path.join(gst_root, "lib"), env, "LIB") + if android: if "ANDROID_NDK" not in env: print("Please set the ANDROID_NDK environment variable.") @@ -632,18 +660,21 @@ class MachCommands(CommandBase): for lib in libs: print("WARNING: could not find " + lib) + # UWP build has its own ANGLE library that it packages. if not uwp: package_generated_shared_libraries(["libEGL.dll", "libGLESv2.dll"], build_path, servo_exe_dir) # copy needed gstreamer DLLs in to servo.exe dir - if "aarch64" not in target_triple: - print("Packaging gstreamer DLLs") - if not package_gstreamer_dlls(servo_exe_dir, target_triple, uwp): - status = 1 - print("Packaging MSVC DLLs") - if not package_msvc_dlls(servo_exe_dir, target_triple, vcinstalldir, vs_version): + print("Packaging gstreamer DLLs") + if not package_gstreamer_dlls(env, servo_exe_dir, target_triple, uwp): status = 1 + # UWP app packaging already bundles all required DLLs for us. + if not uwp: + print("Packaging MSVC DLLs") + if not package_msvc_dlls(servo_exe_dir, target_triple, vcinstalldir, vs_version): + status = 1 + elif sys.platform == "darwin": # On the Mac, set a lovely icon. This makes it easier to pick out the Servo binary in tools # like Instruments.app. @@ -690,7 +721,7 @@ class MachCommands(CommandBase): return check_call(["cargo", "clean"] + opts, env=self.build_env(), verbose=verbose) -def gstreamer_root(target): +def gstreamer_root(target, env): arch = { "x86_64": "X86_64", "x86": "X86", @@ -699,25 +730,26 @@ def gstreamer_root(target): gst_x64 = arch[target.split('-')[0]] gst_default_path = path.join("C:\\gstreamer\\1.0", gst_x64) gst_env = "GSTREAMER_1_0_ROOT_" + gst_x64 - if os.environ.get(gst_env) is not None: - return os.environ.get(gst_env) + if env.get(gst_env) is not None: + return env.get(gst_env) elif os.path.exists(path.join(gst_default_path, "bin", "ffi-7.dll")): return gst_default_path else: return None -def package_gstreamer_dlls(servo_exe_dir, target, uwp): - gst_root = gstreamer_root(target) +def package_gstreamer_dlls(env, servo_exe_dir, target, uwp): + gst_root = gstreamer_root(target, env) if not gst_root: print("Could not find GStreamer installation directory.") return False # All the shared libraries required for starting up and loading plugins. gst_dlls = [ + "avcodec-58.dll", "avfilter-7.dll", "avformat-58.dll", - "avcodec-58.dll", + "avresample-4.dll", "avutil-56.dll", "bz2.dll", "ffi-7.dll", @@ -743,15 +775,13 @@ def package_gstreamer_dlls(servo_exe_dir, target, uwp): "gstwebrtc-1.0-0.dll", "intl-8.dll", "orc-0.4-0.dll", + "postproc-55.dll", "swresample-3.dll", + "swscale-5.dll", + "x264-157.dll", "z-1.dll", ] - # FIXME: until we build with UWP-enabled GStreamer binaries, - # almost every UWP-friendly DLL depends on this - # incompatible DLL. - gst_dlls += ["libwinpthread-1.dll"] - if not uwp: gst_dlls += [ "graphene-1.0-0.dll", @@ -770,6 +800,7 @@ def package_gstreamer_dlls(servo_exe_dir, target, uwp): "libtheoraenc-1.dll", "libvorbis-0.dll", "libvorbisenc-2.dll", + "libwinpthread-1.dll", "nice-10.dll", ] diff --git a/python/servo/command_base.py b/python/servo/command_base.py index e8807397034..b4e5c5d942f 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -576,6 +576,9 @@ install them, let us know by filing a bug!") os.environ["PKG_CONFIG_PATH"] = path.join(gstpath, "lib", "pkgconfig") os.environ["GST_PLUGIN_SCANNER"] = path.join(gstpath, "libexec", "gstreamer-1.0", "gst-plugin-scanner") + def msvc_package_dir(self, package): + return path.join(self.context.sharedir, "msvc-dependencies", package, msvc_deps[package]) + def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit=False): """Return an extended environment dictionary.""" env = os.environ.copy() @@ -590,14 +593,9 @@ install them, let us know by filing a bug!") extra_path = [] extra_lib = [] if "msvc" in (target or host_triple()): - msvc_deps_dir = path.join(self.context.sharedir, "msvc-dependencies") - - def package_dir(package): - return path.join(msvc_deps_dir, package, msvc_deps[package]) - - extra_path += [path.join(package_dir("cmake"), "bin")] - extra_path += [path.join(package_dir("llvm"), "bin")] - extra_path += [path.join(package_dir("ninja"), "bin")] + extra_path += [path.join(self.msvc_package_dir("cmake"), "bin")] + extra_path += [path.join(self.msvc_package_dir("llvm"), "bin")] + extra_path += [path.join(self.msvc_package_dir("ninja"), "bin")] arch = (target or host_triple()).split('-')[0] vcpkg_arch = { @@ -605,7 +603,7 @@ install them, let us know by filing a bug!") "i686": "x86-windows", "aarch64": "arm64-windows", } - openssl_base_dir = path.join(package_dir("openssl"), vcpkg_arch[arch]) + openssl_base_dir = path.join(self.msvc_package_dir("openssl"), vcpkg_arch[arch]) # Link openssl env["OPENSSL_INCLUDE_DIR"] = path.join(openssl_base_dir, "include") @@ -613,13 +611,13 @@ install them, let us know by filing a bug!") env["OPENSSL_LIBS"] = "libssl:libcrypto" # Link moztools, used for building SpiderMonkey env["MOZTOOLS_PATH"] = os.pathsep.join([ - path.join(package_dir("moztools"), "bin"), - path.join(package_dir("moztools"), "msys", "bin"), + path.join(self.msvc_package_dir("moztools"), "bin"), + path.join(self.msvc_package_dir("moztools"), "msys", "bin"), ]) # Link autoconf 2.13, used for building SpiderMonkey - env["AUTOCONF"] = path.join(package_dir("moztools"), "msys", "local", "bin", "autoconf-2.13") + env["AUTOCONF"] = path.join(self.msvc_package_dir("moztools"), "msys", "local", "bin", "autoconf-2.13") # Link LLVM - env["LIBCLANG_PATH"] = path.join(package_dir("llvm"), "lib") + env["LIBCLANG_PATH"] = path.join(self.msvc_package_dir("llvm"), "lib") if not os.environ.get("NATIVE_WIN32_PYTHON"): env["NATIVE_WIN32_PYTHON"] = sys.executable diff --git a/python/servo/packages.py b/python/servo/packages.py index 2d10156ad22..3fa2f036fb8 100644 --- a/python/servo/packages.py +++ b/python/servo/packages.py @@ -8,4 +8,5 @@ WINDOWS_MSVC = { "moztools": "3.2", "ninja": "1.7.1", "openssl": "111.3.0+1.1.1c-vs2017", + "gstreamer-uwp": "1.16.0.3", } diff --git a/support/hololens/ServoApp/ServoApp.vcxproj b/support/hololens/ServoApp/ServoApp.vcxproj index 382b1f6d8b4..660db42cc15 100644 --- a/support/hololens/ServoApp/ServoApp.vcxproj +++ b/support/hololens/ServoApp/ServoApp.vcxproj @@ -177,21 +177,11 @@ true false - - true - true - false - true true false - - true - true - false - true true @@ -202,28 +192,11 @@ true false - - true - true - false - true true false - - true - true - false - - - true - true - false - true - false - true true @@ -567,13 +540,6 @@ true false - - true - true - false - true - false - true true @@ -602,13 +568,6 @@ true false - - true - true - false - true - false - true true @@ -616,13 +575,6 @@ true false - - true - true - false - true - false - true true @@ -966,13 +918,6 @@ true false - - true - true - false - true - false - true true @@ -1001,13 +946,6 @@ true false - - true - true - false - true - false - true true @@ -1091,4 +1029,4 @@ - + \ No newline at end of file diff --git a/support/hololens/ServoApp/ServoApp.vcxproj.filters b/support/hololens/ServoApp/ServoApp.vcxproj.filters index 84dbece0986..364be5f1e6a 100644 --- a/support/hololens/ServoApp/ServoApp.vcxproj.filters +++ b/support/hololens/ServoApp/ServoApp.vcxproj.filters @@ -90,9 +90,6 @@ Content - - DebugServoDLLs - DebugServoDLLs @@ -243,27 +240,18 @@ DebugServoDLLs - - DebugServoDLLs - DebugServoDLLs DebugServoDLLs - - DebugServoDLLs - DebugServoDLLs ReleaseServoDLLs - - ReleaseServoDLLs - ReleaseServoDLLs @@ -273,9 +261,6 @@ ReleaseServoDLLs - - ReleaseServoDLLs - ReleaseServoDLLs @@ -426,9 +411,6 @@ ReleaseServoDLLs - - ReleaseServoDLLs - DebugServoDLLs @@ -438,30 +420,18 @@ DebugARM64ServoDLLs - - DebugARM64ServoDLLs - DebugARM64ServoDLLs - - DebugARM64ServoDLLs - ReleaseARM64ServoDLLs ReleaseARM64ServoDLLs - - ReleaseARM64ServoDLLs - ReleaseARM64ServoDLLs - - ReleaseARM64ServoDLLs - @@ -509,4 +479,4 @@ - + \ No newline at end of file From bcbd425ef502ce07c6723ad9e8ab0802c91100b7 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 26 Jul 2019 09:59:32 -0400 Subject: [PATCH 2/6] Load GStreamer plugins in UWP builds. --- components/servo/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/servo/lib.rs b/components/servo/lib.rs index a64972bc1a7..1ffd3e6818d 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -134,8 +134,15 @@ mod media_platform { #[cfg(windows)] pub fn init() { - let mut plugin_dir = std::env::current_exe().unwrap(); - plugin_dir.pop(); + // UWP apps have the working directory set appropriately. Win32 apps + // do not and need some assistance finding the DLLs. + let plugin_dir = if cfg!(feature = "uwp") { + std::path::PathBuf::new() + } else { + let mut plugin_dir = std::env::current_exe().unwrap(); + plugin_dir.pop(); + plugin_dir + }; let uwp_plugins = [ "gstapp.dll", From 817a7fe2af10b1c5d54415d7aa8404e12f40384f Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 26 Jul 2019 09:59:52 -0400 Subject: [PATCH 3/6] Add more DLLs to UWP app. --- support/hololens/ServoApp/ServoApp.vcxproj | 596 +++++++++------- .../ServoApp/ServoApp.vcxproj.filters | 646 +++++++++++++----- 2 files changed, 852 insertions(+), 390 deletions(-) diff --git a/support/hololens/ServoApp/ServoApp.vcxproj b/support/hololens/ServoApp/ServoApp.vcxproj index 660db42cc15..4e983900576 100644 --- a/support/hololens/ServoApp/ServoApp.vcxproj +++ b/support/hololens/ServoApp/ServoApp.vcxproj @@ -78,7 +78,13 @@ ServoApp_TemporaryKey.pfx - 1132EA939A7107B303D4D40ED6CE28778FC96409 + E4C66C57CCCED9BC20D14168E6D07460DC1EC503 + False + False + Always + x64 + 1 + OnApplicationRun @@ -167,35 +173,347 @@ Designer + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + true - true - false true - true - false + + + true + + + true true - true - false + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true true - true - false true - true - false + + + true + + + true true - true - false + + + true + + + true + + + true + + + true true @@ -218,6 +536,9 @@ true false + + true + true true @@ -533,13 +854,6 @@ true false - - true - true - false - true - false - true true @@ -547,6 +861,9 @@ true false + + true + true true @@ -568,6 +885,12 @@ true false + + true + + + true + true true @@ -577,353 +900,159 @@ true - true - false - true - false true - true - false - true - false true - true - false - true - false + + + true true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false true - true - false - true - false + + + true true - true - false - true - false - - - true - true - false - true - false true - true - false - true - false + + + true true @@ -932,26 +1061,17 @@ true false - - true - true - false - true - false - true - true - false - true - false + + + true + + + true true - true - false - true - false diff --git a/support/hololens/ServoApp/ServoApp.vcxproj.filters b/support/hololens/ServoApp/ServoApp.vcxproj.filters index 364be5f1e6a..d097f65444e 100644 --- a/support/hololens/ServoApp/ServoApp.vcxproj.filters +++ b/support/hololens/ServoApp/ServoApp.vcxproj.filters @@ -237,9 +237,6 @@ DebugServoDLLs - - DebugServoDLLs - DebugServoDLLs @@ -249,170 +246,335 @@ DebugServoDLLs - - ReleaseServoDLLs - - - ReleaseServoDLLs - ReleaseServoDLLs - - ReleaseServoDLLs + + DebugServoDLLs - - ReleaseServoDLLs + + DebugServoDLLs - - ReleaseServoDLLs + + DebugServoDLLs - - ReleaseServoDLLs + + DebugServoDLLs - - ReleaseServoDLLs + + DebugServoDLLs - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - - ReleaseServoDLLs - - + ReleaseServoDLLs ReleaseServoDLLs - + ReleaseServoDLLs - - DebugServoDLLs + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + ReleaseServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs DebugARM64ServoDLLs @@ -420,18 +582,198 @@ DebugARM64ServoDLLs + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + DebugARM64ServoDLLs + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + DebugARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + ReleaseARM64ServoDLLs ReleaseARM64ServoDLLs + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + ReleaseARM64ServoDLLs + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + + + ReleaseARM64ServoDLLs + From 9336931377ecf348f5f8c30a5e7c4016a04214f9 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 26 Jul 2019 13:25:18 -0400 Subject: [PATCH 4/6] Fix CI builds. --- etc/taskcluster/decision_task.py | 2 +- python/servo/build_commands.py | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 17019fd4211..d48b16583c0 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -129,7 +129,7 @@ windows_build_env = { }, "arm64": { "PKG_CONFIG_ALLOW_CROSS": "1", - # No GStreamer support for arm64 windows yet. + "GSTREAMER_1_0_ROOT_ARM64": "%HOMEDRIVE%%HOMEPATH%\\repo\\.servo\\msvc-dependencies\\gstreamer-uwp\\1.16.0.3\\arm64\\", }, "all": { "PYTHON3": "%HOMEDRIVE%%HOMEPATH%\\python3\\python.exe", diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 591a2fc4b20..2749ca7055b 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -749,7 +749,6 @@ def package_gstreamer_dlls(env, servo_exe_dir, target, uwp): "avcodec-58.dll", "avfilter-7.dll", "avformat-58.dll", - "avresample-4.dll", "avutil-56.dll", "bz2.dll", "ffi-7.dll", @@ -775,14 +774,22 @@ def package_gstreamer_dlls(env, servo_exe_dir, target, uwp): "gstwebrtc-1.0-0.dll", "intl-8.dll", "orc-0.4-0.dll", - "postproc-55.dll", "swresample-3.dll", - "swscale-5.dll", - "x264-157.dll", "z-1.dll", ] - if not uwp: + if uwp: + # These come from a more recent version of ffmpeg and + # aren't present in the official GStreamer 1.16 release. + gst_dlls += [ + "avresample-4.dll", + "postproc-55.dll", + "swscale-5.dll", + "x264-157.dll", + ] + else: + # These are built with MinGW and are not yet compatible + # with UWP's restrictions. gst_dlls += [ "graphene-1.0-0.dll", "gstsctp-1.0-0.dll", From e9a7544e7e4daedba0db31dc1a9432cf7fdb38da Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 26 Jul 2019 13:27:09 -0400 Subject: [PATCH 5/6] Load GStreamer plugins on Windows arm64. --- components/servo/Cargo.toml | 4 ++-- components/servo/lib.rs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index cc158af843f..ce4ca523b0f 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -85,10 +85,10 @@ webxr-api = {git = "https://github.com/servo/webxr"} [target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64")))'.dependencies] gaol = {git = "https://github.com/servo/gaol"} -[target.'cfg(any(all(target_os = "android", target_arch = "arm"), target_arch = "x86_64"))'.dependencies.servo-media-gstreamer] +[target.'cfg(any(all(target_os = "android", target_arch = "arm"), target_arch = "x86_64", all(target_os = "windows", target_arch = "aarch64")))'.dependencies.servo-media-gstreamer] git = "https://github.com/servo/media" -[target.'cfg(not(any(all(target_os = "android", target_arch = "arm"), target_arch = "x86_64")))'.dependencies.servo-media-dummy] +[target.'cfg(not(any(all(target_os = "android", target_arch = "arm"), target_arch = "x86_64", all(target_os = "windows", target_arch = "aarch64"))))'.dependencies.servo-media-dummy] git = "https://github.com/servo/media" [target.'cfg(target_os = "windows")'.dependencies] diff --git a/components/servo/lib.rs b/components/servo/lib.rs index 1ffd3e6818d..0f3cc8c5f0e 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -126,7 +126,8 @@ pub use servo_url as url; #[cfg(any( all(target_os = "android", target_arch = "arm"), - target_arch = "x86_64" + target_arch = "x86_64", + all(target_os = "windows", target_arch = "aarch64"), ))] mod media_platform { use super::ServoMedia; @@ -207,7 +208,8 @@ mod media_platform { #[cfg(not(any( all(target_os = "android", target_arch = "arm"), - target_arch = "x86_64" + target_arch = "x86_64", + all(target_os = "windows", target_arch = "aarch64"), )))] mod media_platform { use super::ServoMedia; From 81914e5f3aead4110ea9de06f9f20a2026ba0ea9 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 26 Jul 2019 15:56:00 -0400 Subject: [PATCH 6/6] Build with UWP configuration on CI. --- etc/taskcluster/decision_task.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index d48b16583c0..de947985bc7 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -129,7 +129,6 @@ windows_build_env = { }, "arm64": { "PKG_CONFIG_ALLOW_CROSS": "1", - "GSTREAMER_1_0_ROOT_ARM64": "%HOMEDRIVE%%HOMEPATH%\\repo\\.servo\\msvc-dependencies\\gstreamer-uwp\\1.16.0.3\\arm64\\", }, "all": { "PYTHON3": "%HOMEDRIVE%%HOMEPATH%\\python3\\python.exe", @@ -377,12 +376,15 @@ def windows_arm64(): return ( windows_build_task("Dev build", arch="arm64", package=False) .with_treeherder("Windows arm64") - .with_script( - "python mach build --dev --libsimpleservo \ - --target aarch64-pc-windows-msvc \ - --with-raqote \ - --without-wgl", + .with_file_mount( + "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe", + path="nuget.exe" ) + .with_script( + "%HOMEDRIVE%%HOMEPATH%\\nuget.exe install ANGLE.WindowsStore.Servo \ + -Version 2.1.13 -o %HOMEDRIVE%%HOMEPATH%\\repo\\support\\hololens\\packages", + ) + .with_script("python mach build --dev --uwp --win-arm64") .find_or_create("build.windows_arm64_dev." + CONFIG.task_id()) )