This commit is contained in:
RabbyDevs 2025-05-07 03:03:47 +03:00
parent f8ea4cee47
commit 3ad9e216cc
6 changed files with 7 additions and 84 deletions

79
Cargo.lock generated
View file

@ -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"

View file

@ -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.

View file

@ -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

View file

@ -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<Self, Error> {
pub fn new(uri: &url::Url) -> Result<Self, Error> {
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());

View file

@ -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)
);

View file

@ -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)