diff --git a/Cargo.lock b/Cargo.lock index e81a476d..47a69f97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,12 +727,20 @@ dependencies = [ [[package]] name = "cargo-packager-resource-resolver" version = "0.1.0" -source = "git+https://github.com/wiiznokes/cargo-packager.git?branch=resource-resolver#9c7e96219c24c6bf5554ca4b92fa0645bb1f7c06" +source = "git+https://github.com/wiiznokes/cargo-packager.git?branch=resource-resolver#db277be81d68a635e3729a9f03e094d5ecf95e84" dependencies = [ - "ctor", + "cargo-packager-utils", "thiserror", ] +[[package]] +name = "cargo-packager-utils" +version = "0.1.0" +source = "git+https://github.com/wiiznokes/cargo-packager.git?branch=resource-resolver#db277be81d68a635e3729a9f03e094d5ecf95e84" +dependencies = [ + "ctor", +] + [[package]] name = "cc" version = "1.0.83" diff --git a/Cargo.toml b/Cargo.toml index 49860577..8fde498e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,6 +82,6 @@ derive_more = { version = "1.0.0-beta.6", default-features = false, features = [ [workspace.dependencies.cargo-packager-resource-resolver] git = "https://github.com/wiiznokes/cargo-packager.git" branch = "resource-resolver" -features = ["auto-detect-formats"] +features = ["auto-detect-format"] #path = "../cargo-packager/crates/resource-resolver/" #package = "resource-resolver" diff --git a/hardware/src/windows.rs b/hardware/src/windows.rs index ea047233..7dedbf64 100644 --- a/hardware/src/windows.rs +++ b/hardware/src/windows.rs @@ -48,7 +48,7 @@ fn spawn_windows_server() -> Result { #[cfg(not(test))] { let package_format = resource_resolver::current_format(); - match resource_resolver::resource_dir_with_suffix(package_format, resource_suffix) { + match resource_resolver::resolve_resource(package_format, resource_suffix) { Ok(resource_path) => resource_path, Err(e) => { error!("Can't find resource path: {e}. Fall back to current dir."); diff --git a/ui/src/icon.rs b/ui/src/icon.rs index e374061a..8f6c87e8 100644 --- a/ui/src/icon.rs +++ b/ui/src/icon.rs @@ -12,7 +12,7 @@ use cargo_packager_resource_resolver as resource_resolver; lazy_static::lazy_static! { static ref RESSOURCE_PATH: PathBuf = { let package_format = resource_resolver::current_format(); - resource_resolver::resource_dir_with_suffix(package_format, "resource") + resource_resolver::resolve_resource(package_format, "resource") .unwrap_or(PathBuf::from("resource")) .join("icons/") };