mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 16:08:21 +03:00
chore(deps): migrate dirs_next to dirs (#9929)
This commit is contained in:
parent
e6e17ad1c8
commit
f955f7b490
9
.changes/dirs-next-dirs.md
Normal file
9
.changes/dirs-next-dirs.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
"tauri": patch:deps
|
||||||
|
"tauri-build": patch:deps
|
||||||
|
"tauri-bundler": patch:deps
|
||||||
|
"tauri-cli": patch:deps
|
||||||
|
"@tauri-apps/cli": patch:deps
|
||||||
|
---
|
||||||
|
|
||||||
|
Switch from `dirs_next` to `dirs` as `dirs_next` is now unmaintained while `dirs` is
|
34
Cargo.lock
generated
34
Cargo.lock
generated
@ -665,24 +665,24 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs-next"
|
name = "dirs"
|
||||||
version = "2.0.0"
|
version = "5.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"dirs-sys",
|
||||||
"dirs-sys-next",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs-sys-next"
|
name = "dirs-sys"
|
||||||
version = "0.1.2"
|
version = "0.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
|
"option-ext",
|
||||||
"redox_users",
|
"redox_users",
|
||||||
"winapi",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2177,6 +2177,12 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "option-ext"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "overload"
|
name = "overload"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@ -3534,7 +3540,7 @@ dependencies = [
|
|||||||
"cargo_toml",
|
"cargo_toml",
|
||||||
"cocoa",
|
"cocoa",
|
||||||
"data-url",
|
"data-url",
|
||||||
"dirs-next",
|
"dirs",
|
||||||
"dunce",
|
"dunce",
|
||||||
"embed_plist",
|
"embed_plist",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -3600,7 +3606,7 @@ version = "2.0.0-beta.17"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cargo_toml",
|
"cargo_toml",
|
||||||
"dirs-next",
|
"dirs",
|
||||||
"glob",
|
"glob",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"json-patch",
|
"json-patch",
|
||||||
@ -4087,14 +4093,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tray-icon"
|
name = "tray-icon"
|
||||||
version = "0.14.0"
|
version = "0.14.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f79da804c7d1fd82da182b39d4fe5ac1044b08117358b23b41daf88840a3e70d"
|
checksum = "0b27516dfcfa22a9faaf192283a122bfbede38c1e59ef194e3c4db6549b419c0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cocoa",
|
"cocoa",
|
||||||
"core-graphics",
|
"core-graphics",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"dirs-next",
|
"dirs",
|
||||||
"libappindicator",
|
"libappindicator",
|
||||||
"muda",
|
"muda",
|
||||||
"objc",
|
"objc",
|
||||||
|
@ -38,7 +38,7 @@ json-patch = "1.2"
|
|||||||
walkdir = "2"
|
walkdir = "2"
|
||||||
tauri-winres = "0.1"
|
tauri-winres = "0.1"
|
||||||
semver = "1"
|
semver = "1"
|
||||||
dirs-next = "2"
|
dirs = "5"
|
||||||
glob = "0.3"
|
glob = "0.3"
|
||||||
toml = "0.8"
|
toml = "0.8"
|
||||||
schemars = { version = "0.8.18", features = [ "preserve_order" ] }
|
schemars = { version = "0.8.18", features = [ "preserve_order" ] }
|
||||||
|
@ -198,7 +198,7 @@ fn copy_frameworks(dest_dir: &Path, frameworks: &[String]) -> Result<()> {
|
|||||||
framework
|
framework
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if let Some(home_dir) = dirs_next::home_dir() {
|
if let Some(home_dir) = dirs::home_dir() {
|
||||||
if copy_framework_from(&home_dir.join("Library/Frameworks/"), framework, dest_dir)? {
|
if copy_framework_from(&home_dir.join("Library/Frameworks/"), framework, dest_dir)? {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ getrandom = "0.2"
|
|||||||
serde_repr = "0.1"
|
serde_repr = "0.1"
|
||||||
state = "0.6"
|
state = "0.6"
|
||||||
http = "1.1"
|
http = "1.1"
|
||||||
dirs-next = "2.0"
|
dirs = "5"
|
||||||
percent-encoding = "2.3"
|
percent-encoding = "2.3"
|
||||||
reqwest = { version = "0.12", default-features = false, features = [ "json", "stream" ] }
|
reqwest = { version = "0.12", default-features = false, features = [ "json", "stream" ] }
|
||||||
bytes = { version = "1", features = [ "serde" ] }
|
bytes = { version = "1", features = [ "serde" ] }
|
||||||
|
@ -18,7 +18,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Music`.
|
/// - **macOS:** Resolves to `$HOME/Music`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Music}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Music}`.
|
||||||
pub fn audio_dir(&self) -> Result<PathBuf> {
|
pub fn audio_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::audio_dir().ok_or(Error::UnknownPath)
|
dirs::audio_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's cache directory.
|
/// Returns the path to the user's cache directory.
|
||||||
@ -29,7 +29,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Library/Caches`.
|
/// - **macOS:** Resolves to `$HOME/Library/Caches`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
|
/// - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
|
||||||
pub fn cache_dir(&self) -> Result<PathBuf> {
|
pub fn cache_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::cache_dir().ok_or(Error::UnknownPath)
|
dirs::cache_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's config directory.
|
/// Returns the path to the user's config directory.
|
||||||
@ -40,7 +40,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Library/Application Support`.
|
/// - **macOS:** Resolves to `$HOME/Library/Application Support`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
|
/// - **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
|
||||||
pub fn config_dir(&self) -> Result<PathBuf> {
|
pub fn config_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::config_dir().ok_or(Error::UnknownPath)
|
dirs::config_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's data directory.
|
/// Returns the path to the user's data directory.
|
||||||
@ -51,7 +51,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Library/Application Support`.
|
/// - **macOS:** Resolves to `$HOME/Library/Application Support`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
|
/// - **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
|
||||||
pub fn data_dir(&self) -> Result<PathBuf> {
|
pub fn data_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::data_dir().ok_or(Error::UnknownPath)
|
dirs::data_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's local data directory.
|
/// Returns the path to the user's local data directory.
|
||||||
@ -62,7 +62,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Library/Application Support`.
|
/// - **macOS:** Resolves to `$HOME/Library/Application Support`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
|
/// - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
|
||||||
pub fn local_data_dir(&self) -> Result<PathBuf> {
|
pub fn local_data_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::data_local_dir().ok_or(Error::UnknownPath)
|
dirs::data_local_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's desktop directory.
|
/// Returns the path to the user's desktop directory.
|
||||||
@ -73,7 +73,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Desktop`.
|
/// - **macOS:** Resolves to `$HOME/Desktop`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Desktop}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Desktop}`.
|
||||||
pub fn desktop_dir(&self) -> Result<PathBuf> {
|
pub fn desktop_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::desktop_dir().ok_or(Error::UnknownPath)
|
dirs::desktop_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's document directory.
|
/// Returns the path to the user's document directory.
|
||||||
@ -84,7 +84,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Documents`.
|
/// - **macOS:** Resolves to `$HOME/Documents`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Documents}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Documents}`.
|
||||||
pub fn document_dir(&self) -> Result<PathBuf> {
|
pub fn document_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::document_dir().ok_or(Error::UnknownPath)
|
dirs::document_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's download directory.
|
/// Returns the path to the user's download directory.
|
||||||
@ -95,7 +95,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Downloads`.
|
/// - **macOS:** Resolves to `$HOME/Downloads`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Downloads}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Downloads}`.
|
||||||
pub fn download_dir(&self) -> Result<PathBuf> {
|
pub fn download_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::download_dir().ok_or(Error::UnknownPath)
|
dirs::download_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's executable directory.
|
/// Returns the path to the user's executable directory.
|
||||||
@ -106,7 +106,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Not supported.
|
/// - **macOS:** Not supported.
|
||||||
/// - **Windows:** Not supported.
|
/// - **Windows:** Not supported.
|
||||||
pub fn executable_dir(&self) -> Result<PathBuf> {
|
pub fn executable_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::executable_dir().ok_or(Error::UnknownPath)
|
dirs::executable_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's font directory.
|
/// Returns the path to the user's font directory.
|
||||||
@ -117,7 +117,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Library/Fonts`.
|
/// - **macOS:** Resolves to `$HOME/Library/Fonts`.
|
||||||
/// - **Windows:** Not supported.
|
/// - **Windows:** Not supported.
|
||||||
pub fn font_dir(&self) -> Result<PathBuf> {
|
pub fn font_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::font_dir().ok_or(Error::UnknownPath)
|
dirs::font_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's home directory.
|
/// Returns the path to the user's home directory.
|
||||||
@ -128,7 +128,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME`.
|
/// - **macOS:** Resolves to `$HOME`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Profile}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Profile}`.
|
||||||
pub fn home_dir(&self) -> Result<PathBuf> {
|
pub fn home_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::home_dir().ok_or(Error::UnknownPath)
|
dirs::home_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's picture directory.
|
/// Returns the path to the user's picture directory.
|
||||||
@ -139,7 +139,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Pictures`.
|
/// - **macOS:** Resolves to `$HOME/Pictures`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Pictures}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Pictures}`.
|
||||||
pub fn picture_dir(&self) -> Result<PathBuf> {
|
pub fn picture_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::picture_dir().ok_or(Error::UnknownPath)
|
dirs::picture_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's public directory.
|
/// Returns the path to the user's public directory.
|
||||||
@ -150,7 +150,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Public`.
|
/// - **macOS:** Resolves to `$HOME/Public`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Public}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Public}`.
|
||||||
pub fn public_dir(&self) -> Result<PathBuf> {
|
pub fn public_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::public_dir().ok_or(Error::UnknownPath)
|
dirs::public_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's runtime directory.
|
/// Returns the path to the user's runtime directory.
|
||||||
@ -161,7 +161,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Not supported.
|
/// - **macOS:** Not supported.
|
||||||
/// - **Windows:** Not supported.
|
/// - **Windows:** Not supported.
|
||||||
pub fn runtime_dir(&self) -> Result<PathBuf> {
|
pub fn runtime_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::runtime_dir().ok_or(Error::UnknownPath)
|
dirs::runtime_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's template directory.
|
/// Returns the path to the user's template directory.
|
||||||
@ -172,7 +172,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Not supported.
|
/// - **macOS:** Not supported.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Templates}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Templates}`.
|
||||||
pub fn template_dir(&self) -> Result<PathBuf> {
|
pub fn template_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::template_dir().ok_or(Error::UnknownPath)
|
dirs::template_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the user's video dir
|
/// Returns the path to the user's video dir
|
||||||
@ -183,7 +183,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **macOS:** Resolves to `$HOME/Movies`.
|
/// - **macOS:** Resolves to `$HOME/Movies`.
|
||||||
/// - **Windows:** Resolves to `{FOLDERID_Videos}`.
|
/// - **Windows:** Resolves to `{FOLDERID_Videos}`.
|
||||||
pub fn video_dir(&self) -> Result<PathBuf> {
|
pub fn video_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::video_dir().ok_or(Error::UnknownPath)
|
dirs::video_dir().ok_or(Error::UnknownPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the path to the resource directory of this app.
|
/// Returns the path to the resource directory of this app.
|
||||||
@ -196,7 +196,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
///
|
///
|
||||||
/// Resolves to [`config_dir`](self.config_dir)`/${bundle_identifier}`.
|
/// Resolves to [`config_dir`](self.config_dir)`/${bundle_identifier}`.
|
||||||
pub fn app_config_dir(&self) -> Result<PathBuf> {
|
pub fn app_config_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::config_dir()
|
dirs::config_dir()
|
||||||
.ok_or(Error::UnknownPath)
|
.ok_or(Error::UnknownPath)
|
||||||
.map(|dir| dir.join(&self.0.config().identifier))
|
.map(|dir| dir.join(&self.0.config().identifier))
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
///
|
///
|
||||||
/// Resolves to [`data_dir`](self.data_dir)`/${bundle_identifier}`.
|
/// Resolves to [`data_dir`](self.data_dir)`/${bundle_identifier}`.
|
||||||
pub fn app_data_dir(&self) -> Result<PathBuf> {
|
pub fn app_data_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::data_dir()
|
dirs::data_dir()
|
||||||
.ok_or(Error::UnknownPath)
|
.ok_or(Error::UnknownPath)
|
||||||
.map(|dir| dir.join(&self.0.config().identifier))
|
.map(|dir| dir.join(&self.0.config().identifier))
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
///
|
///
|
||||||
/// Resolves to [`local_data_dir`](self.local_data_dir)`/${bundle_identifier}`.
|
/// Resolves to [`local_data_dir`](self.local_data_dir)`/${bundle_identifier}`.
|
||||||
pub fn app_local_data_dir(&self) -> Result<PathBuf> {
|
pub fn app_local_data_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::data_local_dir()
|
dirs::data_local_dir()
|
||||||
.ok_or(Error::UnknownPath)
|
.ok_or(Error::UnknownPath)
|
||||||
.map(|dir| dir.join(&self.0.config().identifier))
|
.map(|dir| dir.join(&self.0.config().identifier))
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
///
|
///
|
||||||
/// Resolves to [`cache_dir`](self.cache_dir)`/${bundle_identifier}`.
|
/// Resolves to [`cache_dir`](self.cache_dir)`/${bundle_identifier}`.
|
||||||
pub fn app_cache_dir(&self) -> Result<PathBuf> {
|
pub fn app_cache_dir(&self) -> Result<PathBuf> {
|
||||||
dirs_next::cache_dir()
|
dirs::cache_dir()
|
||||||
.ok_or(Error::UnknownPath)
|
.ok_or(Error::UnknownPath)
|
||||||
.map(|dir| dir.join(&self.0.config().identifier))
|
.map(|dir| dir.join(&self.0.config().identifier))
|
||||||
}
|
}
|
||||||
@ -237,12 +237,12 @@ impl<R: Runtime> PathResolver<R> {
|
|||||||
/// - **Windows:** Resolves to [`data_local_dir`](self.data_local_dir)`/${bundle_identifier}/logs`.
|
/// - **Windows:** Resolves to [`data_local_dir`](self.data_local_dir)`/${bundle_identifier}/logs`.
|
||||||
pub fn app_log_dir(&self) -> Result<PathBuf> {
|
pub fn app_log_dir(&self) -> Result<PathBuf> {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
let path = dirs_next::home_dir()
|
let path = dirs::home_dir()
|
||||||
.ok_or(Error::UnknownPath)
|
.ok_or(Error::UnknownPath)
|
||||||
.map(|dir| dir.join("Library/Logs").join(&self.0.config().identifier));
|
.map(|dir| dir.join("Library/Logs").join(&self.0.config().identifier));
|
||||||
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
let path = dirs_next::data_local_dir()
|
let path = dirs::data_local_dir()
|
||||||
.ok_or(Error::UnknownPath)
|
.ok_or(Error::UnknownPath)
|
||||||
.map(|dir| dir.join(&self.0.config().identifier).join("logs"));
|
.map(|dir| dir.join(&self.0.config().identifier).join("logs"));
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ impl<'de> Deserialize<'de> for SafePathBuf {
|
|||||||
/// The base directory is the optional root of a file system operation.
|
/// The base directory is the optional root of a file system operation.
|
||||||
/// If informed by the API call, all paths will be relative to the path of the given directory.
|
/// If informed by the API call, all paths will be relative to the path of the given directory.
|
||||||
///
|
///
|
||||||
/// For more information, check the [`dirs_next` documentation](https://docs.rs/dirs_next/).
|
/// For more information, check the [`dirs` documentation](https://docs.rs/dirs/).
|
||||||
#[derive(Serialize_repr, Deserialize_repr, Clone, Copy, Debug)]
|
#[derive(Serialize_repr, Deserialize_repr, Clone, Copy, Debug)]
|
||||||
#[repr(u16)]
|
#[repr(u16)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
|
@ -30,7 +30,7 @@ walkdir = "2"
|
|||||||
handlebars = "5.1"
|
handlebars = "5.1"
|
||||||
tempfile = "3.10.1"
|
tempfile = "3.10.1"
|
||||||
log = { version = "0.4.21", features = [ "kv" ] }
|
log = { version = "0.4.21", features = [ "kv" ] }
|
||||||
dirs-next = "2.0"
|
dirs = "5"
|
||||||
os_pipe = "1"
|
os_pipe = "1"
|
||||||
ureq = { version = "2.9.6", default-features = false, features = [ "socks-proxy" ] }
|
ureq = { version = "2.9.6", default-features = false, features = [ "socks-proxy" ] }
|
||||||
native-tls = { version = "0.2", optional = true }
|
native-tls = { version = "0.2", optional = true }
|
||||||
|
@ -60,7 +60,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
|
|||||||
sh_map.insert("app_name", settings.product_name());
|
sh_map.insert("app_name", settings.product_name());
|
||||||
sh_map.insert("app_name_uppercase", &upcase_app_name);
|
sh_map.insert("app_name_uppercase", &upcase_app_name);
|
||||||
sh_map.insert("appimage_filename", &appimage_filename);
|
sh_map.insert("appimage_filename", &appimage_filename);
|
||||||
let tauri_tools_path = dirs_next::cache_dir().map_or_else(
|
let tauri_tools_path = dirs::cache_dir().map_or_else(
|
||||||
|| output_path.to_path_buf(),
|
|| output_path.to_path_buf(),
|
||||||
|mut p| {
|
|mut p| {
|
||||||
p.push("tauri");
|
p.push("tauri");
|
||||||
|
@ -407,7 +407,7 @@ fn copy_frameworks_to_bundle(
|
|||||||
framework
|
framework
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
if let Some(home_dir) = dirs_next::home_dir() {
|
if let Some(home_dir) = dirs::home_dir() {
|
||||||
if copy_framework_from(&dest_dir, framework, &home_dir.join("Library/Frameworks/"))? {
|
if copy_framework_from(&dest_dir, framework, &home_dir.join("Library/Frameworks/"))? {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ pub fn notarize_auth() -> Result<NotarizeAuth, NotarizeAuthError> {
|
|||||||
let mut key_path = None;
|
let mut key_path = None;
|
||||||
|
|
||||||
let mut search_paths = vec!["./private_keys".into()];
|
let mut search_paths = vec!["./private_keys".into()];
|
||||||
if let Some(home_dir) = dirs_next::home_dir() {
|
if let Some(home_dir) = dirs::home_dir() {
|
||||||
search_paths.push(home_dir.join("private_keys"));
|
search_paths.push(home_dir.join("private_keys"));
|
||||||
search_paths.push(home_dir.join(".private_keys"));
|
search_paths.push(home_dir.join(".private_keys"));
|
||||||
search_paths.push(home_dir.join(".appstoreconnect").join("private_keys"));
|
search_paths.push(home_dir.join(".appstoreconnect").join("private_keys"));
|
||||||
|
@ -25,7 +25,7 @@ const WIX_REQUIRED_FILES: &[&str] = &[
|
|||||||
/// Runs all of the commands to build the MSI installer.
|
/// Runs all of the commands to build the MSI installer.
|
||||||
/// Returns a vector of PathBuf that shows where the MSI was created.
|
/// Returns a vector of PathBuf that shows where the MSI was created.
|
||||||
pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
|
pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
|
||||||
let mut wix_path = dirs_next::cache_dir().unwrap();
|
let mut wix_path = dirs::cache_dir().unwrap();
|
||||||
wix_path.push("tauri/WixTools");
|
wix_path.push("tauri/WixTools");
|
||||||
|
|
||||||
if !wix_path.exists() {
|
if !wix_path.exists() {
|
||||||
|
@ -63,7 +63,7 @@ const NSIS_REQUIRED_FILES_HASH: &[(&str, &str, &str, HashAlgorithm)] = &[(
|
|||||||
/// Runs all of the commands to build the NSIS installer.
|
/// Runs all of the commands to build the NSIS installer.
|
||||||
/// Returns a vector of PathBuf that shows where the NSIS installer was created.
|
/// Returns a vector of PathBuf that shows where the NSIS installer was created.
|
||||||
pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
|
pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
|
||||||
let tauri_tools_path = dirs_next::cache_dir().unwrap().join("tauri");
|
let tauri_tools_path = dirs::cache_dir().unwrap().join("tauri");
|
||||||
let nsis_toolset_path = tauri_tools_path.join("NSIS");
|
let nsis_toolset_path = tauri_tools_path.join("NSIS");
|
||||||
|
|
||||||
if !nsis_toolset_path.exists() {
|
if !nsis_toolset_path.exists() {
|
||||||
@ -176,7 +176,7 @@ fn build_nsis_app_installer(
|
|||||||
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
{
|
{
|
||||||
let mut dir = dirs_next::cache_dir().unwrap();
|
let mut dir = dirs::cache_dir().unwrap();
|
||||||
dir.extend(["tauri", "NSIS", "Plugins", "x86-unicode"]);
|
dir.extend(["tauri", "NSIS", "Plugins", "x86-unicode"]);
|
||||||
data.insert("additional_plugins_path", to_json(dir));
|
data.insert("additional_plugins_path", to_json(dir));
|
||||||
}
|
}
|
||||||
|
26
tooling/cli/Cargo.lock
generated
26
tooling/cli/Cargo.lock
generated
@ -1102,24 +1102,24 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs-next"
|
name = "dirs"
|
||||||
version = "2.0.0"
|
version = "5.0.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1"
|
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"dirs-sys",
|
||||||
"dirs-sys-next",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dirs-sys-next"
|
name = "dirs-sys"
|
||||||
version = "0.1.2"
|
version = "0.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
|
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
|
"option-ext",
|
||||||
"redox_users",
|
"redox_users",
|
||||||
"winapi",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3127,6 +3127,12 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "option-ext"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ordered-float"
|
name = "ordered-float"
|
||||||
version = "2.10.1"
|
version = "2.10.1"
|
||||||
@ -4844,7 +4850,7 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"ar",
|
"ar",
|
||||||
"bitness",
|
"bitness",
|
||||||
"dirs-next",
|
"dirs",
|
||||||
"dunce",
|
"dunce",
|
||||||
"flate2",
|
"flate2",
|
||||||
"glob",
|
"glob",
|
||||||
|
Loading…
Reference in New Issue
Block a user