aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/platform
Commit message (Collapse)AuthorAgeFilesLines
* Check for existence of 'sudo' on Linux in ./mach bootstrap (#35739)Tom Overlund2025-03-281-0/+14
| | | | | | | | | | | | | * Check for existence of sudo command in ./mach bootstrap on Linux (#35736) Signed-off-by: Tom Overlund <tomov@dilacero.org> * Remove extraneous semicolon from previous commit (test-tidy fix). Signed-off-by: Tom Overlund <tomov@dilacero.org> --------- Signed-off-by: Tom Overlund <tomov@dilacero.org>
* Install tshark for automated tests in #36033 (#36201)Delan Azabani2025-03-281-7/+8
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* mach: Install Rust toolchain during bootstrap if needed (#35795)Delan Azabani2025-03-051-0/+9
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* sync cargo-deny version in python/servo/platform/base.py (#35730)Yerkebulan Tulibergenov2025-03-011-2/+2
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* Fix android build on arm macs (#35516)Jonathan Schwender2025-02-181-1/+16
| | | | | | | | | | The prebuilt directory only contains an `darwin-x86_64` toolchain, but that is perfectly fine, since that also works. In General, if there is only one prebuilt toolchain available, it should be a very safe assumption that it is usable on the host platform, especially if the OS matches. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* tidy: Use more `cargo-deny` features (#34447)Martin Robinson2024-12-131-2/+10
| | | | | | | | | | | | Instead of parsing the `Cargo.lock` file directly in `tidy.py`. Use `cargo-deny`, which we already use to detect unapproved licenses in the dependency chain to detect duplicate and banned crates. In addition, enable all other `cargo-deny` checks and add exceptions where necessary for them. This depends on the latest release of `cargo-deny` which depends on a recent verison of `rust`. Fixes #34393. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* build: upgrade rustc to 1.81.0 (#34270)Mukilan Thiyagarajan2024-12-121-2/+1
| | | Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Remove etc/shell.nix in favour of shell.nix (#34336)Delan Azabani2024-11-221-1/+1
| | | Signed-off-by: Delan Azabani <dazabani@igalia.com>
* ohos: Add basic IME and keyboard support (#34188)Jonathan Schwender2024-11-151-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ohos: Add basic IME and keyboard support - Add extremely basic support for keyboard events - Add basic IME support - Showing and hiding the IME - inserting text - deleting characters - very basic configuration of the IME Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Apply suggestions from code review Improve the log message Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * Update ports/servoshell/egl/ohos.rs Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * ohos: Bump the minimum required SDK version to 5.0 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Remove pub from callbacks The callbacks don't need to be public, as we will be registering them. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Rename composition event Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: clippy in log Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: address some clippy warnings Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Raise Error in mach if unsupported SDK version is used. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Add keyboard-types dependency for android Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
* mach bootstrap: Lock cargo-deny to 0.16.1 (#34258)Jonathan Schwender2024-11-151-1/+2
| | | | | | As mentioned in https://github.com/servo/servo/pull/34257 we should also lock the cargo-deny version in mach bootstrap. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Fix mach build on windows hosts (#34113)Jonathan Schwender2024-11-021-19/+20
| | | | | | | | | | | | | | | | | | | | | | | With the latest release (5.0) of the OpenHarmony SDK libclang.dll is now available and we can support building for OpenHarmony from windows hosts. Other changes required for building OH on windows: - We can't use the `<target_triple>-clang` wrappers, since those are bash scripts, which fails on windows when cc-rs tries to directly call them. However, we already pass all the required flags the wrapper script would set, so this is not an issue. - We need to use posix paths, otherwise the sysroot parameter will not be applied correctly (by bindgen). It seems to only cause issues with bindgen in practice, possibly because bindgen interprets the path with [`shlex::split`](https://github.com/rust-lang/rust-bindgen/blob/8a6d851318153b7304b651a7fd8f559938683de3/bindgen/lib.rs#L312C27-L312C40) which presumably causes the issues with windows paths. To be consistent I decided to use posix paths for all paths. - Fix checks for copying dlls. We need to check the target OS, not the host OS when determining what libraries to copy. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Fix CMake issues on OpenHarmony (#34062)Jonathan Schwender2024-10-301-1/+3
| | | | | | | | | | - We should use the CMake version from the NDK - ignore errors from unused commandline parameters, which can easily happen due to --gcc-toolchain, which is added by the default CMake code when compiling with Clang. - Previously servo didn't have any CMake dependency projects anymore, so these issues didn't surface. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* ohos: Support product flavors (#33512)Jonathan Schwender2024-09-261-2/+4
| | | | | | | | | | | | | | | | | | | * ohos: Support product flavors Support different product flavors (e.g. with different signing configurations) by supporting --flavor on ohos. The flavor influences the package path for OH packages, so allow the flavor parameter on build + package + install Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * Fix smoketest Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* openharmony: add servoshell for ohos (#33295)Mukilan Thiyagarajan2024-09-201-0/+25
| | | | | | | | | | | | | * openharmony: add servoshell for ohos Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ohos: handle missing signing config on forks Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* bootstrap: Avoid needless sudo when pkgs are installed (#33281)Jonathan Schwender2024-09-021-4/+7
| | | | | | | | | | | | - Previously on fedora `./mach bootstrap` would always detect it needs to reinstall packages and require root permissions. - use custom queryformat for `rpm -qa` to to just get the package name (e.g. `openssl-libs` instead of `openssl-libs-3.2.2-3.fc40.i686` - Use a list to store the output result instead of one string - Fedora (40) installs `zlib-ng` instead of `zlib` and `libjpeg-turbo` instead of `libjpeg`, meaning that `rpm` / dnf commands report `zlib` as not installed. Specifying the actually installed package avoids this problem. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Fixed build error on macos (#33200)Ben2024-08-271-1/+1
| | | | | | This was due to uname reporting the architecture as arm64 instead of aarch64 on macos Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de>
* mach: introduce `BuildTarget` abstraction (#33114)Mukilan Thiyagarajan2024-08-265-27/+408
| | | | | | | | | | | | | | | | 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>
* build: Speed up first run after build on macOS (#32928)Martin Robinson2024-08-041-1/+1
| | | | | | | | | | | | | | GStreamer has to process plugins each time they are added when initializing. When those files have changed, this triggers macOS security protections which can add many seconds to access time. This change eliminates that problem after the first packaging of libraries by skipping packaging if everything is up-to-date and not overwriting the dylibs everytime. In addition, it moves a lot of the code for packaging GStreamer libraries on macOS into the `gstreamer` module and adds type-safety and comments to the Python. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* mach: Expose a `--skip-static-analysis` to `mach boostrap` (#32587)Martin Robinson2024-06-241-4/+5
| | | | | This should speed up runners which just need to run the WPT tests. Fixes #32582.
* Add cargo-deny to mach-tidy to check license compliance. (#32465)Jonathan Schwender2024-06-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | * Use cargo-deny to check license compliance. All licenses should be MPL-2.0 or weaker. * Run cargo-deny check licenses in mach tidy * fmt * Fix inverted boolean * Move cargo deny to tidy.py * Add quotes around license in error message * Integrate `cargo-deny` into tidy fully * Fix script tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix mach bootstrap --skip-platform (#32341)Delan Azabani2024-05-221-1/+2
|
* Skip installing 'clang' if 'clang' binary already exists (#32242)Diego Pino2024-05-081-0/+5
| | | | | | | | | | | Simply installing 'clang' installs the default version of Clang for Linux. For instance, the command: 'apt install clang' installs 'clang-14' in Ubuntu 22.04. It might be possible that a more recent version of clang is already installed in the system. For instance, package 'clang-17'. In the case a 'clang' binary is already installed in the system, skip the installation of 'clang'.
* servoshell: Upgrade `egui` and many other dependencies (#31278)Magnus Larsen2024-05-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * servoshell: Upgrade `egui` and many other dependencies This upgrades: - `core-graphics` - `core-text` - `egui` and friends - `font-kit` - `glow` and friends - `harfbuzz-sys` - `jni` - `nix` - `raqote` - `raw-window-handle` - `winit` * Downgrade jni until we can properly upgrade * Update some test results It's unclear why these are now passing, but they are. --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* bootstrap: Add a `--skip-platform` option (#32176)Martin Robinson2024-04-291-2/+4
| | | | This allows installign `taplo` and `crown` when you are installing dependencies manually.
* Run platform_bootstrap first (#31840)Samson2024-04-292-5/+7
|
* bootstrap: Make unknown distro instructions more helpful (#31750)Martin Robinson2024-03-191-2/+3
| | | | | It doesn't make sense to ask everyone to file a bug if their distribution is unsupported. We have manual build instructions for some distributions and we can add instructions for more easily.
* Add gstreamer plugins good/ugly for better codec support (#31687)Delan Azabani2024-03-151-3/+5
| | | | | * NixOS: add gst-plugins-{good,ugly} for better codec support * Add gstreamer plugins good/ugly to all other package lists
* install libudev-dev required by gamepad API (#31376)Mukilan Thiyagarajan2024-02-191-1/+1
| | | | | | | | | | | | | | Ubuntu 20.04 does not have libudev-dev causing build failure when compiling libudev-sys, which is in-turn needed by gilrs-core. Similarly, nix build also needs the udev C library. On Ubuntu 22.04, we don't see the build failures since the build dependency 'libgstreamer-plugins-base-1.0-dev' transitively pulls in libudev-dev. Fixes #31373 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* bootstrap: More resiliently install Deiban-like platform dependencies (#31281)Martin Robinson2024-02-072-10/+12
| | | | | | | | 1. First check to see if a package is available before trying to install it. This means that we always do our best to install everything, but don't fail if we cannot. 2. Install crown and taplo first. This means that if the platform-specific bits fail, we still install Servo-specific dependencies.
* Remove duplicate pkg in APT_PKGS (#31280)atbrakhi2024-02-071-1/+0
| | | | We have `libgstreamer-plugins-base1.0-dev` twice in APT_PKGS, looks like a duplicate, this PR removes the duplicated pkg.
* Fix ./mach bootstrap failure in debian (#31276)atbrakhi2024-02-071-1/+7
| | | | Do not install `libgstreamer-plugins-good1.0-dev` on debian, install only on ubuntu.
* Fix bugs in `mach test-tidy` (#31232)Mukilan Thiyagarajan2024-01-311-3/+1
| | | | | | | | | | | | | | | | | * mach: test-tidy should return 1 for failure Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: tidy should allow spec links with trailing text Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Update build script to support asahi linux (#31207)arrynfr2024-01-281-1/+2
|
* tests: Add GStreamer library directory to DYLD_LIBRARY_PATH (#31163)Martin Robinson2024-01-244-12/+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.
* build: Only set PATH for GStreamer (#31078)Martin Robinson2024-01-172-51/+18
| | | | The documentation claims that this is the only environment variable that needs to be set before build.
* crown: Add a cargo config.toml file (#31090)Martin Robinson2024-01-151-6/+1
| | | | | This makes it more foolproof to install crown from inside the Servo directory, because the root Servo config.toml overrides the rustc to use crown (an obvious circular dependency).
* Fix the build on Ubuntu 20.04 (#31019)Martin Robinson2024-01-072-27/+1
| | | | | | | | Ubuntu 20.04 doesn't have a new enough version of GStreamer, so automatically disable media when running on that platform. This also cleans up the media detection a bit, putting the result in a `enable-media` variable and moving some of the logic into the build scripts themselves rather than the platform module.
* bootstrap: Adding more output when installing dependencies (#31003)Martin Robinson2024-01-051-4/+4
| | | | | | | It's often the case (especially with the taplo installation and on Windows) that bootstrap is doing lots of stuff in the background for a long amount of time. Without output it's hard to tell what exactly is going on. This change adds more output to this process as well as removing some Pythong 2.x era code.
* Upgrade media / GStreamer / GLib (#30750)Martin Robinson2024-01-053-26/+21
| | | | | | | | | | | | | | | | | | - 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.
* Compile Servo with the latest version of rust stable (#30831)Martin Robinson2023-12-062-14/+0
| | | | | | | | | | | | | | | | This completes the transition to compiling Servo with rust stable. Some nightly-only features are still used when compiling the `script` and `crown` crates, as well as for some style unit tests. These will likely break with newer compiler versions, but `crown` can be disabled for them conditionally. This is just the first step. This has some caveats: 1. We need to disable setting up the special linker on Linux. The -Z option isn't supported with stable rust so using this is out -- meanwhile we can't be sure that lld is installed on most systems. 2. `cargo fmt` still uses some unstable options, so we need to rely on the unstable toolchain just for running `fmt`. The idea is to fix this gradually.
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* bootstrap: Alphabetize and add 'm4' Ubuntu dependency (#30727)Martin Robinson2023-11-131-9/+10
| | | It looks like `m4` is now required for builds on Debian-like systems.
* Remove some stray references to OpenSSL (#30710)Martin Robinson2023-11-091-2/+0
| | | These were left over from the change to use rustls.
* Add support for EndeavourOS (#30513)bc-universe2023-10-061-0/+1
|
* Bootstrap pkg-config and cmake on MacOS (#30497)Martin Robinson2023-10-051-1/+13
| | | | | | | These need to be installed in order to build so we can install them via Homebrew. Do this by simply restoring the Homebrew bootstrapping logic we had in place previously. Fixes #27171.
* fix WebGPU runtime dependencies on linux (#30407)Delan Azabani2023-09-221-4/+24
|
* Enforce formatting of TOML files (#30128)Samson2023-09-191-1/+14
| | | | | | | | | * Fmt all toml files * bootstrap taplo * enforce toml formatting with taplo * Install taplo in CI using cargo-install action
* Add TUXEDO OS to mach bootstrap (#30363)Carlos Bentzen2023-09-151-1/+1
| | | Signed-off-by: Carlos Bentzen <cadubentzen@gmail.com>