Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UWP port #23658

Closed
wants to merge 7 commits into from
Closed

Add UWP port #23658

Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Simplify build process for UWP app.

  • Loading branch information
jdm committed Jul 2, 2019
commit 51405479bc3d9da5214b077d4ea337e37d74b2aa
@@ -14,6 +14,7 @@ crate-type = ["rlib"]
[features]
azure_backend = ["canvas/azure_backend"]
debugmozjs = ["script/debugmozjs"]
egl = ["mozangle/egl"]
energy-profiling = ["profile_traits/energy-profiling"]
profilemozjs = ["script/profilemozjs"]
googlevr = ["webvr/googlevr"]
@@ -89,4 +90,4 @@ git = "https://github.com/servo/media"
git = "https://github.com/servo/media"

[target.'cfg(target_os = "windows")'.dependencies]
mozangle = { version = "0.2", features = ["egl"] }
mozangle = {version = "0.2"}
@@ -30,6 +30,7 @@ ProductName = "Servo"
azure_backend = ["libservo/azure_backend"]
default = ["unstable", "default-except-unstable"]
default-except-unstable = ["webdriver", "max_log_level"]
egl = ["libservo/egl"]
energy-profiling = ["libservo/energy-profiling"]
debugmozjs = ["libservo/debugmozjs"]
js_backtrace = ["libservo/js_backtrace"]
@@ -14,6 +14,7 @@ bench = false

[features]
azure_backend = ["simpleservo/azure_backend"]
egl = ["simpleservo/egl"]
raqote_backend = ["simpleservo/raqote_backend"]

[dependencies]
@@ -30,6 +30,7 @@ azure_backend = ["libservo/azure_backend"]
default = ["unstable", "default-except-unstable"]
default-except-unstable = ["webdriver", "max_log_level"]
debugmozjs = ["libservo/debugmozjs"]
egl = ["libservo/egl"]
energy-profiling = ["libservo/energy-profiling"]
googlevr = ["libservo/googlevr"]
js_backtrace = ["libservo/js_backtrace"]
@@ -25,6 +25,7 @@ azure_backend = ["simpleservo/azure_backend"]
debugmozjs = ["simpleservo/debugmozjs"]
default = ["unstable", "default-except-unstable"]
default-except-unstable = ["webdriver", "max_log_level"]
egl = ["simpleservo/egl"]
energy-profiling = ["simpleservo/energy-profiling"]
googlevr = ["simpleservo/googlevr"]
js_backtrace = ["simpleservo/js_backtrace"]
@@ -30,6 +30,7 @@ azure_backend = ["simpleservo/azure_backend"]
debugmozjs = ["simpleservo/debugmozjs"]
default = ["unstable", "default-except-unstable"]
default-except-unstable = ["webdriver", "max_log_level"]
egl = ["simpleservo/egl"]
energy-profiling = ["simpleservo/energy-profiling"]
googlevr = ["simpleservo/googlevr"]
js_backtrace = ["simpleservo/js_backtrace"]
@@ -30,7 +30,7 @@
from mach.registrar import Registrar

from mach_bootstrap import _get_exec_path
from servo.command_base import CommandBase, cd, call, check_call, BIN_SUFFIX
from servo.command_base import CommandBase, cd, call, check_call, BIN_SUFFIX, append_to_path_env
from servo.util import host_triple


@@ -193,6 +193,7 @@ class MachCommands(CommandBase):
default=None,
action='store_true',
help='Build the libsimpleservo library instead of the servo executable')
@CommandArgument('--uwp', default=None, action='store_true')
@CommandArgument('--with-frame-pointer',
default=None,
action='store_true',
@@ -202,7 +203,7 @@ class MachCommands(CommandBase):
def build(self, target=None, release=False, dev=False, jobs=None,
features=None, android=None, magicleap=None, no_package=False, verbose=False, very_verbose=False,
debug_mozjs=False, params=None, with_debug_assertions=False,
libsimpleservo=False, with_frame_pointer=False, with_raqote=False, without_wgl=False):
libsimpleservo=False, uwp=False, with_frame_pointer=False, with_raqote=False, without_wgl=False):

opts = params or []

@@ -284,6 +285,27 @@ def build(self, target=None, release=False, dev=False, jobs=None,
self.ensure_bootstrapped(target=target)
self.ensure_clobbered()

if uwp:
# Ensure that azure/skia is disabled.
with_raqote = True
# The WGL libraries aren't available to UWP apps.
without_wgl = True
# Don't try and build a desktop port.
libsimpleservo = True
# 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.2.1.13", "bin", "UAP", "x64"
),
env,
"LIB"
)
else:
# Non-UWP builds provide their own libEGL via mozangle.
features += ["egl"]

self.add_manifest_path(opts, android, libsimpleservo)

if debug_mozjs:
@@ -661,7 +683,8 @@ def package_generated_shared_libraries(libs, build_path, servo_exe_dir):
for lib in libs:
print("WARNING: could not find " + lib)

package_generated_shared_libraries(["libEGL.dll"], build_path, servo_exe_dir)
if not uwp:
package_generated_shared_libraries(["libEGL.dll"], build_path, servo_exe_dir)

# copy needed gstreamer DLLs in to servo.exe dir
target_triple = target or host_triple()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.