mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix(core): resource path resolution on Linux, closes #2493
This commit is contained in:
6
.changes/fix-linux-resource-path.md
Normal file
6
.changes/fix-linux-resource-path.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-utils": patch
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Fixes resource directory resolution on Linux.
|
||||
@@ -22,5 +22,8 @@ html5ever = "0.25"
|
||||
proc-macro2 = { version = "1.0", optional = true }
|
||||
quote = { version = "1.0", optional = true }
|
||||
|
||||
[target."cfg(target_os = \"linux\")".dependencies]
|
||||
heck = "0.3"
|
||||
|
||||
[features]
|
||||
build = [ "proc-macro2", "quote" ]
|
||||
|
||||
@@ -23,6 +23,12 @@ impl PackageInfo {
|
||||
/// Returns the application package name.
|
||||
/// On macOS and Windows it's the `name` field, and on Linux it's the `name` in `kebab-case`.
|
||||
pub fn package_name(&self) -> String {
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
use heck::KebabCase;
|
||||
self.name.clone().to_kebab_case()
|
||||
}
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
self.name.clone()
|
||||
}
|
||||
}
|
||||
|
||||
3
examples/api/src-tauri/Cargo.lock
generated
3
examples/api/src-tauri/Cargo.lock
generated
@@ -2898,7 +2898,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "1.0.0-beta.6"
|
||||
version = "1.0.0-beta.7"
|
||||
dependencies = [
|
||||
"attohttpc",
|
||||
"base64",
|
||||
@@ -3038,6 +3038,7 @@ dependencies = [
|
||||
name = "tauri-utils"
|
||||
version = "1.0.0-beta.3"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"html5ever",
|
||||
"kuchiki",
|
||||
"phf 0.10.0",
|
||||
|
||||
Reference in New Issue
Block a user