fix: update dependencies
This commit is contained in:
104
Cargo.lock
generated
104
Cargo.lock
generated
@@ -261,7 +261,7 @@ dependencies = [
|
|||||||
"autocfg",
|
"autocfg",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
"memoffset 0.7.1",
|
"memoffset",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -501,15 +501,6 @@ dependencies = [
|
|||||||
"weezl",
|
"weezl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "glam"
|
|
||||||
version = "0.21.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815"
|
|
||||||
dependencies = [
|
|
||||||
"mint",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glam"
|
name = "glam"
|
||||||
version = "0.22.0"
|
version = "0.22.0"
|
||||||
@@ -701,15 +692,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "memoffset"
|
|
||||||
version = "0.6.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memoffset"
|
name = "memoffset"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
@@ -778,16 +760,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.25.0"
|
version = "0.26.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"
|
checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"memoffset 0.6.5",
|
"memoffset",
|
||||||
"pin-utils",
|
"pin-utils",
|
||||||
|
"static_assertions",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1035,7 +1017,7 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"dirs",
|
"dirs",
|
||||||
"ez-pixmap",
|
"ez-pixmap",
|
||||||
"glam 0.22.0",
|
"glam",
|
||||||
"image",
|
"image",
|
||||||
"manifest-dir-macros",
|
"manifest-dir-macros",
|
||||||
"mint",
|
"mint",
|
||||||
@@ -1048,7 +1030,6 @@ dependencies = [
|
|||||||
"tween",
|
"tween",
|
||||||
"ustr",
|
"ustr",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"xpm",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1369,16 +1350,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stardust-xr"
|
name = "stardust-xr"
|
||||||
version = "0.7.1"
|
version = "0.8.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "23c98b32604a8dc54010b737fb2f176523bc1a9d585eef5bb4a3c9f409f9012d"
|
checksum = "751ea9078f39d03844a1cc967577ef0f2aab6818d4ce3f26861730f22e0d59f4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
|
||||||
"chrono",
|
"chrono",
|
||||||
"cluFlock",
|
"cluFlock",
|
||||||
"color-rs",
|
"color-rs",
|
||||||
"flatbuffers",
|
|
||||||
"flexbuffers",
|
|
||||||
"mint",
|
"mint",
|
||||||
"parking_lot 0.12.1",
|
"parking_lot 0.12.1",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
@@ -1386,21 +1364,21 @@ dependencies = [
|
|||||||
"stardust-xr-schemas",
|
"stardust-xr-schemas",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tracing",
|
||||||
"xdg",
|
"xdg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stardust-xr-fusion"
|
name = "stardust-xr-fusion"
|
||||||
version = "0.23.1"
|
version = "0.25.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "357475624cc78941af592c755fd51a7f6b85b3323df10542c53993030fbea5a8"
|
checksum = "4c8dd13d2326da48be4d30cf682bbe2f3c2eafcf74cc7d95e357928554b4e1c2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"buildstructor",
|
"buildstructor",
|
||||||
"color-rs",
|
"color-rs",
|
||||||
"flagset",
|
"flagset",
|
||||||
"flexbuffers",
|
"glam",
|
||||||
"glam 0.22.0",
|
|
||||||
"mint",
|
"mint",
|
||||||
"nanoid",
|
"nanoid",
|
||||||
"parking_lot 0.12.1",
|
"parking_lot 0.12.1",
|
||||||
@@ -1410,18 +1388,19 @@ dependencies = [
|
|||||||
"stardust-xr",
|
"stardust-xr",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tracing",
|
||||||
"xkbcommon",
|
"xkbcommon",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stardust-xr-molecules"
|
name = "stardust-xr-molecules"
|
||||||
version = "0.5.4"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e04616f27e92c2d40595c0fbe4f96e5788adca3a855611794c6f202bf2c0ddd0"
|
checksum = "b3ac6c61970207deb30ec077d96a1cd0a3ab5336d918c94f6f0c83a74ce0bfb6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"color-rs",
|
"color-rs",
|
||||||
"flexbuffers",
|
"flexbuffers",
|
||||||
"glam 0.22.0",
|
"glam",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"mint",
|
"mint",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
@@ -1433,20 +1412,25 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stardust-xr-schemas"
|
name = "stardust-xr-schemas"
|
||||||
version = "1.1.3"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f792ac8844e1d58a17ccb158f2acbe0df2f789a1838ca77f5ccc6fba234535e0"
|
checksum = "9a60a7c0c8ace5604f1b010edc3507c95b7517c3c5957c44eaad4f4fa26e9617"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
|
||||||
"flatbuffers",
|
"flatbuffers",
|
||||||
"flexbuffers",
|
"flexbuffers",
|
||||||
"glam 0.21.3",
|
"glam",
|
||||||
"mint",
|
"mint",
|
||||||
"ouroboros",
|
"ouroboros",
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "static_assertions"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "str_inflector"
|
name = "str_inflector"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
@@ -1631,6 +1615,38 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing"
|
||||||
|
version = "0.1.37"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tracing-attributes",
|
||||||
|
"tracing-core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing-attributes"
|
||||||
|
version = "0.1.23"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing-core"
|
||||||
|
version = "0.1.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "try_match"
|
name = "try_match"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
@@ -1950,9 +1966,3 @@ name = "xmlparser"
|
|||||||
version = "0.13.5"
|
version = "0.13.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
|
checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "xpm"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "03e3b32dce137f44f1da822ff82ec509f64028db6edd79b18ecd3d07b2bfe73c"
|
|
||||||
|
|||||||
@@ -11,15 +11,14 @@ glam = { version = "0.22.0", features = ["mint"] }
|
|||||||
image = "0.24.5"
|
image = "0.24.5"
|
||||||
manifest-dir-macros = "0.1.16"
|
manifest-dir-macros = "0.1.16"
|
||||||
mint = "0.5.9"
|
mint = "0.5.9"
|
||||||
nix = "0.25.0"
|
nix = "0.26.1"
|
||||||
resvg = "0.27.0"
|
resvg = "0.27.0"
|
||||||
rustc-hash = "1.1.0"
|
rustc-hash = "1.1.0"
|
||||||
stardust-xr-molecules = "0.5.2"
|
stardust-xr-molecules = "0.7.3"
|
||||||
tokio = { version = "1.22.0", features = ["full"] }
|
tokio = { version = "1.22.0", features = ["full"] }
|
||||||
tween = "1.0.1"
|
tween = "1.0.1"
|
||||||
ustr = "0.9.0"
|
ustr = "0.9.0"
|
||||||
walkdir = "2.3.2"
|
walkdir = "2.3.2"
|
||||||
xpm = "0.1.0"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
|
|||||||
@@ -5,18 +5,15 @@ use std::str::FromStr;
|
|||||||
use std::{env, fs};
|
use std::{env, fs};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use image::GenericImageView;
|
|
||||||
use resvg::render;
|
use resvg::render;
|
||||||
use resvg::tiny_skia::{Pixmap, PixmapMut, Transform};
|
use resvg::tiny_skia::{Pixmap, Transform};
|
||||||
use resvg::usvg::{FitTo, Tree};
|
use resvg::usvg::{FitTo, Tree};
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
|
|
||||||
fn get_desktop_files() -> Vec<PathBuf> {
|
fn get_desktop_files() -> Vec<PathBuf> {
|
||||||
// Get the XDG data directories
|
// Get the XDG data directories
|
||||||
let xdg_data_dirs = match std::env::var("XDG_DATA_DIRS") {
|
let xdg_data_dirs =
|
||||||
Ok(val) => val,
|
std::env::var("XDG_DATA_DIRS").unwrap_or("/usr/local/share:/usr/share".to_string());
|
||||||
Err(_) => "/usr/local/share:/usr/share".to_string(),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Append the applications directory to each data directory
|
// Append the applications directory to each data directory
|
||||||
let app_dirs = xdg_data_dirs
|
let app_dirs = xdg_data_dirs
|
||||||
@@ -120,11 +117,9 @@ fn test_parse_desktop_file() {
|
|||||||
fs::write(&file, data).unwrap();
|
fs::write(&file, data).unwrap();
|
||||||
|
|
||||||
// Parse the test desktop file
|
// Parse the test desktop file
|
||||||
let result = parse_desktop_file(&file);
|
let desktop_file = parse_desktop_file(&file).unwrap();
|
||||||
assert!(result.is_ok());
|
|
||||||
|
|
||||||
// Check the parsed values
|
// Check the parsed values
|
||||||
let desktop_file = result.unwrap();
|
|
||||||
assert_eq!(desktop_file.name, Some("Test".to_string()));
|
assert_eq!(desktop_file.name, Some("Test".to_string()));
|
||||||
assert_eq!(desktop_file.command, Some("test".to_string()));
|
assert_eq!(desktop_file.command, Some("test".to_string()));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
@@ -171,6 +166,7 @@ fn render_svg_to_png(svg_path: &PathBuf, png_path: &PathBuf, size: u32) -> Resul
|
|||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_render_svg_to_png() {
|
fn test_render_svg_to_png() {
|
||||||
|
use image::GenericImageView;
|
||||||
// Create temporary input and output paths
|
// Create temporary input and output paths
|
||||||
let input_path = PathBuf::from("test_input.svg");
|
let input_path = PathBuf::from("test_input.svg");
|
||||||
let output_path = PathBuf::from("test_output.png");
|
let output_path = PathBuf::from("test_output.png");
|
||||||
|
|||||||
@@ -55,7 +55,16 @@ impl ProtoStar {
|
|||||||
impl LifeCycleHandler for ProtoStar {
|
impl LifeCycleHandler for ProtoStar {
|
||||||
fn logic_step(&mut self, info: LogicStepInfo) {
|
fn logic_step(&mut self, info: LogicStepInfo) {
|
||||||
self.grabbable.update();
|
self.grabbable.update();
|
||||||
if self.grabbable.grab_action().actor_stopped() {
|
|
||||||
|
if let Some(icon_shrink) = &mut self.icon_shrink {
|
||||||
|
if let Some(scale) = icon_shrink.update(info.delta) {
|
||||||
|
self.icon
|
||||||
|
.set_scale(None, Vector3::from([scale; 3]))
|
||||||
|
.unwrap();
|
||||||
|
} else {
|
||||||
|
self.client.stop_loop();
|
||||||
|
}
|
||||||
|
} else if self.grabbable.grab_action().actor_stopped() {
|
||||||
let startup_settings =
|
let startup_settings =
|
||||||
StartupSettings::create(&self.field.spatial.client().unwrap()).unwrap();
|
StartupSettings::create(&self.field.spatial.client().unwrap()).unwrap();
|
||||||
self.grabbable
|
self.grabbable
|
||||||
@@ -82,14 +91,5 @@ impl LifeCycleHandler for ProtoStar {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if let Some(icon_shrink) = &mut self.icon_shrink {
|
|
||||||
if let Some(scale) = icon_shrink.update(info.delta) {
|
|
||||||
self.icon
|
|
||||||
.set_scale(None, Vector3::from([scale; 3]))
|
|
||||||
.unwrap();
|
|
||||||
} else {
|
|
||||||
self.client.stop_loop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user