aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/platform/windows.py
Commit message (Collapse)AuthorAgeFilesLines
* mach: introduce `BuildTarget` abstraction (#33114)Mukilan Thiyagarajan2024-08-261-10/+13
| | | | | | | | | | | | | | | | Introduce a new `BuildTarget` abstraction to centralize the code for supporting different ways of choosing the build target (e.g --android, --target x86_64-linux-android , --target aarch64-linux-ohos). This is currently handled in an adhoc fashion in different commands ( mach package, install, run) leading to a proliferation of keyword parameters for the commands and duplicated logic. The patch introduces a new `allow_target_configuration` decorator to do the validation and parsing of these parameters into the appropriate `BuildTarget` subclass, which is now stored as an instance attribute of the CommandBase class. All the code that previously relied on `self.cross_compile_target` has been switched to use the BuildTarget. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* mach: Add support for paths with spaces on Windows (#32936)Mukilan Thiyagarajan2024-08-051-12/+18
| | | | | | | | | | | | | | | | The default user name in Windows installations is of the form "FirstName LastName", so it seems likely that there will be spaces in the user's path. Based on my testing on Windows 11, the only Servo's bootstrap script has trouble dealing with spaces in paths. This patch fixes that by quoting such paths correctly. Our direct and indirect dependencies seem to handle these without issue and Servo does build and run correctly with this patch. In this patch, the logic for gstreamer bootstrap now uses powershell instead of directly invoking msiexec.exe via cmd.exe as I was unable to get the installer to run correctly, even with quoting. Some extra hacks were necessary to propagate the exit code correctly to mach. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* tests: Add GStreamer library directory to DYLD_LIBRARY_PATH (#31163)Martin Robinson2024-01-241-3/+0
| | | | | | | This fixes an issue where the dylib for harfbuzz cannot be found when running unit tests on some systems, because unit tests don't get their rpaths adjusted during build. This is quite likely an issue with dylib dependency management. We just need a bit more exploration of how this is traditionally handled.
* Upgrade media / GStreamer / GLib (#30750)Martin Robinson2024-01-051-5/+5
| | | | | | | | | | | | | | | | | | - Upgrade the version of GStreamer for Windows This upgrades the Windows build to use the most recent version of GStreamer. This is necessary to upgrade our GStreamer dependency. - Stop shipping GStreamer binaries on Linux The binary bundle of GStreamer that we package is not used to compile -- only to run layout tests. It's too old for the APIs that we are using (as evidenced by needed 1.18 for WebRTC) and nowadays Linux distributions carry a new version so it's unecessary for our build machines. No longer using this binary bundle will allow us to upgrade our GStreamer dependency -- which now has stricter checks that we are using at least version 1.18. - Upgrade media to use newer versions of GStreamer / GLib dependencies
* Download Windows GStreamer dependencies from GitHub (#30973)Martin Robinson2024-01-031-1/+1
| | | | This works around issues where the server is rejecting our requests and should be more reliable.
* Use MozTools 4 and update mozjs (#30326)Samson2023-09-111-1/+1
| | | | | | | | | | | | | | | | | | | * Update mozjs * moztools4 in bootstrap * no autoconf * tidy * switch to servo-build-deps * update mozjs for real * glue mozjs * fmt * move to servo/mozjs
* Get LLVM from chocolatey (#30140)Martin Robinson2023-08-211-1/+0
| | | | | | | | | | | | LLVM is the largest package that we get from servo-build-deps, so installing it via chocolatey should reduce the amount of data that we transfer from that source. In addition, it's one less dependency that we have to manage. It also seems that installing LLVM to the default location with choco means that we no longer have to set the LIBCLANG_PATH environment variable for bindgen. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Switch to rustls and webpki-roots (#30025)Martin Robinson2023-08-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change replaces OpenSSL with rustls and also the manually curated CA certs file with webpki-roots (effectively the same thing, but as a crate). Generally speaking the design of the network stack is the same. Changes: - Code around certificate overrides needed to be refactored to work with rustls so the various thread-safe list of certificates is refactored into `CertificateErrorOverrideManager` - hyper-rustls takes care of setting ALPN protocols for HTTP requests, so for WebSockets this is moved to the WebSocket code. - The safe set of cypher suites is chosen, which seem to correspond to the "Modern" configuration from [1]. This can be adjusted later. - Instead of passing a string of PEM CA certificates around, an enum is used that includes parsed Certificates (or the default which reads them from webpki-roots). - Code for starting up an SSL server for testing is cleaned up a little, due to the fact that the certificates need to be overriden explicitly now. This is due to the fact that the `webpki` crate is more stringent with self-signed certificates than SSL (CA certificates cannot used as end-entity certificates). [2] 1. https://wiki.mozilla.org/Security/Server_Side_TLS 2. https://github.com/briansmith/webpki/issues/114 Fixes #7888. Fixes #13749. Fixes #26835. Fixes #29291.
* `mach bootstrap` should also bootstrap GStreamer on Windows (#30018)Martin Robinson2023-07-211-1/+2
| | | Fixes #30007.
* Remove UWP / Hololens supportMartin Robinson2023-07-051-2/+0
|
* Windows bootstrap supportMartin Robinson2023-07-031-44/+44
|
* Implement `bootstrap-gstreamer` for all platformsMartin Robinson2023-05-251-10/+87
| | | | | | | | | | | | | | | | | | This change makes it so that the Platform classes can now handle installing GStreamer dependencies and properly setting up the environment including when cross-compiling. For Windows and Linux is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition: 1. Creating and moving existing environment path append helpers to `util.py`. 2. Combining the `set_run_env` and `build_dev` functions and moving some outside code into them so that it can be shared. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. 3. Adding Python typing information in many places. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Start organizing platform-specific Python codeMartin Robinson2023-05-191-0/+98
This starts to split platform-specific Python code into its own module, which should help to tidy up our mach commands and make things more reusable.