From 3ad9e216cc46d72cc588d261933e3860a6dad27b Mon Sep 17 00:00:00 2001 From: RabbyDevs <67389402+RabbyDevs@users.noreply.github.com> Date: Wed, 7 May 2025 03:03:47 +0300 Subject: [PATCH] mmmm --- Cargo.lock | 79 +--------------------------------- Cargo.toml | 3 +- iced_video_player/Cargo.toml | 2 +- iced_video_player/src/video.rs | 2 +- src/components/installer.rs | 3 +- src/utils/visual_helper.rs | 2 +- 6 files changed, 7 insertions(+), 84 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ab5bd2..6a96993 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,15 +213,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bit-set" version = "0.8.0" @@ -976,7 +967,6 @@ dependencies = [ "futures-core", "futures-task", "futures-util", - "num_cpus", ] [[package]] @@ -1378,12 +1368,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - [[package]] name = "hermit-abi" version = "0.4.0" @@ -1516,7 +1500,6 @@ source = "git+https://github.com/RabbyDevs/iced.git#24ccb057b5b0750f2bcee7a4ef30 dependencies = [ "iced_core", "iced_debug", - "iced_devtools", "iced_futures", "iced_renderer", "iced_runtime", @@ -1526,21 +1509,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "iced_beacon" -version = "0.14.0-dev" -source = "git+https://github.com/RabbyDevs/iced.git#24ccb057b5b0750f2bcee7a4ef306260259ef94e" -dependencies = [ - "bincode", - "futures", - "iced_core", - "log", - "semver", - "serde", - "thiserror 1.0.69", - "tokio", -] - [[package]] name = "iced_core" version = "0.14.0-dev" @@ -1553,7 +1521,6 @@ dependencies = [ "log", "num-traits", "rustc-hash 2.1.1", - "serde", "smol_str", "thiserror 1.0.69", "web-time", @@ -1564,23 +1531,11 @@ name = "iced_debug" version = "0.14.0-dev" source = "git+https://github.com/RabbyDevs/iced.git#24ccb057b5b0750f2bcee7a4ef306260259ef94e" dependencies = [ - "iced_beacon", "iced_core", "iced_futures", "log", ] -[[package]] -name = "iced_devtools" -version = "0.14.0-dev" -source = "git+https://github.com/RabbyDevs/iced.git#24ccb057b5b0750f2bcee7a4ef306260259ef94e" -dependencies = [ - "iced_debug", - "iced_program", - "iced_widget", - "log", -] - [[package]] name = "iced_futures" version = "0.14.0-dev" @@ -2407,16 +2362,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "num_enum" version = "0.7.3" @@ -2845,7 +2790,7 @@ checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", + "hermit-abi", "pin-project-lite", "rustix 0.38.44", "tracing", @@ -3167,7 +3112,6 @@ dependencies = [ "strum 0.27.1", "strum_macros 0.27.1", "tempfile", - "tokio", "url", ] @@ -3381,15 +3325,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749" -[[package]] -name = "semver" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" -dependencies = [ - "serde", -] - [[package]] name = "serde" version = "1.0.219" @@ -3918,21 +3853,9 @@ dependencies = [ "mio", "pin-project-lite", "socket2", - "tokio-macros", "windows-sys 0.52.0", ] -[[package]] -name = "tokio-macros" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "tokio-native-tls" version = "0.3.1" diff --git a/Cargo.toml b/Cargo.toml index 97c30fc..cdb2392 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" [dependencies] directories = "6.0.0" -iced = { git = "https://github.com/RabbyDevs/iced.git", features = ["tokio", "tiny-skia", "wgpu", "image", "debug"], default-features = false } +iced = { git = "https://github.com/RabbyDevs/iced.git", features = ["tokio", "wgpu", "image"], default-features = false } image = "0.25.6" serde = { version = "1.0.219", features = ["serde_derive"] } serde_json = "1.0.140" @@ -20,7 +20,6 @@ reqwest = { version = "0.12.15", features = [ # "blocking", "gzip", "json"] } -tokio = "1.45.0" [profile.release] strip = true # Automatically strip symbols from the binary. diff --git a/iced_video_player/Cargo.toml b/iced_video_player/Cargo.toml index 809904e..8034dc4 100644 --- a/iced_video_player/Cargo.toml +++ b/iced_video_player/Cargo.toml @@ -16,7 +16,7 @@ exclude = [ ] [dependencies] -iced = { git = "https://github.com/RabbyDevs/iced.git", features = ["thread-pool", "wgpu", "image", "advanced"], default-features = false } +iced = { git = "https://github.com/RabbyDevs/iced.git", features = ["wgpu", "image", "advanced"], default-features = false } iced_wgpu = { git = "https://github.com/RabbyDevs/iced.git" } gstreamer = "0.23.5" gstreamer-app = "0.23.5" # appsink diff --git a/iced_video_player/src/video.rs b/iced_video_player/src/video.rs index dc349d0..9099b66 100644 --- a/iced_video_player/src/video.rs +++ b/iced_video_player/src/video.rs @@ -225,7 +225,7 @@ impl Drop for Video { impl Video { /// Create a new video player from a given video which loads from `uri`. /// Note that live sources will report the duration to be zero. - pub fn new(uri: url::Url) -> Result { + pub fn new(uri: &url::Url) -> Result { gst::init()?; let pipeline = format!("playbin uri=\"{}\" text-sink=\"appsink name=iced_text sync=true drop=true\" video-sink=\"videoscale ! videoconvert ! appsink name=iced_video drop=true caps=video/x-raw,format=NV12,pixel-aspect-ratio=1/1\"", &uri.as_str()); diff --git a/src/components/installer.rs b/src/components/installer.rs index 2a9d5b1..1a80525 100644 --- a/src/components/installer.rs +++ b/src/components/installer.rs @@ -3,6 +3,7 @@ use std::{fs::create_dir_all, io::Write, path::Path}; use std::fs::{remove_file, DirEntry, OpenOptions}; use directories::ProjectDirs; +use iced::futures::join; use reqwest::Client; use reqwest::header::{HeaderMap, HeaderValue, ACCEPT_ENCODING}; use serde::{Deserialize, Serialize}; @@ -67,7 +68,7 @@ pub async fn refresh_install() -> Result<(), String> { let proj_dirs = ProjectDirs::from("com", "RabbyDevs", "rr-launcher") .ok_or_else(|| "Failed to get project directories".to_string())?; - let (kuro_result, hoyo_result) = tokio::join!( + let (kuro_result, hoyo_result) = join!( refresh_kuro_install(&proj_dirs, &reqwest_client), refresh_hoyo_install(&proj_dirs, &reqwest_client) ); diff --git a/src/utils/visual_helper.rs b/src/utils/visual_helper.rs index d34c660..d581395 100644 --- a/src/utils/visual_helper.rs +++ b/src/utils/visual_helper.rs @@ -22,7 +22,7 @@ pub fn get_game_background(game: &PossibleGames) -> LauncherBackground { temp_file.write_all(&data).unwrap(); let temp_path = temp_file.path().to_str().unwrap().to_string(); - match Video::new(url::Url::from_file_path(temp_path).unwrap()) { + match Video::new(&url::Url::from_file_path(temp_path).unwrap()) { Ok(mut video) => { video.set_looping(true); LauncherBackground::Video(video)