Skip to content

Commit

Permalink
update resource_resolver [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Jan 5, 2024
1 parent 065373e commit 723242c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion hardware/src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn spawn_windows_server() -> Result<std::process::Child> {
#[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.");
Expand Down
2 changes: 1 addition & 1 deletion ui/src/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
};
Expand Down

0 comments on commit 723242c

Please sign in to comment.