mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Remove UWP / Hololens support
This commit is contained in:
parent
041d95e0f4
commit
c58d74fe62
97 changed files with 54 additions and 7084 deletions
|
@ -6,9 +6,6 @@ license = "MPL-2.0"
|
|||
edition = "2018"
|
||||
publish = false
|
||||
|
||||
[features]
|
||||
uwp = []
|
||||
|
||||
[lib]
|
||||
name = "servo_config"
|
||||
path = "lib.rs"
|
||||
|
|
|
@ -35,14 +35,9 @@ pub fn default_config_dir() -> Option<PathBuf> {
|
|||
Some(config_dir)
|
||||
}
|
||||
|
||||
#[cfg(all(target_os = "windows", not(feature = "uwp")))]
|
||||
#[cfg(all(target_os = "windows"))]
|
||||
pub fn default_config_dir() -> Option<PathBuf> {
|
||||
let mut config_dir = ::dirs_next::config_dir().unwrap();
|
||||
config_dir.push("Servo");
|
||||
Some(config_dir)
|
||||
}
|
||||
|
||||
#[cfg(all(target_os = "windows", feature = "uwp"))]
|
||||
pub fn default_config_dir() -> Option<PathBuf> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ fn test_set_all_error_on_unknown_field() -> Result<(), Box<dyn Error>> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", feature = "uwp")))]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
#[test]
|
||||
fn test_default_config_dir_create_read_write() {
|
||||
let json_str = "{\
|
||||
|
|
|
@ -21,7 +21,6 @@ default = ["unrooted_must_root_lint"]
|
|||
webgl_backtrace = ["canvas_traits/webgl_backtrace"]
|
||||
js_backtrace = []
|
||||
refcell_backtrace = ["accountable-refcell"]
|
||||
uwp = ["js/uwp"]
|
||||
xr-profile = ["webxr-api/profile"]
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -26,7 +26,6 @@ no-wgl = ["canvas/no-wgl"]
|
|||
no_static_freetype = ["webrender/no_static_freetype"]
|
||||
profilemozjs = ["script/profilemozjs"]
|
||||
refcell_backtrace = ["script/refcell_backtrace"]
|
||||
uwp = ["servo_config/uwp", "script/uwp"]
|
||||
webdriver = ["webdriver_server"]
|
||||
webgl_backtrace = [
|
||||
"script/webgl_backtrace",
|
||||
|
|
|
@ -141,49 +141,14 @@ mod media_platform {
|
|||
use super::ServoMedia;
|
||||
use servo_media_gstreamer::GStreamerBackend;
|
||||
|
||||
#[cfg(feature = "uwp")]
|
||||
fn set_gstreamer_log_handler() {
|
||||
use gstreamer::{debug_add_log_function, DebugLevel};
|
||||
|
||||
debug_add_log_function(|cat, level, file, function, line, _, message| {
|
||||
let message = format!(
|
||||
"{:?} {:?} {:?}:{:?}:{:?} {:?}",
|
||||
cat.get_name(),
|
||||
level,
|
||||
file,
|
||||
line,
|
||||
function,
|
||||
message
|
||||
);
|
||||
match level {
|
||||
DebugLevel::Debug => debug!("{}", message),
|
||||
DebugLevel::Error => error!("{}", message),
|
||||
DebugLevel::Warning => warn!("{}", message),
|
||||
DebugLevel::Fixme | DebugLevel::Info => info!("{}", message),
|
||||
DebugLevel::Memdump | DebugLevel::Count | DebugLevel::Trace => {
|
||||
trace!("{}", message)
|
||||
},
|
||||
_ => (),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(any(windows, target_os = "macos"))]
|
||||
pub fn init() {
|
||||
// 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();
|
||||
let mut plugin_dir = std::env::current_exe().unwrap();
|
||||
plugin_dir.pop();
|
||||
|
||||
if cfg!(target_os = "macos") {
|
||||
plugin_dir.push("lib");
|
||||
}
|
||||
|
||||
plugin_dir
|
||||
};
|
||||
if cfg!(target_os = "macos") {
|
||||
plugin_dir.push("lib");
|
||||
}
|
||||
|
||||
let backend = match GStreamerBackend::init_with_plugins(
|
||||
plugin_dir,
|
||||
|
@ -196,10 +161,6 @@ mod media_platform {
|
|||
},
|
||||
};
|
||||
ServoMedia::init_with_backend(backend);
|
||||
#[cfg(feature = "uwp")]
|
||||
{
|
||||
set_gstreamer_log_handler();
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(any(windows, target_os = "macos")))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue